com.md5importer.interfaces.model.mesh.primitive
Interface IVertex

All Superinterfaces:
com.jme.util.export.Savable
All Known Implementing Classes:
Vertex

public interface IVertex
extends com.jme.util.export.Savable

IVertex defines the interface of a single vertex in a mesh system. It maintains its own transformation based on the joints and weight that affects it.

IVertex maintains its texture coordinates, normal vector and position vector.


Method Summary
 IVertex clone(IWeight[] clonedWeights)
          Clone this vertex.
 int getIndex()
          Retrieve the index value of this vertex.
 com.jme.math.Vector3f getNormal()
          Retrieve the normal of this vertex.
 com.jme.math.Vector3f getPosition()
          Retrieve the position of this vertex.
 com.jme.math.Vector2f getTextureCoords()
          Retrieve the texture coordinates of this vertex.
 int getUsedTimes()
          Retrieve the number of times this vertex has been used.
 void incrementUsedTimes()
          Increment the number of times this vertex has been used by a triangle
 void processPosition()
          Process the vertex position.
 void resetInformation()
          Reset the normal and position information of this vertex.
 void setNormal(com.jme.math.Vector3f normal)
          Set the normal vector of this vertex.
 void setNormalReference(com.jme.math.Vector3f normal)
          Set this vertex to directly use the given reference as normal.
 void setTextureCoords(float u, float v)
          Set the texture coordinates of this vertex.
 void setWeights(IWeight... weights)
          Set weights that affects this vertex
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag, read, write
 

Method Detail

processPosition

void processPosition()
Process the vertex position.


resetInformation

void resetInformation()
Reset the normal and position information of this vertex.


incrementUsedTimes

void incrementUsedTimes()
Increment the number of times this vertex has been used by a triangle


setTextureCoords

void setTextureCoords(float u,
                      float v)
Set the texture coordinates of this vertex.

Parameters:
u - The u value.
v - The un-inverted v value.

setWeights

void setWeights(IWeight... weights)
Set weights that affects this vertex

Parameters:
weights - The variable argument of IWeight.

setNormal

void setNormal(com.jme.math.Vector3f normal)
Set the normal vector of this vertex.

Parameters:
normal - The normal Vector3f to be set.

setNormalReference

void setNormalReference(com.jme.math.Vector3f normal)
Set this vertex to directly use the given reference as normal.

Parameters:
normal - The Vector3f normal reference.

getTextureCoords

com.jme.math.Vector2f getTextureCoords()
Retrieve the texture coordinates of this vertex.

Returns:
The Vector2f texture coordinates.

getUsedTimes

int getUsedTimes()
Retrieve the number of times this vertex has been used.

Returns:
The Integer number of used times.

getPosition

com.jme.math.Vector3f getPosition()
Retrieve the position of this vertex.

Returns:
The Vector3f position.

getNormal

com.jme.math.Vector3f getNormal()
Retrieve the normal of this vertex.

Returns:
The normal Vector3f.

getIndex

int getIndex()
Retrieve the index value of this vertex.

Returns:
The Integer index.

clone

IVertex clone(IWeight[] clonedWeights)
Clone this vertex.

Returns:
The cloned copy of this Vertex