C# Class BEPUphysics.Vehicle.WheelShape

Superclass for the shape of the tires of a vehicle. Responsible for figuring out where the wheel touches the ground and managing graphical properties.
Inheritance: ICollisionRulesOwner
ファイルを表示 Open project: Indiefreaks/igf Class Usage Examples

Protected Properties

Property Type Description
detector Box
localGraphicTransform Matrix
spinAngle float
spinVelocity float
wheel Wheel
worldTransform Matrix

Public Methods

Method Description
UpdateWorldTransform ( ) : void

Updates the wheel's world transform for graphics. Called automatically by the owning wheel at the end of each frame. If the engine is updating asynchronously, you can call this inside of a space read buffer lock and update the wheel transforms safely.

Protected Methods

Method Description
FindSupport ( Vector3 &location, Vector3 &normal, float &suspensionLength, Collidable &supportCollidable, Entity &entity, BEPUphysics.Materials.Material &material ) : bool

Finds a supporting entity, the contact location, and the contact normal.

Initialize ( ) : void

Initializes the detector entity and any other necessary logic.

UpdateDetectorPosition ( ) : void

Updates the position of the detector before each step.

Private Methods

Method Description
OnAdditionToSpace ( ISpace space ) : void
OnRemovalFromSpace ( ISpace space ) : void
UpdateSpin ( float dt ) : void

Updates the spin velocity and spin angle for the shape.

Method Details

FindSupport() protected abstract method

Finds a supporting entity, the contact location, and the contact normal.
protected abstract FindSupport ( Vector3 &location, Vector3 &normal, float &suspensionLength, Collidable &supportCollidable, Entity &entity, BEPUphysics.Materials.Material &material ) : bool
location Vector3 Contact point between the wheel and the support.
normal Vector3 Contact normal between the wheel and the support.
suspensionLength float Length of the suspension at the contact.
supportCollidable Collidable Collidable supporting the wheel, if any.
entity Entity Entity supporting the wheel, if any.
material BEPUphysics.Materials.Material Material of the support.
return bool

Initialize() protected abstract method

Initializes the detector entity and any other necessary logic.
protected abstract Initialize ( ) : void
return void

UpdateDetectorPosition() protected abstract method

Updates the position of the detector before each step.
protected abstract UpdateDetectorPosition ( ) : void
return void

UpdateWorldTransform() public abstract method

Updates the wheel's world transform for graphics. Called automatically by the owning wheel at the end of each frame. If the engine is updating asynchronously, you can call this inside of a space read buffer lock and update the wheel transforms safely.
public abstract UpdateWorldTransform ( ) : void
return void

Property Details

detector protected_oe property

Collects collision pairs from the environment.
protected Box detector
return Box

localGraphicTransform protected_oe property

protected Matrix localGraphicTransform
return Matrix

spinAngle protected_oe property

protected float spinAngle
return float

spinVelocity protected_oe property

protected float spinVelocity
return float

wheel protected_oe property

protected Wheel wheel
return Wheel

worldTransform protected_oe property

protected Matrix worldTransform
return Matrix