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

Class Subvec4D

TSAlgebra.h:640–829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638
639 template <typename type_struct, bool anti, int count, int index_x, int index_y, int index_z, int index_w>
640 class Subvec4D
641 {
642 public:
643
644 typedef typename type_struct::component_type component_type;
645 typedef typename type_struct::vector4D_type vector4D_type;
646
647 component_type data[count];
648
649 Subvec4D& Set(const component_type& x, const component_type& y, const component_type& z, const component_type& w)
650 {
651 data[index_x] = x;
652 data[index_y] = y;
653 data[index_z] = z;
654 data[index_w] = w;
655 return (*this);
656 }
657
658 void Set(const component_type& x, const component_type& y, const component_type& z, const component_type& w) volatile
659 {
660 data[index_x] = x;
661 data[index_y] = y;
662 data[index_z] = z;
663 data[index_w] = w;
664 }
665
666 operator typename ConverterVector4D<type_struct, index_x, index_y, index_z, index_w>::vector4D_type(void)
667 {
668 return (ConverterVector4D<type_struct, index_x, index_y, index_z, index_w>::Convert(data));
669 }
670
671 operator typename ConverterVector4D<type_struct, index_x, index_y, index_z, index_w>::const_vector4D_type(void) const
672 {
673 return (ConverterVector4D<type_struct, index_x, index_y, index_z, index_w>::Convert(data));
674 }
675
676 Subvec4D& operator =(const vector4D_type& value)
677 {
678 data[index_x] = value.x;
679 data[index_y] = value.y;
680 data[index_z] = value.z;
681 data[index_w] = value.w;
682 return (*this);
683 }
684
685 void operator =(const vector4D_type& value) volatile
686 {
687 data[index_x] = value.x;
688 data[index_y] = value.y;
689 data[index_z] = value.z;
690 data[index_w] = value.w;
691 }
692
693 Subvec4D& operator =(const Subvec4D& value)
694 {
695 data[index_x] = value.data[index_x];
696 data[index_y] = value.data[index_y];
697 data[index_z] = value.data[index_z];

Callers

nothing calls this directly

Calls 1

InverseSqrtFunction · 0.85

Tested by

no test coverage detected