Gets the total number of faces in the model.
This is the total of the index count across all segments
This is mostly used when you need raw verts for physics simulation
Gets an array of PVectors that make up the position co-ordinates of the face.
This method needs one int that must be between 0 and the getTotalFaceCount()
This is mostly used when you need raw verts for physics simulation
Personally I wouldn't do this during draw.
Class Constructor, loads the file from the data directory.
use String "relative" to search the data folder for the mtl and textures
use "absolute" to load the files from the specific path
A Debug method that prints information about the loaded model
This method only prints information if the debugMode is true.
V Size = The number of vertex positions
Vt Size = The number of UV positions
Vn Size = The number of normals
G Size = the number of Groups in the model
S Size = the number of segments in the model, this should directly
equate to the number of unique materials in the mtl file
Clears all Vectors ready for loading in a new model.
Doing something like this
OBJModel model = new OBJModel(this, "myobj.obj");
// do something with model
model.clear();
model.load("myobj.obj");
is vastly better for memory use than doing something like this
OBJModel model = new OBJModel(this, "myobj.obj");
// do something with model
model = new OBJModel(this, "myOtherObj.obj");
The second example is really bad because the original model is
still in memory but nothing is pointing to it.
We would have to wait for the Garbage Collector to do the clean up
before freeing the memory.
Sets an override texture for the drawing of the model.
Any PImage supplied will be used over all model segments
NOTE: This method is identical to texture(), It has the better syntax.