Click or drag to resize

PhysicsEngine Class

[Missing <summary> documentation for "T:Demo3D.Visuals.PhysicsEngine"]

Inheritance Hierarchy
SystemObject
  Demo3D.VisualsPhysicsEngine

Namespace:  Demo3D.Visuals
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 18.03.00
Syntax
C#
public class PhysicsEngine : IDisposable

The PhysicsEngine type exposes the following members.

Properties
  NameDescription
Public propertyCallbacksCount
The total number of ProcessContact calls made following the collision detection phase.
Public propertyCCD
Whether Continuous Collision Detection should be performed.
Public propertyContactsCount
The total number of contact points generated in the collision detection phase.
Public propertyConveyorsGroup
The collision group for conveyors.
Public propertyDeflectorsGroup
The collision group for deflectors.
Public propertyDiagnosticSensorsGroup
The collision group for diagnostic sensors.
Public propertyEngineCollisionDetectionTime
The time spent detecting collisions in the most recent timestep.
Public propertyEngineProcessingTime
The total time spent processing physics in the most recent timestep.
Public propertyEngineSolverTime
The time spent solving constraints in the most recent timestep.
Public propertyFloorsGroup
The collision group for floors.
Public propertyLoadsGroup
The collision group for loads.
Public propertyNoneGroup
The special "None" collision group.
Public propertyPhysicsStepSubscribed
Whether anything has subscribed to receive physics step notifications.
Public propertyProcessCollisionsSingleThreaded
Whether to process collisions received from the physics engine in the simulation thread.
Public propertyProcessCollisionsTime
The time spent processing collisions in the most recent timestep.
Public propertyRandomSeed
The random seed for the physics engine.
Public propertyRenderBodyProperties
Whether to render physics body properties.
Public propertyRenderPhysics
Whether to render physics.
Public propertySensorsGroup
The collision group for sensors.
Public propertySimulationGroup
The collision group for planar physics.
Public propertySleepingTime
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.
Public propertySolverIterations
Number of iterations to use when solving constraints in the dynamics response phase.
Public propertyStopBladesGroup
The collision group for stop blades.
Public propertyTicks
Counter incremented every time AdvanceTime(Boolean, Double) is called, and reset to zero on Reset.
Remarks
Can be used to notice in other code if a new physics step has been started, allowing per-physics step caches to be implemented.
Public propertyTime
The current simulation time.
Public propertyVehiclesGroup
The collision group for vehicles.
Top
Methods
  NameDescription
Public methodAddGeometryProcessCollisionHandler
Add a delegate for a specific geometry that is called for each collision that the specified geometry is involved in.
Public methodAddGeometryProcessContactHandler Obsolete.
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.
Public methodAddPostCollideDelegate(PostCollideDelegate, Visual)
Subscribes to be notified after the collision detection phase has been completed.
Public methodAddPostCollideDelegate(PostCollideDataDelegate, Visual, Object)
Subscribes to be notified after the collision detection phase has been completed.
Public methodAddRenderPoint Obsolete.
Renders the specified "render point".
Public methodAddSensorDelegate
Subscribes to be notified of blocked and cleared events.
Public methodClear
Destroys and reconstructs the physics world.
Public methodClear(Boolean)
Destroys and reconstructs the physics world if specified.
Public methodClearAllRenderLabels
Public methodClearAllRenderLines
Public methodClearAllRenderLines(String)
Public methodClearAllRenderPoints
Public methodClearAllRenderPoints(String)
Public methodClearRenderLines
Public methodClearRenderPoints
Public methodClearRenderPoints(String)
Public methodCollide(BBox, PhysicsGroup, Boolean)
Finds all physics bodies prescribed to the specified group that are intersecting the specified bounding box.
Public methodCollide(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.
Public methodCollide(BSphere, PhysicsGroup, Boolean)
Finds all physics bodies prescribed to the specified group that are intersecting the specified bounding sphere.
Public methodCollide(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.
Public methodCollide(PhysicsBody, PhysicsGroup, Boolean)
Finds all physics bodies prescribed to the specified group that are colliding with the specified body.
Public methodCollide(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.
Public methodCollides(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.
Public methodCollides(PhysicsBody, PhysicsBody)
Whether the first physics object is tested for collisions against the second collision object by virtue of their groups.
Public methodCollides(PhysicsGroup, PhysicsGroup)
Whether physics objects prescribing to groupA should collide with physics objects prescribing to groupB.
Public methodCollides(PhysicsGroup, PhysicsGroup, Boolean)
Specifies whether physics objects prescribing to groupA should collide with physics objects prescribing to groupB.
Public methodCountBodies
Counts the number of bodies in the physics world.
Public methodCountBodies(PhysicsGroup)
Counts the number of bodies in the physics world that prescribe to the specified group.
Public methodCountBodies(PredicatePhysicsBody)
Counts the number of bodies in the physics world matching the provided predicate.
Public methodCountLoads
Counts the number of loads in the physics world.
Public methodCreateApproximateCylinderGeometry
Approximates a cylindrical collision geometry using a convex-hull.
Public methodCreateBallSocketJoint(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.
Public methodCreateBallSocketJoint(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.
Public methodCreateBoxGeometry
Creates a box (rectangular parallelepiped) collision geometry.
Public methodCreateCompoundGeometry
Creates an empty compound collision geometry.
Public methodCreateContactJoint(PhysicsBody, PhysicsBody, ContactInfo, Boolean) Obsolete.
Instructs the physics engine to create a contact joint for the specified contact point.
Public methodCreateContactJoint(Visual, Visual, ContactInfo, Boolean) Obsolete.
Instructs the physics engine to create a contact joint for the specified contact point.
Public methodCreateConvexHullGeometry(IEnumerableVector3, Double)
Creates a convex-hull geometry from the provided collection of points that form the convex-hull.
Public methodCreateConvexHullGeometry(IMesh, Double)
Creates a convex-hull geometry that tightly wraps the vertices that form the provided mesh.
Public methodCreateConvexHullGeometryByDecomposition
Decomposes the provided mesh into a number of convex-hulls.
Public methodCreateCylinderGeometry
Creates a cylindrical collision geometry formed about the z-axis.
Public methodCreateFixedJoint(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.
Public methodCreateFixedJoint(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.
Public methodCreateGroup
Creates a collision group identified by the specified name.
Public methodCreateGroupList
Creates an empty collision group list.
Public methodCreateHingeJoint(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.
Public methodCreateHingeJoint(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.
Public methodCreateRigidBody
Creates a rigid body in the physics world.
Public methodCreateRigidBodyProperties
Creates an empty container of properties that is used to instantiate a rigid body.
Public methodCreateSimulationSensor
Creates a non-movable sensor for planar physics with the specified geometry and world-space transform in the physics world.
Public methodCreateSliderJoint(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.
Public methodCreateSliderJoint(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.
Public methodCreateSphereGeometry
Creates a spherical collision geometry.
Public methodCreateStaticBody
Creates a static body in the physics world.
Public methodCreateStaticBodyProperties
Creates an empty container of properties that is used to instantiate a static body.
Public methodCreateTriangleMeshGeometry
Creates a concave collision geometry formed of triangular faces.
Public methodDestroyBody
Destroys the specified physics body.
Public methodDestroyGeometry
Removes the specified geometry from the physics world and disposes of it.
Public methodDestroyJoint
Removes the specified joint from the physics world and disposes of it.
Public methodDestroySimulationSensor
Removes the specifed planar physics sensor from the physics world.
Public methodDetectLoad
Records a load as having been detected by a sensor.
Public methodDisableCCD
Disables continuous collision detection on the specified physics body.
Public methodEnableCCD
Enables continuous collision detection on the specified physics body.
Public methodExport
Public methodFindCollisions(SpaceType, Visual) Obsolete.
Public methodFindCollisions(SpaceType, Visual, Double) Obsolete.
Public methodFrictionMaterial(PhysicsGeometry)
Retrieves the friction material for the specified geometry.
Public methodFrictionMaterial(Visual)
Retrieves the friction material for the geometry of the specified visual.
Public methodStatic memberIsDeflector(PhysicsBody)
Public methodStatic memberIsDeflector(Visual)
Public methodStatic memberIsDeflectorBlocksSensors(PhysicsBody)
Public methodStatic memberIsDeflectorBlocksSensors(Visual)
Public methodStatic memberIsDynamic
Public methodIsFirstContact
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.
Public methodStatic memberIsFloor
Public methodStatic memberIsKinematic
Public methodStatic memberIsLoad(PhysicsBody)
Public methodStatic memberIsLoad(Visual)
Public methodStatic memberIsSensor(PhysicsBody)
Public methodStatic memberIsSensor(Visual)
Public methodStatic memberIsStatic
Public methodStatic memberIsStopBlade
Public methodStatic memberIsTrigger
Public methodStatic memberIsVehicle(PhysicsBody)
Public methodStatic memberIsVehicle(Visual)
Public methodKeepAwake
Keeps the specified rigid body awake for the physics auto-disable time.
Public methodRemoveGeometryProcessCollisionHandler
Remove a collision handler delegate from a geometry.
Public methodRemoveGeometryProcessContactHandler Obsolete.
Remove a contact handler delegate from a geom.
Public methodRemoveVisual
Removes the physics body from the specified visual and then destroys the removed physics body.
Public methodRenderLabel(String, Color, Vector3, Boolean)
Public methodRenderLabel(String, Color, Vector3, Vector2, Boolean)
Public methodRenderLine
Public methodRenderPoint
Public methodStatic memberSetFrictionMaterialRecursive
Sets the friction material down the geometry hierarchy.
Public methodUndetectLoad
Unrecords a load as having been detected by a sensor.
Public methodWakeUp
Wakes up the specified physics rigid body.
Public methodWakeUpLoads(BBox)
Wakes up any loads that intersect the specified bounding box.
Public methodWakeUpLoads(BSphere)
Wakes up any loads that intersect the specified bounding sphere.
Top
Events
  NameDescription
Public eventPhysicsStepBeforeProcessCollisions
Subscribe/unsubscribe to be notified before collisions are processed.
Public eventPhysicsStepBeforeResolve
Subscribe/unsubscribe to be notified before the dynamics response phase is performed.
Public eventPhysicsStepCompleted
Subscribe/unsubscribe to be notified after the dynamics response phase has been performed.
Public eventPhysicsStepStarted
Subscribe/unsubscribe to be notified before the collision detection phase is performed.
Top
See Also