Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Paradox.Physics.PhysicsEngine Class Reference
Inheritance diagram for SiliconStudio.Paradox.Physics.PhysicsEngine:

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< HitResultRaycastPenetrating (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< HitResultShapeSweepPenetrating (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...
 

Detailed Description

Definition at line 13 of file PhysicsEngine.cs.

Constructor & Destructor Documentation

SiliconStudio.Paradox.Physics.PhysicsEngine.PhysicsEngine ( Game  g)

Definition at line 76 of file PhysicsEngine.cs.

Member Function Documentation

void SiliconStudio.Paradox.Physics.PhysicsEngine.AddCharacter ( Character  character)

Adds the character to the engine processing pipeline.

Parameters
characterThe character.
Exceptions
System.ExceptionCannot 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.

Parameters
characterThe character.
groupThe group.
maskThe mask.
Exceptions
System.ExceptionCannot 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.

Parameters
colliderThe 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.

Parameters
colliderThe collider.
groupThe group.
maskThe 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.

Parameters
constraintThe constraint.
Exceptions
System.ExceptionCannot 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.

Parameters
constraintThe constraint.
disableCollisionsBetweenLinkedBodiesif set to true [disable collisions between linked bodies].
Exceptions
System.ExceptionCannot 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.

Parameters
rigidBodyThe rigid body.
Exceptions
System.ExceptionCannot 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.

Parameters
rigidBodyThe rigid body.
groupThe group.
maskThe mask.
Exceptions
System.ExceptionCannot 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.

Parameters
colliderThe collider.
stepHeightHeight of the step.
Returns

Definition at line 340 of file PhysicsEngine.cs.

Collider SiliconStudio.Paradox.Physics.PhysicsEngine.CreateCollider ( ColliderShape  shape)

Creates the collider.

Parameters
shapeThe shape.
Returns

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.

Parameters
typeThe type.
rigidBodyAThe rigid body a.
frameAThe frame a.
useReferenceFrameAif set to true [use reference frame a].
Returns
Exceptions
System.ExceptionCannot 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.

Parameters
typeThe type.
rigidBodyAThe rigid body a.
rigidBodyBThe rigid body b.
frameAThe frame a.
frameBThe frame b.
useReferenceFrameAif set to true [use reference frame a].
Returns
Exceptions
System.ExceptionCannot 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.

Parameters
colliderThe collider.
Returns

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.

Parameters
flagsThe flags.
Exceptions
System.NotImplementedExceptionSoftBody processing is not yet available

Definition at line 101 of file PhysicsEngine.cs.

References DirectX.flags.

static void SiliconStudio.Paradox.Physics.PhysicsEngine.InitializeConverters ( )
static

Definition at line 83 of file PhysicsEngine.cs.

HitResult SiliconStudio.Paradox.Physics.PhysicsEngine.Raycast ( Vector3  from,
Vector3  to 
)

Raycasts and stops at the first hit.

Parameters
fromFrom.
toTo.
Returns

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.

Parameters
fromFrom.
toTo.
Returns

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.

Parameters
characterThe character.
Exceptions
System.ExceptionCannot 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.

Parameters
colliderThe 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.

Parameters
constraintThe constraint.
Exceptions
System.ExceptionCannot 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.

Parameters
rigidBodyThe rigid body.
Exceptions
System.ExceptionCannot 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

Parameters
shapeThe shape.
fromFrom.
toTo.
Returns
Exceptions
System.ExceptionThis 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"

Parameters
shapeThe shape.
fromFrom.
toTo.
Returns
Exceptions
System.ExceptionThis kind of shape cannot be used for a ShapeSweep.

Definition at line 916 of file PhysicsEngine.cs.

References DirectX.count.

Member Data Documentation

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.

Property Documentation

bool SiliconStudio.Paradox.Physics.PhysicsEngine.ContinuousCollisionDetection
getset

Definition at line 29 of file PhysicsEngine.cs.

Vector3 SiliconStudio.Paradox.Physics.PhysicsEngine.Gravity
getset

Gets or sets the gravity.

The gravity.

Exceptions
System.ExceptionCannot 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.

bool SiliconStudio.Paradox.Physics.PhysicsEngine.Initialized
getset

Gets a value indicating whether this PhysicsEngine is initialized.

true if initialized; otherwise, false.

Definition at line 951 of file PhysicsEngine.cs.


The documentation for this class was generated from the following file: