2 Physics Effects Copyright(C) 2010 Sony Computer Entertainment Inc.
\r
5 Physics Effects is open software; you can redistribute it and/or
\r
6 modify it under the terms of the BSD License.
\r
8 Physics Effects is distributed in the hope that it will be useful,
\r
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
\r
11 See the BSD License for more details.
\r
13 A copy of the BSD License is distributed with
\r
14 Physics Effects under the filename: physics_effects_license.txt
\r
17 #ifndef _SCE_PFX_JOINT_UNIVERSAL_H
\r
18 #define _SCE_PFX_JOINT_UNIVERSAL_H
\r
20 #include "pfx_joint.h"
\r
21 #include "pfx_solver_body.h"
\r
24 namespace PhysicsEffects {
\r
26 struct PfxUniversalJointInitParam {
\r
27 PfxVector3 anchorPoint;
\r
29 PfxFloat swing1LowerAngle;
\r
30 PfxFloat swing1UpperAngle;
\r
31 PfxFloat swing2LowerAngle;
\r
32 PfxFloat swing2UpperAngle;
\r
34 PfxUniversalJointInitParam()
\r
36 anchorPoint = PfxVector3(0.0f);
\r
37 axis = PfxVector3(1.0f,0.0f,0.0f);
\r
38 swing1LowerAngle = -0.7f;
\r
39 swing1UpperAngle = 0.7f;
\r
40 swing2LowerAngle = -0.7f;
\r
41 swing2UpperAngle = 0.7f;
\r
45 PfxInt32 pfxInitializeUniversalJoint(
\r
47 const PfxRigidState &stateA,
\r
48 const PfxRigidState &stateB,
\r
49 const PfxUniversalJointInitParam ¶m);
\r
51 void pfxSetupUniversalJoint(
\r
53 const PfxRigidState &stateA,
\r
54 const PfxRigidState &stateB,
\r
55 PfxSolverBody &solverBodyA,
\r
56 PfxSolverBody &solverBodyB,
\r
59 // pfxWarmStartUniversalJoint = pfxWarmStartSwingTwistJoint
\r
61 // pfxSolveUniversalJoint = pfxSolveSwingTwistJoint
\r
63 } //namespace PhysicsEffects
\r
65 #endif // _SCE_PFX_JOINT_UNIVERSAL_H
\r