Class: OBJ.Mesh

OBJ.OBJ.Mesh(objectData, name)

new OBJ.Mesh(objectData, name)

The main Mesh class. The constructor will parse through the OBJ file data and collect the vertex, vertex normal, texture, and face information. This information can then be used later on when creating your VBOs. See OBJ.initMeshBuffers for an example of how to use the newly created Mesh.
Parameters:
Name Type Description
objectData String A string representation of an OBJ file with newlines preserved
name Name of the loaded OBJ file
Source:

Members

indices :Array

Array contains the indices of the faces.
Type:
  • Array
Source:

name :String

Name of the Mesh.
Type:
  • String
Source:

textures :Array

Array contains the Texture Coordinates.
Type:
  • Array
Source:

vertexNormals :Array

Array contains the Vertex Normals.
Type:
  • Array
Source:

vertices :Array

Array contains Vertex Position Coordinates (does not include w).
Type:
  • Array
Source: