|
| | Position (void) |
| | Default constructor initializing position to (0, 0, 0).
|
| |
| | Position (PositionComponentType value) |
| | Construct by filling all components with the same PositionComponentType value.
|
| |
| | Position (const utility::math::Vector< PositionComponentType, 3 > &vector) |
| | Construct from a vector.
|
| |
| | Position (PositionComponentType x, PositionComponentType y, PositionComponentType z) |
| | Construct from three PositionComponentType values (x, y, z).
|
| |
| | Position (std::initializer_list< PositionComponentType > values) |
| | Construct from initializer list of three PositionComponentType values.
|
| |
| | Position (const std::initializer_list< PositionComponentType > &value) |
| | Construct from a GLM vector.
|
| |
| | Position (const Position &other)=default |
| | Copy constructor.
|
| |
| | Position (Position &&other) noexcept=default |
| | Move constructor.
|
| |
| Position & | operator= (const Position &other)=default |
| | Copy assignment operator.
|
| |
| Position & | operator= (Position &&other) noexcept=default |
| | Move assignment operator.
|
| |
|
| ~Position (void)=default |
| | Default destructor for Position.
|
| |
| Position & | setX (const PositionComponentType value) noexcept |
| | Set the X component of the position.
|
| |
| PositionComponentType | getX (void) const noexcept |
| | Get the X component of the position.
|
| |
| Position & | setY (const PositionComponentType value) noexcept |
| | Set the Y component of the position.
|
| |
| PositionComponentType | getY (void) const noexcept |
| | Get the Y component of the position.
|
| |
| Position & | setZ (const PositionComponentType value) noexcept |
| | Set the Z component of the position.
|
| |
| PositionComponentType | getZ (void) const noexcept |
| | Get the Z component of the position.
|
| |
| Position & | translate (const Position &offset) noexcept |
| | Translate this position by an offset.
|
| |
| Position | translated (const Position &offset) const noexcept |
| | Return a translated copy of this position.
|
| |
| PositionComponentType | distanceSquaredTo (const Position &other) const |
| | Compute squared Euclidean distance to another position.
|
| |
| PositionComponentType | distanceTo (const Position &other) const |
| | Compute Euclidean distance to another position.
|
| |
| bool | isOrigin (PositionComponentType epsilon=PositionComponentType { 1e-6 }) const noexcept |
| | Check whether this position is at (or near) the origin.
|
| |
| Position | midpoint (const Position &other) const noexcept |
| | Compute midpoint between this position and another.
|
| |
| bool | operator== (const Position &other) const noexcept |
| | Equality comparison.
|
| |
| bool | operator!= (const Position &other) const noexcept |
| | Inequality comparison.
|
| |
| bool | operator< (const Position &other) const noexcept |
| | Less-than comparison for ordering.
|
| |
| | Vector (void) |
| | Default constructor initializing vector values to zero.
|
| |
| | Vector (const glm::vec< VectorDimension, VectorComponentType > &v) |
| | Construct from a GLM vector.
|
| |
| | Vector (std::initializer_list< VectorComponentType > values) |
| | Construct from initializer list of float values.
|
| |
| | Vector (VectorComponentType value) |
| | Construct by filling all components with the same float value.
|
| |
| | Vector (const Vector &other)=default |
| | Copy constructor.
|
| |
| | Vector (Vector &&other) noexcept=default |
| | Move constructor.
|
| |
|
| ~Vector (void)=default |
| | Default destructor for Vector.
|
| |
| Vector & | operator= (const Vector &other)=default |
| | Copy assignment operator.
|
| |
| Vector & | operator= (Vector &&other) noexcept=default |
| | Move assignment operator.
|
| |
| Vector | operator+ (const Vector &rhs) const noexcept |
| | Vector addition.
|
| |
| Vector & | operator+= (const Vector &rhs) noexcept |
| | Vector addition assignment.
|
| |
| Vector | operator- (const Vector &rhs) const noexcept |
| | Vector subtraction.
|
| |
| Vector | operator- () const noexcept |
| | Unary negation.
|
| |
| Vector & | operator-= (const Vector &rhs) noexcept |
| | Vector subtraction assignment.
|
| |
| Vector | operator* (VectorComponentType scalar) const noexcept |
| | Scalar multiplication.
|
| |
| Vector | operator* (const Vector &rhs) const noexcept |
| | Element-wise multiplication.
|
| |
| Vector & | operator*= (VectorComponentType scalar) noexcept |
| | Scalar multiplication assignment.
|
| |
| Vector & | operator*= (const Vector &rhs) noexcept |
| | Element-wise multiplication assignment.
|
| |
| Vector | operator/ (VectorComponentType scalar) const |
| | Scalar division.
|
| |
| Vector | operator/ (const Vector &rhs) const |
| | Element-wise division.
|
| |
| Vector & | operator/= (VectorComponentType scalar) |
| | Scalar division assignment.
|
| |
| Vector & | operator/= (const Vector &rhs) |
| | Element-wise division assignment.
|
| |
| bool | operator== (const Vector &rhs) const noexcept |
| | Equality comparison.
|
| |
| bool | equalsEpsilon (const Vector &rhs, VectorComponentType epsilon=VectorComponentType { 1e-5 }) const |
| | Approximate equality using an epsilon threshold.
|
| |
| bool | operator!= (const Vector &rhs) const noexcept |
| | Inequality comparison.
|
| |
template<CanBePositionComponent PositionComponentType>
class utility::graphic::Position< PositionComponentType >
Position in 3D space represented as a vector of three PositionComponentType components (x, y, z).
- Template Parameters
-
| PositionComponentType | The type of the position components (e.g., float, double). |
Definition at line 51 of file position.hpp.