Isle
|
[AI] 4D point class for floating point values. More...
#include <mxgeometry4d.h>
Public Member Functions | |
Mx4DPointFloat () | |
[AI] Default constructor. More... | |
Mx4DPointFloat (float p_x, float p_y, float p_z, float p_a) | |
[AI] Constructor with explicit coordinates. More... | |
Mx4DPointFloat (const Mx4DPointFloat &p_other) | |
[AI] Copy constructor. More... | |
virtual void | operator= (const Vector4 &p_impl) |
[AI] Assignment operator from a Vector4 object. More... | |
float & | operator[] (int idx) |
[AI] Array subscript operator for modifiable access. More... | |
float & | index_operator (int idx) |
[AI] Explicit indexed access wrapper (alias for operator[]). More... | |
![]() | |
Vector4 (float *p_data) | |
[AI] Constructs a Vector4 using external float storage. More... | |
Vector4 (const float *p_data) | |
[AI] Constructs a Vector4 using a const float pointer (pointer is reinterpreted as mutable). More... | |
void | Clear () override |
[AI] Sets all four components to zero. More... | |
float | LenSquared () const override |
[AI] Computes the squared magnitude of the 4D vector. More... | |
void | Fill (const float &p_value) override |
[AI] Fill all four floats with p_value. More... | |
virtual void | SetMatrixProduct (const float *p_vec, const float *p_mat) |
[AI] Set this vector to the result of a matrix-vector product: result = p_mat * p_vec. More... | |
virtual void | SetMatrixProduct (const Vector4 &p_a, const float *p_b) |
[AI] Set this vector to result of matrix-vector product with source given as Vector4, matrix as pointer. More... | |
virtual int | NormalizeQuaternion () |
[AI] Normalize this quaternion (interpreted as vector) in place. More... | |
virtual int | EqualsHamiltonProduct (const Vector4 &p_a, const Vector4 &p_b) |
[AI] Set this vector to the Hamilton product of two quaternion Vector4s. More... | |
float & | operator[] (int idx) |
[AI] Indexes 0-3: returns reference to the fast access coordinate. More... | |
const float & | operator[] (int idx) const |
[AI] Const version for coordinate access (0...3). More... | |
![]() | |
Vector3 (float *p_data) | |
[AI] Construct a 3D vector pointing at external data storage. More... | |
Vector3 (const float *p_data) | |
[AI] Construct a 3D vector from const float* (pointer is cast to non-const in base). More... | |
void | Clear () override |
[AI] Sets every coordinate (x, y, z) to zero. More... | |
float | LenSquared () const override |
[AI] Computes the squared magnitude (x^2 + y^2 + z^2) of this vector. More... | |
virtual void | EqualsCross (const Vector3 &p_a, const Vector3 &p_b) |
[AI] Sets this vector to be the cross product of p_a and p_b. More... | |
virtual void | EqualsCross (const Vector3 &p_a, const float *p_b) |
[AI] Sets this vector to be the cross product of p_a and p_b, with b as a pointer. More... | |
virtual void | EqualsCross (const float *p_a, const Vector3 &p_b) |
[AI] Sets this vector to be the cross product of p_a and p_b, with a as a pointer. More... | |
virtual void | Fill (const float &p_value) |
[AI] Fills all coordinates with p_value. More... | |
![]() | |
Vector2 (float *p_data) | |
[AI] Construct a 2D vector using an external float buffer. More... | |
Vector2 (const float *p_data) | |
[AI] Construct a 2D vector from a (likely constant) array of floats without copying (just pointer assignment). More... | |
virtual float * | GetData () |
[AI] Retrieves the mutable in-memory data pointer for this vector. More... | |
virtual const float * | GetData () const |
[AI] Retrieves the immutable data pointer for this vector. More... | |
virtual void | Clear () |
[AI] Zeros all elements (sets all coordinates to 0.0). More... | |
virtual float | Dot (const float *p_a, const float *p_b) const |
[AI] Compute the dot product of the two float arrays interpreted as vectors of 2 elements. More... | |
virtual float | Dot (const Vector2 &p_a, const Vector2 &p_b) const |
[AI] Compute the dot product of two Vector2 objects. More... | |
virtual float | Dot (const float *p_a, const Vector2 &p_b) const |
[AI] Compute the dot product given a pointer and a Vector2 (second param). More... | |
virtual float | Dot (const Vector2 &p_a, const float *p_b) const |
[AI] Compute the dot product given a Vector2 (first param) and a pointer (second param). More... | |
virtual float | LenSquared () const |
[AI] Compute the squared length (magnitude^2) of the vector. More... | |
virtual int | Unitize () |
[AI] Scales the vector so its norm is 1 (unit vector). More... | |
virtual void | operator+= (float p_value) |
[AI] In-place add a scalar to all coordinates. More... | |
virtual void | operator+= (const float *p_other) |
[AI] In-place add vector elements via float pointer. More... | |
virtual void | operator+= (const Vector2 &p_other) |
[AI] In-place add another Vector2. More... | |
virtual void | operator-= (const float *p_other) |
[AI] In-place subtraction of vector pointed to by p_other. More... | |
virtual void | operator-= (const Vector2 &p_other) |
[AI] In-place subtraction of another Vector2. More... | |
virtual void | operator*= (const float *p_other) |
[AI] In-place per-element multiplication of this vector by another array. More... | |
virtual void | operator*= (const Vector2 &p_other) |
[AI] In-place per-element multiplication by another Vector2. More... | |
virtual void | operator*= (const float &p_value) |
[AI] In-place multiplication by a scalar. More... | |
virtual void | operator/= (const float &p_value) |
[AI] In-place scalar division. More... | |
virtual void | operator= (const float *p_other) |
[AI] Assigns this vector's elements from a pointer to two floats. More... | |
virtual void | operator= (const Vector2 &p_other) |
[AI] Assigns this vector's elements from another Vector2. More... | |
float & | operator[] (int idx) |
[AI] Accesses the idx-th float in the vector (0 or 1). More... | |
const float & | operator[] (int idx) const |
[AI] Const version of the index operator. More... | |
Additional Inherited Members | |
![]() | |
void | AddImpl (const float *p_value) override |
[AI] Adds the values pointed to by p_value to this vector. More... | |
void | AddImpl (float p_value) override |
[AI] Adds a scalar value to every element of this vector. More... | |
void | SubImpl (const float *p_value) override |
[AI] Subtracts the vector specified by p_value from this vector. More... | |
void | MulImpl (const float *p_value) override |
[AI] Multiplies this vector by another vector (per element). More... | |
void | MulImpl (const float &p_value) override |
[AI] Multiplies this vector by a scalar value. More... | |
void | DivImpl (const float &p_value) override |
[AI] Divides this vector by a scalar value. More... | |
float | DotImpl (const float *p_a, const float *p_b) const override |
void | EqualsImpl (const float *p_data) override |
[AI] Assigns values from provided array to this vector. More... | |
![]() | |
void | AddImpl (const float *p_value) override |
[AI] Adds the values pointed to by p_value to this vector. More... | |
void | AddImpl (float p_value) override |
[AI] Adds a scalar value to every element of this vector. More... | |
void | SubImpl (const float *p_value) override |
[AI] Subtracts the vector specified by p_value from this vector. More... | |
void | MulImpl (const float *p_value) override |
[AI] Multiplies this vector by another vector (per element). More... | |
void | MulImpl (const float &p_value) override |
[AI] Multiplies this vector by a scalar value. More... | |
void | DivImpl (const float &p_value) override |
[AI] Divides this vector by a scalar value. More... | |
float | DotImpl (const float *p_a, const float *p_b) const override |
void | EqualsImpl (const float *p_data) override |
[AI] Assigns values from provided array to this vector. More... | |
virtual void | EqualsCrossImpl (const float *p_a, const float *p_b) |
[AI] Assigns this vector to the cross product of p_a and p_b. More... | |
![]() | |
virtual void | AddImpl (const float *p_value) |
[AI] Adds the values pointed to by p_value to this vector. More... | |
virtual void | AddImpl (float p_value) |
[AI] Adds a scalar value to every element of this vector. More... | |
virtual void | SubImpl (const float *p_value) |
[AI] Subtracts the vector specified by p_value from this vector. More... | |
virtual void | MulImpl (const float *p_value) |
[AI] Multiplies this vector by another vector (per element). More... | |
virtual void | MulImpl (const float &p_value) |
[AI] Multiplies this vector by a scalar value. More... | |
virtual void | DivImpl (const float &p_value) |
[AI] Divides this vector by a scalar value. More... | |
virtual float | DotImpl (const float *p_a, const float *p_b) const |
[AI] Computes the dot product of two arrays interpreted as vectors. More... | |
virtual void | SetData (float *p_data) |
[AI] Set the internal data pointer to external storage. More... | |
virtual void | EqualsImpl (const float *p_data) |
[AI] Assigns values from provided array to this vector. More... | |
![]() | |
float * | m_data |
[AI] Pointer to externally provided float storage (owned elsewhere). More... | |
[AI] 4D point class for floating point values.
[AI] This class extends the Vector4 class, adding storage for 4D point coordinates using float precision. It provides various constructors and utility methods to manipulate 4D points, such as setting/getting each coordinate, assignment, and array-style access. This is especially useful in graphics or spatial transformations where a homogeneous coordinate is needed.
Definition at line 18 of file mxgeometry4d.h.
|
inline |
[AI] Default constructor.
Initializes a 4D point with uninitialized elements. [AI]
[AI] Constructs the base Vector4 with m_elements as storage for coordinate values.
Definition at line 24 of file mxgeometry4d.h.
|
inline |
[AI] Constructor with explicit coordinates.
p_x | X component. [AI] |
p_y | Y component. [AI] |
p_z | Z component. [AI] |
p_a | 'A' component (homogeneous or fourth dimension). [AI] |
[AI] Initializes the four-dimensional point with given values. Used for direct coordinate control.
Definition at line 34 of file mxgeometry4d.h.
|
inline |
[AI] Copy constructor.
p_other | Instance to copy from. [AI] |
[AI] Initializes the new object by copying all 4 coordinate values from another Mx4DPointFloat.
Definition at line 47 of file mxgeometry4d.h.
|
inline |
[AI] Explicit indexed access wrapper (alias for operator[]).
[AI]
idx | Index into the four components. [AI] |
[AI] Used by several legacy routines, provides alternate access to the data array.
Definition at line 73 of file mxgeometry4d.h.
|
inlinevirtual |
[AI] Assignment operator from a Vector4 object.
p_impl | The source Vector4 to copy values from. [AI] |
[AI] Overwrites the current 4D point's data array with another Vector4's components.
Definition at line 54 of file mxgeometry4d.h.
|
inline |
[AI] Array subscript operator for modifiable access.
idx | Index (0-3) for x/y/z/a components. [AI] |
[AI] Allows for array-style reading and writing of component values, e.g. pt[2] = 4.5f;
Definition at line 62 of file mxgeometry4d.h.