Isle
Loading...
Searching...
No Matches
MxPoint< T > Class Template Reference

[AI] 2D point class templated on its coordinate type. More...

#include <mxgeometry.h>

Public Member Functions

 MxPoint ()
 [AI] Default constructor, does not initialize coordinates. More...
 
 MxPoint (const MxPoint &p_p)
 [AI] Copy constructor. More...
 
 MxPoint (T p_x, T p_y)
 [AI] Constructor with explicit coordinates. More...
 
GetX () const
 [AI] Get X coordinate. More...
 
GetY () const
 [AI] Get Y coordinate. More...
 
void SetX (T p_x)
 [AI] Set X coordinate. More...
 
void SetY (T p_y)
 [AI] Set Y coordinate. More...
 
void operator+= (const MxPoint &p_p)
 [AI] Add another point's coordinates to this point. More...
 
void operator-= (const MxPoint &p_p)
 [AI] Subtract another point's coordinates from this point. More...
 
MxPoint operator+ (const MxPoint &p_p) const
 [AI] Add another point, returning the result. More...
 
MxPoint operator- (const MxPoint &p_p) const
 [AI] Subtract another point, returning the result. More...
 

Protected Attributes

m_x
 [AI] X coordinate. More...
 
m_y
 [AI] Y coordinate. More...
 

Detailed Description

template<class T>
class MxPoint< T >

[AI] 2D point class templated on its coordinate type.

[AI] Represents a point in 2D space, supporting basic arithmetic and access/modification of its coordinates.

Template Parameters
T[AI] Underlying type for coordinates (e.g., int, float, etc.)

Definition at line 13 of file mxgeometry.h.

Constructor & Destructor Documentation

◆ MxPoint() [1/3]

template<class T >
MxPoint< T >::MxPoint ( )
inline

[AI] Default constructor, does not initialize coordinates.

Definition at line 22 of file mxgeometry.h.

◆ MxPoint() [2/3]

template<class T >
MxPoint< T >::MxPoint ( const MxPoint< T > &  p_p)
inline

[AI] Copy constructor.

Parameters
p_p[AI] The point to copy.

Definition at line 28 of file mxgeometry.h.

◆ MxPoint() [3/3]

template<class T >
MxPoint< T >::MxPoint ( p_x,
p_y 
)
inline

[AI] Constructor with explicit coordinates.

Parameters
p_x[AI] X coordinate.
p_y[AI] Y coordinate.

Definition at line 39 of file mxgeometry.h.

Member Function Documentation

◆ GetX()

template<class T >
T MxPoint< T >::GetX ( ) const
inline

[AI] Get X coordinate.

Definition at line 48 of file mxgeometry.h.

◆ GetY()

template<class T >
T MxPoint< T >::GetY ( ) const
inline

[AI] Get Y coordinate.

Definition at line 53 of file mxgeometry.h.

◆ operator+()

template<class T >
MxPoint MxPoint< T >::operator+ ( const MxPoint< T > &  p_p) const
inline

[AI] Add another point, returning the result.

Parameters
p_p[AI] The point to add.

Definition at line 91 of file mxgeometry.h.

◆ operator+=()

template<class T >
void MxPoint< T >::operator+= ( const MxPoint< T > &  p_p)
inline

[AI] Add another point's coordinates to this point.

Parameters
p_p[AI] The point to add.

Definition at line 71 of file mxgeometry.h.

◆ operator-()

template<class T >
MxPoint MxPoint< T >::operator- ( const MxPoint< T > &  p_p) const
inline

[AI] Subtract another point, returning the result.

Parameters
p_p[AI] The point to subtract.

Definition at line 97 of file mxgeometry.h.

◆ operator-=()

template<class T >
void MxPoint< T >::operator-= ( const MxPoint< T > &  p_p)
inline

[AI] Subtract another point's coordinates from this point.

Parameters
p_p[AI] The point to subtract.

Definition at line 81 of file mxgeometry.h.

◆ SetX()

template<class T >
void MxPoint< T >::SetX ( p_x)
inline

[AI] Set X coordinate.

Parameters
p_x[AI] The new X coordinate.

Definition at line 59 of file mxgeometry.h.

◆ SetY()

template<class T >
void MxPoint< T >::SetY ( p_y)
inline

[AI] Set Y coordinate.

Parameters
p_y[AI] The new Y coordinate.

Definition at line 65 of file mxgeometry.h.

Member Data Documentation

◆ m_x

template<class T >
T MxPoint< T >::m_x
protected

[AI] X coordinate.

Definition at line 15 of file mxgeometry.h.

◆ m_y

template<class T >
T MxPoint< T >::m_y
protected

[AI] Y coordinate.

Definition at line 16 of file mxgeometry.h.


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