Package com.marginallyclever.ro3.mesh
Interface VertexProvider
public interface VertexProvider
VertexProvider
is an interface for providing vertices and normals to a Mesh
. Historically
this has only been used for Ray
intersections.
-
Method Summary
Modifier and TypeMethodDescriptionint
javax.vecmath.Vector3d
provideNormal
(int index) Provides a new instance of a normal at the given index.javax.vecmath.Point2d
provideTextureCoordinate
(int index) Provides a new instance of a Point2d for the texture coordinate.javax.vecmath.Point3d
provideVertex
(int index) Provides a new instance of a vertex at the given index.
-
Method Details
-
provideCount
int provideCount()- Returns:
- the number of vertexes and normals available. This should be number of triangles * 3.
-
provideVertex
javax.vecmath.Point3d provideVertex(int index) Provides a new instance of a vertex at the given index.- Parameters:
index
- the index of the vertex to provide- Returns:
- the vertex at the given index
-
provideNormal
javax.vecmath.Vector3d provideNormal(int index) Provides a new instance of a normal at the given index.- Parameters:
index
- the index of the vertex to provide- Returns:
- the vertex at the given index
-
provideTextureCoordinate
javax.vecmath.Point2d provideTextureCoordinate(int index) Provides a new instance of a Point2d for the texture coordinate.
-