Visual3D Game EngineAPI Documentation for XNA, C#, VB, and .NET
Assembly: Visual3D.Engine (in Visual3D.Engine.dll) Version: 1.0.0.0 (1.0.0.0)
Holds the current Dynamics state for an object (it's velocity and acceleration).
Namespace: Visual3D.PhysicsAssembly: Visual3D.Engine (in Visual3D.Engine.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# | Visual Basic |
[SerializableAttribute] public class SimplePhysicsBody : IPhysicsBody, IDisposable
<SerializableAttribute> _ Public Class SimplePhysicsBody _ Implements IPhysicsBody, IDisposable
Members
| All Members | Constructors | Fields | Properties | Methods | Events |
| Member | Description | |
|---|---|---|
| SimplePhysicsBody()()()() | Initializes a new instance of the SimplePhysicsBody class | |
| SimplePhysicsBody(SceneObject, MotionType, Single, Single, Single, Boolean) | Initializes a new instance of the SimplePhysicsBody class | |
| SimplePhysicsBody(SceneObject, MotionType, LinearDamping, LinearDamping, Single, Boolean) | Initializes a new instance of the SimplePhysicsBody class | |
| SimplePhysicsBody(SceneObject, MotionType, Single, Single, Single, Boolean, Single) | Initializes a new instance of the SimplePhysicsBody class | |
| SimplePhysicsBody(SceneObject, MotionType, LinearDamping, LinearDamping, Single, Boolean, Single) | Initializes a new instance of the SimplePhysicsBody class | |
| AddAcceleration(Acceleration) | Applies the specified Acceleration to this Body (until manually removed). | |
| AddAngularAcceleration(Acceleration..::..Angular) | Applies the specified Acceleration to this Body (until manually removed). | |
| AddAngularVelocity(Single, Vector3, TransformSpace) | Add Interval Spin with specified relativity. | |
| AddIntervalAngularVelocity(Single, Vector3, TransformSpace) | Add Interval Spin with specified relativity. | |
| AddLinearAcceleration(Acceleration..::..Linear) | Applies the specified Acceleration to this Body (until manually removed). | |
| AddYPRAcceleration(Acceleration..::..YPR) | ||
| AngularAcceleration | ||
| AngularDamping | Angular Damping factor, sets the effective "linear drag" of this body
causing the velocity to decay proportionately to it's magnitude. | |
| AngularDampingDelay | Indicates Spin Damping should be delayed for XX update intervals.
Usually set whenever Spin rate is Manually adjusted. | |
| AngularDampingTime | Amount of time it should take for Body to decay to 1% of it's current angular velocity. | |
| AngularFactor | ||
| AngularVelocity | ||
| ApplyAngularImpulse(Single, Vector3, TransformSpace) | ||
| ApplyCentralForce(Vector3) | ||
| ApplyCentralImpulse(Vector3) | ||
| ApplyForce(Vector3, Vector3) | ||
| ApplyImpulse(Vector3, Vector3) | ||
| ApplyLinearImpulse(Vector3, TransformSpace) | ||
| ApplyPitchImpulse(Single) | Adds Spin Rate along the Local Pitch Axis (i.e. X-Axis). | |
| ApplyRollImpulse(Single) | Adds Spin Rate along the Local Roll Axis (i.e. Z-Axis). | |
| ApplyTorque(Vector3) | ||
| ApplyTorqueImpulse(Vector3) | ||
| ApplyWorldYawImpulse(Single) | Adds Spin Rate along the World-Aligned Yaw Axis (i.e. Y-Axis). | |
| ApplyYawImpulse(Single) | Adds Spin Rate along the Local Yaw Axis (i.e. Y-Axis). | |
| BodyOffset | ||
| Bounces | ||
| BuoyancyFactor | ||
| CaptureBaselineYaw()()()() | ||
| CaptureBaselineYawPitch()()()() | ||
| CaptureBaselineYPROrientation()()()() | ||
| CcdSquareMotionThreshold | ||
| CenterOfMassPosition | ||
| CheckGroundHeightInterval | ||
| CopyEvents(SimplePhysicsBody) | Part of upgrading from SimplePhysicsBody to YawPitchRollPhysicsBody.
| |
| CreateCopy(SceneObject) | ||
| DebugHandle | ||
| DefaultAngularDamping | Second-based Multiplier used for standard Spin Damping (multiplied every second). | |
| DefaultAngularFallDamping | Second-based Multiplier used for standard Spin Damping while Falling (multiplied every second). | |
| DefaultLinearDamping | Second-based Multiplier used for standard Velocity Damping (multiplied every second). | |
| DefaultLinearFallDamping | Second-based Multiplier used for standard Velocity Damping while Falling (multiplied every second). | |
| Dispose()()()() | ||
| FallingSnapToGround | ||
| FallingTolerance | ||
| Friction | ||
| GetOrientation()()()() | ||
| GetWorldOrigin()()()() | ||
| Gravity | ||
| GravityScale | Indicates the relative gravitational pull on this object when it leaves the ground.
Note: 1f => Normal, and 0 => Weightless. | |
| HasContactResponse | ||
| HasLinearAcceleration | ||
| HasOwner | ||
| IntervalLinearVelocity | World-Aligned Positional offset that will occur for each DynamicMgr Interval Update. | |
| IsActive | ||
| IsDisposed | ||
| IsFalling | Gets/Sets if object is falling (being acclerated by gravity). | |
| IsInWorld | ||
| IsKinematicObject | ||
| IsLinearVelocityRotated | Indicates if the linear and spin velocities are rotated along with the body such
that their relative values are preserved when the body is rotated.
NOTE: If True, this gives the "TrainTrack" effect, as momentum follows the turning tracks. | |
| IsMotionLevel | Indicates if level motion of the object is to be preserved on rotations (i.e. don't rotate motion into Y-axis). | |
| IsPhysicBodyOffset | ||
| IsSleeping | ||
| IsStaticObject | ||
| IsStationary | Indicates if Object is World-Aligned Stationary (i.e. not Moving, Spinning or Accelerated). | |
| IsTouchingGroundSurface | ||
| IsTrulyFalling | ||
| LastHeightAboveGround | ||
| LinearAcceleration | ||
| LinearDamping | Linear Damping factor, sets the effective "linear drag" of this body
causing the velocity to decay proportionately to it's magnitude. | |
| LinearDampingDelay | Indicates Linear Damping should be delayed for XX update intervals.
Usually set whenever Velocity is Manually adjusted. | |
| LinearDampingTime | Amount of time it should take for Body to decay to 1% of it's current linear velocity. | |
| LinearVelocity | Linear velocity body (units/second). | |
| LocalInertia | ||
| LocalIntervalAngularVelocity | Interval Spin Relative to Local Transform Space for this node. | |
| LocalIntervalVelocity | Interval Velocity Relative to Local Transform Space for this node. | |
| ManualSpin | True when angular motion is being applied manually over time.
This is needed, so that physics won't think motion is stopping,
which causes CaptureBaselineYPROrientation.
| |
| Mass | ||
| MotionStarted | Event that fires when Dynamic Motion of this node begins. | |
| MotionStopped | ||
| MotionType | Nature of the Dynamics Implementation. | |
| Name | ||
| NotifyParentObjectMoved()()()() | ||
| NotifyParentObjectRotated()()()() | ||
| Orientation | ||
| ParentObject | ||
| PhysicsSettings | ||
| PhysicsSystem | ||
| Pitch | ||
| PitchDegrees | ||
| Position | ||
| RaiseMotionStoppedEvent()()()() | Event that fires anytime this SceneObject stops moving. | |
| RaiseMovedEvent()()()() | Event that fires anytime this SceneObject is moved or rotated. | |
| RaiseRotatedEvent()()()() | Event that fires anytime this Dynamic causes the controlled node to be rotated. | |
| RelativeBodyPositionOffset | ||
| RelativeBodyRotationalOffset | ||
| RemoveAcceleration(Acceleration) | Removes an acceleration from the Body that was previously added. | |
| RemoveAllAccelerations()()()() | ||
| RemoveAngularAcceleration(Acceleration..::..Angular) | Removes a Spin Acceleration from the Body that was previously added. | |
| RemoveLinearAcceleration(Acceleration..::..Linear) | Removes a Linear Acceleration from the Body that was previously added. | |
| RemoveYPRAcceleration(Acceleration..::..YPR) | ||
| ResetToBaselineYPROrientation()()()() | ||
| Restitution | ||
| Roll | ||
| RollDegrees | ||
| RotatePitch(Single) | ||
| RotateRoll(Single) | ||
| RotateYaw(Single) | ||
| Rotation | ||
| SetDamping(Single, Single) | ||
| SetOrientation(Quaternion) | ||
| SetOrientationWithoutEvents(Quaternion) | ||
| SetOrigin(Vector3) | ||
| SnapPositionToParentObjectWithoutEvents()()()() | ||
| Speed | ||
| States | Indicates the dynamic states currently possessed by this body -
having to do with the current dimensions of motion that need to be updated. | |
| StopMotion()()()() | Resets Motion to Zero, and Initializes the States/ActivityFlags. | |
| SurfacesCheckedToPreventFalling | ||
| ToString()()()() | (Overrides Object..::..ToString()()()().) | |
| Translate(Vector3) | ||
| TrueFallingDefaultHeight | ||
| TrueFallingHeight | ||
| UpdateAccelerations()()()() | Should be called if any of the applied Accelerations are altered, to tell this body
to recalculate the total acceleration applied to it. | |
| UpdateAngularAccelerations()()()() | Update the Spin Acceleration Summation acting on this Body. | |
| UpdateDynamicState()()()() | Call this every XXX frames to update the Dynamic State which will evaluate the
types of updates that should be done for this body. | |
| UpdateLinearAccelerations()()()() | Update the Linear Acceleration Summation acting on this Body. | |
| UpdateMotion()()()() | Moves the body, then applies Damping and Accelerations to the motion. | |
| UseAABBMinYHeight | ||
| WorldMatrix | ||
| Yaw | ||
| YawDegrees |
Remarks
Interval Damping and Accelerations are the underlying efficient fields that are stored with this class,
to facilitate quick FrameInterval math (everything is updated each interval, so therefore, it is more
efficient to keep the raw fields in terms of Interval values.
Inheritance Hierarchy
System..::..Object
Visual3D.Physics..::..SimplePhysicsBody
Visual3D.Physics..::..YawPitchRollPhysicsBody
Visual3D.Physics..::..SimplePhysicsBody
Visual3D.Physics..::..YawPitchRollPhysicsBody