RavEngine
Loading...
Searching...
No Matches
CmSpatialVector.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#ifndef CM_SPATIAL_VECTOR_H
30#define CM_SPATIAL_VECTOR_H
31
32#include "foundation/PxVec3.h"
33#include "foundation/PxVecMath.h"
34#include "foundation/PxTransform.h"
35
40namespace physx
41{
42namespace Cm
43{
44PX_ALIGN_PREFIX(16)
46{
47public:
49 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVector()
50 {}
51
53 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVector(const PxVec3& lin, const PxVec3& ang)
54 : linear(lin), pad0(0.0f), angular(ang), pad1(0.0f)
55 {
56 }
57
58 PX_CUDA_CALLABLE PX_FORCE_INLINE ~SpatialVector()
59 {}
60
61 // PT: this one is very important. Without it, the Xbox compiler generates weird "float-to-int" and "int-to-float" LHS
62 // each time we copy a SpatialVector (see for example PIX on "solveSimpleGroupA" without this operator).
63 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator = (const SpatialVector& v)
64 {
65 linear = v.linear;
66 pad0 = 0.0f;
67 angular = v.angular;
68 pad1 = 0.0f;
69 }
70
71 static PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVector zero() { return SpatialVector(PxVec3(0),PxVec3(0)); }
72
73 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVector operator+(const SpatialVector& v) const
74 {
75 return SpatialVector(linear+v.linear,angular+v.angular);
76 }
77
78 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVector operator-(const SpatialVector& v) const
79 {
80 return SpatialVector(linear-v.linear,angular-v.angular);
81 }
82
83 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVector operator-() const
84 {
85 return SpatialVector(-linear,-angular);
86 }
87
88 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVector operator *(PxReal s) const
89 {
90 return SpatialVector(linear*s,angular*s);
91 }
92
93 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator+=(const SpatialVector& v)
94 {
95 linear+=v.linear;
96 angular+=v.angular;
97 }
98
99 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator-=(const SpatialVector& v)
100 {
101 linear-=v.linear;
102 angular-=v.angular;
103 }
104
105 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal magnitude() const
106 {
107 return angular.magnitude() + linear.magnitude();
108 }
109
110 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal dot(const SpatialVector& v) const
111 {
112 return linear.dot(v.linear) + angular.dot(v.angular);
113 }
114
115 PX_CUDA_CALLABLE PX_FORCE_INLINE bool isFinite() const
116 {
117 return linear.isFinite() && angular.isFinite();
118 }
119
120 PX_CUDA_CALLABLE PX_FORCE_INLINE Cm::SpatialVector scale(PxReal l, PxReal a) const
121 {
122 return Cm::SpatialVector(linear*l, angular*a);
123 }
124
125 PxVec3 linear;
126 PxReal pad0;
127 PxVec3 angular;
128 PxReal pad1;
129}
130PX_ALIGN_SUFFIX(16);
131
132PX_ALIGN_PREFIX(16)
134{
135public:
138 {}
139
140 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF(const PxReal* v)
141 : pad0(0.0f), pad1(0.0f)
142 {
143 top.x = v[0]; top.y = v[1]; top.z = v[2];
144 bottom.x = v[3]; bottom.y = v[4]; bottom.z = v[5];
145 }
147 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF(const PxVec3& top_, const PxVec3& bottom_)
148 : top(top_), pad0(0.0f), bottom(bottom_), pad1(0.0f)
149 {
150 }
151
152 PX_CUDA_CALLABLE PX_FORCE_INLINE ~SpatialVectorF()
153 {}
154
155 // PT: this one is very important. Without it, the Xbox compiler generates weird "float-to-int" and "int-to-float" LHS
156 // each time we copy a SpatialVector (see for example PIX on "solveSimpleGroupA" without this operator).
157 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator = (const SpatialVectorF& v)
158 {
159 top = v.top;
160 pad0 = 0.0f;
161 bottom = v.bottom;
162 pad1 = 0.0f;
163 }
164
165 static PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF Zero() { return SpatialVectorF(PxVec3(0), PxVec3(0)); }
166
167 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF operator+(const SpatialVectorF& v) const
168 {
169 return SpatialVectorF(top + v.top, bottom + v.bottom);
170 }
171
172 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF operator-(const SpatialVectorF& v) const
173 {
174 return SpatialVectorF(top - v.top, bottom - v.bottom);
175 }
176
177 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF operator-() const
178 {
179 return SpatialVectorF(-top, -bottom);
180 }
181
182 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF operator *(PxReal s) const
183 {
184 return SpatialVectorF(top*s, bottom*s);
185 }
186
187 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF multiply(const SpatialVectorF& v) const
188 {
189 return SpatialVectorF(top.multiply(v.top), bottom.multiply(v.bottom));
190 }
191
192 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator *= (const PxReal s)
193 {
194 top *= s;
195 bottom *= s;
196 }
197
198 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator += (const SpatialVectorF& v)
199 {
200 top += v.top;
201 bottom += v.bottom;
202 }
203
204 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator -= (const SpatialVectorF& v)
205 {
206 top -= v.top;
207 bottom -= v.bottom;
208 }
209
210 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal magnitude() const
211 {
212 return top.magnitude() + bottom.magnitude();
213 }
214
215 PX_FORCE_INLINE PxReal magnitudeSquared() const
216 {
217 return top.magnitudeSquared() + bottom.magnitudeSquared();
218 }
219
220 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal innerProduct(const SpatialVectorF& v) const
221 {
222 return bottom.dot(v.top) + top.dot(v.bottom);
223 /*PxVec3 p0 = bottom.multiply(v.top);
224 PxVec3 p1 = top.multiply(v.bottom);
225
226 PxReal result = (((p1.y + p1.z) + (p0.z + p1.x)) + (p0.x + p0.y));
227 return result;*/
228 }
229
230 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal dot(const SpatialVectorF& v) const
231 {
232 return top.dot(v.top) + bottom.dot(v.bottom);
233 }
234
235 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal dot(const SpatialVector& v) const
236 {
237 return bottom.dot(v.angular) + top.dot(v.linear);
238 }
239
240 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF cross(const SpatialVectorF& v) const
241 {
242 SpatialVectorF a;
243 a.top = top.cross(v.top);
244 a.bottom = top.cross(v.bottom) + bottom.cross(v.top);
245 return a;
246 }
247
248 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF abs() const
249 {
250 return SpatialVectorF(top.abs(), bottom.abs());
251 }
252
253 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF rotate(const PxTransform& rot) const
254 {
255 return SpatialVectorF(rot.rotate(top), rot.rotate(bottom));
256 }
257
258 PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF rotateInv(const PxTransform& rot) const
259 {
260 return SpatialVectorF(rot.rotateInv(top), rot.rotateInv(bottom));
261 }
262
263 PX_CUDA_CALLABLE PX_FORCE_INLINE bool isFinite() const
264 {
265 return top.isFinite() && bottom.isFinite();
266 }
267
268 PX_CUDA_CALLABLE PX_FORCE_INLINE bool isValid(const PxReal maxV) const
269 {
270 const bool tValid = ((PxAbs(top.x) <= maxV) && (PxAbs(top.y) <= maxV) && (PxAbs(top.z) <= maxV));
271 const bool bValid = ((PxAbs(bottom.x) <= maxV) && (PxAbs(bottom.y) <= maxV) && (PxAbs(bottom.z) <= maxV));
272
273 return tValid && bValid;
274 }
275
276 PX_CUDA_CALLABLE PX_FORCE_INLINE Cm::SpatialVectorF scale(PxReal l, PxReal a) const
277 {
278 return Cm::SpatialVectorF(top*l, bottom*a);
279 }
280
281 PX_CUDA_CALLABLE PX_FORCE_INLINE void assignTo(PxReal* val) const
282 {
283 val[0] = top.x; val[1] = top.y; val[2] = top.z;
284 val[3] = bottom.x; val[4] = bottom.y; val[5] = bottom.z;
285 }
286
287 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal& operator [] (const PxU32 index)
288 {
289 PX_ASSERT(index < 6);
290 if(index < 3)
291 return top[index];
292 return bottom[index-3];
293 }
294
295 PX_CUDA_CALLABLE PX_FORCE_INLINE const PxReal& operator [] (const PxU32 index) const
296 {
297 PX_ASSERT(index < 6);
298 if (index < 3)
299 return top[index];
300 return bottom[index-3];
301 }
302
303 PxVec3 top;
304 PxReal pad0;
305 PxVec3 bottom;
306 PxReal pad1;
307} PX_ALIGN_SUFFIX(16);
308
310{
311public:
314 {}
315
316 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector(const PxReal* v)
317 {
318 top.x = v[0]; top.y = v[1]; top.z = v[2];
319 bottom.x = v[3]; bottom.y = v[4]; bottom.z = v[5];
320 }
322 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector(const PxVec3& top_, const PxVec3& bottom_)
323 : top(top_), bottom(bottom_)
324 {
325 }
326
328 {}
329
330 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator = (const SpatialVectorF& v)
331 {
332 top = v.top;
333 bottom = v.bottom;
334 }
335
336 static PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector Zero() { return UnAlignedSpatialVector(PxVec3(0), PxVec3(0)); }
337
338 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector operator+(const UnAlignedSpatialVector& v) const
339 {
340 return UnAlignedSpatialVector(top + v.top, bottom + v.bottom);
341 }
342
343 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector operator-(const UnAlignedSpatialVector& v) const
344 {
345 return UnAlignedSpatialVector(top - v.top, bottom - v.bottom);
346 }
347
348 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector operator-() const
349 {
350 return UnAlignedSpatialVector(-top, -bottom);
351 }
352
353 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector operator *(PxReal s) const
354 {
355 return UnAlignedSpatialVector(top*s, bottom*s);
356 }
357
358 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator *= (const PxReal s)
359 {
360 top *= s;
361 bottom *= s;
362 }
363
364 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator += (const UnAlignedSpatialVector& v)
365 {
366 top += v.top;
367 bottom += v.bottom;
368 }
369
370 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator += (const SpatialVectorF& v)
371 {
372 top += v.top;
373 bottom += v.bottom;
374 }
375
376 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator -= (const UnAlignedSpatialVector& v)
377 {
378 top -= v.top;
379 bottom -= v.bottom;
380 }
381
382 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator -= (const SpatialVectorF& v)
383 {
384 top -= v.top;
385 bottom -= v.bottom;
386 }
387
388 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal magnitude() const
389 {
390 return top.magnitude() + bottom.magnitude();
391 }
392
393 PX_FORCE_INLINE PxReal magnitudeSquared() const
394 {
395 return top.magnitudeSquared() + bottom.magnitudeSquared();
396 }
397
398 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal innerProduct(const UnAlignedSpatialVector& v) const
399 {
400 return bottom.dot(v.top) + top.dot(v.bottom);
401 }
402
403 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal innerProduct(const SpatialVectorF& v) const
404 {
405 return bottom.dot(v.top) + top.dot(v.bottom);
406 }
407
408 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal dot(const UnAlignedSpatialVector& v) const
409 {
410 return top.dot(v.top) + bottom.dot(v.bottom);
411 }
412
413 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal dot(const SpatialVectorF& v) const
414 {
415 return top.dot(v.top) + bottom.dot(v.bottom);
416 }
417
418 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector cross(const UnAlignedSpatialVector& v) const
419 {
421 a.top = top.cross(v.top);
422 a.bottom = top.cross(v.bottom) + bottom.cross(v.top);
423 return a;
424 }
425
426 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector abs() const
427 {
428 return UnAlignedSpatialVector(top.abs(), bottom.abs());
429 }
430
431 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector rotate(const PxTransform& rot) const
432 {
433 return UnAlignedSpatialVector(rot.rotate(top), rot.rotate(bottom));
434 }
435
436 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector rotateInv(const PxTransform& rot) const
437 {
438 return UnAlignedSpatialVector(rot.rotateInv(top), rot.rotateInv(bottom));
439 }
440
441 PX_CUDA_CALLABLE PX_FORCE_INLINE bool isFinite() const
442 {
443 return top.isFinite() && bottom.isFinite();
444 }
445
446 PX_CUDA_CALLABLE PX_FORCE_INLINE bool isValid(const PxReal maxV) const
447 {
448 const bool tValid = ((top.x <= maxV) && (top.y <= maxV) && (top.z <= maxV));
449 const bool bValid = ((bottom.x <= maxV) && (bottom.y <= maxV) && (bottom.z <= maxV));
450
451 return tValid && bValid;
452 }
453
454 PX_CUDA_CALLABLE PX_FORCE_INLINE Cm::UnAlignedSpatialVector scale(PxReal l, PxReal a) const
455 {
456 return Cm::UnAlignedSpatialVector(top*l, bottom*a);
457 }
458
459 PX_CUDA_CALLABLE PX_FORCE_INLINE void assignTo(PxReal* val) const
460 {
461 val[0] = top.x; val[1] = top.y; val[2] = top.z;
462 val[3] = bottom.x; val[4] = bottom.y; val[5] = bottom.z;
463 }
464
465 PX_CUDA_CALLABLE PX_FORCE_INLINE PxReal& operator [] (const PxU32 index)
466 {
467 PX_ASSERT(index < 6);
468 return (&top.x)[index];
469 }
470
471 PX_CUDA_CALLABLE PX_FORCE_INLINE const PxReal& operator [] (const PxU32 index) const
472 {
473 PX_ASSERT(index < 6);
474 return (&top.x)[index];
475 }
476
477 PxVec3 top; //12 12
478 PxVec3 bottom; //12 24
479};
480
481PX_ALIGN_PREFIX(16)
483{
484 aos::Vec3V linear;
485 aos::Vec3V angular;
486
488 PX_FORCE_INLINE SpatialVectorV(PxZERO): linear(aos::V3Zero()), angular(aos::V3Zero()) {}
489 PX_FORCE_INLINE SpatialVectorV(const Cm::SpatialVector& v): linear(aos::V3LoadA(&v.linear.x)), angular(aos::V3LoadA(&v.angular.x)) {}
490 PX_FORCE_INLINE SpatialVectorV(const aos::Vec3VArg l, const aos::Vec3VArg a): linear(l), angular(a) {}
491 PX_FORCE_INLINE SpatialVectorV(const SpatialVectorV& other): linear(other.linear), angular(other.angular) {}
492
493 PX_FORCE_INLINE SpatialVectorV& operator=(const SpatialVectorV& other) { linear = other.linear; angular = other.angular; return *this; }
494
495 PX_FORCE_INLINE SpatialVectorV operator+(const SpatialVectorV& other) const { return SpatialVectorV(aos::V3Add(linear,other.linear),
496 aos::V3Add(angular, other.angular)); }
497
498 PX_FORCE_INLINE SpatialVectorV& operator+=(const SpatialVectorV& other) { linear = aos::V3Add(linear,other.linear);
499 angular = aos::V3Add(angular, other.angular);
500 return *this;
501 }
502
503 PX_FORCE_INLINE SpatialVectorV operator-(const SpatialVectorV& other) const { return SpatialVectorV(aos::V3Sub(linear,other.linear),
504 aos::V3Sub(angular, other.angular)); }
505
506 PX_FORCE_INLINE SpatialVectorV operator-() const { return SpatialVectorV(aos::V3Neg(linear), aos::V3Neg(angular)); }
507
508 PX_FORCE_INLINE SpatialVectorV operator*(const aos::FloatVArg r) const { return SpatialVectorV(aos::V3Scale(linear,r), aos::V3Scale(angular,r)); }
509
510 PX_FORCE_INLINE SpatialVectorV& operator-=(const SpatialVectorV& other) { linear = aos::V3Sub(linear,other.linear);
511 angular = aos::V3Sub(angular, other.angular);
512 return *this;
513 }
514
515 PX_FORCE_INLINE aos::FloatV dot(const SpatialVectorV& other) const { return aos::V3SumElems(aos::V3Add(aos::V3Mul(linear, other.linear), aos::V3Mul(angular, other.angular))); }
516
517 PX_FORCE_INLINE SpatialVectorV multiply(const SpatialVectorV& other) const { return SpatialVectorV(aos::V3Mul(linear, other.linear), aos::V3Mul(angular, other.angular)); }
518
519 PX_FORCE_INLINE SpatialVectorV multiplyAdd(const SpatialVectorV& m, const SpatialVectorV& a) const { return SpatialVectorV(aos::V3MulAdd(linear, m.linear, a.linear), aos::V3MulAdd(angular, m.angular, a.angular)); }
520
521 PX_FORCE_INLINE SpatialVectorV scale(const aos::FloatV& a, const aos::FloatV& b) const { return SpatialVectorV(aos::V3Scale(linear, a), aos::V3Scale(angular, b)); }
522
523}PX_ALIGN_SUFFIX(16);
524
525} // namespace Cm
526
529
530}
531
532#endif
Definition CmSpatialVector.h:46
PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVector(const PxVec3 &lin, const PxVec3 &ang)
Construct from two PxcVectors.
Definition CmSpatialVector.h:53
PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVector()
Default constructor.
Definition CmSpatialVector.h:49
3 Element vector class.
Definition PxVec3.h:50
PX_CUDA_CALLABLE PX_FORCE_INLINE float dot(const PxVec3 &v) const
returns the scalar product of this and other.
Definition PxVec3.h:276
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 cross(const PxVec3 &v) const
cross product
Definition PxVec3.h:284
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 abs() const
returns absolute values of components;
Definition PxVec3.h:376
PX_CUDA_CALLABLE PX_FORCE_INLINE float magnitudeSquared() const
returns the squared magnitude
Definition PxVec3.h:175
PX_CUDA_CALLABLE PX_FORCE_INLINE float magnitude() const
returns the magnitude
Definition PxVec3.h:183
PX_CUDA_CALLABLE PX_INLINE bool isFinite() const
returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)
Definition PxVec3.h:156
GLM_FUNC_QUALIFIER vec< 3, T, Q > cross(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
Definition func_geometric.inl:175
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_COMPILE_TIME_ASSERT(exp)
Definition PxPreprocessor.h:428
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_INLINE void rotate(const Gu::Box &src, const PxMat34 &mtx, Gu::Box &obb)
recomputes the OBB after an arbitrary transform by a 4x4 matrix.
Definition GuBoxConversion.h:100
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAbs(float a)
abs returns the absolute value of its argument.
Definition PxMath.h:109
PX_INLINE PxStrideIterator< T > operator+(int i, PxStrideIterator< T > it)
Addition operator.
Definition PxStrideIterator.h:323
PxZERO
Definition Px.h:93
Definition CmSpatialVector.h:134
PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF(const PxVec3 &top_, const PxVec3 &bottom_)
Construct from two PxcVectors.
Definition CmSpatialVector.h:147
PX_CUDA_CALLABLE PX_FORCE_INLINE SpatialVectorF()
Default constructor.
Definition CmSpatialVector.h:137
Definition CmSpatialVector.h:483
Definition CmSpatialVector.h:310
PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector()
Default constructor.
Definition CmSpatialVector.h:313
PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector(const PxVec3 &top_, const PxVec3 &bottom_)
Construct from two PxcVectors.
Definition CmSpatialVector.h:322
Definition PxVecMathAoSScalar.h:52
Definition PxVecMathAoSScalar.h:77