MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / UnAlignedSpatialVector

Class UnAlignedSpatialVector

physx/source/common/src/CmSpatialVector.h:304–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302
303
304struct UnAlignedSpatialVector
305{
306public:
307 //! Default constructor
308 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector()
309 {}
310
311 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector(const PxReal* v)
312 {
313 top.x = v[0]; top.y = v[1]; top.z = v[2];
314 bottom.x = v[3]; bottom.y = v[4]; bottom.z = v[5];
315 }
316 //! Construct from two PxcVectors
317 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector(const PxVec3& top_, const PxVec3& bottom_)
318 : top(top_), bottom(bottom_)
319 {
320 }
321
322 PX_CUDA_CALLABLE PX_FORCE_INLINE ~UnAlignedSpatialVector()
323 {}
324
325
326
327
328 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator = (const SpatialVectorF& v)
329 {
330 top = v.top;
331 bottom = v.bottom;
332 }
333
334
335 static PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector Zero() { return UnAlignedSpatialVector(PxVec3(0), PxVec3(0)); }
336
337 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector operator+(const UnAlignedSpatialVector& v) const
338 {
339 return UnAlignedSpatialVector(top + v.top, bottom + v.bottom);
340 }
341
342 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector operator-(const UnAlignedSpatialVector& v) const
343 {
344 return UnAlignedSpatialVector(top - v.top, bottom - v.bottom);
345 }
346
347 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector operator-() const
348 {
349 return UnAlignedSpatialVector(-top, -bottom);
350 }
351
352 PX_CUDA_CALLABLE PX_FORCE_INLINE UnAlignedSpatialVector operator *(PxReal s) const
353 {
354 return UnAlignedSpatialVector(top*s, bottom*s);
355 }
356
357 PX_CUDA_CALLABLE PX_FORCE_INLINE void operator *= (const PxReal s)
358 {
359 top *= s;
360 bottom *= s;
361 }

Callers 11

ZeroMethod · 0.85
operator+Method · 0.85
operator-Method · 0.85
operator *Method · 0.85
absMethod · 0.85
rotateMethod · 0.85
rotateInvMethod · 0.85
scaleMethod · 0.85
operator *Method · 0.85
transposeTransformMethod · 0.85
operator *Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected