![]() |
Paradox Game Engine
v1.0.0 beta06
|
Public Member Functions | |
PhysicsEngine (Game g) | |
void | Initialize (PhysicsEngineFlags flags=PhysicsEngineFlags.None) |
Initializes the Physics engine using the specified flags. More... | |
void | Dispose () |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More... | |
Collider | CreateCollider (ColliderShape shape) |
Creates the collider. More... | |
RigidBody | CreateRigidBody (ColliderShape collider) |
Creates the rigid body. More... | |
Character | CreateCharacter (ColliderShape collider, float stepHeight) |
Creates the character. More... | |
void | AddCollider (Collider collider) |
Adds the collider to the engine processing pipeline. More... | |
void | AddCollider (Collider collider, CollisionFilterGroups group, CollisionFilterGroups mask) |
Adds the collider to the engine processing pipeline. More... | |
void | RemoveCollider (Collider collider) |
Removes the collider from the engine processing pipeline. More... | |
void | AddRigidBody (RigidBody rigidBody) |
Adds the rigid body to the engine processing pipeline. More... | |
void | AddRigidBody (RigidBody rigidBody, CollisionFilterGroups group, CollisionFilterGroups mask) |
Adds the rigid body to the engine processing pipeline. More... | |
void | RemoveRigidBody (RigidBody rigidBody) |
Removes the rigid body from the engine processing pipeline. More... | |
void | AddCharacter (Character character) |
Adds the character to the engine processing pipeline. More... | |
void | AddCharacter (Character character, CollisionFilterGroups group, CollisionFilterGroups mask) |
Adds the character to the engine processing pipeline. More... | |
void | RemoveCharacter (Character character) |
Removes the character from the engine processing pipeline. More... | |
Constraint | CreateConstraint (ConstraintTypes type, RigidBody rigidBodyA, Matrix frameA, bool useReferenceFrameA=false) |
Creates the constraint. More... | |
Constraint | CreateConstraint (ConstraintTypes type, RigidBody rigidBodyA, RigidBody rigidBodyB, Matrix frameA, Matrix frameB, bool useReferenceFrameA=false) |
Creates the constraint. More... | |
void | AddConstraint (Constraint constraint) |
Adds the constraint to the engine processing pipeline. More... | |
void | AddConstraint (Constraint constraint, bool disableCollisionsBetweenLinkedBodies) |
Adds the constraint to the engine processing pipeline. More... | |
void | RemoveConstraint (Constraint constraint) |
Removes the constraint from the engine processing pipeline. More... | |
HitResult | Raycast (Vector3 from, Vector3 to) |
Raycasts and stops at the first hit. More... | |
List< HitResult > | RaycastPenetrating (Vector3 from, Vector3 to) |
Raycasts penetrating any shape the ray encounters. More... | |
HitResult | ShapeSweep (ColliderShape shape, Matrix from, Matrix to) |
Pefrorms a sweep test using a collider shape and stops at the first hit More... | |
List< HitResult > | ShapeSweepPenetrating (ColliderShape shape, Matrix from, Matrix to) |
Pefrorms a sweep test using a collider shape and never stops until "to" More... | |
Static Public Member Functions | |
static void | InitializeConverters () |
Public Attributes | |
PhysicsDebugEffect | DebugEffect = null |
The debug effect, populate this field in the case of debug rendering More... | |
bool | CreateDebugPrimitives = false |
Set to true if you want the engine to create the debug primitives More... | |
bool | RenderDebugPrimitives = false |
Set to true if you want the engine to render the debug primitives More... | |
bool | DisableSimulation = false |
Totally disable the simulation if set to true More... | |
Properties | |
bool | ContinuousCollisionDetection [get, set] |
bool | Initialized [get, set] |
Gets a value indicating whether this PhysicsEngine is initialized. More... | |
Vector3 | Gravity [get, set] |
Gets or sets the gravity. More... | |
Definition at line 13 of file PhysicsEngine.cs.
SiliconStudio.Paradox.Physics.PhysicsEngine.PhysicsEngine | ( | Game | g | ) |
Definition at line 76 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.AddCharacter | ( | Character | character | ) |
Adds the character to the engine processing pipeline.
character | The character. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 439 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.AddCharacter | ( | Character | character, |
CollisionFilterGroups | group, | ||
CollisionFilterGroups | mask | ||
) |
Adds the character to the engine processing pipeline.
character | The character. |
group | The group. |
mask | The mask. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 456 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.AddCollider | ( | Collider | collider | ) |
Adds the collider to the engine processing pipeline.
collider | The collider. |
Definition at line 371 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.AddCollider | ( | Collider | collider, |
CollisionFilterGroups | group, | ||
CollisionFilterGroups | mask | ||
) |
Adds the collider to the engine processing pipeline.
collider | The collider. |
group | The group. |
mask | The mask. |
Definition at line 382 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.AddConstraint | ( | Constraint | constraint | ) |
Adds the constraint to the engine processing pipeline.
constraint | The constraint. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 784 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.AddConstraint | ( | Constraint | constraint, |
bool | disableCollisionsBetweenLinkedBodies | ||
) |
Adds the constraint to the engine processing pipeline.
constraint | The constraint. |
disableCollisionsBetweenLinkedBodies | if set to true [disable collisions between linked bodies]. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 799 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.AddRigidBody | ( | RigidBody | rigidBody | ) |
Adds the rigid body to the engine processing pipeline.
rigidBody | The rigid body. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 401 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.AddRigidBody | ( | RigidBody | rigidBody, |
CollisionFilterGroups | group, | ||
CollisionFilterGroups | mask | ||
) |
Adds the rigid body to the engine processing pipeline.
rigidBody | The rigid body. |
group | The group. |
mask | The mask. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 415 of file PhysicsEngine.cs.
Character SiliconStudio.Paradox.Physics.PhysicsEngine.CreateCharacter | ( | ColliderShape | collider, |
float | stepHeight | ||
) |
Creates the character.
collider | The collider. |
stepHeight | Height of the step. |
Definition at line 340 of file PhysicsEngine.cs.
Collider SiliconStudio.Paradox.Physics.PhysicsEngine.CreateCollider | ( | ColliderShape | shape | ) |
Creates the collider.
shape | The shape. |
Definition at line 277 of file PhysicsEngine.cs.
Constraint SiliconStudio.Paradox.Physics.PhysicsEngine.CreateConstraint | ( | ConstraintTypes | type, |
RigidBody | rigidBodyA, | ||
Matrix | frameA, | ||
bool | useReferenceFrameA = false |
||
) |
Creates the constraint.
type | The type. |
rigidBodyA | The rigid body a. |
frameA | The frame a. |
useReferenceFrameA | if set to true [use reference frame a]. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly or Both RigidBodies must be valid or A Gear constraint always needs two rigidbodies to be created. |
Definition at line 496 of file PhysicsEngine.cs.
Constraint SiliconStudio.Paradox.Physics.PhysicsEngine.CreateConstraint | ( | ConstraintTypes | type, |
RigidBody | rigidBodyA, | ||
RigidBody | rigidBodyB, | ||
Matrix | frameA, | ||
Matrix | frameB, | ||
bool | useReferenceFrameA = false |
||
) |
Creates the constraint.
type | The type. |
rigidBodyA | The rigid body a. |
rigidBodyB | The rigid body b. |
frameA | The frame a. |
frameB | The frame b. |
useReferenceFrameA | if set to true [use reference frame a]. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly or Both RigidBodies must be valid |
Definition at line 631 of file PhysicsEngine.cs.
RigidBody SiliconStudio.Paradox.Physics.PhysicsEngine.CreateRigidBody | ( | ColliderShape | collider | ) |
Creates the rigid body.
collider | The collider. |
Definition at line 306 of file PhysicsEngine.cs.
References SiliconStudio.Paradox.Physics.ColliderShape.Is2D.
void SiliconStudio.Paradox.Physics.PhysicsEngine.Dispose | ( | ) |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Definition at line 261 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.Initialize | ( | PhysicsEngineFlags | flags = PhysicsEngineFlags.None | ) |
Initializes the Physics engine using the specified flags.
flags | The flags. |
System.NotImplementedException | SoftBody processing is not yet available |
Definition at line 101 of file PhysicsEngine.cs.
References DirectX.flags.
|
static |
Definition at line 83 of file PhysicsEngine.cs.
Raycasts and stops at the first hit.
from | From. |
to | To. |
Definition at line 828 of file PhysicsEngine.cs.
List<HitResult> SiliconStudio.Paradox.Physics.PhysicsEngine.RaycastPenetrating | ( | Vector3 | from, |
Vector3 | to | ||
) |
Raycasts penetrating any shape the ray encounters.
from | From. |
to | To. |
Definition at line 852 of file PhysicsEngine.cs.
References DirectX.count.
void SiliconStudio.Paradox.Physics.PhysicsEngine.RemoveCharacter | ( | Character | character | ) |
Removes the character from the engine processing pipeline.
character | The character. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 471 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.RemoveCollider | ( | Collider | collider | ) |
Removes the collider from the engine processing pipeline.
collider | The collider. |
Definition at line 391 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.RemoveConstraint | ( | Constraint | constraint | ) |
Removes the constraint from the engine processing pipeline.
constraint | The constraint. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 813 of file PhysicsEngine.cs.
void SiliconStudio.Paradox.Physics.PhysicsEngine.RemoveRigidBody | ( | RigidBody | rigidBody | ) |
Removes the rigid body from the engine processing pipeline.
rigidBody | The rigid body. |
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 427 of file PhysicsEngine.cs.
HitResult SiliconStudio.Paradox.Physics.PhysicsEngine.ShapeSweep | ( | ColliderShape | shape, |
Matrix | from, | ||
Matrix | to | ||
) |
Pefrorms a sweep test using a collider shape and stops at the first hit
shape | The shape. |
from | From. |
to | To. |
System.Exception | This kind of shape cannot be used for a ShapeSweep. |
Definition at line 887 of file PhysicsEngine.cs.
List<HitResult> SiliconStudio.Paradox.Physics.PhysicsEngine.ShapeSweepPenetrating | ( | ColliderShape | shape, |
Matrix | from, | ||
Matrix | to | ||
) |
Pefrorms a sweep test using a collider shape and never stops until "to"
shape | The shape. |
from | From. |
to | To. |
System.Exception | This kind of shape cannot be used for a ShapeSweep. |
Definition at line 916 of file PhysicsEngine.cs.
References DirectX.count.
bool SiliconStudio.Paradox.Physics.PhysicsEngine.CreateDebugPrimitives = false |
Set to true if you want the engine to create the debug primitives
Definition at line 58 of file PhysicsEngine.cs.
Referenced by SiliconStudio.Paradox.Physics.Box2DColliderShape.Box2DColliderShape(), SiliconStudio.Paradox.Physics.BoxColliderShape.BoxColliderShape(), SiliconStudio.Paradox.Physics.CapsuleColliderShape.CapsuleColliderShape(), SiliconStudio.Paradox.Physics.ConvexHullColliderShape.ConvexHullColliderShape(), SiliconStudio.Paradox.Physics.CylinderColliderShape.CylinderColliderShape(), and SiliconStudio.Paradox.Physics.SphereColliderShape.SphereColliderShape().
PhysicsDebugEffect SiliconStudio.Paradox.Physics.PhysicsEngine.DebugEffect = null |
The debug effect, populate this field in the case of debug rendering
Definition at line 53 of file PhysicsEngine.cs.
bool SiliconStudio.Paradox.Physics.PhysicsEngine.DisableSimulation = false |
Totally disable the simulation if set to true
Definition at line 68 of file PhysicsEngine.cs.
bool SiliconStudio.Paradox.Physics.PhysicsEngine.RenderDebugPrimitives = false |
Set to true if you want the engine to render the debug primitives
Definition at line 63 of file PhysicsEngine.cs.
|
getset |
Definition at line 29 of file PhysicsEngine.cs.
|
getset |
Gets or sets the gravity.
The gravity.
System.Exception | Cannot perform this action when the physics engine is set to CollisionsOnly or Cannot perform this action when the physics engine is set to CollisionsOnly |
Definition at line 965 of file PhysicsEngine.cs.
|
getset |
Gets a value indicating whether this PhysicsEngine is initialized.
true
if initialized; otherwise, false
.
Definition at line 951 of file PhysicsEngine.cs.