| 302 | |
| 303 | |
| 304 | struct UnAlignedSpatialVector |
| 305 | { |
| 306 | public: |
| 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 | } |
no outgoing calls
no test coverage detected