![]() |
Trax3 3.1.0
trax track library
|
Implements a 4D - position in homogenous coordinates. More...
#include <C:/Trend/Development/Trax3/Code/spat/PositionH.h>
Public Types | |
| typedef Valtype | value_type |
Public Member Functions | |||||||||||||
| Valtype * | ptr () noexcept | ||||||||||||
| Pointer accessor for direct copying. | |||||||||||||
| const Valtype * | ptr () const noexcept | ||||||||||||
| Pointer accessor for direct copying. | |||||||||||||
| void | Init () noexcept | ||||||||||||
| Sets the values to (0,0,0,1). | |||||||||||||
| bool | Homogenize () noexcept | ||||||||||||
| Transforms the position so that w == 1. | |||||||||||||
| bool | Equals (const PositionH &p, Valtype epsilon=Valtype{0}) const noexcept | ||||||||||||
| Comparison within some range. The area within two positions regarded as equal is a sphere with radius epsilon. | |||||||||||||
Construction | |||||||||||||
| |||||||||||||
| PositionH ()=default | |||||||||||||
| Does not initialize the members. | |||||||||||||
| PositionH (Valtype x, Valtype y, Valtype z, Valtype w) noexcept | |||||||||||||
| Does not initialize the members. | |||||||||||||
| template<typename Valtype2> | |||||||||||||
| constexpr | PositionH (const Position< Valtype2 > &p) noexcept | ||||||||||||
| Does not initialize the members. | |||||||||||||
| template<typename Valtype2> | |||||||||||||
| PositionH (const Vector< Valtype2 > &v) noexcept | |||||||||||||
| Does not initialize the members. | |||||||||||||
| template<typename Valtype2> | |||||||||||||
| PositionH (const Valtype2 *pVal) noexcept | |||||||||||||
| Does not initialize the members. | |||||||||||||
Subscripting. | |||||||||||||
| |||||||||||||
| const Valtype & | operator[] (size_t index) const | ||||||||||||
| Valtype & | operator[] (size_t index) | ||||||||||||
Public Attributes | |
| Valtype | x |
| x coordinate | |
| Valtype | y |
| y coordinate | |
| Valtype | z |
| z coordinate | |
| Valtype | w |
| w coordinate, homogenous coordinate | |
Implements a 4D - position in homogenous coordinates.
Specifies the coordinates of a point in 3D space. For Vectors, like e.g. surface normals, use the Vector type.
|
inlinenoexcept |
Comparison within some range. The area within two positions regarded as equal is a sphere with radius epsilon.
| p | PositionH to compare with. |
| epsilon | Distance <= wich two positions are regarded as equal. |