Package com.jme3.math
Class AbstractTriangle
java.lang.Object
com.jme3.math.AbstractTriangle
- All Implemented Interfaces:
- Collidable
- Direct Known Subclasses:
- Triangle
A Collidable with a triangular shape.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintcollideWith(Collidable other, CollisionResults results) Generate collision results for this triangle with another Collidable.abstract Vector3fget1()Determine the location of the first vertex.abstract Vector3fget2()Determine the location of the 2nd vertex.abstract Vector3fget3()Determine the location of the 3rd vertex.abstract voidAlter all 3 vertex locations.toString()Returns a string representation of the triangle, which is unaffected.
- 
Constructor Details- 
AbstractTrianglepublic AbstractTriangle()
 
- 
- 
Method Details- 
get1Determine the location of the first vertex.- Returns:
- a location vector
 
- 
get2Determine the location of the 2nd vertex.- Returns:
- a location vector
 
- 
get3Determine the location of the 3rd vertex.- Returns:
- a location vector
 
- 
setAlter all 3 vertex locations.- Parameters:
- v1- the location for the first vertex
- v2- the location for the 2nd vertex
- v3- the location for the 3rd vertex
 
- 
collideWithGenerate collision results for this triangle with another Collidable.- Specified by:
- collideWithin interface- Collidable
- Parameters:
- other- the other Collidable
- results- storage for collision results
- Returns:
- the number of collisions found
 
- 
toStringReturns a string representation of the triangle, which is unaffected. For example, aTrianglejoining (1,0,0) and (0,1,0) with (0,0,1) is represented by:Triangle [V1: (1.0, 0.0, 0.0) V2: (0.0, 1.0, 0.0) V3: (0.0, 0.0, 1.0)] 
 
-