| Modifier and Type | Class and Description |
|---|---|
static class |
CollisionShape.Type |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildShape(Transform t,
CollisionShape shape)
Add collision shape for compound shape type
|
void |
destroy() |
void |
getBox(Box box) |
GeometryData |
getBvhTriangles() |
void |
getCapsule(Capsule capsule) |
CollisionShape |
getChildShape(int index) |
void |
getChildTransform(int index,
Transform dst) |
Vec3Array |
getConvexHull() |
GeometryData |
getConvexHullVolume() |
void |
getCylinder(Cylinder cylinder) |
float |
getMargin() |
int |
getNumChildShapes() |
void |
getPlane(Plane plane) |
void |
getSphere(Sphere sphere) |
Transform |
getTransform(Transform dst) |
CollisionShape.Type |
getType() |
boolean |
isConvex() |
void |
setTransform(Transform src)
Note: scaling does not seem to behave well with Bullet, it is therefore suggested to pre-scale the
CollisionShape. |
public final CollisionShape.Type getType()
public final boolean isConvex()
public final float getMargin()
public final Transform getTransform(Transform dst)
dst - destination to store this CollisionShape transformpublic final void setTransform(Transform src)
CollisionShape.src - new transform for this CollisionShapepublic final void addChildShape(Transform t, CollisionShape shape)
shape - a non compound child shapepublic final int getNumChildShapes()
public final CollisionShape getChildShape(int index)
index - public final void getChildTransform(int index,
Transform dst)
public final void getPlane(Plane plane)
plane - destination to receive this CollisionShape planejava.lang.IllegalStateException - if this getType() is not CollisionShape.Type.planepublic final void getBox(Box box)
box - destination to receive this CollisionShape box volumejava.lang.IllegalStateException - if this getType() is not CollisionShape.Type.boxpublic final void getSphere(Sphere sphere)
sphere - destination to receive this CollisionShape sphere volumejava.lang.IllegalStateException - if this getType() is not CollisionShape.Type.spherepublic final void getCylinder(Cylinder cylinder)
cylinder - destination to receive this CollisionShape cylinder volumejava.lang.IllegalStateException - if this getType() is not CollisionShape.Type.cylinderpublic final void getCapsule(Capsule capsule)
capsule - destination to receive this CollisionShape capsule volume.java.lang.IllegalStateException - if this getType() is not CollisionShape.Type.capsulepublic final Vec3Array getConvexHull()
CollisionShapejava.lang.IllegalStateException - if this getType() is not CollisionShape.Type.convexHulljava.lang.RuntimeException - if a native unknown error occurespublic final GeometryData getConvexHullVolume()
CollisionShapejava.lang.IllegalStateException - if this getType() is not CollisionShape.Type.convexHulljava.lang.RuntimeException - if a native unknown error occurespublic final GeometryData getBvhTriangles()
CollisionShapejava.lang.IllegalStateException - if this getType() is not CollisionShape.Type.bvhTrianglesBonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com