org.xith3d.utility.geometry
Class TangentsFactory
java.lang.Object
org.xith3d.utility.geometry.TangentsFactory
public class TangentsFactory
- extends java.lang.Object
The TangentsFactory generates tanget data (tangents and bitangents)
for arbitrary meshes.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final TangentsFactory INSTANCE
TangentsFactory
protected TangentsFactory()
getInstance
public static TangentsFactory getInstance()
calculateTangents
public void calculateTangents(Geometry geom,
TangentsFactory.TangentsStoreMode storeMode,
int storeIndex1,
int storeIndex2,
org.openmali.vecmath2.Vector3f[] tangents,
org.openmali.vecmath2.Vector3f[] bitangents)
- Calculates the tangents and bitangents for the given GeomContainer.
The GeometryArray must have at least three texture units where the first one (0) must be filled.
It also has to have normals.
If both of the two array parameters are null,
the tanget data is directly applied to the 2nd and 3rd (1, 2) texture units.
- Parameters:
geom - storeMode - use null to only store in the arrays (index1 and index2 are ignored then)storeIndex1 - storeIndex2 - tangents - bitangents -
calculateTangents
public void calculateTangents(Geometry geom,
TangentsFactory.TangentsStoreMode storeMode,
int storeIndex1,
int storeIndex2)
- Calculates the tangents and bitangents for the given GeomContainer.
The GeometryArray must have at least three texture units where the first one (0) must be filled.
It also has to have normals.
- Parameters:
geom - storeMode - storeIndex1 - storeIndex2 -