RigidVehicle class
Simple vehicle helper class with spherical rigid body wheels.
Constructors
- RigidVehicle({Vec3? coordinateSystem, Body? chassisBody})
Properties
- chassisBody ↔ Body
-
The chassis body.
getter/setter pair
-
constraints
↔ List<
HingeConstraint> -
The constraints.
getter/setter pair
- coordinateSystem ↔ Vec3
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
wheelAxes
↔ List<
Vec3> -
The wheel axes.
getter/setter pair
-
wheelBodies
↔ List<
Body> -
The bodies of the wheels.
getter/setter pair
-
wheelForces
↔ List<
double> -
The wheel forces.
getter/setter pair
Methods
-
addToWorld(
World world) → void - Add the vehicle including its constraints to the world.
-
addWheel(
{Body? body, Vec3? position, Vec3? axis, Vec3? direction}) → int - Add a wheel
-
applyWheelForce(
double value, int wheelIndex) → void - Apply a torque on one of the wheels.
-
disableMotor(
int wheelIndex) → void - Set the target rotational speed of the hinge constraint.
-
getWheelSpeed(
int wheelIndex) → double - Get current rotational velocity of a wheel
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFromWorld(
World world) → void - Remove the vehicle including its constraints from the world.
-
setMotorSpeed(
double value, int wheelIndex) → void - Set the target rotational speed of the hinge constraint.
-
setSteeringValue(
double value, int wheelIndex) → void - Set the steering value of a wheel. @todo check coordinateSystem
-
setWheelForce(
double value, int wheelIndex) → void - Set the wheel force to apply on one of the wheels each time step
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited