Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

WheelJoint

Allows relative rotation and translation of two bodies along a specified axis. More...

Import Statement: import Felgo 4.0
Inherits:

Joint

Properties

Methods

Detailed Description

This joint provides two degrees of freedom: translation along an axis fixed in bodyA and rotation in the plane around the point localAnchorA. You can use a joint limit to restrict the range of motion and a joint motor to drive the rotation or to model rotational friction. This joint is designed for vehicle suspensions.

Property Documentation

dampingRatio : real

The damping ratio. 0 = no damping, 1 = critical damping. The default is 0.7.


enableMotor : bool

Set this property to true for maxMotorTorque and motorSpeed to have an effect. By default, it is false.


frequencyHz : real

The response speed, i.e. how fast the bodyB should move towards the targetPoint. By default, it is set to 2.0.


localAnchorA : point

The local anchor point relative to the Joint::bodyA center in pixels.

The default is (0, 0), which means the center of Joint::bodyA.


localAnchorB : point

The local anchor point relative to the Joint::bodyB center in pixels.

The default is (0, 0), which means the center of Joint::bodyB.


localAxisA : point

The local translation axis relative Joint::bodyA is moved upon. Only the direction of the vector and not the length matters.

The default is 1/0.


maxMotorTorque : real

The maximum force in kg*pixels^2/s^2 meters. To enable it, set enableMotor to true.

The joint motor will maintain the specified motorSpeed unless the required force exceeds this maximum. When the maximum force is exceeded, the joint will slow down and can even reverse.


motorSpeed : real

The speed of the motor in radians per second. To enable it, set enableMotor to true.


Method Documentation

real getJointSpeed()

Returns the current translation speed of the joint, in pixels/second.


real getJointTranslation()

Returns the current translation of the joint, in pixels.


point getReactionForce(real inv_dt)

Returns the reaction force, in kg*pixels/second^2 for a timestep of length inv_dt, in seconds.

For the Parameter inv_dt, World::timeStep can be used.


real getReactionTorque(real inv_dt)

Returns the reaction torque, in clockwise kg*pixels^2/second^2 for a timestep of length inv_dt, in seconds.

For the Parameter inv_dt, World::timeStep can be used.


Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded