@EqualityReference public final class RMeshBasic extends Object
The type of basic mutable meshes.
Basic meshes have vertices (of type RMeshBasicVertex
that have
positions, normals, and UV coordinates.
Modifier and Type | Method and Description |
---|---|
String |
getName() |
static RMeshBasic |
newMesh(String name)
Construct a new empty mesh with the given name.
|
int |
normalAdd(com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> normal)
Add a new normal vector.
|
List<com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType>> |
normalsGet() |
int |
positionAdd(com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> position)
Add a new position vector.
|
List<com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType>> |
positionsGet() |
int |
triangleAdd(int v0,
int v1,
int v2)
Add a new triangle consisting of the given vertices.
|
List<RMeshTriangle> |
trianglesGet() |
int |
uvAdd(com.io7m.jtensors.parameterized.PVectorI2F<RSpaceTextureType> uv)
Add a new UV coordinate vector.
|
List<com.io7m.jtensors.parameterized.PVectorI2F<RSpaceTextureType>> |
uvsGet() |
int |
vertexAdd(int position,
int normal,
int uv)
Add a new vertex consisting of the given indices.
|
List<RMeshBasicVertex> |
verticesGet() |
public static RMeshBasic newMesh(String name) throws RExceptionMeshNameInvalid
name
- The name.RExceptionMeshNameInvalid
- If the mesh name is not valid.RMeshNames
public String getName()
public int normalAdd(com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> normal)
normal
- The normal vector.public List<com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType>> normalsGet()
public int positionAdd(com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> position)
position
- The position vector.public List<com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType>> positionsGet()
public int triangleAdd(int v0, int v1, int v2)
v0
- The index of the first vertex.v1
- The index of the second vertex.v2
- The index of the third vertex.public List<RMeshTriangle> trianglesGet()
public int uvAdd(com.io7m.jtensors.parameterized.PVectorI2F<RSpaceTextureType> uv)
uv
- The UV coordinate vector.public List<com.io7m.jtensors.parameterized.PVectorI2F<RSpaceTextureType>> uvsGet()
public int vertexAdd(int position, int normal, int uv)
position
- The index of the position vector.normal
- The index of the normal vector.uv
- The index of the UV coordinate vector.public List<RMeshBasicVertex> verticesGet()
Copyright © 2015 <code@io7m.com> http://io7m.com