A B C D E F G I K L M N O P R S T U V

A

ABSOLUTE - Static variable in class saito.objloader.OBJModel
 

B

beginDrawGL(GL, boolean, boolean) - Method in class saito.objloader.Material
 
beginDrawGL(GL) - Method in class saito.objloader.Segment
 
BoundingBox - Class in saito.objloader
 
BoundingBox(PApplet, OBJModel) - Constructor for class saito.objloader.BoundingBox
 

C

clampUV() - Method in class saito.objloader.OBJModel
Helper function to clamp the UV's so they sit within 0-1.
compareTo(Object) - Method in class saito.objloader.Face
 

D

d - Variable in class saito.objloader.Material
 
dataFB - Variable in class saito.objloader.Segment
 
Debug - Class in saito.objloader
 
Debug(PApplet) - Constructor for class saito.objloader.Debug
 
debug - Variable in class saito.objloader.OBJModel
 
disableDebug() - Method in class saito.objloader.OBJModel
 
disableMaterial() - Method in class saito.objloader.OBJModel
Disables the material completely.

With this on you can set the appearance of the model in processing before calling model.draw();



background(32);

stroke(255);

noFill();

model.draw();

disableTexture() - Method in class saito.objloader.OBJModel
Turns off the use of the textures in mtl file.
draw() - Method in class saito.objloader.BoundingBox
 
draw() - Method in class saito.objloader.OBJModel
The draw method of the OBJModel.

This method used the standard Processing system of beginShape, endShape to draw the model.

drawGL() - Method in class saito.objloader.OBJModel
Draws the obj model using the Vertex Buffers that were made in the setupOPENGL method

NOTE: this method is on the way out.
drawGL(GL, int) - Method in class saito.objloader.Segment
 

E

enabled - Variable in class saito.objloader.Debug
 
enableDebug() - Method in class saito.objloader.OBJModel
Enables the debug mode.

Prints version and contact information to the console.

enableMaterial() - Method in class saito.objloader.OBJModel
Turns on the use of the material that came from the mtl file

enableTexture() - Method in class saito.objloader.OBJModel
Turns on the use of textures that are listed in the mtl file

endDrawGL(GL, boolean, boolean) - Method in class saito.objloader.Material
 
endDrawGL(GL) - Method in class saito.objloader.Segment
 

F

Face - Class in saito.objloader
 
Face() - Constructor for class saito.objloader.Face
Constructor for the Face.
faces - Variable in class saito.objloader.Segment
 
FaceXComparator - Static variable in class saito.objloader.Face
 
FaceYComparator - Static variable in class saito.objloader.Face
 
FaceZComparator - Static variable in class saito.objloader.Face
 

G

getCenter() - Method in class saito.objloader.BoundingBox
 
getCenter() - Method in class saito.objloader.Face
Get's the center position of the face.
getDrawMode() - Method in class saito.objloader.OBJModel
Gets the drawmode
getFace(int) - Method in class saito.objloader.Segment
 
getFaceCount() - Method in class saito.objloader.OBJModel
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

getFaceCount() - Method in class saito.objloader.Segment
 
getFaceInSegment(int, int) - Method in class saito.objloader.OBJModel
 
getFaces() - Method in class saito.objloader.Segment
 
getFaceVertices(int) - Method in class saito.objloader.OBJModel
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.
getFacingAmount(PVector) - Method in class saito.objloader.Face
Returns a float value from 0 - 1.
getGroup(String) - Method in class saito.objloader.OBJModel
Returns the group via name

Until I find a practical use for Groups this feature isn't going anywhere.
getGroupCount() - Method in class saito.objloader.OBJModel
Gets the size of the Groups from the obj Model.
getIndexCount() - Method in class saito.objloader.Segment
 
getIndexCountInSegment(int) - Method in class saito.objloader.OBJModel
Gets the number of Indexes in the Segment.
getIndices() - Method in class saito.objloader.Segment
 
getMaterialName() - Method in class saito.objloader.Segment
 
getMax() - Method in class saito.objloader.BoundingBox
 
getMin() - Method in class saito.objloader.BoundingBox
 
getName() - Method in class saito.objloader.Group
 
getNormal() - Method in class saito.objloader.Face
Returns the face normal.
getNormal(int) - Method in class saito.objloader.OBJModel
Returns a reference to a numbered Normal.
getNormalCount() - Method in class saito.objloader.Face
 
getNormalCount() - Method in class saito.objloader.OBJModel
Get's the total number of Normals in the model.
getNormalIndex(int) - Method in class saito.objloader.Face
 
getNormalIndices() - Method in class saito.objloader.Face
 
getNormalIndicesInSegment(int, int) - Method in class saito.objloader.OBJModel
Returns an array of ints.
getNormals() - Method in class saito.objloader.Face
Returns an array of normals that make up this face
getNormIndexCount() - Method in class saito.objloader.Face
 
getSegment(int) - Method in class saito.objloader.OBJModel
 
getSegmentCount() - Method in class saito.objloader.OBJModel
Gets the number of segments in the model.

A segment is a unique material and an array of indexes into the vert, norm and uv Vectors

getTextureIndex(int) - Method in class saito.objloader.Face
 
getTextureIndices() - Method in class saito.objloader.Face
 
getTextureIndicesInSegment(int, int) - Method in class saito.objloader.OBJModel
Returns an array of ints.
getTexturePathMode() - Method in class saito.objloader.OBJModel
Should return "relative" or "absolute"
getUV(int) - Method in class saito.objloader.OBJModel
Returns a reference to a numbered Textured Coordinate.
getUVCount() - Method in class saito.objloader.Face
 
getUVCount() - Method in class saito.objloader.OBJModel
Get's the total number of UVs in the model.
getUVIndexCount() - Method in class saito.objloader.Face
 
getUvs() - Method in class saito.objloader.Face
Returns an array of uvs that make up this face
getVertex(int) - Method in class saito.objloader.OBJModel
Returns a reference to a numbered Vertex.
getVertexCount() - Method in class saito.objloader.Face
 
getVertexCount() - Method in class saito.objloader.OBJModel
Get's the total number of Verts in the model.
getVertexIndex(int) - Method in class saito.objloader.Face
 
getVertexIndices() - Method in class saito.objloader.Face
 
getVertexIndicesInSegment(int, int) - Method in class saito.objloader.OBJModel
Returns an array of ints.
getVertices() - Method in class saito.objloader.Face
Returns an array of PVectors that make up this face
getVertIndexCount() - Method in class saito.objloader.Face
 
getWHD() - Method in class saito.objloader.BoundingBox
 
Group - Class in saito.objloader
 
Group(String) - Constructor for class saito.objloader.Group
 
groupName - Variable in class saito.objloader.Group
 

I

indexIB - Variable in class saito.objloader.Segment
 
indexType - Variable in class saito.objloader.Face
 
isFacingPosition(PVector) - Method in class saito.objloader.Face
Used for knowing if a face is pointing in the direction of the supplied PVector.

K

Ka - Variable in class saito.objloader.Material
 
Kd - Variable in class saito.objloader.Material
 
Ks - Variable in class saito.objloader.Material
 

L

load(String) - Method in class saito.objloader.OBJModel
The manual load method for obj files.

M

map_Kd - Variable in class saito.objloader.Material
 
mapUVToZeroOne() - Method in class saito.objloader.OBJModel
Helper function to scale the UV's so they sit within 0-1.
Material - Class in saito.objloader
 
Material() - Constructor for class saito.objloader.Material
Constructs a default Material object.
materialName - Variable in class saito.objloader.Segment
 
mtlName - Variable in class saito.objloader.Material
 

N

normalIndices - Variable in class saito.objloader.Face
 
normals - Variable in class saito.objloader.Face
 

O

OBJModel - Class in saito.objloader
 
OBJModel(PApplet) - Constructor for class saito.objloader.OBJModel
Class Constructor to setup an empty obj model
OBJModel(PApplet, String) - Constructor for class saito.objloader.OBJModel
Class Constructor, loads the file from the data directory
OBJModel(PApplet, String, int) - Constructor for class saito.objloader.OBJModel
Class Constructor, loads the string as an obj from the data directory.
OBJModel(PApplet, String, String) - Constructor for class saito.objloader.OBJModel
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
OBJModel(PApplet, String, String, int) - Constructor for class saito.objloader.OBJModel
Class Constructor, loads the string as an obj from the data directory.
originalTexture() - Method in class saito.objloader.OBJModel
Sets the override texture back to null.

P

print(String) - Method in class saito.objloader.Debug
 
println(String) - Method in class saito.objloader.Debug
 
println(int) - Method in class saito.objloader.Debug
 
println(int[]) - Method in class saito.objloader.Debug
 
println(float[]) - Method in class saito.objloader.Debug
 
println(PVector) - Method in class saito.objloader.Debug
 
printModelInfo() - Method in class saito.objloader.OBJModel
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


R

RELATIVE - Static variable in class saito.objloader.OBJModel
 
reset() - Method in class saito.objloader.OBJModel
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.

S

saito.objloader - package saito.objloader
 
scale(float) - Method in class saito.objloader.OBJModel
Scales the vertex positions of the model.
scale(float, float, float) - Method in class saito.objloader.OBJModel
Scales the vertex positions of the model.
Segment - Class in saito.objloader
 
Segment() - Constructor for class saito.objloader.Segment
Constructor for the ModelSegment, each Segment holds a Vector of Elements.
segments - Variable in class saito.objloader.Group
 
setDrawMode(int) - Method in class saito.objloader.OBJModel
Sets the draw mode of the shape drawing
setNormal(int, PVector) - Method in class saito.objloader.OBJModel
Sets the Normal at index i to the PVector supplied
setTexture(PImage) - Method in class saito.objloader.OBJModel
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.
setTexturePathMode(String) - Method in class saito.objloader.OBJModel
Use "relative" or "absolute" to set the texture load method
setupGL(GL, Debug) - Method in class saito.objloader.Material
Sets up the OPENGL material as a series of float and int buffers
setupGL() - Method in class saito.objloader.OBJModel
Called after loading the obj model.
setupGL(GL, Debug, PVector[], PVector[], PVector[]) - Method in class saito.objloader.Segment
 
setUV(int, PVector) - Method in class saito.objloader.OBJModel
Sets the UV at index i to the PVector supplied
setVertex(int, PVector) - Method in class saito.objloader.OBJModel
Sets the vert at index i to the PVector supplied
setVertex(int, float, float, float) - Method in class saito.objloader.OBJModel
Sets the vert at index i to the x,y,z values supplied
shapeMode(int) - Method in class saito.objloader.OBJModel
Set's the beginShape mode for drawing the model.
sortFacesByX() - Method in class saito.objloader.Segment
 
sortFacesByY() - Method in class saito.objloader.Segment
 
sortFacesByZ() - Method in class saito.objloader.Segment
 

T

texture(PImage) - Method in class saito.objloader.OBJModel
Sets an override texture for the drawing of the model.

Any PImage supplied will be used over all model segments

translate(PVector) - Method in class saito.objloader.OBJModel
Translates all the verts by the PVector amount
translateToCenter() - Method in class saito.objloader.OBJModel
Helper function to move the origin point of the model to the center of the objects BoundingBox

U

uvIndices - Variable in class saito.objloader.Face
 
uvs - Variable in class saito.objloader.Face
 

V

vertexIndices - Variable in class saito.objloader.Face
 
vertices - Variable in class saito.objloader.Face
 

A B C D E F G I K L M N O P R S T U V

processing library OBJLoader by Saito, Matt Ditton, Ekene Ijeoma. (c) 2010