Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor::Position Class Reference

#include <Position.hpp>

Inheritance diagram for castor::Position:
Inheritance graph
[legend]
Collaboration diagram for castor::Position:
Collaboration graph
[legend]

Public Member Functions

CU_API Position (int32_t x=0, int32_t y=0)
 Constructor.
 
CU_API Position (Position const &obj)
 Copy Constructor.
 
CU_API Position (Position &&obj) noexcept
 Move assignment Constructor.
 
CU_API ~Position () noexcept=default
 Destructor.
 
CU_API Positionoperator= (Position const &obj)
 Copy assignment operator.
 
CU_API Positionoperator= (Position &&obj) noexcept
 Move assignment operator.
 
CU_API void set (int32_t x, int32_t y)
 sets the position values
 
CU_API void offset (int32_t x, int32_t y)
 Offsets the position values.
 
int32_t y () const
 Retrieves the left coordinate.
 
int32_t & y ()
 Retrieves the left coordinate.
 
int32_t x () const
 Retrieves the right coordinate.
 
int32_t & x ()
 Retrieves the right coordinate.
 
- Public Member Functions inherited from castor::Coords< int32_t, 2 >
void swap (Coords &rhs) noexcept
 Swaps this pont data with the parameter ones.
 
uint32_t size () const
 
int32_t const & operator[] (uint32_t index) const
 Retrieves the data at given index.
 
int32_t & operator[] (uint32_t index)
 Retrieves the data at given index.
 
int32_t * ptr ()
 Retrieves a non constant pointer on datas.
 
int32_t const * constPtr () const
 Retrieves a constant pointer on datas.
 
iterator begin ()
 Retrieves an iterator to the first element.
 
const_iterator begin () const
 Retrieves a constant iterator to the first element.
 
iterator end ()
 Retrieves an iterator to the last element.
 
const_iterator end () const
 Retrieves a constant iterator to the last element.
 
 Coords ()=default
 
 Coords (Point< int32_t, Count > &rhs)
 
 Coords (int32_t *rhs)
 
Coordsoperator= (int32_t *rhs)
 
Coordsoperator= (Point< int32_t, Count > const &rhs)
 
Coordsoperator+= (Coords< U, UCount > const &rhs)
 
Coordsoperator+= (Point< U, UCount > const &rhs)
 
Coordsoperator+= (U const *coords)
 
Coordsoperator+= (int32_t const &coord)
 
Coordsoperator-= (Coords< U, UCount > const &rhs)
 
Coordsoperator-= (Point< U, UCount > const &rhs)
 
Coordsoperator-= (U const *coords)
 
Coordsoperator-= (int32_t const &coord)
 
Coordsoperator*= (Coords< U, UCount > const &rhs)
 
Coordsoperator*= (Point< U, UCount > const &rhs)
 
Coordsoperator*= (U const *coords)
 
Coordsoperator*= (int32_t const &coord)
 
Coordsoperator/= (Coords< U, UCount > const &rhs)
 
Coordsoperator/= (Point< U, UCount > const &rhs)
 
Coordsoperator/= (U const *coords)
 
Coordsoperator/= (int32_t const &coord)
 

Additional Inherited Members

- Public Types inherited from castor::Coords< int32_t, 2 >
using iterator
 
using const_iterator
 

Constructor & Destructor Documentation

◆ Position() [1/3]

CU_API castor::Position::Position ( int32_t x = 0,
int32_t y = 0 )

Constructor.

Parameters
[in]x,yThe position

◆ Position() [2/3]

CU_API castor::Position::Position ( Position const & obj)

Copy Constructor.

Parameters
[in]objThe object to copy

◆ Position() [3/3]

CU_API castor::Position::Position ( Position && obj)
noexcept

Move assignment Constructor.

Parameters
[in]objThe object to move

◆ ~Position()

CU_API castor::Position::~Position ( )
defaultnoexcept

Destructor.

Member Function Documentation

◆ offset()

CU_API void castor::Position::offset ( int32_t x,
int32_t y )

Offsets the position values.

Parameters
[in]x,yThe position offsets

◆ operator=() [1/2]

CU_API Position & castor::Position::operator= ( Position && obj)
noexcept

Move assignment operator.

Parameters
[in]objThe object to move
Returns
A reference to this object

◆ operator=() [2/2]

CU_API Position & castor::Position::operator= ( Position const & obj)

Copy assignment operator.

Parameters
[in]objThe object to copy
Returns
A reference to this object

◆ set()

CU_API void castor::Position::set ( int32_t x,
int32_t y )

sets the position values

Parameters
[in]x,yThe position

◆ x() [1/2]

int32_t & castor::Position::x ( )
inline

Retrieves the right coordinate.

Returns
The rectangle's right coordinate

References castor::DataHolderT< PositionData >::getData(), castor::PositionData::position, and castor::PositionData::Pos::x.

Here is the call graph for this function:

◆ x() [2/2]

int32_t castor::Position::x ( ) const
inline

Retrieves the right coordinate.

Returns
The rectangle's right coordinate

References castor::DataHolderT< PositionData >::getData(), castor::PositionData::position, and castor::PositionData::Pos::x.

Referenced by castor::PxBufferBase::getAt(), and castor::PxBufferBase::getAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ y() [1/2]

int32_t & castor::Position::y ( )
inline

Retrieves the left coordinate.

Returns
The rectangle's left coordinate

References castor::DataHolderT< PositionData >::getData(), castor::PositionData::position, and castor::PositionData::Pos::y.

Here is the call graph for this function:

◆ y() [2/2]

int32_t castor::Position::y ( ) const
inline

Retrieves the left coordinate.

Returns
The rectangle's left coordinate

References castor::DataHolderT< PositionData >::getData(), castor::PositionData::position, and castor::PositionData::Pos::y.

Referenced by castor::PxBufferBase::getAt(), and castor::PxBufferBase::getAt().

Here is the call graph for this function:
Here is the caller graph for this function:

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