Joints
From Newton Wiki
Contents |
About
Newton offers several different types of joints that can be used to stitch two (or more) objects together and/or to limit the degree of freedom for certain objects. This page shows how the differnet joint types could look like, to give you an impression on how they can be used. There is also an official tutorial on joints that can be found here.
Common functions
These functions are common for all joint types :
- NewtonJointGetUserData
- NewtonJointSetUserData
- NewtonJointGetCollisionState
- NewtonJointSetCollisionState
- NewtonJointGetStiffness
- NewtonJointSetStiffness
- NewtonDestroyJoint
- NewtonJointSetDestructor
Ball and socket
Description
This joint type has an anchor (the end of blue sphere) and a moveable body that is "hanging" by this anchor (the beginning of the green sphere). The movement of that body is free to all directions, but limited to a certain degree (specified in angles), so that the child body's movement is limited to a cone-shped area. A good example for such a joint is your wrist angle or your hip joint.
Functions
- NewtonConstraintCreateBall
- NewtonBallSetUserCallback
- NewtonBallGetJointAngle
- NewtonBallGetJointOmega
- NewtonBallGetJointForce
- NewtonBallSetConeLimits
Hinge
Description
An object attached to a hinge joint can only rotate around one dimension perpendicular to the axis it is attached to. A good real-life example would be a swinging door or a propeller.
Functions
- NewtonConstraintCreateHinge
- NewtonHingeSetUserCallback
- NewtonHingeGetJointAngle
- NewtonHingeGetJointOmega
- NewtonHingeGetJointForce
- NewtonHingeCalculateStopAlpha
Slider
Description
This should be very obvious. A child body attached via a slider joint can only slide up and down (move along) the axis it is attached to. A real-life example is e.g. a car's damper shaft.
Functions
- NewtonConstraintCreateSlider
- NewtonSliderSetUserCallback
- NewtonSliderGetJointPosit
- NewtonSliderGetJointVeloc
- NewtonSliderGetJointForce
- NewtonSliderCalculateStopAccel
Corkscrew
Description
This joint type is an enhanched version of a slider joint which allows the attached child body to not only slide up and down the axis, but also to rotate around this axis. It's called corkscrew-joint because that's the best way to describe how a child body attached with such a joint can move.
Functions
- NewtonConstraintCreateCorkscrew
- NewtonCorkscrewSetUserCallback
- NewtonCorkscrewGetJointPosit
- NewtonCorkscrewGetJointAngle
- NewtonCorkscrewGetJointVeloc
- NewtonCorkscrewGetJointOmega
- NewtonCorkscrewGetJointForce
- NewtonCorkscrewCalculateStopAlpha
- NewtonCorkscrewCalculateStopAccel
Universal
Description
The universal joint allows the attached child body to rotate on two axis. It's like a hinge joint with an added degree of freedom.
Functions
- NewtonConstraintCreateUniversal
- NewtonUniversalSetUserCallback
- NewtonUniversalGetJointAngle0
- NewtonUniversalGetJointAngle1
- NewtonUniversalGetJointOmega0
- NewtonUniversalGetJointOmega1
- NewtonUniversalGetJointForce
- NewtonUniversalCalculateStopAlpha0
- NewtonUniversalCalculateStopAlpha1
Up-Vector
Description
This specialized vector can be used to limit rotation to one axis of freedom for rigid bodies. It's mostly used if you use e.g. a sphere to create a character controller and don't want that sphere to "fall" forwards. It's like if you want an egg to stand still upwards on the table but still be able to rotate it on the y-axis and move it around.
Functions
Userdefined bilateral
Description
This joint type is meant to be fully customizeable by the user. It can have up tp 6 degrees of freedom (3 linear and 3 angluar) but the user can specifiy on how (if) to limit them. So this type of joint can be used to implement any kind if joint you can think of. So if the other joints that Newton offers are not the right thing, you can built the joint you need using this one.
Functions
- NewtonConstraintCreateUserJoint
- NewtonUserJointAddLinearRow
- NewtonUserJointAddAngularRow
- NewtonUserJointSetRowMinimunFriction
- NewtonUserJointSetRowMaximunFriction
- NewtonUserJointSetRowAcceleration
- NewtonUserJointSetRowStiffness
- NewtonUserJointGetRowForce
Ragdoll
Description
This is actually a joint-container specialized for making so-called "Ragdolls". Ragdolls are mostly used to animate death sequences and are made up of ball-and-socket joints. But they can also be used to animate humandoid modells.
Functions
- NewtonCreateRagDoll
- NewtonDestroyRagDoll
- NewtonRagDollBegin
- NewtonRagDollEnd
- NewtonRagDollSetForceAndTorqueCallback
- NewtonRagDollSetTransformCallback
- NewtonRagDollAddBone
- NewtonRagDollBoneGetUserData
- NewtonRagDollBoneGetBody
- NewtonRagDollBoneSetID
- NewtonRagDollBoneSetLimits
- NewtonRagDollBoneGetLocalMatrix
- NewtonRagDollBoneGetGlobalMatrix
Vehicle
Description
This joint-container implements a full rigid body vehicle to simulate real-life vehicles. Note that it can be hard to tweak the different parameters for this vehicle joint if you want it to act accurate. If you also want a vehicle that accelerates like a real vehicle, you need to implement a gearbox. It's not the job of a physics engine to implement such a thing, so you need to do it by yourself.
Functions
- NewtonConstraintCreateVehicle
- NewtonVehicleReset
- NewtonVehicleSetTireCallback
- NewtonVehicleAddTire
- NewtonVehicleRemoveTire
- NewtonVehicleBalanceTires
- NewtonVehicleGetFirstTireID
- NewtonVehicleGetNextTireID
- NewtonVehicleTireIsAirBorne
- NewtonVehicleTireLostSideGrip
- NewtonVehicleTireLostTraction
- NewtonVehicleGetTireUserData
- NewtonVehicleGetTireOmega
- NewtonVehicleGetTireNormalLoad
- NewtonVehicleGetTireSteerAngle
- NewtonVehicleGetTireLateralSpeed
- NewtonVehicleGetTireLongitudinalSpeed
- NewtonVehicleGetTireMatrix
- NewtonVehicleSetTireTorque
- NewtonVehicleSetTireSteerAngle
- NewtonVehicleSetTireMaxSideSleepSpeed
- NewtonVehicleSetTireSideSleepCoeficient
- NewtonVehicleSetTireMaxLongitudinalSlideSpeed
- NewtonVehicleSetTireLongitudinalSlideCoeficient
- NewtonVehicleTireCalculateMaxBrakeAcceleration
- NewtonVehicleTireSetBrakeAcceleration







