public class OBJFile extends Object
Modifier and Type | Class and Description |
---|---|
class |
OBJFile.IdxSet |
static class |
OBJFile.PrimType
Enumeration of primitive types
|
Modifier and Type | Field and Description |
---|---|
protected IntBuffer |
indices_ |
protected List<Integer> |
nIndex_ |
protected int |
nOffset_ |
protected List<Float> |
normals_ |
static int |
NumPrimTypes |
protected int |
openEdges_ |
protected List<Integer> |
pIndex_ |
protected int |
pOffset_ |
protected List<Float> |
positions_ |
protected int |
posSize_ |
protected FloatBuffer |
vertices_ |
protected int |
vtxSize_ |
Constructor and Description |
---|
OBJFile() |
Modifier and Type | Method and Description |
---|---|
void |
clearNormals() |
void |
compileModel()
This function takes the raw model data in the internal
structures, and attempts to bring it to a format directly
accepted for vertex array style rendering.
|
BoundingBox3d |
computeBoundingBox()
Returns the points defining the axis-aligned bounding box containing the model.
|
IntBuffer |
getCompiledIndices() |
int |
getCompiledNormalOffset() |
int |
getCompiledPositionOffset() |
int |
getCompiledVertexCount() |
int |
getCompiledVertexSize() |
FloatBuffer |
getCompiledVertices() |
int |
getIndexCount() |
int |
getNormalCount() |
List<Integer> |
getNormalIndices() |
List<Float> |
getNormals() |
int |
getNormalSize() |
int |
getOpenEdgeCount() |
int |
getPositionCount() |
List<Integer> |
getPositionIndices() |
List<Float> |
getPositions() |
int |
getPositionSize() |
boolean |
hasNormals() |
boolean |
loadModelFromFilename(String file) |
boolean |
loadModelFromURL(URL fileURL)
This function attempts to determine the type of the filename passed as a
parameter.
|
public static final int NumPrimTypes
protected int posSize_
protected IntBuffer indices_
protected FloatBuffer vertices_
protected int pOffset_
protected int nOffset_
protected int vtxSize_
protected int openEdges_
public boolean loadModelFromFilename(String file)
public boolean loadModelFromURL(URL fileURL)
public void compileModel()
public BoundingBox3d computeBoundingBox()
public void clearNormals()
public boolean hasNormals()
public int getPositionSize()
public int getNormalSize()
public int getPositionCount()
public int getNormalCount()
public int getIndexCount()
public FloatBuffer getCompiledVertices()
public IntBuffer getCompiledIndices()
public int getCompiledPositionOffset()
public int getCompiledNormalOffset()
public int getCompiledVertexSize()
public int getCompiledVertexCount()
public int getOpenEdgeCount()
Copyright © 2016. All rights reserved.