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

#include <Size.hpp>

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

Public Member Functions

CU_API Size () noexcept
 Constructor.
 
CU_API Size (uint32_t width, uint32_t height) noexcept
 Constructor.
 
CU_API Size (Size const &obj)
 Copy Constructor.
 
CU_API Size (Size &&obj) noexcept
 Move assignment Constructor.
 
CU_API ~Size () noexcept=default
 Destructor.
 
CU_API Sizeoperator= (Size const &obj) noexcept
 Copy assignment operator.
 
CU_API Sizeoperator= (Size &&obj) noexcept
 Move assignment operator.
 
CU_API void set (uint32_t width, uint32_t height) noexcept
 sets the size values
 
uint32_t getWidth () const noexcept
 Retrieves the width.
 
uint32_t & getWidth () noexcept
 Retrieves the width.
 
uint32_t getHeight () const noexcept
 Retrieves the height.
 
uint32_t & getHeight () noexcept
 Retrieves the height.
 
CU_API void grow (int32_t cx, int32_t cy) noexcept
 Modifies the size.
 
Sizeoperator<<= (uint32_t rhs) noexcept
 
Sizeoperator>>= (uint32_t rhs) noexcept
 
auto operator-> () const noexcept
 
auto operator-> () noexcept
 
- Public Member Functions inherited from castor::Coords< uint32_t, 2 >
void swap (Coords &rhs) noexcept
 Swaps this pont data with the parameter ones.
 
uint32_t size () const
 
uint32_t const & operator[] (uint32_t index) const
 Retrieves the data at given index.
 
uint32_t & operator[] (uint32_t index)
 Retrieves the data at given index.
 
uint32_t * ptr ()
 Retrieves a non constant pointer on datas.
 
uint32_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< uint32_t, Count > &rhs)
 
 Coords (uint32_t *rhs)
 
Coordsoperator= (uint32_t *rhs)
 
Coordsoperator= (Point< uint32_t, Count > const &rhs)
 
Coordsoperator+= (Coords< U, UCount > const &rhs)
 
Coordsoperator+= (Point< U, UCount > const &rhs)
 
Coordsoperator+= (U const *coords)
 
Coordsoperator+= (uint32_t const &coord)
 
Coordsoperator-= (Coords< U, UCount > const &rhs)
 
Coordsoperator-= (Point< U, UCount > const &rhs)
 
Coordsoperator-= (U const *coords)
 
Coordsoperator-= (uint32_t const &coord)
 
Coordsoperator*= (Coords< U, UCount > const &rhs)
 
Coordsoperator*= (Point< U, UCount > const &rhs)
 
Coordsoperator*= (U const *coords)
 
Coordsoperator*= (uint32_t const &coord)
 
Coordsoperator/= (Coords< U, UCount > const &rhs)
 
Coordsoperator/= (Point< U, UCount > const &rhs)
 
Coordsoperator/= (U const *coords)
 
Coordsoperator/= (uint32_t const &coord)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ Size() [1/4]

CU_API castor::Size::Size ( )
noexcept

Constructor.

◆ Size() [2/4]

CU_API castor::Size::Size ( uint32_t width,
uint32_t height )
noexcept

Constructor.

Parameters
[in]width,heightThe dimensions

◆ Size() [3/4]

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

Copy Constructor.

Parameters
[in]objThe object to copy

◆ Size() [4/4]

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

Move assignment Constructor.

Parameters
[in]objThe object to move

◆ ~Size()

CU_API castor::Size::~Size ( )
defaultnoexcept

Destructor.

Member Function Documentation

◆ getHeight() [1/2]

uint32_t castor::Size::getHeight ( ) const
inlinenoexcept

Retrieves the height.

Returns
The height

References castor::DataHolderT< SizeData >::getData(), castor::SizeData::size, and castor::SizeData::Mbr::y.

Referenced by castor3d::GBufferBase::doCreateTextures(), castor::PxBufferBase::getHeight(), and castor::PxBufferBase::getTileHeight().

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

◆ getHeight() [2/2]

uint32_t & castor::Size::getHeight ( )
inlinenoexcept

Retrieves the height.

Returns
The height

References castor::DataHolderT< SizeData >::getData(), castor::SizeData::size, and castor::SizeData::Mbr::y.

Here is the call graph for this function:

◆ getWidth() [1/2]

uint32_t castor::Size::getWidth ( ) const
inlinenoexcept

Retrieves the width.

Returns
The width

References castor::DataHolderT< SizeData >::getData(), castor::SizeData::size, and castor::SizeData::Mbr::x.

Referenced by castor3d::GBufferBase::doCreateTextures(), castor::PxBufferBase::getTileWidth(), and castor::PxBufferBase::getWidth().

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

◆ getWidth() [2/2]

uint32_t & castor::Size::getWidth ( )
inlinenoexcept

Retrieves the width.

Returns
The width

References castor::DataHolderT< SizeData >::getData(), castor::SizeData::size, and castor::SizeData::Mbr::x.

Here is the call graph for this function:

◆ grow()

CU_API void castor::Size::grow ( int32_t cx,
int32_t cy )
noexcept

Modifies the size.

Remarks
If width+cx < 0 (or height+cy < 0) then width=0 (respectively height=0)
Parameters
[in]cx,cyThe size modifications

◆ operator->() [1/2]

auto castor::Size::operator-> ( ) const
inlinenoexcept

References castor::DataHolderT< SizeData >::getData(), and castor::SizeData::size.

Here is the call graph for this function:

◆ operator->() [2/2]

auto castor::Size::operator-> ( )
inlinenoexcept

References castor::DataHolderT< SizeData >::getData(), and castor::SizeData::size.

Here is the call graph for this function:

◆ operator<<=()

Size & castor::Size::operator<<= ( uint32_t rhs)
inlinenoexcept

◆ operator=() [1/2]

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

Move assignment operator.

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

◆ operator=() [2/2]

CU_API Size & castor::Size::operator= ( Size const & obj)
noexcept

Copy assignment operator.

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

◆ operator>>=()

Size & castor::Size::operator>>= ( uint32_t rhs)
inlinenoexcept

◆ set()

CU_API void castor::Size::set ( uint32_t width,
uint32_t height )
noexcept

sets the size values

Parameters
[in]width,heightThe dimensions

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