1 /*************************************************************************
3 * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
4 * All rights reserved. Email: russ@q12.org Web: www.q12.org *
6 * This library is free software; you can redistribute it and/or *
7 * modify it under the terms of EITHER: *
8 * (1) The GNU Lesser General Public License as published by the Free *
9 * Software Foundation; either version 2.1 of the License, or (at *
10 * your option) any later version. The text of the GNU Lesser *
11 * General Public License is included with this library in the *
13 * (2) The BSD-style license that is included with this library in *
14 * the file LICENSE-BSD.TXT. *
16 * This library is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files *
19 * LICENSE.TXT and LICENSE-BSD.TXT for more details. *
21 *************************************************************************/
23 #ifndef _ODE_JOINT_PU_H_
24 #define _ODE_JOINT_PU_H_
26 #include "universal.h"
31 * Component of a Prismatic -- Universal joint.
32 * The axisP must be perpendicular to axis1.
33 * The second axis of the universal joint is perpendicular to axis1.
35 * Since the PU joint is derived from the Universal joint. Some variable
38 * anchor1: Vector from body1 to the anchor point
39 * This vector is calculated when the body are attached or
40 * when the anchor point is set. It is like the offset of the Slider
41 * joint. Since there is a prismatic between the anchor and the body1
42 * the distance might change as the simulation goes on.
43 * anchor2: Vector from body2 to the anchor point.
49 * Prismatic articulation .. ..
52 * +--------------+ --| __.. .. anchor2
53 * <--------| x | .....|.......(__) ..
54 * axisP +--------------+ --| ^ <
55 * |----------------------->|
56 * anchor1 |--- Universal articulation
57 * axis1 going out of the plane
58 * axis2 is perpendicular to axis1
62 struct dxJointPU
: public dxJointUniversal
65 /// @brief Axis for the prismatic articulation w.r.t first body.
66 /// @note This is considered as axis2 from the parameter view
69 dxJointLimitMotor limotP
; ///< limit and motor information for the prismatic articulation.
72 dxJointPU( dxWorld
*w
);
73 virtual void getSureMaxInfo( SureMaxInfo
* info
);
74 virtual void getInfo1( Info1
* info
);
75 virtual void getInfo2( dReal worldFPS
, dReal worldERP
,
76 int rowskip
, dReal
*J1
, dReal
*J2
,
77 int pairskip
, dReal
*pairRhsCfm
, dReal
*pairLoHi
,
79 virtual dJointType
type() const;
80 virtual sizeint
size() const;
83 virtual void setRelativeValues();