C# Class Indiefreaks.Xna.Physics.Entities.StaticMeshCollisionMove

StaticMesh based BEPUCollisionMove class implementation
Inheritance: BEPUCollisionMove
Datei anzeigen Open project: Indiefreaks/igf

Public Methods

Method Description
ApplyObjectForce ( Microsoft.Xna.Framework.Vector3 objectforce ) : void

Applies force to the object. The total force is used to move the object during the next call to Begin().

ApplyObjectForce ( Microsoft.Xna.Framework.Vector3 objectposition, Microsoft.Xna.Framework.Vector3 objectforce ) : void

Applies force to the object. The total force is used to move the object during the next call to Update().

ApplyWorldForce ( Microsoft.Xna.Framework.Vector3 worldposition, Microsoft.Xna.Framework.Vector3 worldforce ) : void

Applies force to the object. The total force is used to move the object during the next call to Update().

ApplyWorldForce ( Microsoft.Xna.Framework.Vector3 worldforce, bool constantforce ) : void

Applies force to the object. The total force is used to move the object during the next call to Begin().

Begin ( ) : void

Applies eventual ParentObject collision information changes to the current ISpaceObject instance.

End ( ) : void

Applies the current ISpaceObject World matrix changes to the ParentObject.

Initialize ( ) : void
RemoveForces ( ) : void

Removes all accumulated forces acting on the object. This will halt the object movement, however future forces (such as gravity) can immediately begin acting on the object again.

StaticMeshCollisionMove ( ICollisionObject collisionObject, Model model ) : BEPUphysics.BroadPhaseEntries

Creates a new instance

StaticMeshCollisionMove ( ICollisionObject collisionObject, Microsoft.Xna.Framework.Vector3 vertices, int indices ) : BEPUphysics.BroadPhaseEntries

Creates a new instance

Private Methods

Method Description
OnStaticMeshCollisionDetected ( StaticMesh sender, Collidable other, CollidablePairHandler pair ) : void

Raises the appropriate ParentObject collision events depending on its CollisionType value

Method Details

ApplyObjectForce() public method

Applies force to the object. The total force is used to move the object during the next call to Begin().
public ApplyObjectForce ( Microsoft.Xna.Framework.Vector3 objectforce ) : void
objectforce Microsoft.Xna.Framework.Vector3 Amount of object-space force to apply to the object.
return void

ApplyObjectForce() public method

Applies force to the object. The total force is used to move the object during the next call to Update().
public ApplyObjectForce ( Microsoft.Xna.Framework.Vector3 objectposition, Microsoft.Xna.Framework.Vector3 objectforce ) : void
objectposition Microsoft.Xna.Framework.Vector3 Object-space location the force is applied to the object. /// This allows off-center forces, which cause rotation.
objectforce Microsoft.Xna.Framework.Vector3 Amount of object-space force to apply to the object.
return void

ApplyWorldForce() public method

Applies force to the object. The total force is used to move the object during the next call to Update().
public ApplyWorldForce ( Microsoft.Xna.Framework.Vector3 worldposition, Microsoft.Xna.Framework.Vector3 worldforce ) : void
worldposition Microsoft.Xna.Framework.Vector3 World-space location the force is applied to the object. /// This allows off-center forces, which cause rotation.
worldforce Microsoft.Xna.Framework.Vector3 Amount of world-space force to apply to the object.
return void

ApplyWorldForce() public method

Applies force to the object. The total force is used to move the object during the next call to Begin().
public ApplyWorldForce ( Microsoft.Xna.Framework.Vector3 worldforce, bool constantforce ) : void
worldforce Microsoft.Xna.Framework.Vector3 Amount of world-space force to apply to the object.
constantforce bool Determines if the force is from a constant /// source such as gravity, wind, or similar (eg: applied by the caller /// every frame instead of a single time).
return void

Begin() public method

Applies eventual ParentObject collision information changes to the current ISpaceObject instance.
public Begin ( ) : void
return void

End() public method

Applies the current ISpaceObject World matrix changes to the ParentObject.
public End ( ) : void
return void

Initialize() public method

public Initialize ( ) : void
return void

RemoveForces() public method

Removes all accumulated forces acting on the object. This will halt the object movement, however future forces (such as gravity) can immediately begin acting on the object again.
public RemoveForces ( ) : void
return void

StaticMeshCollisionMove() public method

Creates a new instance
public StaticMeshCollisionMove ( ICollisionObject collisionObject, Model model ) : BEPUphysics.BroadPhaseEntries
collisionObject ICollisionObject The ParentObject this instance will be associated with
model Microsoft.Xna.Framework.Graphics.Model The Model used to compute the BEPUPgysics StaticMesh
return BEPUphysics.BroadPhaseEntries

StaticMeshCollisionMove() public method

Creates a new instance
public StaticMeshCollisionMove ( ICollisionObject collisionObject, Microsoft.Xna.Framework.Vector3 vertices, int indices ) : BEPUphysics.BroadPhaseEntries
collisionObject ICollisionObject The ParentObject this instance will be associated with
vertices Microsoft.Xna.Framework.Vector3 The Model vertices used to compute the BEPUPgysics StaticMesh
indices int The Model indices used to compute the BEPUPgysics StaticMesh
return BEPUphysics.BroadPhaseEntries