com.bulletphysics.collision.shapes
Class TriangleShape
java.lang.Object
com.bulletphysics.collision.shapes.CollisionShape
com.bulletphysics.collision.shapes.ConvexShape
com.bulletphysics.collision.shapes.ConvexInternalShape
com.bulletphysics.collision.shapes.PolyhedralConvexShape
com.bulletphysics.collision.shapes.TriangleShape
- Direct Known Subclasses:
- TriangleShapeEx
public class TriangleShape
- extends PolyhedralConvexShape
Single triangle shape.
Method Summary |
void |
batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors,
Vector3f[] supportVerticesOut,
int numVectors)
|
void |
calcNormal(Vector3f normal)
|
void |
calculateLocalInertia(float mass,
Vector3f inertia)
|
void |
getAabb(Transform t,
Vector3f aabbMin,
Vector3f aabbMax)
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version. |
void |
getEdge(int i,
Vector3f pa,
Vector3f pb)
|
String |
getName()
|
int |
getNumEdges()
|
int |
getNumPlanes()
|
int |
getNumPreferredPenetrationDirections()
|
int |
getNumVertices()
|
void |
getPlane(Vector3f planeNormal,
Vector3f planeSupport,
int i)
|
void |
getPlaneEquation(int i,
Vector3f planeNormal,
Vector3f planeSupport)
|
void |
getPreferredPenetrationDirection(int index,
Vector3f penetrationVector)
|
BroadphaseNativeType |
getShapeType()
|
void |
getVertex(int index,
Vector3f vert)
|
Vector3f |
getVertexPtr(int index)
|
void |
init(Vector3f p0,
Vector3f p1,
Vector3f p2)
|
boolean |
isInside(Vector3f pt,
float tolerance)
|
Vector3f |
localGetSupportingVertexWithoutMargin(Vector3f dir,
Vector3f out)
|
vertices1
public final Vector3f[] vertices1
TriangleShape
public TriangleShape()
TriangleShape
public TriangleShape(Vector3f p0,
Vector3f p1,
Vector3f p2)
init
public void init(Vector3f p0,
Vector3f p1,
Vector3f p2)
getNumVertices
public int getNumVertices()
- Specified by:
getNumVertices
in class PolyhedralConvexShape
getVertexPtr
public Vector3f getVertexPtr(int index)
getVertex
public void getVertex(int index,
Vector3f vert)
- Specified by:
getVertex
in class PolyhedralConvexShape
getShapeType
public BroadphaseNativeType getShapeType()
- Specified by:
getShapeType
in class CollisionShape
getNumEdges
public int getNumEdges()
- Specified by:
getNumEdges
in class PolyhedralConvexShape
getEdge
public void getEdge(int i,
Vector3f pa,
Vector3f pb)
- Specified by:
getEdge
in class PolyhedralConvexShape
getAabb
public void getAabb(Transform t,
Vector3f aabbMin,
Vector3f aabbMax)
- Description copied from class:
ConvexInternalShape
- getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version.
- Overrides:
getAabb
in class PolyhedralConvexShape
localGetSupportingVertexWithoutMargin
public Vector3f localGetSupportingVertexWithoutMargin(Vector3f dir,
Vector3f out)
- Overrides:
localGetSupportingVertexWithoutMargin
in class PolyhedralConvexShape
batchedUnitVectorGetSupportingVertexWithoutMargin
public void batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors,
Vector3f[] supportVerticesOut,
int numVectors)
- Overrides:
batchedUnitVectorGetSupportingVertexWithoutMargin
in class PolyhedralConvexShape
getPlane
public void getPlane(Vector3f planeNormal,
Vector3f planeSupport,
int i)
- Specified by:
getPlane
in class PolyhedralConvexShape
getNumPlanes
public int getNumPlanes()
- Specified by:
getNumPlanes
in class PolyhedralConvexShape
calcNormal
public void calcNormal(Vector3f normal)
getPlaneEquation
public void getPlaneEquation(int i,
Vector3f planeNormal,
Vector3f planeSupport)
calculateLocalInertia
public void calculateLocalInertia(float mass,
Vector3f inertia)
- Overrides:
calculateLocalInertia
in class PolyhedralConvexShape
isInside
public boolean isInside(Vector3f pt,
float tolerance)
- Specified by:
isInside
in class PolyhedralConvexShape
getName
public String getName()
- Specified by:
getName
in class CollisionShape
getNumPreferredPenetrationDirections
public int getNumPreferredPenetrationDirections()
- Overrides:
getNumPreferredPenetrationDirections
in class ConvexInternalShape
getPreferredPenetrationDirection
public void getPreferredPenetrationDirection(int index,
Vector3f penetrationVector)
- Overrides:
getPreferredPenetrationDirection
in class ConvexInternalShape