com.bulletphysics.collision.shapes
Class BoxShape
java.lang.Object
   com.bulletphysics.collision.shapes.CollisionShape
com.bulletphysics.collision.shapes.CollisionShape
       com.bulletphysics.collision.shapes.ConvexShape
com.bulletphysics.collision.shapes.ConvexShape
           com.bulletphysics.collision.shapes.ConvexInternalShape
com.bulletphysics.collision.shapes.ConvexInternalShape
               com.bulletphysics.collision.shapes.PolyhedralConvexShape
com.bulletphysics.collision.shapes.PolyhedralConvexShape
                   com.bulletphysics.collision.shapes.BoxShape
com.bulletphysics.collision.shapes.BoxShape
- Direct Known Subclasses: 
- CylinderShape
- public class BoxShape 
- extends PolyhedralConvexShape
BoxShape is a box primitive around the origin, its sides axis aligned with length
 specified by half extents, in local shape coordinates. When used as part of a
 CollisionObject or RigidBody it will be an oriented box in world space.
 
 
 
| Method Summary | 
|  void | batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors,
                                                  Vector3f[] supportVerticesOut,
                                                  int numVectors)
 | 
|  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)
 | 
|  Vector3f | getHalfExtentsWithMargin(Vector3f out)
 | 
|  Vector3f | getHalfExtentsWithoutMargin(Vector3f out)
 | 
|  String | getName()
 | 
|  int | getNumEdges()
 | 
|  int | getNumPlanes()
 | 
|  int | getNumPreferredPenetrationDirections()
 | 
|  int | getNumVertices()
 | 
|  void | getPlane(Vector3f planeNormal,
         Vector3f planeSupport,
         int i)
 | 
|  void | getPlaneEquation(Vector4f plane,
                 int i)
 | 
|  void | getPreferredPenetrationDirection(int index,
                                 Vector3f penetrationVector)
 | 
|  BroadphaseNativeType | getShapeType()
 | 
|  void | getVertex(int i,
          Vector3f vtx)
 | 
|  boolean | isInside(Vector3f pt,
         float tolerance)
 | 
|  Vector3f | localGetSupportingVertex(Vector3f vec,
                         Vector3f out)
 | 
|  Vector3f | localGetSupportingVertexWithoutMargin(Vector3f vec,
                                      Vector3f out)
 | 
|  void | setLocalScaling(Vector3f scaling)
 | 
|  void | setMargin(float margin)
 | 
 
 
 
 
 
BoxShape
public BoxShape(Vector3f boxHalfExtents)
getHalfExtentsWithMargin
public Vector3f getHalfExtentsWithMargin(Vector3f out)
- 
 
getHalfExtentsWithoutMargin
public Vector3f getHalfExtentsWithoutMargin(Vector3f out)
- 
 
getShapeType
public BroadphaseNativeType getShapeType()
- 
- Specified by:
- getShapeTypein class- CollisionShape
 
- 
 
localGetSupportingVertex
public Vector3f localGetSupportingVertex(Vector3f vec,
                                         Vector3f out)
- 
- Overrides:
- localGetSupportingVertexin class- ConvexInternalShape
 
- 
 
localGetSupportingVertexWithoutMargin
public Vector3f localGetSupportingVertexWithoutMargin(Vector3f vec,
                                                      Vector3f out)
- 
- Overrides:
- localGetSupportingVertexWithoutMarginin class- PolyhedralConvexShape
 
- 
 
batchedUnitVectorGetSupportingVertexWithoutMargin
public void batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors,
                                                              Vector3f[] supportVerticesOut,
                                                              int numVectors)
- 
- Overrides:
- batchedUnitVectorGetSupportingVertexWithoutMarginin class- PolyhedralConvexShape
 
- 
 
setMargin
public void setMargin(float margin)
- 
- Overrides:
- setMarginin class- ConvexInternalShape
 
- 
 
setLocalScaling
public void setLocalScaling(Vector3f scaling)
- 
- Overrides:
- setLocalScalingin 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:
- getAabbin class- PolyhedralConvexShape
 
- 
 
calculateLocalInertia
public void calculateLocalInertia(float mass,
                                  Vector3f inertia)
- 
- Overrides:
- calculateLocalInertiain class- PolyhedralConvexShape
 
- 
 
getPlane
public void getPlane(Vector3f planeNormal,
                     Vector3f planeSupport,
                     int i)
- 
- Specified by:
- getPlanein class- PolyhedralConvexShape
 
- 
 
getNumPlanes
public int getNumPlanes()
- 
- Specified by:
- getNumPlanesin class- PolyhedralConvexShape
 
- 
 
getNumVertices
public int getNumVertices()
- 
- Specified by:
- getNumVerticesin class- PolyhedralConvexShape
 
- 
 
getNumEdges
public int getNumEdges()
- 
- Specified by:
- getNumEdgesin class- PolyhedralConvexShape
 
- 
 
getVertex
public void getVertex(int i,
                      Vector3f vtx)
- 
- Specified by:
- getVertexin class- PolyhedralConvexShape
 
- 
 
getPlaneEquation
public void getPlaneEquation(Vector4f plane,
                             int i)
- 
 
getEdge
public void getEdge(int i,
                    Vector3f pa,
                    Vector3f pb)
- 
- Specified by:
- getEdgein class- PolyhedralConvexShape
 
- 
 
isInside
public boolean isInside(Vector3f pt,
                        float tolerance)
- 
- Specified by:
- isInsidein class- PolyhedralConvexShape
 
- 
 
getName
public String getName()
- 
- Specified by:
- getNamein class- CollisionShape
 
- 
 
getNumPreferredPenetrationDirections
public int getNumPreferredPenetrationDirections()
- 
- Overrides:
- getNumPreferredPenetrationDirectionsin class- ConvexInternalShape
 
- 
 
getPreferredPenetrationDirection
public void getPreferredPenetrationDirection(int index,
                                             Vector3f penetrationVector)
- 
- Overrides:
- getPreferredPenetrationDirectionin class- ConvexInternalShape
 
-