source: GTP/trunk/App/Games/Jungle_Rumble/src/physic/physics/include/NxSpringAndDamperEffectorDesc.h @ 1378

Revision 1378, 5.6 KB checked in by giegl, 18 years ago (diff)

GTPD - Jungle Rumble - integrate into GTP SVN structure

Line 
1#ifndef NX_PHYSICS_NXSPRINGANDDAMPEREFFECTORDESC
2#define NX_PHYSICS_NXSPRINGANDDAMPEREFFECTORDESC
3/*----------------------------------------------------------------------------*\
4|
5|                                               Public Interface to NovodeX Technology
6|
7|                                                            www.novodex.com
8|
9\*----------------------------------------------------------------------------*/
10/** \addtogroup physics
11  @{
12*/
13
14#include "Nxp.h"
15
16class NxActor;
17
18/* TODO: This is not yet/anymore used for anything useful!! */
19
20/**
21\brief Desc class for NxSpringAndDamperEffector.
22
23<h3>Example</h3>
24
25\include NxSpringAndDamperEffector_Create.cpp
26
27@see NxSpringAndDamperEffector
28*/
29class NxSpringAndDamperEffectorDesc
30        {
31        public:
32
33        /**
34        \brief Constructor sets to default.
35        */
36        NX_INLINE NxSpringAndDamperEffectorDesc();     
37       
38        /**
39        \brief (re)sets the structure to the default.   
40        */
41        NX_INLINE void setToDefault();
42       
43        /**
44        \brief Returns true if the descriptor is valid.
45
46        \return true if the current settings are valid
47        */
48        NX_INLINE bool isValid() const;
49
50        /**
51        \brief First attached body.
52
53        <b>Default:</b> NULL
54
55        <b>Platform:</b>
56        \li PC SW: Yes
57        \li PPU  : No
58        \li PS3  : Yes
59        \li XB360: Yes
60
61        @see NxSpringAndDampererEffector.setBodies()
62        */
63        NxActor* body1;
64
65        /**
66        \brief Second attached body.
67
68        <b>Default:</b> NULL
69
70        <b>Platform:</b>
71        \li PC SW: Yes
72        \li PPU  : No
73        \li PS3  : Yes
74        \li XB360: Yes
75
76        @see NxSpringAndDampererEffector.setBodies()
77        */
78        NxActor* body2;
79
80        /**
81        \brief First attachment point.
82
83        <b>Range:</b> position vector<br>
84        <b>Default:</b> Zero
85
86        <b>Platform:</b>
87        \li PC SW: Yes
88        \li PPU  : No
89        \li PS3  : Yes
90        \li XB360: Yes
91
92        @see NxSpringAndDampererEffector.setBodies()
93        */
94        NxVec3 pos1;
95
96        /**
97        \brief Second attachment point.
98
99        <b>Range:</b> position vector<br>
100        <b>Default:</b> Zero
101
102        <b>Platform:</b>
103        \li PC SW: Yes
104        \li PPU  : No
105        \li PS3  : Yes
106        \li XB360: Yes
107
108        @see NxSpringAndDampererEffector.setBodies()
109        */
110        NxVec3 pos2;
111
112//linear spring parameters:
113        /**
114        \brief
115
116        <b>Range:</b> [0,springDistRelaxed]<br>
117        <b>Default:</b> 0
118
119        <b>Platform:</b>
120        \li PC SW: Yes
121        \li PPU  : No
122        \li PS3  : Yes
123        \li XB360: Yes
124
125        @see NxSpringAndDampererEffector.setLinearSpring() NxSpringAndDampererEffector.getLinearSpring()
126        */
127        NxReal springDistCompressSaturate;
128       
129        /**
130        \brief
131
132        <b>Range:</b> [springDistCompressSaturate,springDistStretchSaturate]<br>
133        <b>Default:</b> 0
134
135        <b>Platform:</b>
136        \li PC SW: Yes
137        \li PPU  : No
138        \li PS3  : Yes
139        \li XB360: Yes
140
141        @see NxSpringAndDampererEffector.setLinearSpring() NxSpringAndDampererEffector.getLinearSpring()
142        */
143        NxReal springDistRelaxed;
144       
145        /**
146        \brief
147
148        <b>Range:</b> [springDistCompressSaturate,inf)<br>
149        <b>Default:</b> 0
150
151        <b>Platform:</b>
152        \li PC SW: Yes
153        \li PPU  : No
154        \li PS3  : Yes
155        \li XB360: Yes
156
157        @see NxSpringAndDampererEffector.setLinearSpring() NxSpringAndDampererEffector.getLinearSpring()
158        */
159        NxReal springDistStretchSaturate;
160       
161        /**
162        \brief
163
164        <b>Range:</b> [0,inf)<br>
165        <b>Default:</b> 0
166
167        <b>Platform:</b>
168        \li PC SW: Yes
169        \li PPU  : No
170        \li PS3  : Yes
171        \li XB360: Yes
172
173        @see NxSpringAndDampererEffector.setLinearSpring() NxSpringAndDampererEffector.getLinearSpring()
174        */
175        NxReal springMaxCompressForce;
176       
177        /**
178        \brief
179
180        <b>Range:</b> [0,inf)<br>
181        <b>Default:</b> 0
182
183        <b>Platform:</b>
184        \li PC SW: Yes
185        \li PPU  : No
186        \li PS3  : Yes
187        \li XB360: Yes
188
189        @see NxSpringAndDampererEffector.setLinearSpring() NxSpringAndDampererEffector.getLinearSpring()
190        */
191        NxReal springMaxStretchForce;
192
193//linear damper parameters:
194       
195        /**
196        \brief
197
198        <b>Range:</b> (-inf,0]<br>
199        <b>Default:</b> 0
200
201        <b>Platform:</b>
202        \li PC SW: Yes
203        \li PPU  : No
204        \li PS3  : Yes
205        \li XB360: Yes
206
207        @see NxSpringAndDampererEffector.setLinearDamper() NxSpringAndDampererEffector.getLinearDamper()
208        */
209        NxReal damperVelCompressSaturate;
210       
211        /**
212        \brief
213       
214        <b>Range:</b> [0,inf)<br>
215        <b>Default:</b> 0
216
217        <b>Platform:</b>
218        \li PC SW: Yes
219        \li PPU  : No
220        \li PS3  : Yes
221        \li XB360: Yes
222
223        @see NxSpringAndDampererEffector.setLinearDamper() NxSpringAndDampererEffector.getLinearDamper()
224        */
225        NxReal damperVelStretchSaturate;
226       
227        /**
228        \brief
229
230        <b>Range:</b> [0,inf)<br>
231        <b>Default:</b> 0
232
233        <b>Platform:</b>
234        \li PC SW: Yes
235        \li PPU  : No
236        \li PS3  : Yes
237        \li XB360: Yes
238
239        @see NxSpringAndDampererEffector.setLinearDamper() NxSpringAndDampererEffector.getLinearDamper()
240        */
241        NxReal damperMaxCompressForce;
242       
243        /**
244        \brief
245
246        <b>Range:</b> [0,inf)<br>
247        <b>Default:</b> 0
248
249        <b>Platform:</b>
250        \li PC SW: Yes
251        \li PPU  : No
252        \li PS3  : Yes
253        \li XB360: Yes
254
255        @see NxSpringAndDampererEffector.setLinearDamper() NxSpringAndDampererEffector.getLinearDamper()
256        */
257        NxReal damperMaxStretchForce;
258        };
259
260NX_INLINE NxSpringAndDamperEffectorDesc::NxSpringAndDamperEffectorDesc()        //constructor sets to default
261        {
262        setToDefault();
263        }
264
265NX_INLINE void NxSpringAndDamperEffectorDesc::setToDefault()
266        {
267        body1 = NULL;
268    body2 = NULL;
269
270        pos1.zero();
271        pos2.zero();
272
273        springDistCompressSaturate = 0;
274        springDistRelaxed = 0;
275        springDistStretchSaturate = 0;
276        springMaxCompressForce = 0;
277        springMaxStretchForce = 0;
278
279        damperVelCompressSaturate = 0;
280    damperVelStretchSaturate = 0;
281        damperMaxCompressForce = 0;
282        damperMaxStretchForce = 0;
283        }
284
285NX_INLINE bool NxSpringAndDamperEffectorDesc::isValid() const
286        {
287        return true;
288        }
289
290/** @} */
291#endif
292
293
294//AGCOPYRIGHTBEGIN
295///////////////////////////////////////////////////////////////////////////
296// Copyright © 2005 AGEIA Technologies.
297// All rights reserved. www.ageia.com
298///////////////////////////////////////////////////////////////////////////
299//AGCOPYRIGHTEND
300
Note: See TracBrowser for help on using the repository browser.