Isle
Loading...
Searching...
No Matches
Mx3DPointFloat Class Reference

[AI] Represents a 3D point with floating-point precision, inheriting from Vector3. More...

#include <mxgeometry3d.h>

Inheritance diagram for Mx3DPointFloat:
Collaboration diagram for Mx3DPointFloat:

Public Member Functions

 Mx3DPointFloat ()
 [AI] Constructs a zero-initialized 3D point at the origin (0, 0, 0). More...
 
 Mx3DPointFloat (float p_x, float p_y, float p_z)
 [AI] Constructs a 3D point with supplied X, Y, and Z coordinates. More...
 
 Mx3DPointFloat (const Mx3DPointFloat &p_other)
 [AI] Copy constructor from another Mx3DPointFloat. More...
 
 Mx3DPointFloat (const Vector3 &p_other)
 [AI] Constructs from a generic Vector3, treating it as a 3D point. More...
 
virtual void operator= (const Vector3 &p_impl)
 [AI] Assignment operator copies the content of a Vector3 into this point. More...
 
float & operator[] (int idx)
 [AI] Accesses a component (X/Y/Z) of the point for modification. More...
 
const float & operator[] (int idx) const
 [AI] Accesses a component (X/Y/Z) of the point as a constant value. More...
 
- Public Member Functions inherited from Vector3
 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...
 
- Public Member Functions inherited from Vector2
 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

- Protected Member Functions inherited from Vector3
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...
 
- Protected Member Functions inherited from Vector2
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...
 
- Protected Attributes inherited from Vector2
float * m_data
 [AI] Pointer to externally provided float storage (owned elsewhere). More...
 

Detailed Description

[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.

Used throughout the LEGO Island engine to denote world positions, directions and vectors in 3D space. [AI]

[AI] This class is often used as an interchangeable type with Vector3, but is promoted to a full class to allow explicit semantic usage for points versus general 3D vectors. [AI]

Definition at line 14 of file mxgeometry3d.h.

Constructor & Destructor Documentation

◆ Mx3DPointFloat() [1/4]

Mx3DPointFloat::Mx3DPointFloat ( )
inline

[AI] Constructs a zero-initialized 3D point at the origin (0, 0, 0).

[AI]

Definition at line 19 of file mxgeometry3d.h.

◆ Mx3DPointFloat() [2/4]

Mx3DPointFloat::Mx3DPointFloat ( float  p_x,
float  p_y,
float  p_z 
)
inline

[AI] Constructs a 3D point with supplied X, Y, and Z coordinates.

[AI]

Parameters
p_xThe X component of the point. [AI]
p_yThe Y component of the point. [AI]
p_zThe Z component of the point. [AI]

Definition at line 27 of file mxgeometry3d.h.

◆ Mx3DPointFloat() [3/4]

Mx3DPointFloat::Mx3DPointFloat ( const Mx3DPointFloat p_other)
inline

[AI] Copy constructor from another Mx3DPointFloat.

[AI]

Parameters
p_otherThe source Mx3DPointFloat to copy from. [AI]

Definition at line 38 of file mxgeometry3d.h.

◆ Mx3DPointFloat() [4/4]

Mx3DPointFloat::Mx3DPointFloat ( const Vector3 p_other)
inline

[AI] Constructs from a generic Vector3, treating it as a 3D point.

[AI]

Parameters
p_otherThe Vector3 whose values will be copied. [AI]

Definition at line 44 of file mxgeometry3d.h.

Member Function Documentation

◆ operator=()

virtual void Mx3DPointFloat::operator= ( const Vector3 p_impl)
inlinevirtual

[AI] Assignment operator copies the content of a Vector3 into this point.

[AI]

Parameters
p_implThe Vector3 to copy values from. [AI]

Definition at line 50 of file mxgeometry3d.h.

◆ operator[]() [1/2]

float & Mx3DPointFloat::operator[] ( int  idx)
inline

[AI] Accesses a component (X/Y/Z) of the point for modification.

[AI]

Parameters
idxThe index (0: X, 1: Y, 2: Z) [AI]
Returns
Reference to the component's value. [AI]

Definition at line 57 of file mxgeometry3d.h.

◆ operator[]() [2/2]

const float & Mx3DPointFloat::operator[] ( int  idx) const
inline

[AI] Accesses a component (X/Y/Z) of the point as a constant value.

[AI]

Parameters
idxThe index (0: X, 1: Y, 2: Z) [AI]
Returns
Const reference to the component's value. [AI]

Definition at line 64 of file mxgeometry3d.h.


The documentation for this class was generated from the following file: