MCPcopy Create free account
hub / github.com/EricLengyel/Terathon-Math-Library / Subvec3D

Class Subvec3D

TSAlgebra.h:415–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413
414 template <typename type_struct, bool anti, int count, int index_x, int index_y, int index_z>
415 class Subvec3D
416 {
417 public:
418
419 typedef typename type_struct::component_type component_type;
420 typedef typename type_struct::vector3D_type vector3D_type;
421
422 component_type data[count];
423
424 Subvec3D& Set(const component_type& x, const component_type& y, const component_type& z)
425 {
426 data[index_x] = x;
427 data[index_y] = y;
428 data[index_z] = z;
429 return (*this);
430 }
431
432 void Set(const component_type& x, const component_type& y, const component_type& z) volatile
433 {
434 data[index_x] = x;
435 data[index_y] = y;
436 data[index_z] = z;
437 }
438
439 operator typename ConverterVector3D<type_struct, index_x, index_y, index_z>::vector3D_type(void)
440 {
441 return (ConverterVector3D<type_struct, index_x, index_y, index_z>::Convert(data));
442 }
443
444 operator typename ConverterVector3D<type_struct, index_x, index_y, index_z>::const_vector3D_type(void) const
445 {
446 return (ConverterVector3D<type_struct, index_x, index_y, index_z>::Convert(data));
447 }
448
449 Subvec3D& operator =(const vector3D_type& value)
450 {
451 data[index_x] = value.x;
452 data[index_y] = value.y;
453 data[index_z] = value.z;
454 return (*this);
455 }
456
457 void operator =(const vector3D_type& value) volatile
458 {
459 data[index_x] = value.x;
460 data[index_y] = value.y;
461 data[index_z] = value.z;
462 }
463
464 Subvec3D& operator =(const Subvec3D& value)
465 {
466 data[index_x] = value.data[index_x];
467 data[index_y] = value.data[index_y];
468 data[index_z] = value.data[index_z];
469 return (*this);
470 }
471
472 void operator =(const Subvec3D& value) volatile

Callers

nothing calls this directly

Calls 1

InverseSqrtFunction · 0.85

Tested by

no test coverage detected