com.bulletphysics.collision.shapes
Class PolyhedralConvexShape

java.lang.Object
  extended by com.bulletphysics.collision.shapes.CollisionShape
      extended by com.bulletphysics.collision.shapes.ConvexShape
          extended by com.bulletphysics.collision.shapes.ConvexInternalShape
              extended by com.bulletphysics.collision.shapes.PolyhedralConvexShape
Direct Known Subclasses:
BoxShape, BU_Simplex1to4, ConvexHullShape, TriangleShape

public abstract class PolyhedralConvexShape
extends ConvexInternalShape

PolyhedralConvexShape is an internal interface class for polyhedral convex shapes.


Field Summary
 
Fields inherited from class com.bulletphysics.collision.shapes.ConvexShape
MAX_PREFERRED_PENETRATION_DIRECTIONS
 
Constructor Summary
PolyhedralConvexShape()
           
 
Method Summary
 void batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors, Vector3f[] supportVerticesOut, int numVectors)
           
 void calculateLocalInertia(float mass, Vector3f inertia)
           
 void getAabb(Transform trans, Vector3f aabbMin, Vector3f aabbMax)
          getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version.
abstract  void getEdge(int i, Vector3f pa, Vector3f pb)
           
abstract  int getNumEdges()
           
abstract  int getNumPlanes()
           
abstract  int getNumVertices()
           
abstract  void getPlane(Vector3f planeNormal, Vector3f planeSupport, int i)
           
abstract  void getVertex(int i, Vector3f vtx)
           
abstract  boolean isInside(Vector3f pt, float tolerance)
           
 Vector3f localGetSupportingVertexWithoutMargin(Vector3f vec0, Vector3f out)
           
 void recalcLocalAabb()
           
 void setLocalScaling(Vector3f scaling)
           
 
Methods inherited from class com.bulletphysics.collision.shapes.ConvexInternalShape
getAabbSlow, getLocalScaling, getMargin, getNumPreferredPenetrationDirections, getPreferredPenetrationDirection, localGetSupportingVertex, setMargin
 
Methods inherited from class com.bulletphysics.collision.shapes.CollisionShape
calculateTemporalAabb, getAngularMotionDisc, getBoundingSphere, getName, getShapeType, getUserPointer, isCompound, isConcave, isConvex, isInfinite, isPolyhedral, setUserPointer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolyhedralConvexShape

public PolyhedralConvexShape()
Method Detail

localGetSupportingVertexWithoutMargin

public Vector3f localGetSupportingVertexWithoutMargin(Vector3f vec0,
                                                      Vector3f out)
Specified by:
localGetSupportingVertexWithoutMargin in class ConvexShape

batchedUnitVectorGetSupportingVertexWithoutMargin

public void batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors,
                                                              Vector3f[] supportVerticesOut,
                                                              int numVectors)
Specified by:
batchedUnitVectorGetSupportingVertexWithoutMargin in class ConvexShape

calculateLocalInertia

public void calculateLocalInertia(float mass,
                                  Vector3f inertia)
Specified by:
calculateLocalInertia in class CollisionShape

getAabb

public void getAabb(Transform trans,
                    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 ConvexInternalShape

recalcLocalAabb

public void recalcLocalAabb()

setLocalScaling

public void setLocalScaling(Vector3f scaling)
Overrides:
setLocalScaling in class ConvexInternalShape

getNumVertices

public abstract int getNumVertices()

getNumEdges

public abstract int getNumEdges()

getEdge

public abstract void getEdge(int i,
                             Vector3f pa,
                             Vector3f pb)

getVertex

public abstract void getVertex(int i,
                               Vector3f vtx)

getNumPlanes

public abstract int getNumPlanes()

getPlane

public abstract void getPlane(Vector3f planeNormal,
                              Vector3f planeSupport,
                              int i)

isInside

public abstract boolean isInside(Vector3f pt,
                                 float tolerance)