|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.ucm.look.ar.ar3D.parser.MeshObjParser
public class MeshObjParser
A parser for *.obj 3D files. It supports vertices, faces, normals and textures. It does NOT support materials
Constructor Summary | |
---|---|
MeshObjParser()
|
Method Summary | |
---|---|
Point3 |
getCenter()
Returns the center point for the mesh |
short[] |
getFaceIndeces()
Returns the faces array, in the form { f1.v1, f1.v2, f1.v3, f2.v1, f2.v2, f2.v3... } and so on |
java.lang.String |
getName()
Returns mesh name |
float[] |
getNormals()
Returns the normals array, in the form { n1.x, n1.y, n1.z, n2.x, n2.y, ... } and so on |
float |
getRadius()
Returns the radius of the sphere that, with its center in getCenter() , contains all the mesh |
float[] |
getTextureCoords()
Returns the texture vertices array, in the form { t1.x, t1.y, t2.x, t2.y, ... } and so on |
float[] |
getVertices()
Returns the vertex array, in the form { v1.x, v1.y, v1.z, v2.x, v2.y, v2.z ... } and so on |
boolean |
parse(java.io.InputStream input)
Parse an *.obj file and fill vertex arrays, which can be accessed by getVertices() , getNormals() ,
etc |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MeshObjParser()
Method Detail |
---|
public Point3 getCenter()
public short[] getFaceIndeces()
public java.lang.String getName()
public float[] getNormals()
public float getRadius()
getCenter()
, contains all the mesh
public float[] getTextureCoords()
public float[] getVertices()
public boolean parse(java.io.InputStream input)
getVertices()
, getNormals()
,
etc
resources
- General resources from the appresourceId
- Resource id
true
if everything was OK
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |