📄 oxnewtonimport.pas
字号:
//
// *****************************************************************************************************************************
function NewtonConstraintCreateHinge( const newtonWorld : PNewtonWorld;
const pivotPoint : PFloat; const pinDir : PFloat;
const childBody : PNewtonBody; const parentBody : PNewtonBody ) : PNewtonJoint; cdecl; external{$IFDEF __GPC__}name 'NewtonConstraintCreateHinge'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonHingeSetUserCallback( const hinge : PNewtonJoint; callback : NewtonHingeCallBack ); cdecl; external{$IFDEF __GPC__}name 'NewtonHingeSetUserCallback'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonHingeGetJointAngle( const hinge : PNewtonJoint ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonHingeGetJointAngle'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonHingeGetJointOmega( const hinge : PNewtonJoint ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonHingeGetJointOmega'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonHingeGetJointForce( const hinge : PNewtonJoint; force : PFloat ); cdecl; external{$IFDEF __GPC__}name 'NewtonHingeGetJointForce'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonHingeCalculateStopAlpha( const hinge : PNewtonJoint; const desc : PNewtonHingeSliderUpdateDesc; angle : float ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonHingeCalculateStopAlpha'{$ELSE}NewtonDLL{$ENDIF __GPC__};
// *****************************************************************************************************************************
//
// Slider joint functions
//
// *****************************************************************************************************************************
function NewtonConstraintCreateSlider( const newtonWorld : PNewtonWorld;
const pivotPoint : PFloat; const pinDir : PFloat;
const childBody : PNewtonBody; const parentBody : PNewtonBody ) : PNewtonJoint; cdecl; external{$IFDEF __GPC__}name 'NewtonConstraintCreateSlider'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonSliderSetUserCallback( const slider : PNewtonJoint; callback : NewtonSliderCallBack ); cdecl; external{$IFDEF __GPC__}name 'NewtonSliderSetUserCallback'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonSliderGetJointPosit( const slider : PNewtonJoint ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonSliderGetJointPosit'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonSliderGetJointVeloc( const slider : PNewtonJoint ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonSliderGetJointVeloc'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonSliderGetJointForce( const slider : PNewtonJoint; force : PFloat ); cdecl; external{$IFDEF __GPC__}name 'NewtonSliderGetJointForce'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonSliderCalculateStopAccel( const slider : PNewtonJoint; const desc : PNewtonHingeSliderUpdateDesc; position : float ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonSliderCalculateStopAccel'{$ELSE}NewtonDLL{$ENDIF __GPC__};
// *****************************************************************************************************************************
//
// Corkscrew joint functions
//
// *****************************************************************************************************************************
function NewtonConstraintCreateCorkscrew( const newtonWorld : PNewtonWorld;
const pivotPoint : PFloat; const pinDir : PFloat;
const childBody : PNewtonBody; const parentBody : PNewtonBody ) : PNewtonJoint; cdecl; external{$IFDEF __GPC__}name 'NewtonConstraintCreateCorkscrew'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonCorkscrewSetUserCallback( const corkscrew : PNewtonJoint; callback : NewtonCorkscrewCallBack ); cdecl; external{$IFDEF __GPC__}name 'NewtonCorkscrewSetUserCallback'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonCorkscrewGetJointPosit( const corkscrew : PNewtonJoint ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonCorkscrewGetJointPosit'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonCorkscrewGetJointAngle( const corkscrew : PNewtonJoint ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonCorkscrewGetJointAngle'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonCorkscrewGetJointVeloc( const corkscrew : PNewtonJoint ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonCorkscrewGetJointVeloc'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonCorkscrewGetJointOmega( const corkscrew : PNewtonJoint ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonCorkscrewGetJointOmega'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonCorkscrewGetJointForce( const corkscrew : PNewtonJoint; force : PFloat ); cdecl; external{$IFDEF __GPC__}name 'NewtonCorkscrewGetJointForce'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonCorkscrewCalculateStopAlpha( const corkscrew : PNewtonJoint; const desc : PNewtonHingeSliderUpdateDesc; angle : float ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonCorkscrewCalculateStopAlpha'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonCorkscrewCalculateStopAccel( const corkscrew : PNewtonJoint; const desc : PNewtonHingeSliderUpdateDesc; position : float ) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonCorkscrewCalculateStopAccel'{$ELSE}NewtonDLL{$ENDIF __GPC__};
// *****************************************************************************************************************************
//
// Universal joint functions
//
// *****************************************************************************************************************************
function NewtonConstraintCreateUniversal( const newtonWorld: PNewtonWorld; const pivotPoint: PFloat; const pinDir0: PFloat;
const pinDir1: PFloat; const childBody: PNewtonBody; const parentBody: PNewtonBody): PNewtonJoint; cdecl; external{$IFDEF __GPC__}name 'NewtonConstraintCreateUniversal'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUniversalSetUserCallback(const universal: PNewtonJoint; callback: NewtonUniversalCallback); cdecl; external{$IFDEF __GPC__}name 'NewtonUniversalSetUserCallback'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonUniversalGetJointAngle0(const universal: PNewtonJoint):float; cdecl; external{$IFDEF __GPC__}name 'NewtonUniversalGetJointAngle0'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonUniversalGetJointAngle1(const universal: PNewtonJoint):float; cdecl; external{$IFDEF __GPC__}name 'NewtonUniversalGetJointAngle1'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonUniversalGetJointOmega0(const universal: PNewtonJoint):float; cdecl; external{$IFDEF __GPC__}name 'NewtonUniversalGetJointOmega0'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonUniversalGetJointOmega1(const universal: PNewtonJoint):float; cdecl; external{$IFDEF __GPC__}name 'NewtonUniversalGetJointOmega1'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUniversalGetJointForce(const universal: PNewtonJoint; force: PFloat); cdecl; external{$IFDEF __GPC__}name 'NewtonUniversalGetJointForce'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonUniversalCalculateStopAlpha0(const universal : PNewtonJoint; const desc: PNewtonHingeSliderUpdateDesc; angle: float): float; cdecl; external{$IFDEF __GPC__}name 'NewtonUniversalCalculateStopAlpha0'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonUniversalCalculateStopAlpha1(const universal : PNewtonJoint; const desc: PNewtonHingeSliderUpdateDesc; angle: float): float; cdecl; external{$IFDEF __GPC__}name 'NewtonUniversalCalculateStopAlpha1'{$ELSE}NewtonDLL{$ENDIF __GPC__};
// *****************************************************************************************************************************
//
// Up vector joint unctions
//
// *****************************************************************************************************************************
function NewtonConstraintCreateUpVector( const newtonWorld : PNewtonWorld; const pinDir : PFloat; const body : PNewtonBody ) : PNewtonJoint; cdecl; external{$IFDEF __GPC__}name 'NewtonConstraintCreateUpVector'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUpVectorGetPin( const upVector : PNewtonJoint; pin : PFloat ); cdecl; external{$IFDEF __GPC__}name 'NewtonUpVectorGetPin'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUpVectorSetPin( const upVector : PNewtonJoint; const pin : PFloat ); cdecl; external{$IFDEF __GPC__}name 'NewtonUpVectorSetPin'{$ELSE}NewtonDLL{$ENDIF __GPC__};
// *****************************************************************************************************************************
//
// User defined bilateral Joint
//
// *****************************************************************************************************************************
function NewtonConstraintCreateUserJoint(const NewtonWorld : PNewtonWorld; MaxDOF : Integer; Callback : PNewtonUserBilateralCallBack;
const ChildBody: PNewtonBody; const parentBody: PNewtonBody): PNewtonJoint;
cdecl; external{$IFDEF __GPC__}name 'NewtonConstraintCreateUserJoint'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUserJointAddLinearRow(const Joint : PNewtonJoint; const pivot0 : PFloat; const pivot1 : PFloat; const Dir : PFloat); cdecl; external{$IFDEF __GPC__}name 'NewtonUserJointAddLinearRow'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUserJointAddAngularRow(const Joint : PNewtonJoint; RelativeAngle : Float; const Dir : PFloat); cdecl; external{$IFDEF __GPC__}name 'NewtonUserJointAddAngularRow'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUserJointAddGeneralRow(const Joint : PNewtonJoint; const Jacobian0 : PFloat; const Jacobian1 : PFloat); cdecl; external{$IFDEF __GPC__}name 'NewtonUserJointAddGeneralRow'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUserJointSetRowMinimumFriction(const Joint : PNewtonJoint; Friction : Float); cdecl; external{$IFDEF __GPC__}name 'NewtonUserJointSetRowMinimumFriction'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUserJointSetRowMaximumFriction(const Joint : PNewtonJoint; Friction : Float); cdecl; external{$IFDEF __GPC__}name 'NewtonUserJointSetRowMaximumFriction'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUserJointSetRowAcceleration(const Joint : PNewtonJoint; Acceleration : Float); cdecl; external{$IFDEF __GPC__}name 'NewtonUserJointSetRowAcceleration'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUserJointSetRowStiffness(const Joint : PNewtonJoint; Stiffness : Float); cdecl; external{$IFDEF __GPC__}name 'NewtonUserJointSetRowStiffness'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonUserJointSetRowSpringDamperAcceleration(const joint : PNewtonJoint; springK : Float; springD : Float); cdecl; external{$IFDEF __GPC__}name 'NewtonUserJointSetRowSpringDamperAcceleration'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonUserJointGetRowForce(const Joint : PNewtonJoint; Row : Int) : Float; cdecl; external{$IFDEF __GPC__}name 'NewtonUserJointGetRowForce'{$ELSE}NewtonDLL{$ENDIF __GPC__};
// *****************************************************************************************************************************
//
// Ragdoll joint contatiner funtion
//
// *****************************************************************************************************************************
function NewtonCreateRagDoll( const newtonWorld : PNewtonWorld ) : PNewtonRagDoll; cdecl; external{$IFDEF __GPC__}name 'NewtonCreateRagDoll'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonDestroyRagDoll( const newtonWorld : PNewtonWorld; const ragDoll : PNewtonRagDoll ); cdecl; external{$IFDEF __GPC__}name 'NewtonDestroyRagDoll'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonRagDollBegin( const ragDoll : PNewtonRagDoll ); cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollBegin'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonRagDollEnd( const ragDoll : PNewtonRagDoll ); cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollEnd'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonRagDollFindBone( const ragDoll : PNewtonRagDoll; id : int ) : PNewtonRagDollBone; cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollFindBone'{$ELSE}NewtonDLL{$ENDIF __GPC__};
//function NewtonRagDollGetRootBone( const ragDoll : PNewtonRagDoll ) : PNewtonRagDollBone; cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollGetRootBone'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonRagDollSetForceAndTorqueCallback( const ragDoll : PNewtonRagDoll; callback : NewtonApplyForceAndTorque ); cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollSetForceAndTorqueCallback'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonRagDollSetTransformCallback( const ragDoll : PNewtonRagDoll; callback : NewtonSetRagDollTransform ); cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollSetTransformCallback'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonRagDollAddBone( const RagDoll : PNewtonRagDoll; const Parent : PNewtonRagDollBone; userData : Pointer; mass : Float; const matrix : PFloat;
const BoneCollision : PNewtonCollision; const Size : PFloat) : PNewtonRagDollBone; cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollAddBone'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonRagDollBoneGetUserData( const bone : PNewtonRagDollBone ) : Pointer; cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollBoneGetUserData'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonRagDollBoneGetBody( const bone : PNewtonRagDollBone ) : PNewtonBody; cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollBoneGetBody'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonRagDollBoneSetID( const bone : PNewtonRagDollBone; id : int ); cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollBoneSetID'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonRagDollBoneSetLimits( const bone : PNewtonRagDollBone;
const coneDir : PFloat; minConeAngle : float; maxConeAngle : float; maxTwistAngle : float;
const bilateralConeDir : PFloat; negativeBilateralConeAngle : float; positiveBilateralConeAngle : float ); cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollBoneSetLimits'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonRagDollBoneGetLocalMatrix( const bone : PNewtonRagDollBone; matrix : PFloat ); cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollBoneGetLocalMatrix'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonRagDollBoneGetGlobalMatrix( const bone : PNewtonRagDollBone; matrix : PFloat ); cdecl; external{$IFDEF __GPC__}name 'NewtonRagDollBoneGetGlobalMatrix'{$ELSE}NewtonDLL{$ENDIF __GPC__};
// *****************************************************************************************************************************
//
// Vehicle joint functions
//
// *****************************************************************************************************************************
function NewtonConstraintCreateVehicle( const newtonWorld : PNewtonWorld; const upDir : PFloat; const body : PNewtonBody) : PNewtonJoint; cdecl; external{$IFDEF __GPC__}name 'NewtonConstraintCreateVehicle'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonVehicleReset( const vehicle : PNewtonJoint); cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleReset'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonVehicleSetTireCallback( const vehicle : PNewtonJoint; update : PNewtonVehicleTireUpdate); cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleSetTireCallback'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleAddTire( const vehicle : PNewtonJoint; const localMatrix : PFloat; const pin : PFloat; mass : Float; width : Float; radius : Float;
suspensionShock : Float; suspensionSpring : Float; suspensionLength : Float; userData : Pointer; collisionID : int) : Pointer; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleAddTire'{$ELSE}NewtonDLL{$ENDIF __GPC__};
procedure NewtonVehicleRemoveTire( const vehicle : PNewtonJoint; tireID : Pointer); cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleRemoveTire'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleGetFirstTireID( const vehicle : PNewtonJoint) : Pointer; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleGetFirstTireID'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleGetNextTireID( const vehicle : PNewtonJoint; tireId : Pointer) : Pointer; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleGetNextTireID'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleTireIsAirBorne( const vehicle : PNewtonJoint; tireId : Pointer) : int; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleTireIsAirBorne'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleTireLostSideGrip( const vehicle : PNewtonJoint; tireId : Pointer) : int; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleTireLostSideGrip'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleTireLostTraction( const vehicle : PNewtonJoint; tireId : Pointer) : int; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleTireLostTraction'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleGetTireUserData( const vehicle : PNewtonJoint; tireId : Pointer) : Pointer; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleGetTireUserData'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleGetTireOmega( const vehicle : PNewtonJoint; tireId : Pointer) : float; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleGetTireOmega'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleGetTireNormalLoad( const vehicle : PNewtonJoint; tireId : Pointer) : Float; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleGetTireNormalLoad'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleGetTireSteerAngle( const vehicle : PNewtonJoint; tireId : Pointer) : Float; cdecl; external{$IFDEF __GPC__}name 'NewtonVehicleGetTireSteerAngle'{$ELSE}NewtonDLL{$ENDIF __GPC__};
function NewtonVehicleGetTireLateralSpeed( const vehicle : PNewt
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -