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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
collideWith
(Collidable other, CollisionResults results) Generate collision results for this triangle with another Collidable.abstract Vector3f
get1()
Determine the location of the first vertex.abstract Vector3f
get2()
Determine the location of the 2nd vertex.abstract Vector3f
get3()
Determine the location of the 3rd vertex.abstract void
Alter all 3 vertex locations.
-
Constructor Details
-
AbstractTriangle
public AbstractTriangle()
-
-
Method Details
-
get1
Determine the location of the first vertex.- Returns:
- a location vector
-
get2
Determine the location of the 2nd vertex.- Returns:
- a location vector
-
get3
Determine the location of the 3rd vertex.- Returns:
- a location vector
-
set
Alter all 3 vertex locations.- Parameters:
v1
- the location for the first vertexv2
- the location for the 2nd vertexv3
- the location for the 3rd vertex
-
collideWith
Generate collision results for this triangle with another Collidable.- Specified by:
collideWith
in interfaceCollidable
- Parameters:
other
- the other Collidableresults
- storage for collision results- Returns:
- the number of collisions found
-