public abstract class PhysicsCollisionObject extends java.lang.Object implements Savable
Modifier and Type | Field and Description |
---|---|
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 |
Constructor and Description |
---|
PhysicsCollisionObject() |
Modifier and Type | Method and Description |
---|---|
void |
addCollideWithGroup(int collisionGroup)
Add a group that this object will collide with.
Two object will collide when one of the parties has the collisionGroup of the other in its collideWithGroups set. |
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() |
java.lang.Object |
getUserObject() |
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) |
void |
write(JmeExporter e) |
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
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
- the groups to add, ORed together (bitmask)public void removeCollideWithGroup(int collisionGroup)
collisionGroup
- the groups to remove, ORed together (bitmask)public void setCollideWithGroups(int collisionGroups)
collisionGroups
- the desired groups, ORed together (bitmask,
default=COLLISION_GROUP_01)public int getCollideWithGroups()
public java.lang.Object getUserObject()
public void setUserObject(java.lang.Object userObject)
userObject
- the userObject to setpublic void write(JmeExporter e) throws java.io.IOException
public void read(JmeImporter e) throws java.io.IOException