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

Templated static dimensions point representation. More...

#include <Point.hpp>

Inheritance diagram for castor::Point< T, TCount >:
Inheritance graph
[legend]

Public Types

using iterator = value_type *
 
using const_iterator = value_type const *
 

Public Member Functions

void swap (Point &rhs) noexcept
 Swaps this pont data with the parameter ones.
 
std::size_t size () const
 Retrieves the total size of the point.
 
T * ptr ()
 Retrieves the pointer on datas.
 
T const * constPtr () const
 Retrieves a constant pointer on datas.
 
Construction / Destruction.
constexpr Point () noexcept
 
constexpr ~Point () noexcept=default
 
constexpr Point (Point const &rhs) noexcept
 
constexpr Point (Point &&rhs) noexcept
 
 Point (T const *rhs) noexcept
 
template<typename U , uint32_t UCount>
 Point (Point< U, UCount > const &rhs) noexcept
 
template<typename U , uint32_t UCount>
 Point (Coords< U, UCount > const &rhs) noexcept
 
template<typename U >
 Point (U const *rhs) noexcept
 
template<typename ValueA >
constexpr Point (ValueA a) noexcept
 
template<typename ValueA , typename ValueB >
constexpr Point (ValueA a, ValueB b) noexcept
 
template<typename ValueA , typename ValueB , typename ValueC >
constexpr Point (ValueA a, ValueB b, ValueC c) noexcept
 
template<typename ValueA , typename ValueB , typename ValueC , typename ValueD >
constexpr Point (ValueA a, ValueB b, ValueC c, ValueD d) noexcept
 
Assignment operators.
constexpr Pointoperator= (Point const &rhs) noexcept
 
constexpr Pointoperator= (Point &&rhs) noexcept
 
Arithmetic operators.
template<typename U , uint32_t UCount>
Pointoperator+= (Point< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Pointoperator-= (Point< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Pointoperator*= (Point< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Pointoperator/= (Point< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Pointoperator+= (Coords< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Pointoperator-= (Coords< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Pointoperator*= (Coords< U, UCount > const &rhs)
 
template<typename U , uint32_t UCount>
Pointoperator/= (Coords< U, UCount > const &rhs)
 
template<typename U >
Pointoperator+= (U const *rhs)
 
template<typename U >
Pointoperator-= (U const *rhs)
 
template<typename U >
Pointoperator*= (U const *rhs)
 
template<typename U >
Pointoperator/= (U const *rhs)
 
Pointoperator+= (T const &rhs)
 
Pointoperator-= (T const &rhs)
 
Pointoperator*= (T const &rhs)
 
Pointoperator/= (T const &rhs)
 
T const & operator[] (uint32_t index) const
 
T & operator[] (uint32_t index)
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator end () const
 
iterator end ()
 
PointData< T, TCount > * operator-> ()
 
PointData< T, TCount > const * operator-> () const
 

Friends

template<typename U , uint32_t UCount>
class Point
 

Detailed Description

template<typename T, uint32_t TCount>
class castor::Point< T, TCount >

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 TCount>
using castor::Point< T, TCount >::const_iterator = value_type const *

Typedef over a constant pointer on data.

◆ iterator

template<typename T , uint32_t TCount>
using castor::Point< T, TCount >::iterator = value_type *

Typedef over a pointer on data.

Constructor & Destructor Documentation

◆ Point() [1/11]

template<typename T , uint32_t TCount>
constexpr castor::Point< T, TCount >::Point ( )
constexprnoexcept

◆ ~Point()

template<typename T , uint32_t TCount>
constexpr castor::Point< T, TCount >::~Point ( )
constexprdefaultnoexcept

◆ Point() [2/11]

template<typename T , uint32_t TCount>
constexpr castor::Point< T, TCount >::Point ( Point< T, TCount > const & rhs)
constexprnoexcept

◆ Point() [3/11]

template<typename T , uint32_t TCount>
constexpr castor::Point< T, TCount >::Point ( Point< T, TCount > && rhs)
constexprnoexcept

◆ Point() [4/11]

template<typename T , uint32_t TCount>
castor::Point< T, TCount >::Point ( T const * rhs)
explicitnoexcept

◆ Point() [5/11]

template<typename T , uint32_t TCount>
template<typename U , uint32_t UCount>
castor::Point< T, TCount >::Point ( Point< U, UCount > const & rhs)
explicitnoexcept

◆ Point() [6/11]

template<typename T , uint32_t TCount>
template<typename U , uint32_t UCount>
castor::Point< T, TCount >::Point ( Coords< U, UCount > const & rhs)
explicitnoexcept

◆ Point() [7/11]

template<typename T , uint32_t TCount>
template<typename U >
castor::Point< T, TCount >::Point ( U const * rhs)
explicitnoexcept

◆ Point() [8/11]

template<typename T , uint32_t TCount>
template<typename ValueA >
constexpr castor::Point< T, TCount >::Point ( ValueA a)
explicitconstexprnoexcept

◆ Point() [9/11]

template<typename T , uint32_t TCount>
template<typename ValueA , typename ValueB >
constexpr castor::Point< T, TCount >::Point ( ValueA a,
ValueB b )
constexprnoexcept

◆ Point() [10/11]

template<typename T , uint32_t TCount>
template<typename ValueA , typename ValueB , typename ValueC >
constexpr castor::Point< T, TCount >::Point ( ValueA a,
ValueB b,
ValueC c )
constexprnoexcept

◆ Point() [11/11]

template<typename T , uint32_t TCount>
template<typename ValueA , typename ValueB , typename ValueC , typename ValueD >
constexpr castor::Point< T, TCount >::Point ( ValueA a,
ValueB b,
ValueC c,
ValueD d )
constexprnoexcept

Member Function Documentation

◆ begin() [1/2]

template<typename T , uint32_t TCount>
iterator castor::Point< T, TCount >::begin ( )
inline

◆ begin() [2/2]

template<typename T , uint32_t TCount>
const_iterator castor::Point< T, TCount >::begin ( ) const
inline

◆ constPtr()

template<typename T , uint32_t TCount>
T const * castor::Point< T, TCount >::constPtr ( ) const
inline

Retrieves a constant pointer on datas.

Returns
The pointer

◆ end() [1/2]

template<typename T , uint32_t TCount>
iterator castor::Point< T, TCount >::end ( )
inline

◆ end() [2/2]

template<typename T , uint32_t TCount>
const_iterator castor::Point< T, TCount >::end ( ) const
inline

◆ operator*=() [1/4]

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

◆ operator*=() [2/4]

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

◆ operator*=() [3/4]

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

◆ operator*=() [4/4]

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

◆ operator+=() [1/4]

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

◆ operator+=() [2/4]

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

◆ operator+=() [3/4]

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

◆ operator+=() [4/4]

template<typename T , uint32_t TCount>
template<typename U >
Point & castor::Point< T, TCount >::operator+= ( U const * rhs)

◆ operator-=() [1/4]

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

◆ operator-=() [2/4]

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

◆ operator-=() [3/4]

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

◆ operator-=() [4/4]

template<typename T , uint32_t TCount>
template<typename U >
Point & castor::Point< T, TCount >::operator-= ( U const * rhs)

◆ operator->() [1/2]

template<typename T , uint32_t TCount>
PointData< T, TCount > * castor::Point< T, TCount >::operator-> ( )
inline

◆ operator->() [2/2]

template<typename T , uint32_t TCount>
PointData< T, TCount > const * castor::Point< T, TCount >::operator-> ( ) const
inline

◆ operator/=() [1/4]

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

◆ operator/=() [2/4]

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

◆ operator/=() [3/4]

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

◆ operator/=() [4/4]

template<typename T , uint32_t TCount>
template<typename U >
Point & castor::Point< T, TCount >::operator/= ( U const * rhs)

◆ operator=() [1/2]

template<typename T , uint32_t TCount>
constexpr Point & castor::Point< T, TCount >::operator= ( Point< T, TCount > && rhs)
constexprnoexcept

◆ operator=() [2/2]

template<typename T , uint32_t TCount>
constexpr Point & castor::Point< T, TCount >::operator= ( Point< T, TCount > const & rhs)
constexprnoexcept

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

name Array access.

◆ ptr()

template<typename T , uint32_t TCount>
T * castor::Point< T, TCount >::ptr ( )
inline

Retrieves the pointer on datas.

Returns
The pointer

◆ size()

template<typename T , uint32_t TCount>
std::size_t castor::Point< T, TCount >::size ( ) const
inline

Retrieves the total size of the point.

Returns
count * elemSize

◆ swap()

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

Swaps this pont data with the parameter ones.

Parameters
[in]rhsThe point to swap

Friends And Related Symbol Documentation

◆ Point

template<typename T , uint32_t TCount>
template<typename U , uint32_t UCount>
friend class Point
friend

Member Data Documentation

◆ coords

template<typename T , uint32_t TCount>
Array< T, TCount > castor::Point< T, TCount >::coords

◆ data

template<typename T , uint32_t TCount>
PointData< T, TCount > castor::Point< T, TCount >::data

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