| Modifier and Type | Class and Description |
|---|---|
static class |
CollisionShape.Type |
| Modifier | Constructor and Description |
|---|---|
protected |
CollisionShape(CollisionShape.Type type,
long collisionShapeId) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildShape(Transform t,
CollisionShape shape)
Add collision shape for compound shape type
|
void |
destroy() |
protected void |
finalize() |
void |
getBox(Box box) |
GeometryData |
getBvhTriangles() |
void |
getCapsule(Capsule capsule) |
CollisionShape |
getChildShape(int index) |
void |
getChildTransform(int index,
Transform dst) |
protected static CollisionShape |
getCollisionShape(long collisionShapeId) |
protected long |
getCollisionShapeId() |
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() |
protected boolean |
setBoxShapeHalfExtents(Vec3 halfExtents) |
protected boolean |
setCapsuleShapeSize(float height,
float radius) |
protected boolean |
setCompoundShapeChilds(PhysicWorld physicWorld,
ConvexDecomposition convexDecomposition) |
protected boolean |
setCompoundShapeChildTransform(int index,
Transform src) |
protected boolean |
setCylinderShapeSize(float height,
float radius) |
protected boolean |
setSphereShapeRadius(float radius) |
void |
setTransform(Transform src)
Note: scaling does not seem to behave well with Bullet, it is therefore suggested to pre-scale the
CollisionShape. |
protected CollisionShape(CollisionShape.Type type, long collisionShapeId)
protected static CollisionShape getCollisionShape(long collisionShapeId)
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic final CollisionShape.Type getType()
protected final long getCollisionShapeId()
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.bvhTrianglesprotected final boolean setBoxShapeHalfExtents(Vec3 halfExtents)
protected final boolean setSphereShapeRadius(float radius)
protected final boolean setCylinderShapeSize(float height,
float radius)
protected final boolean setCapsuleShapeSize(float height,
float radius)
protected final boolean setCompoundShapeChildTransform(int index,
Transform src)
protected final boolean setCompoundShapeChilds(PhysicWorld physicWorld, ConvexDecomposition convexDecomposition)
Bonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com