Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Core::Geometry::GeometryIndexLayer< T > Struct Template Reference

Typed index collection. More...

#include <Core/Geometry/IndexedGeometry.hpp>

+ Inheritance diagram for Ra::Core::Geometry::GeometryIndexLayer< T >:
+ Collaboration diagram for Ra::Core::Geometry::GeometryIndexLayer< T >:

Public Types

using IndexType = T
 
using IndexContainerType = VectorArray<IndexType>
 
- Public Types inherited from Ra::Core::Utils::ObjectWithSemantic
using SemanticName = std::string
 
using SemanticNameCollection = std::set<SemanticName>
 Store in set to allow for logarithmic search.
 

Public Member Functions

IndexContainerTypecollection ()
 
const IndexContainerTypecollection () const
 
bool append (const GeometryIndexLayerBase &other) final
 Append content from another layer.
 
bool operator== (const GeometryIndexLayerBase &other) const final
 
size_t getSize () const override final
 
std::unique_ptr< GeometryIndexLayerBaseclone () override final
 Create new layer with duplicated content.
 
size_t getNumberOfComponents () const override final
 
size_t getBufferSize () const override final
 
int getStride () const override final
 
const void * dataPtr () const override final
 
- Public Member Functions inherited from Ra::Core::Geometry::GeometryIndexLayerBase
 GeometryIndexLayerBase (const GeometryIndexLayerBase &other)
 Copy constructor.
 
GeometryIndexLayerBaseoperator= (const GeometryIndexLayerBase &other)
 Assignment operator.
 
GeometryIndexLayerBaseoperator= (GeometryIndexLayerBase &&other)
 Move assignment operator.
 
- Public Member Functions inherited from Ra::Core::Utils::ObjectWithSemantic
 ObjectWithSemantic (const ObjectWithSemantic &other)
 
bool hasSemantic (const SemanticName &name) const
 
const SemanticNameCollectionsemantics () const
 
ObjectWithSemanticoperator= (const ObjectWithSemantic &other)
 
ObjectWithSemanticoperator= (ObjectWithSemantic &&other)
 
bool shareSemantic (const ObjectWithSemantic &other) const
 
bool sameSemantics (const ObjectWithSemantic &other) const
 
- Public Member Functions inherited from Ra::Core::Utils::ContainerIntrospectionInterface
virtual ~ContainerIntrospectionInterface ()
 only needed for correct abstract dtor call.
 

Protected Member Functions

template<class... SemanticNames>
 GeometryIndexLayer (SemanticNames... names)
 
- Protected Member Functions inherited from Ra::Core::Geometry::GeometryIndexLayerBase
template<class... SemanticNames>
 GeometryIndexLayerBase (SemanticNames... names)
 Hidden constructor that must be called by inheriting classes to define the object semantics.
 
- Protected Member Functions inherited from Ra::Core::Utils::ObjectWithSemantic
template<class... SemanticNames>
 ObjectWithSemantic (SemanticNames... names)
 
 ObjectWithSemantic (const SemanticNameCollection &otherNames)
 

Detailed Description

template<typename T>
struct Ra::Core::Geometry::GeometryIndexLayer< T >

Typed index collection.

Definition at line 52 of file IndexedGeometry.hpp.

Member Typedef Documentation

◆ IndexContainerType

template<typename T >
using Ra::Core::Geometry::GeometryIndexLayer< T >::IndexContainerType = VectorArray<IndexType>

Definition at line 54 of file IndexedGeometry.hpp.

◆ IndexType

template<typename T >
using Ra::Core::Geometry::GeometryIndexLayer< T >::IndexType = T

Definition at line 53 of file IndexedGeometry.hpp.

Constructor & Destructor Documentation

◆ GeometryIndexLayer()

template<typename T >
template<class... SemanticNames>
Ra::Core::Geometry::GeometryIndexLayer< T >::GeometryIndexLayer ( SemanticNames... names)
inlineprotected

Definition at line 80 of file IndexedGeometry.hpp.

Member Function Documentation

◆ append()

template<typename T >
bool Ra::Core::Geometry::GeometryIndexLayer< T >::append ( const GeometryIndexLayerBase & other)
inlinefinalvirtual

Append content from another layer.

Returns
false if data cannot be appended, e.g., different semantics

Implements Ra::Core::Geometry::GeometryIndexLayerBase.

Definition at line 599 of file IndexedGeometry.hpp.

◆ clone()

template<typename T >
std::unique_ptr< GeometryIndexLayerBase > Ra::Core::Geometry::GeometryIndexLayer< T >::clone ( )
inlinefinaloverridevirtual

Create new layer with duplicated content.

Implements Ra::Core::Geometry::GeometryIndexLayerBase.

Definition at line 644 of file IndexedGeometry.hpp.

◆ collection() [1/2]

template<typename T >
GeometryIndexLayer< T >::IndexContainerType & Ra::Core::Geometry::GeometryIndexLayer< T >::collection ( )
inline

Definition at line 588 of file IndexedGeometry.hpp.

◆ collection() [2/2]

template<typename T >
const GeometryIndexLayer< T >::IndexContainerType & Ra::Core::Geometry::GeometryIndexLayer< T >::collection ( ) const

Definition at line 594 of file IndexedGeometry.hpp.

◆ dataPtr()

template<typename T >
const void * Ra::Core::Geometry::GeometryIndexLayer< T >::dataPtr ( ) const
inlinefinaloverridevirtual
Returns
a const pointer to the raw data

Implements Ra::Core::Utils::ContainerIntrospectionInterface.

Definition at line 639 of file IndexedGeometry.hpp.

◆ getBufferSize()

template<typename T >
size_t Ra::Core::Geometry::GeometryIndexLayer< T >::getBufferSize ( ) const
inlinefinaloverridevirtual
Returns
the size in byte of container

Implements Ra::Core::Utils::ContainerIntrospectionInterface.

Definition at line 629 of file IndexedGeometry.hpp.

◆ getNumberOfComponents()

template<typename T >
size_t Ra::Core::Geometry::GeometryIndexLayer< T >::getNumberOfComponents ( ) const
inlinefinaloverridevirtual

Return the number of components of one element (i.e. for glVertexAttribPointer size argument )

See also
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glVertexAttribPointer.xhtml
Returns
the number of components of one element (i.e. faces, vector)

Implements Ra::Core::Utils::ContainerIntrospectionInterface.

Definition at line 624 of file IndexedGeometry.hpp.

◆ getSize()

template<typename T >
size_t Ra::Core::Geometry::GeometryIndexLayer< T >::getSize ( ) const
inlinefinaloverridevirtual
Returns
the number of element (i.e. faces, vector) contained in the array.

Implements Ra::Core::Utils::ContainerIntrospectionInterface.

Definition at line 619 of file IndexedGeometry.hpp.

◆ getStride()

template<typename T >
int Ra::Core::Geometry::GeometryIndexLayer< T >::getStride ( ) const
inlinefinaloverridevirtual
Warning
it's meaningful only if the attrib do not contain heap allocated data.

Implements Ra::Core::Utils::ContainerIntrospectionInterface.

Definition at line 634 of file IndexedGeometry.hpp.

◆ operator==()

template<typename T >
bool Ra::Core::Geometry::GeometryIndexLayer< T >::operator== ( const GeometryIndexLayerBase & other) const
inlinefinalvirtual
Warning
Does not account for elements permutations

Reimplemented from Ra::Core::Geometry::GeometryIndexLayerBase.

Definition at line 610 of file IndexedGeometry.hpp.


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