Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Friends | List of all members
castor::Coords< T, Count > Class Template Reference

Templated static dimensions point representation. More...

#include <Coords.hpp>

Inheritance diagram for castor::Coords< T, Count >:
Inheritance graph
[legend]

Public Types

using iterator = value_type *
 
using const_iterator = value_type const *
 

Public Member Functions

void swap (Coords &rhs) noexcept
 Swaps this pont data with the parameter ones.
 
uint32_t size () const
 
T const & operator[] (uint32_t index) const
 Retrieves the data at given index.
 
T & operator[] (uint32_t index)
 Retrieves the data at given index.
 
T * ptr ()
 Retrieves a non constant pointer on datas.
 
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< T, Count > &rhs)
 
 Coords (T *rhs)
 
Coordsoperator= (T *rhs)
 
Coordsoperator= (Point< T, Count > const &rhs)
 
template<typename U , uint32_t UCount>
Coordsoperator+= (Coords< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Coordsoperator-= (Coords< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Coordsoperator*= (Coords< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Coordsoperator/= (Coords< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Coordsoperator+= (Point< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Coordsoperator-= (Point< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Coordsoperator*= (Point< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Coordsoperator/= (Point< U, UCount > const &rhs)
 
template<typename U >
Coordsoperator+= (U const *coords)
 
template<typename U >
Coordsoperator-= (U const *coords)
 
template<typename U >
Coordsoperator*= (U const *coords)
 
template<typename U >
Coordsoperator/= (U const *coords)
 
Coordsoperator+= (T const &coord)
 
Coordsoperator-= (T const &coord)
 
Coordsoperator*= (T const &coord)
 
Coordsoperator/= (T const &coord)
 

Friends

template<typename U , uint32_t UCount>
class Coords
 

Detailed Description

template<typename T, uint32_t Count>
class castor::Coords< T, Count >

Templated static dimensions point representation.

Remarks
Can hold any type which has a defined Policy

Member Typedef Documentation

◆ const_iterator

template<typename T , uint32_t Count>
using castor::Coords< T, Count >::const_iterator = value_type const *

Typedef over a constant pointer on data.

◆ iterator

template<typename T , uint32_t Count>
using castor::Coords< T, Count >::iterator = value_type *

Typedef over a pointer on data.

Constructor & Destructor Documentation

◆ Coords() [1/3]

template<typename T , uint32_t Count>
castor::Coords< T, Count >::Coords ( )
default

name Construction / Destruction.

◆ Coords() [2/3]

template<typename T , uint32_t Count>
castor::Coords< T, Count >::Coords ( Point< T, Count > & rhs)
explicit

◆ Coords() [3/3]

template<typename T , uint32_t Count>
castor::Coords< T, Count >::Coords ( T * rhs)
explicit

Member Function Documentation

◆ begin() [1/2]

template<typename T , uint32_t Count>
iterator castor::Coords< T, Count >::begin ( )
inline

Retrieves an iterator to the first element.

Returns
The iterator

◆ begin() [2/2]

template<typename T , uint32_t Count>
const_iterator castor::Coords< T, Count >::begin ( ) const
inline

Retrieves a constant iterator to the first element.

Returns
The iterator

◆ constPtr()

template<typename T , uint32_t Count>
T const * castor::Coords< T, Count >::constPtr ( ) const
inline

Retrieves a constant pointer on datas.

Returns
The pointer

Referenced by castor3d::getBuffer(), and castor3d::getBuffer().

Here is the caller graph for this function:

◆ end() [1/2]

template<typename T , uint32_t Count>
iterator castor::Coords< T, Count >::end ( )
inline

Retrieves an iterator to the last element.

Returns
The iterator

◆ end() [2/2]

template<typename T , uint32_t Count>
const_iterator castor::Coords< T, Count >::end ( ) const
inline

Retrieves a constant iterator to the last element.

Returns
The iterator

◆ operator*=() [1/4]

template<typename T , uint32_t Count>
template<typename U , uint32_t UCount>
Coords & castor::Coords< T, Count >::operator*= ( Coords< U, UCount > const & rhs)

◆ operator*=() [2/4]

template<typename T , uint32_t Count>
template<typename U , uint32_t UCount>
Coords & castor::Coords< T, Count >::operator*= ( Point< U, UCount > const & rhs)

◆ operator*=() [3/4]

template<typename T , uint32_t Count>
Coords & castor::Coords< T, Count >::operator*= ( T const & coord)

◆ operator*=() [4/4]

template<typename T , uint32_t Count>
template<typename U >
Coords & castor::Coords< T, Count >::operator*= ( U const * coords)

◆ operator+=() [1/4]

template<typename T , uint32_t Count>
template<typename U , uint32_t UCount>
Coords & castor::Coords< T, Count >::operator+= ( Coords< U, UCount > const & rhs)

name Arithmetic operators.

◆ operator+=() [2/4]

template<typename T , uint32_t Count>
template<typename U , uint32_t UCount>
Coords & castor::Coords< T, Count >::operator+= ( Point< U, UCount > const & rhs)

◆ operator+=() [3/4]

template<typename T , uint32_t Count>
Coords & castor::Coords< T, Count >::operator+= ( T const & coord)

◆ operator+=() [4/4]

template<typename T , uint32_t Count>
template<typename U >
Coords & castor::Coords< T, Count >::operator+= ( U const * coords)

◆ operator-=() [1/4]

template<typename T , uint32_t Count>
template<typename U , uint32_t UCount>
Coords & castor::Coords< T, Count >::operator-= ( Coords< U, UCount > const & rhs)

◆ operator-=() [2/4]

template<typename T , uint32_t Count>
template<typename U , uint32_t UCount>
Coords & castor::Coords< T, Count >::operator-= ( Point< U, UCount > const & rhs)

◆ operator-=() [3/4]

template<typename T , uint32_t Count>
Coords & castor::Coords< T, Count >::operator-= ( T const & coord)

◆ operator-=() [4/4]

template<typename T , uint32_t Count>
template<typename U >
Coords & castor::Coords< T, Count >::operator-= ( U const * coords)

◆ operator/=() [1/4]

template<typename T , uint32_t Count>
template<typename U , uint32_t UCount>
Coords & castor::Coords< T, Count >::operator/= ( Coords< U, UCount > const & rhs)

◆ operator/=() [2/4]

template<typename T , uint32_t Count>
template<typename U , uint32_t UCount>
Coords & castor::Coords< T, Count >::operator/= ( Point< U, UCount > const & rhs)

◆ operator/=() [3/4]

template<typename T , uint32_t Count>
Coords & castor::Coords< T, Count >::operator/= ( T const & coord)

◆ operator/=() [4/4]

template<typename T , uint32_t Count>
template<typename U >
Coords & castor::Coords< T, Count >::operator/= ( U const * coords)

◆ operator=() [1/2]

template<typename T , uint32_t Count>
Coords & castor::Coords< T, Count >::operator= ( Point< T, Count > const & rhs)

◆ operator=() [2/2]

template<typename T , uint32_t Count>
Coords & castor::Coords< T, Count >::operator= ( T * rhs)

name Assignment operators.

◆ operator[]() [1/2]

template<typename T , uint32_t Count>
T & castor::Coords< T, Count >::operator[] ( uint32_t index)
inline

Retrieves the data at given index.

Remarks
No check is made, if you make an index error, expect a crash
Returns
A reference on data at wanted index

◆ operator[]() [2/2]

template<typename T , uint32_t Count>
T const & castor::Coords< T, Count >::operator[] ( uint32_t index) const
inline

Retrieves the data at given index.

Remarks
No check is made, if you make an index error, expect a crash
Returns
A constant reference on data at wanted index

◆ ptr()

template<typename T , uint32_t Count>
T * castor::Coords< T, Count >::ptr ( )
inline

Retrieves a non constant pointer on datas.

Returns
The pointer

Referenced by castor3d::getBuffer(), and castor3d::getBuffer().

Here is the caller graph for this function:

◆ size()

template<typename T , uint32_t Count>
uint32_t castor::Coords< T, Count >::size ( ) const
inline
Returns
The point total size: count * elemSize.

◆ swap()

template<typename T , uint32_t Count>
void castor::Coords< T, Count >::swap ( Coords< T, Count > & rhs)
noexcept

Swaps this pont data with the parameter ones.

Parameters
[in]rhsThe point to swap

Friends And Related Symbol Documentation

◆ Coords

template<typename T , uint32_t Count>
template<typename U , uint32_t UCount>
friend class Coords
friend

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