Physics |
[Missing <summary> documentation for "T:Demo3D.Visuals.PhysicsEngine"]
public class PhysicsEngine : IDisposable
The PhysicsEngine type exposes the following members.
| Name | Description | |
|---|---|---|
| CallbacksCount | The total number of ProcessContact calls made following the collision detection phase. | |
| CCD | Whether Continuous Collision Detection should be performed. | |
| ContactsCount | The total number of contact points generated in the collision detection phase. | |
| ConveyorsGroup | The collision group for conveyors. | |
| DeflectorsGroup | The collision group for deflectors. | |
| DiagnosticSensorsGroup | The collision group for diagnostic sensors. | |
| EngineCollisionDetectionTime | The time spent detecting collisions in the most recent timestep. | |
| EngineProcessingTime | The total time spent processing physics in the most recent timestep. | |
| EngineSolverTime | The time spent solving constraints in the most recent timestep. | |
| FloorsGroup | The collision group for floors. | |
| LoadsGroup | The collision group for loads. | |
| NoneGroup | The special "None" collision group. | |
| PhysicsStepSubscribed | Whether anything has subscribed to receive physics step notifications. | |
| ProcessCollisionsSingleThreaded | Whether to process collisions received from the physics engine in the simulation thread. | |
| ProcessCollisionsTime | The time spent processing collisions in the most recent timestep. | |
| RandomSeed | The random seed for the physics engine. | |
| RenderBodyProperties | Whether to render physics body properties. | |
| RenderPhysics | Whether to render physics. | |
| SensorsGroup | The collision group for sensors. | |
| SimulationGroup | The collision group for planar physics. | |
| SleepingTime | The time that a rigid body must be idle, according to the rigid body's LinearSleepingThreshold and AngularSleepingThreshold values, before it is allowed to enter the sleeping state. | |
| SolverIterations | Number of iterations to use when solving constraints in the dynamics response phase. | |
| StopBladesGroup | The collision group for stop blades. | |
| Ticks |
Counter incremented every time AdvanceTime(Boolean, Double) is called, and reset to zero on Reset.
Can be used to notice in other code if a new physics step has been started,
allowing per-physics step caches to be implemented.
| |
| Time | The current simulation time. | |
| VehiclesGroup | The collision group for vehicles. |
| Name | Description | |
|---|---|---|
| AddGeometryProcessCollisionHandler | Add a delegate for a specific geometry that is called for each collision that the specified geometry is involved in. | |
| AddGeometryProcessContactHandler |
Add a delegate for a specific geometry that is called for each contact point generated
when the specified geometry collides with another physics object's geometry.
Obsolete | |
| AddPostCollideDelegate(PostCollideDelegate, Visual) | Subscribes to be notified after the collision detection phase has been completed. | |
| AddPostCollideDelegate(PostCollideDataDelegate, Visual, Object) | Subscribes to be notified after the collision detection phase has been completed. | |
| AddRenderPoint |
Renders the specified "render point".
Obsolete | |
| AddSensorDelegate | Subscribes to be notified of blocked and cleared events. | |
| Clear | Destroys and reconstructs the physics world. | |
| Clear(Boolean) | Destroys and reconstructs the physics world if specified. | |
| ClearAllRenderLabels | ||
| ClearAllRenderLines | ||
| ClearAllRenderLines(String) | ||
| ClearAllRenderPoints | ||
| ClearAllRenderPoints(String) | ||
| ClearRenderLines | ||
| ClearRenderPoints | ||
| ClearRenderPoints(String) | ||
| Collide(BBox, PhysicsGroup, Boolean) | Finds all physics bodies prescribed to the specified group that are intersecting the specified bounding box. | |
| Collide(BBox, IListPhysicsGroup, Boolean) | Finds all physics bodies prescribed to any of the groups specified in the group list that are intersecting the specified bounding box. | |
| Collide(BSphere, PhysicsGroup, Boolean) | Finds all physics bodies prescribed to the specified group that are intersecting the specified bounding sphere. | |
| Collide(BSphere, IListPhysicsGroup, Boolean) | Finds all physics objects prescribed to any of the groups specified in the group list that are intersecting the specified bounding sphere. | |
| Collide(PhysicsBody, PhysicsGroup, Boolean) | Finds all physics bodies prescribed to the specified group that are colliding with the specified body. | |
| Collide(PhysicsBody, IListPhysicsGroup, Boolean) | Finds all physics objects prescribed to any of the groups specified in the group list that are colliding with the specified body. | |
| Collides(IListPhysicsGroup, IListPhysicsGroup) | Whether physics objects prescribing to any of the groups in groupListA are tested for collisions against physics objects prescribing to any of the groups in groupListB. | |
| Collides(PhysicsBody, PhysicsBody) | Whether the first physics object is tested for collisions against the second collision object by virtue of their groups. | |
| Collides(PhysicsGroup, PhysicsGroup) | Whether physics objects prescribing to groupA should collide with physics objects prescribing to groupB. | |
| Collides(PhysicsGroup, PhysicsGroup, Boolean) | Specifies whether physics objects prescribing to groupA should collide with physics objects prescribing to groupB. | |
| CountBodies | Counts the number of bodies in the physics world. | |
| CountBodies(PhysicsGroup) | Counts the number of bodies in the physics world that prescribe to the specified group. | |
| CountBodies(PredicatePhysicsBody) | Counts the number of bodies in the physics world matching the provided predicate. | |
| CountLoads | Counts the number of loads in the physics world. | |
| CreateApproximateCylinderGeometry | Approximates a cylindrical collision geometry using a convex-hull. | |
| CreateBallSocketJoint(PhysicsRigidBody, Vector3) | Creates a ball and socket (spherical) joint in the physics world that constrains the specified rigid body to maintain a fixed distance from the specified world-space anchor position. | |
| CreateBallSocketJoint(PhysicsRigidBody, PhysicsRigidBody, Vector3) | Creates a ball and socket (spherical) joint in the physics world that constrains the two specified rigid bodies to maintain a fixed distance from the specified world-space anchor position. | |
| CreateBoxGeometry | Creates a box (rectangular parallelepiped) collision geometry. | |
| CreateCompoundGeometry | Creates an empty compound collision geometry. | |
| CreateContactJoint(PhysicsBody, PhysicsBody, ContactInfo, Boolean) |
Instructs the physics engine to create a contact joint for the specified contact point.
Obsolete | |
| CreateContactJoint(Visual, Visual, ContactInfo, Boolean) |
Instructs the physics engine to create a contact joint for the specified contact point.
Obsolete | |
| CreateConvexHullGeometry(IEnumerableVector3, Double) | Creates a convex-hull geometry from the provided collection of points that form the convex-hull. | |
| CreateConvexHullGeometry(IMesh, Double) | Creates a convex-hull geometry that tightly wraps the vertices that form the provided mesh. | |
| CreateConvexHullGeometryByDecomposition | Decomposes the provided mesh into a number of convex-hulls. | |
| CreateCylinderGeometry | Creates a cylindrical collision geometry formed about the z-axis. | |
| CreateFixedJoint(PhysicsRigidBody) | Creates a fixed joint in the physics world that constrains the specified rigid body to maintain its current position and orientation in the physics world. | |
| CreateFixedJoint(PhysicsRigidBody, PhysicsRigidBody) | Creates a fixed joint in the physics world that constrains the two specified rigid bodies to maintain their current positions and orientations relative to each other. | |
| CreateGroup | Creates a collision group identified by the specified name. | |
| CreateGroupList | Creates an empty collision group list. | |
| CreateHingeJoint(PhysicsRigidBody, Matrix) | Creates a hinge (revolute) joint in the physics world that constrains the specified rigid body to maintain a fixed distance from the origin of the speicied transform but is allowed to pivot about the z-axis of the specified transform. | |
| CreateHingeJoint(PhysicsRigidBody, PhysicsRigidBody, Matrix) | Creates a hinge (revolute) joint in the physics world that constrains the two specified rigid bodies to maintain a fixed distance from the origin of the specified transform but are allowed to pivot about the z-axis of the specified transform. | |
| CreateRigidBody | Creates a rigid body in the physics world. | |
| CreateRigidBodyProperties | Creates an empty container of properties that is used to instantiate a rigid body. | |
| CreateSimulationSensor | Creates a non-movable sensor for planar physics with the specified geometry and world-space transform in the physics world. | |
| CreateSliderJoint(PhysicsRigidBody, Matrix) | Creates a slider (prismatic) joint in the physics world that constrains the specified rigid body to maintain a fixed orientation in the physics world but is allowed to move in the direction of the specified transform's x-axis. | |
| CreateSliderJoint(PhysicsRigidBody, PhysicsRigidBody, Matrix) | Creates a slider (prismatic) joint in the physics world that constrains the specified rigid bodies to maintain a fixed orientation relative to each other but are allowed to move in the direction of the specified transform's x-axis. | |
| CreateSphereGeometry | Creates a spherical collision geometry. | |
| CreateStaticBody | Creates a static body in the physics world. | |
| CreateStaticBodyProperties | Creates an empty container of properties that is used to instantiate a static body. | |
| CreateTriangleMeshGeometry | Creates a concave collision geometry formed of triangular faces. | |
| DestroyBody | Destroys the specified physics body. | |
| DestroyGeometry | Removes the specified geometry from the physics world and disposes of it. | |
| DestroyJoint | Removes the specified joint from the physics world and disposes of it. | |
| DestroySimulationSensor | Removes the specifed planar physics sensor from the physics world. | |
| DetectLoad | Records a load as having been detected by a sensor. | |
| DisableCCD | Disables continuous collision detection on the specified physics body. | |
| EnableCCD | Enables continuous collision detection on the specified physics body. | |
| Export | ||
| FindCollisions(SpaceType, Visual) | Obsolete | |
| FindCollisions(SpaceType, Visual, Double) | Obsolete | |
| FrictionMaterial(PhysicsGeometry) | Retrieves the friction material for the specified geometry. | |
| FrictionMaterial(Visual) | Retrieves the friction material for the geometry of the specified visual. | |
| IsDeflector(PhysicsBody) | ||
| IsDeflector(Visual) | ||
| IsDeflectorBlocksSensors(PhysicsBody) | ||
| IsDeflectorBlocksSensors(Visual) | ||
| IsDynamic | ||
| IsFirstContact | Record the specified sensor and load as touching. The ProcessCollision(PhysicsCollision, Visual, PhysicsBody) method will be called with other=null when the contact is broken, and the first time the load is seen this method will return true. | |
| IsFloor | ||
| IsKinematic | ||
| IsLoad(PhysicsBody) | ||
| IsLoad(Visual) | ||
| IsSensor(PhysicsBody) | ||
| IsSensor(Visual) | ||
| IsStatic | ||
| IsStopBlade | ||
| IsTrigger | ||
| IsVehicle(PhysicsBody) | ||
| IsVehicle(Visual) | ||
| KeepAwake | Keeps the specified rigid body awake for the physics auto-disable time. | |
| RemoveGeometryProcessCollisionHandler | Remove a collision handler delegate from a geometry. | |
| RemoveGeometryProcessContactHandler |
Remove a contact handler delegate from a geom.
Obsolete | |
| RemoveVisual | Removes the physics body from the specified visual and then destroys the removed physics body. | |
| RenderLabel(String, Color, Vector3, Boolean) | ||
| RenderLabel(String, Color, Vector3, Vector2, Boolean) | ||
| RenderLine | ||
| RenderPoint | ||
| SetFrictionMaterialRecursive | Sets the friction material down the geometry hierarchy. | |
| UndetectLoad | Unrecords a load as having been detected by a sensor. | |
| WakeUp | Wakes up the specified physics rigid body. | |
| WakeUpLoads(BBox) | Wakes up any loads that intersect the specified bounding box. | |
| WakeUpLoads(BSphere) | Wakes up any loads that intersect the specified bounding sphere. |
| Name | Description | |
|---|---|---|
| PhysicsStepBeforeProcessCollisions | Subscribe/unsubscribe to be notified before collisions are processed. | |
| PhysicsStepBeforeResolve | Subscribe/unsubscribe to be notified before the dynamics response phase is performed. | |
| PhysicsStepCompleted | Subscribe/unsubscribe to be notified after the dynamics response phase has been performed. | |
| PhysicsStepStarted | Subscribe/unsubscribe to be notified before the collision detection phase is performed. |