Class Index | File Index

Classes


Class JWheel

JWheel represents a wheel
Defined in: jwheel.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
JWheel(car)
Field Summary
Field Attributes Field Name and Description
 
a 3D vector
 
a 3D vector
 
a 3D vector
 
a unique name by which to identify the wheel (e.g.
 
a 3D vector
 
a 3D vector
 
a 3D vector
 
a 3D vector
 
a 3D vector
 
 
a 3D vector
 
a 3D vector
 
a 3D vector
 
a 3D vector
 
a 3D vector
Method Summary
Method Attributes Method Name and Description
 
 
addTorque(torque)
 
 
 
 
 
 
 
 
 
 
 
 
setLock(lock)
 
 
 
setup(pos, axisUp, spring, travel, inertia, radius, sideFriction, fwdFriction, damping, numRays, drive, normalForce)
 
update(dt)
Class Detail
JWheel(car)

Author: Muzer(muzerly@gmail.com).
Parameters:
{JCar} car
the vehicle this wheel belongs to
Field Detail
{array} groundFwd
a 3D vector

{array} groundLeft
a 3D vector

{array} groundUp
a 3D vector

{string} name
a unique name by which to identify the wheel (e.g. FrontRight, RearLeft etc.)

{array} rimVel
a 3D vector

{array} wheelCentreVel
a 3D vector

{array} wheelFwd
a 3D vector

{array} wheelLeft
a 3D vector

{array} wheelPointVel
a 3D vector

{JSegment} wheelRay

{array} wheelRayEnd
a 3D vector

{array} wheelUp
a 3D vector

{array} worldAxis
a 3D vector

{array} worldPos
a 3D vector

{array} worldVel
a 3D vector
Method Detail
{boolean} addForcesToCar(dt)
Parameters:
dt
Returns:
true if the wheel is on the ground, else false

{void} addTorque(torque)
Parameters:
{number} torque
the amount of torque to add

{array} getActualPos()

{array} getAxisAngle()

{number} getDisplacement()

{array} getLocalAxisUp()

{boolean} getOnFloor()
Returns:
true if on the ground, else false

{array} getPos()

{number} getRadius()

{number} getRollAngle()

{number} getRotationDamping()

{number} getSteerAngle()

{void} reset()

{void} setLock(lock)
Parameters:
{boolean} lock

{void} setRotationDamping(vel)
Parameters:
{number} vel

{void} setSteerAngle(steer)
Parameters:
{number} steer

{void} setup(pos, axisUp, spring, travel, inertia, radius, sideFriction, fwdFriction, damping, numRays, drive, normalForce)
Parameters:
{array} pos
position relative to car, in car's space
{array} axisUp
in car's space
{number} spring
force per suspension offset
{number} travel
suspension travel upwards
{number} inertia
inertia about the axle
{number} radius
wheel radius
{number} sideFriction
side friction
{number} fwdFriction
forward friction
{number} damping
suspension damping
{number} numRays
{number} drive
{number} normalForce

{void} update(dt)
Parameters:
dt

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 25 2011 08:49:10 GMT+0100 (CET)