Package org.jbox2d.dynamics
Class FixtureDef
java.lang.Object
org.jbox2d.dynamics.FixtureDef
A fixture definition is used to create a fixture. This class defines an
abstract fixture definition. You can reuse fixture definitions safely.
- Author:
- Daniel Murphy
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloatThe density, usually in kg/m^2Contact filtering data;floatThe friction coefficient, usually in the range [0,1].booleanA sensor shape collects contact information but never generates a collision response.floatThe restitution (elasticity) usually in the range [0,1].The shape, this must be set.Use this to store application specific fixture data. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatThe density, usually in kg/m^2Contact filtering data;floatThe friction coefficient, usually in the range [0,1].floatThe restitution (elasticity) usually in the range [0,1].getShape()The shape, this must be set.Use this to store application specific fixture data.booleanisSensor()A sensor shape collects contact information but never generates a collision response.voidsetDensity(float density) The density, usually in kg/m^2voidContact filtering data;voidsetFriction(float friction) The friction coefficient, usually in the range [0,1].voidsetRestitution(float restitution) The restitution (elasticity) usually in the range [0,1].voidsetSensor(boolean isSensor) A sensor shape collects contact information but never generates a collision response.voidThe shape, this must be set.voidsetUserData(Object userData) Use this to store application specific fixture data.
-
Field Details
-
shape
The shape, this must be set. The shape will be cloned, so you can create the shape on the stack. -
userData
Use this to store application specific fixture data. -
friction
public float frictionThe friction coefficient, usually in the range [0,1]. -
restitution
public float restitutionThe restitution (elasticity) usually in the range [0,1]. -
density
public float densityThe density, usually in kg/m^2 -
isSensor
public boolean isSensorA sensor shape collects contact information but never generates a collision response. -
filter
Contact filtering data;
-
-
Constructor Details
-
FixtureDef
public FixtureDef()
-
-
Method Details
-
getShape
The shape, this must be set. The shape will be cloned, so you can create the shape on the stack. -
setShape
The shape, this must be set. The shape will be cloned, so you can create the shape on the stack. -
getUserData
Use this to store application specific fixture data. -
setUserData
Use this to store application specific fixture data. -
getFriction
public float getFriction()The friction coefficient, usually in the range [0,1]. -
setFriction
public void setFriction(float friction) The friction coefficient, usually in the range [0,1]. -
getRestitution
public float getRestitution()The restitution (elasticity) usually in the range [0,1]. -
setRestitution
public void setRestitution(float restitution) The restitution (elasticity) usually in the range [0,1]. -
getDensity
public float getDensity()The density, usually in kg/m^2 -
setDensity
public void setDensity(float density) The density, usually in kg/m^2 -
isSensor
public boolean isSensor()A sensor shape collects contact information but never generates a collision response. -
setSensor
public void setSensor(boolean isSensor) A sensor shape collects contact information but never generates a collision response. -
getFilter
Contact filtering data; -
setFilter
Contact filtering data;
-