Modules | |
| RigidBody API | |
Data Structures | |
| class | Contact |
| class | Physics |
| class | Physics6DOFJoint |
| class | Physics6DOFSpringJoint |
| class | PhysicsBallSocketJoint |
| class | PhysicsBlock |
| class | PhysicsConeTwistJoint |
| class | PhysicsFixedJoint |
| class | PhysicsGeom |
| class | PhysicsGeomDef |
| class | PhysicsHingeJoint |
| class | PhysicsJoint |
| class | PhysicsSliderJoint |
| class | PhysicsWorld |
| class | SurfaceProperties |
Typedefs | |
| typedef int[] | Physics |
| typedef int[] | Physics6DOFJoint |
| typedef int[] | Physics6DOFSpringJoint |
| typedef int[] | PhysicsBallSocketJoint |
| typedef int[] | PhysicsBlock |
| typedef int[] | PhysicsConeTwistJoint |
| typedef int[] | PhysicsFixedJoint |
| typedef PhysicsGeom | dGeom |
| typedef int[] | PhysicsGeom |
| typedef int[] | PhysicsHingeJoint |
| typedef int[] | PhysicsJoint |
| typedef int[] | PhysicsSliderJoint |
| typedef int[] | SurfaceProperties |
| typedef int[] | dJoint |
| typedef int[] | dBlock |
Enumerations | |
| enum | ActiveState { INACTIVE , ACTIVE , ALWAYS_ACTIVE , INACTIVE , ACTIVE , ALWAYS_ACTIVE } |
| enum | ActiveState { INACTIVE , ACTIVE , ALWAYS_ACTIVE , INACTIVE , ACTIVE , ALWAYS_ACTIVE } |
| enum | SimulationState { NONE = -1 , COLLISION , SIMULATION , NONE = -1 , COLLISION , SIMULATION } |
| enum | SimulationState { NONE = -1 , COLLISION , SIMULATION , NONE = -1 , COLLISION , SIMULATION } |
Functions | |
| proto native int | dGetNumDynamicBodies (notnull IEntity worldEnt) |
| proto native IEntity | dGetDynamicBody (notnull IEntity worldEnt, int index) |
| proto native void | dSetInteractionLayer (notnull IEntity worldEntity, int mask1, int mask2, bool enable) |
| proto native bool | dGetInteractionLayer (notnull IEntity worldEntity, int mask1, int mask2) |
| proto native vector | dGetGravity (notnull IEntity worldEntity) |
| Gets global gravity. | |
| proto native void | dSetGravity (notnull IEntity worldEntity, vector g) |
| Changes global gravity. | |
| proto native void | dSetTimeSlice (notnull IEntity worldEntity, float timeSlice) |
| Changes fixed time-slice. Default is 1/40, thus simulation runs on 40fps. With smaller values, there is more precise simulation. | |
| typedef PhysicsGeom dGeom |
Geometric shapes relevant for physics simulation
Wrapper over a physics simulation of an entity. The entity is capable of the physics simulation only when such object exists (see IEntity.GetPhysics). Two main types of physics bodies are static and dynamic. Static bodies are represented by a collision object and dynamic bodies by a rigid body. This means certain methods make sense only when dealing with a dynamic physics body, e.g., Physics.GetVelocity, Physics.ApplyImpulse.
Physics bodies rely on physics geometries to support collisions or casting. In general a physics body can be made out of multiply physics geometries. Certain methods allow to work with a specific physics geometry (via geometry index).
| typedef int [] Physics6DOFJoint |
6 DOF joint simulation.
The first 3 DOF axes represent linear motion (translation) and the latter 3 DOF axes represent angular motion. Each axis can be configured to be either free, locked or limited. All axes are locked initially. Some combinations can lead to an undefined behavior.
Configuration of the axes:
Ranges of the angular limits:
| typedef int [] Physics6DOFSpringJoint |
6 DOF spring joint simulation.
| typedef int [] PhysicsBallSocketJoint |
Ball socket joint simulation
| typedef int [] PhysicsBlock |
Disables collisions between two entities.
| typedef int [] PhysicsConeTwistJoint |
Cone twist joint simulation
| typedef int [] PhysicsFixedJoint |
Fixed joint simulation
| typedef int [] PhysicsGeom |
| typedef int [] PhysicsHingeJoint |
Hinge joint simulation
| typedef int [] PhysicsJoint |
Wrapper over joint simulation
| typedef int [] PhysicsSliderJoint |
Slider joint simulation
| typedef int [] SurfaceProperties |
General surface properties
| enum ActiveState |
Activation state of the physics controller in the physics world.
| enum ActiveState |
| enum SimulationState |
State/presence of the physics controller in physics world. When it's created as static, only SimulationState::NONE or SimulationState::COLLISION can be used. For dynamic ones, there is also SimulationState::SIMULATION for full dynamic simulation.
| Enumerator | |
|---|---|
| NONE | body is not in simulation, nor in collision world No automatic destroying. Flags to pass to ParticleSource.StopParticle. Plain Effect base. No flags |
| COLLISION | body is in collision world, but it's not simulated |
| SIMULATION | dynamic bodies are colliding and are simulated |
| NONE | body is not in simulation, nor in collision world No automatic destroying. Flags to pass to ParticleSource.StopParticle. Plain Effect base. No flags |
| COLLISION | body is in collision world, but it's not simulated |
| SIMULATION | dynamic bodies are colliding and are simulated |
| enum SimulationState |
| Enumerator | |
|---|---|
| NONE | body is not in simulation, nor in collision world No automatic destroying. Flags to pass to ParticleSource.StopParticle. Plain Effect base. No flags |
| COLLISION | body is in collision world, but it's not simulated |
| SIMULATION | dynamic bodies are colliding and are simulated |
| NONE | body is not in simulation, nor in collision world No automatic destroying. Flags to pass to ParticleSource.StopParticle. Plain Effect base. No flags |
| COLLISION | body is in collision world, but it's not simulated |
| SIMULATION | dynamic bodies are colliding and are simulated |
Referenced by EntityAI::IsIgnoredObject().
| proto native void dSetInteractionLayer | ( | notnull IEntity | worldEntity, |
| int | mask1, | ||
| int | mask2, | ||
| bool | enable | ||
| ) |