com.bulletphysics.extras.gimpact
Class GImpactMeshShape

java.lang.Object
  extended by com.bulletphysics.collision.shapes.CollisionShape
      extended by com.bulletphysics.collision.shapes.ConcaveShape
          extended by com.bulletphysics.extras.gimpact.GImpactShapeInterface
              extended by com.bulletphysics.extras.gimpact.GImpactMeshShape

public class GImpactMeshShape
extends GImpactShapeInterface


Constructor Summary
GImpactMeshShape(StridingMeshInterface meshInterface)
           
 
Method Summary
 void calculateLocalInertia(float mass, Vector3f inertia)
           
 void getBulletTriangle(int prim_index, TriangleShapeEx triangle)
           
 void getChildAabb(int child_index, Transform t, Vector3f aabbMin, Vector3f aabbMax)
          Retrieves the bound from a child.
 CollisionShape getChildShape(int index)
          Gets the children.
 Transform getChildTransform(int index)
          Gets the children transform.
 GImpactMeshShapePart getMeshPart(int index)
           
 int getMeshPartCount()
           
 String getName()
           
 int getNumChildShapes()
          Gets the number of children.
 boolean childrenHasTransform()
          If true, then its children must get transforms.
 void lockChildShapes()
          Call when reading child shapes.
 boolean needsRetrieveTetrahedrons()
          Determines if this shape has tetrahedrons.
 boolean needsRetrieveTriangles()
          Determines if this shape has triangles.
 void postUpdate()
          Tells to this object that is needed to refit the box set.
 void processAllTriangles(TriangleCallback callback, Vector3f aabbMin, Vector3f aabbMax)
          Function for retrieve triangles.
 void rayTest(Vector3f rayFrom, Vector3f rayTo, CollisionWorld.RayResultCallback resultCallback)
          Virtual method for ray collision.
 void setChildTransform(int index, Transform transform)
          Sets the children transform.
 void setLocalScaling(Vector3f scaling)
          You must call updateBound() for update the box set.
 void setMargin(float margin)
           
 void unlockChildShapes()
           
 
Methods inherited from class com.bulletphysics.extras.gimpact.GImpactShapeInterface
getAabb, getLocalBox, getLocalScaling, getShapeType, hasBoxSet, updateBound
 
Methods inherited from class com.bulletphysics.collision.shapes.ConcaveShape
getMargin
 
Methods inherited from class com.bulletphysics.collision.shapes.CollisionShape
calculateTemporalAabb, getAngularMotionDisc, getBoundingSphere, 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

GImpactMeshShape

public GImpactMeshShape(StridingMeshInterface meshInterface)
Method Detail

getMeshPartCount

public int getMeshPartCount()

getMeshPart

public GImpactMeshShapePart getMeshPart(int index)

setLocalScaling

public void setLocalScaling(Vector3f scaling)
Description copied from class: GImpactShapeInterface
You must call updateBound() for update the box set.

Overrides:
setLocalScaling in class GImpactShapeInterface

setMargin

public void setMargin(float margin)
Overrides:
setMargin in class GImpactShapeInterface

postUpdate

public void postUpdate()
Description copied from class: GImpactShapeInterface
Tells to this object that is needed to refit the box set.

Overrides:
postUpdate in class GImpactShapeInterface

calculateLocalInertia

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

getNumChildShapes

public int getNumChildShapes()
Description copied from class: GImpactShapeInterface
Gets the number of children.

Specified by:
getNumChildShapes in class GImpactShapeInterface

childrenHasTransform

public boolean childrenHasTransform()
Description copied from class: GImpactShapeInterface
If true, then its children must get transforms.

Specified by:
childrenHasTransform in class GImpactShapeInterface

needsRetrieveTriangles

public boolean needsRetrieveTriangles()
Description copied from class: GImpactShapeInterface
Determines if this shape has triangles.

Specified by:
needsRetrieveTriangles in class GImpactShapeInterface

needsRetrieveTetrahedrons

public boolean needsRetrieveTetrahedrons()
Description copied from class: GImpactShapeInterface
Determines if this shape has tetrahedrons.

Specified by:
needsRetrieveTetrahedrons in class GImpactShapeInterface

getBulletTriangle

public void getBulletTriangle(int prim_index,
                              TriangleShapeEx triangle)
Specified by:
getBulletTriangle in class GImpactShapeInterface

lockChildShapes

public void lockChildShapes()
Description copied from class: GImpactShapeInterface
Call when reading child shapes.

Overrides:
lockChildShapes in class GImpactShapeInterface

unlockChildShapes

public void unlockChildShapes()
Overrides:
unlockChildShapes in class GImpactShapeInterface

getChildAabb

public void getChildAabb(int child_index,
                         Transform t,
                         Vector3f aabbMin,
                         Vector3f aabbMax)
Description copied from class: GImpactShapeInterface
Retrieves the bound from a child.

Overrides:
getChildAabb in class GImpactShapeInterface

getChildShape

public CollisionShape getChildShape(int index)
Description copied from class: GImpactShapeInterface
Gets the children.

Specified by:
getChildShape in class GImpactShapeInterface

getChildTransform

public Transform getChildTransform(int index)
Description copied from class: GImpactShapeInterface
Gets the children transform.

Specified by:
getChildTransform in class GImpactShapeInterface

setChildTransform

public void setChildTransform(int index,
                              Transform transform)
Description copied from class: GImpactShapeInterface
Sets the children transform.

You must call updateBound() for update the box set.

Specified by:
setChildTransform in class GImpactShapeInterface

getName

public String getName()
Specified by:
getName in class CollisionShape

rayTest

public void rayTest(Vector3f rayFrom,
                    Vector3f rayTo,
                    CollisionWorld.RayResultCallback resultCallback)
Description copied from class: GImpactShapeInterface
Virtual method for ray collision.

Overrides:
rayTest in class GImpactShapeInterface

processAllTriangles

public void processAllTriangles(TriangleCallback callback,
                                Vector3f aabbMin,
                                Vector3f aabbMax)
Description copied from class: GImpactShapeInterface
Function for retrieve triangles. It gives the triangles in local space.

Overrides:
processAllTriangles in class GImpactShapeInterface