|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.bullet.collision.PhysicsCollisionObject
public abstract class PhysicsCollisionObject
Base class for collision objects (PhysicsRigidBody, PhysicsGhostObject)
Field Summary | |
---|---|
static int |
COLLISION_GROUP_01
|
static int |
COLLISION_GROUP_02
|
static int |
COLLISION_GROUP_03
|
static int |
COLLISION_GROUP_04
|
static int |
COLLISION_GROUP_05
|
static int |
COLLISION_GROUP_06
|
static int |
COLLISION_GROUP_07
|
static int |
COLLISION_GROUP_08
|
static int |
COLLISION_GROUP_09
|
static int |
COLLISION_GROUP_10
|
static int |
COLLISION_GROUP_11
|
static int |
COLLISION_GROUP_12
|
static int |
COLLISION_GROUP_13
|
static int |
COLLISION_GROUP_14
|
static int |
COLLISION_GROUP_15
|
static int |
COLLISION_GROUP_16
|
static int |
COLLISION_GROUP_NONE
|
protected int |
collisionGroup
|
protected int |
collisionGroupsMask
|
protected CollisionShape |
collisionShape
|
protected Arrow |
debugArrow
|
protected Geometry |
debugArrowGeom
|
protected Material |
debugMaterialBlue
|
protected Material |
debugMaterialGreen
|
protected Material |
debugMaterialRed
|
protected Material |
debugMaterialYellow
|
protected Spatial |
debugShape
|
protected long |
objectId
|
Constructor Summary | |
---|---|
PhysicsCollisionObject()
|
Method Summary | |
---|---|
void |
addCollideWithGroup(int collisionGroup)
Add a group that this object will collide with. Two object will collide when one of the partys has the collisionGroup of the other in its collideWithGroups set. |
protected void |
attachCollisionShape(long objectId,
long collisionShapeId)
|
protected Spatial |
attachDebugShape()
Creates a visual debug shape of the current collision shape of this physics object Does not work with detached physics, please switch to PARALLEL or SEQUENTIAL for debugging |
protected Spatial |
attachDebugShape(AssetManager manager)
Creates a visual debug shape of the current collision shape of this physics object Does not work with detached physics, please switch to PARALLEL or SEQUENTIAL for debugging |
protected Spatial |
attachDebugShape(Material material)
|
Spatial |
createDebugShape(AssetManager manager)
Creates a debug shape for this CollisionObject |
Spatial |
debugShape()
|
void |
detachDebugShape()
Removes the debug shape |
protected void |
finalize()
|
protected void |
finalizeNative(long objectId)
|
int |
getCollideWithGroups()
Gets the bitmask of collision groups that this object collides with. |
int |
getCollisionGroup()
Returns the collision group for this collision shape |
CollisionShape |
getCollisionShape()
|
protected Spatial |
getDebugShape()
|
long |
getObjectId()
|
java.lang.Object |
getUserObject()
|
protected void |
initUserPointer()
|
void |
read(JmeImporter e)
|
void |
removeCollideWithGroup(int collisionGroup)
Remove a group from the list this object collides with. |
void |
setCollideWithGroups(int collisionGroups)
Directly set the bitmask for collision groups that this object collides with. |
void |
setCollisionGroup(int collisionGroup)
Sets the collision group number for this physics object. |
void |
setCollisionShape(CollisionShape collisionShape)
Sets a CollisionShape to this physics object, note that the object should not be in the physics space when adding a new collision shape as it is rebuilt on the physics side. |
void |
setUserObject(java.lang.Object userObject)
|
protected void |
updateDebugShape()
|
void |
write(JmeExporter e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long objectId
protected Spatial debugShape
protected Arrow debugArrow
protected Geometry debugArrowGeom
protected Material debugMaterialBlue
protected Material debugMaterialRed
protected Material debugMaterialGreen
protected Material debugMaterialYellow
protected CollisionShape collisionShape
public static final int COLLISION_GROUP_NONE
public static final int COLLISION_GROUP_01
public static final int COLLISION_GROUP_02
public static final int COLLISION_GROUP_03
public static final int COLLISION_GROUP_04
public static final int COLLISION_GROUP_05
public static final int COLLISION_GROUP_06
public static final int COLLISION_GROUP_07
public static final int COLLISION_GROUP_08
public static final int COLLISION_GROUP_09
public static final int COLLISION_GROUP_10
public static final int COLLISION_GROUP_11
public static final int COLLISION_GROUP_12
public static final int COLLISION_GROUP_13
public static final int COLLISION_GROUP_14
public static final int COLLISION_GROUP_15
public static final int COLLISION_GROUP_16
protected int collisionGroup
protected int collisionGroupsMask
Constructor Detail |
---|
public PhysicsCollisionObject()
Method Detail |
---|
public void setCollisionShape(CollisionShape collisionShape)
collisionShape
- the CollisionShape to setpublic CollisionShape getCollisionShape()
public int getCollisionGroup()
public void setCollisionGroup(int collisionGroup)
collisionGroup
- the collisionGroup to setpublic void addCollideWithGroup(int collisionGroup)
collisionGroup
- public void removeCollideWithGroup(int collisionGroup)
collisionGroup
- public void setCollideWithGroups(int collisionGroups)
collisionGroups
- public int getCollideWithGroups()
protected void initUserPointer()
protected Spatial attachDebugShape(AssetManager manager)
manager
- AssetManager to load the default wireframe material for the debug shapepublic Spatial createDebugShape(AssetManager manager)
manager
-
protected Spatial attachDebugShape(Material material)
public Spatial debugShape()
protected Spatial attachDebugShape()
material
- Material to use for the debug shapeprotected void updateDebugShape()
protected Spatial getDebugShape()
public void detachDebugShape()
public java.lang.Object getUserObject()
public void setUserObject(java.lang.Object userObject)
userObject
- the userObject to setpublic long getObjectId()
protected void attachCollisionShape(long objectId, long collisionShapeId)
public void write(JmeExporter e) throws java.io.IOException
write
in interface Savable
java.io.IOException
public void read(JmeImporter e) throws java.io.IOException
read
in interface Savable
java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
protected void finalizeNative(long objectId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |