C# Class JitterDemo.Wheel

A wheel which adds drive forces to a body. Can be used to create a vehicle.
Exibir arquivo Open project: tpb3d/TPB3D

Public Methods

Method Description
AddTorque ( float torque ) : void

Adds drivetorque.

GetWorldPosition ( ) : Jitter.LinearMath.JVector

Gets the position of the wheel in world space.

RemoveWheel ( ) : void
Wheel ( World world, RigidBody car, Jitter.LinearMath.JVector position, float radius ) : System

Creates a new instance of the Wheel class.

Private Methods

Method Description
PostStep ( float timeStep ) : void
PreStep ( float timeStep ) : void
RaycastCallback ( RigidBody body, Jitter.LinearMath.JVector normal, float frac ) : bool

Method Details

AddTorque() public method

Adds drivetorque.
public AddTorque ( float torque ) : void
torque float The amount of torque applied to this wheel.
return void

GetWorldPosition() public method

Gets the position of the wheel in world space.
public GetWorldPosition ( ) : Jitter.LinearMath.JVector
return Jitter.LinearMath.JVector

RemoveWheel() public method

public RemoveWheel ( ) : void
return void

Wheel() public method

Creates a new instance of the Wheel class.
public Wheel ( World world, RigidBody car, Jitter.LinearMath.JVector position, float radius ) : System
world Jitter.World The world.
car RigidBody The RigidBody on which to apply the wheel forces.
position Jitter.LinearMath.JVector The position of the wheel on the body (in body space).
radius float The wheel radius.
return System