com.bulletphysics.collision.shapes
Class UniformScalingShape

java.lang.Object
  extended by com.bulletphysics.collision.shapes.CollisionShape
      extended by com.bulletphysics.collision.shapes.ConvexShape
          extended by com.bulletphysics.collision.shapes.UniformScalingShape

public class UniformScalingShape
extends ConvexShape

UniformScalingShape allows to re-use uniform scaled instances of ConvexShape in a memory efficient way. Istead of using UniformScalingShape, it is better to use the non-uniform setLocalScaling method on convex shapes that implement it.


Field Summary
 
Fields inherited from class com.bulletphysics.collision.shapes.ConvexShape
MAX_PREFERRED_PENETRATION_DIRECTIONS
 
Constructor Summary
UniformScalingShape(ConvexShape convexChildShape, float uniformScalingFactor)
           
 
Method Summary
 void batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors, Vector3f[] supportVerticesOut, int numVectors)
           
 void calculateLocalInertia(float mass, Vector3f inertia)
           
 void getAabb(Transform t, Vector3f aabbMin, Vector3f aabbMax)
           
 void getAabbSlow(Transform t, Vector3f aabbMin, Vector3f aabbMax)
           
 ConvexShape getChildShape()
           
 Vector3f getLocalScaling(Vector3f out)
           
 float getMargin()
           
 String getName()
           
 int getNumPreferredPenetrationDirections()
           
 void getPreferredPenetrationDirection(int index, Vector3f penetrationVector)
           
 BroadphaseNativeType getShapeType()
           
 float getUniformScalingFactor()
           
 Vector3f localGetSupportingVertex(Vector3f vec, Vector3f out)
           
 Vector3f localGetSupportingVertexWithoutMargin(Vector3f vec, Vector3f out)
           
 void setLocalScaling(Vector3f scaling)
           
 void setMargin(float margin)
           
 
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

UniformScalingShape

public UniformScalingShape(ConvexShape convexChildShape,
                           float uniformScalingFactor)
Method Detail

getUniformScalingFactor

public float getUniformScalingFactor()

getChildShape

public ConvexShape getChildShape()

localGetSupportingVertex

public Vector3f localGetSupportingVertex(Vector3f vec,
                                         Vector3f out)
Specified by:
localGetSupportingVertex in class ConvexShape

localGetSupportingVertexWithoutMargin

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

batchedUnitVectorGetSupportingVertexWithoutMargin

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

getAabbSlow

public void getAabbSlow(Transform t,
                        Vector3f aabbMin,
                        Vector3f aabbMax)
Specified by:
getAabbSlow in class ConvexShape

setLocalScaling

public void setLocalScaling(Vector3f scaling)
Specified by:
setLocalScaling in class ConvexShape

getLocalScaling

public Vector3f getLocalScaling(Vector3f out)
Specified by:
getLocalScaling in class ConvexShape

setMargin

public void setMargin(float margin)
Specified by:
setMargin in class ConvexShape

getMargin

public float getMargin()
Specified by:
getMargin in class ConvexShape

getNumPreferredPenetrationDirections

public int getNumPreferredPenetrationDirections()
Specified by:
getNumPreferredPenetrationDirections in class ConvexShape

getPreferredPenetrationDirection

public void getPreferredPenetrationDirection(int index,
                                             Vector3f penetrationVector)
Specified by:
getPreferredPenetrationDirection in class ConvexShape

getAabb

public void getAabb(Transform t,
                    Vector3f aabbMin,
                    Vector3f aabbMax)
Specified by:
getAabb in class CollisionShape

getShapeType

public BroadphaseNativeType getShapeType()
Specified by:
getShapeType in class CollisionShape

calculateLocalInertia

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

getName

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