Radium Engine
1.5.0
|
A single layer MultiIndexedGeometry. More...
#include <Core/Geometry/IndexedGeometry.hpp>
Public Types | |
using | IndexType = T |
using | IndexContainerType = VectorArray< IndexType > |
Public Types inherited from Ra::Core::Geometry::MultiIndexedGeometry | |
using | LayerSemanticCollection = Utils::ObjectWithSemantic::SemanticNameCollection |
using | LayerSemantic = Utils::ObjectWithSemantic::SemanticName |
using | LayerKeyType = std::pair< LayerSemanticCollection, std::string > |
using | PointAttribHandle = AttribArrayGeometry::PointAttribHandle |
using | NormalAttribHandle = AttribArrayGeometry::NormalAttribHandle |
using | FloatAttribHandle = AttribArrayGeometry::FloatAttribHandle |
using | Vec2AttribHandle = AttribArrayGeometry::Vec2AttribHandle |
using | Vec3AttribHandle = AttribArrayGeometry::Vec3AttribHandle |
using | Vec4AttribHandle = AttribArrayGeometry::Vec4AttribHandle |
Public Types inherited from Ra::Core::Geometry::AttribArrayGeometry | |
using | Point = Vector3 |
using | Normal = Vector3 |
using | PointAttribHandle = Utils::AttribHandle< Point > |
using | NormalAttribHandle = Utils::AttribHandle< Normal > |
using | FloatAttribHandle = Utils::AttribHandle< Scalar > |
using | Vec2AttribHandle = Utils::AttribHandle< Vector2 > |
using | Vec3AttribHandle = Utils::AttribHandle< Vector3 > |
using | Vec4AttribHandle = Utils::AttribHandle< Vector4 > |
Public Member Functions | |
const IndexContainerType & | getIndices () const |
IndexContainerType & | getIndicesWithLock () |
void | indicesUnlock () |
unlock previously read write acces, notify observers of the update. | |
void | setIndices (IndexContainerType &&indices) |
void | setIndices (const IndexContainerType &indices) |
const LayerKeyType & | getLayerKey () const |
Public Member Functions inherited from Ra::Core::Geometry::MultiIndexedGeometry | |
MultiIndexedGeometry (const MultiIndexedGeometry &other) | |
MultiIndexedGeometry (MultiIndexedGeometry &&other) | |
MultiIndexedGeometry (const AttribArrayGeometry &other) | |
MultiIndexedGeometry (AttribArrayGeometry &&other) | |
MultiIndexedGeometry & | operator= (const MultiIndexedGeometry &other) |
MultiIndexedGeometry & | operator= (MultiIndexedGeometry &&other) |
void | clear () override |
Erases all data, making the geometry empty. | |
void | copy (const MultiIndexedGeometry &other) |
Copy geometry and indices from others . More... | |
void | checkConsistency () const |
Check that the MultiIndexedGeometry is well built, asserting when it is not. More... | |
bool | append (const MultiIndexedGeometry &other) |
bool | containsLayer (const LayerKeyType &layerKey) const |
Check if at least one layer with such properties exists. More... | |
bool | containsLayer (const LayerSemanticCollection &semantics, const std::string &layerName) const |
Check if at least one layer with such properties exists. More... | |
bool | containsLayer (const LayerSemanticCollection &semantics) const |
Check if at least one layer with such properties exists. More... | |
bool | containsLayer (const LayerSemantic &semanticName) const |
Check if at least one layer with such properties exists. More... | |
size_t | countLayers (const LayerKeyType &layerKey) const |
Count the number of layer matching the input parameters. More... | |
size_t | countLayers (const LayerSemanticCollection &semantics, const std::string &layerName) const |
Count the number of layer matching the input parameters. More... | |
size_t | countLayers (const LayerSemanticCollection &semantics) const |
Count the number of layer matching the input parameters. More... | |
size_t | countLayers (const LayerSemantic &semanticName) const |
Count the number of layer matching the input parameters. More... | |
const GeometryIndexLayerBase & | getLayer (const LayerKeyType &layerKey) const |
Read-only access to a layer. More... | |
const GeometryIndexLayerBase & | getLayer (const LayerSemanticCollection &semantics, const std::string &layerName) const |
Read-only access to a layer. More... | |
std::pair< LayerKeyType, const GeometryIndexLayerBase & > | getFirstLayerOccurrence (const LayerSemanticCollection &semantics) const |
Read-only access to a layer. More... | |
std::pair< LayerKeyType, const GeometryIndexLayerBase & > | getFirstLayerOccurrence (const LayerSemantic &semanticName) const |
Read-only access to a layer. More... | |
GeometryIndexLayerBase & | getLayerWithLock (const LayerKeyType &layerKey) |
Write access to a layer. More... | |
GeometryIndexLayerBase & | getLayerWithLock (const LayerSemanticCollection &semantics, const std::string &layerName) |
Write access to a layer. More... | |
std::pair< LayerKeyType, GeometryIndexLayerBase & > | getFirstLayerOccurrenceWithLock (const LayerSemanticCollection &semantics) |
Write access to a layer. More... | |
std::pair< LayerKeyType, GeometryIndexLayerBase & > | getFirstLayerOccurrenceWithLock (const LayerSemantic &semanticName) |
Write access to a layer. More... | |
void | unlockLayer (const LayerKeyType &layerKey) |
Unlock layer with write acces, notify observers of the update. More... | |
void | unlockLayer (const LayerSemanticCollection &semantics, const std::string &layerName) |
Unlock layer with write acces, notify observers of the update. More... | |
std::pair< bool, GeometryIndexLayerBase & > | addLayer (std::unique_ptr< GeometryIndexLayerBase > &&layer, const bool withLock=false, const std::string &layerName="") |
Add layer. More... | |
auto | layerKeys () const |
Range on layer keys (read-only) More... | |
Public Member Functions inherited from Ra::Core::Geometry::AttribArrayGeometry | |
AttribArrayGeometry () | |
Create an empty geometry. | |
AttribArrayGeometry (const AttribArrayGeometry &other) | |
AttribArrayGeometry (AttribArrayGeometry &&other) | |
AttribArrayGeometry & | operator= (const AttribArrayGeometry &other) |
AttribArrayGeometry & | operator= (AttribArrayGeometry &&other) |
bool | append (const AttribArrayGeometry &other) |
void | clear () override |
Erases all data, making the AttribArrayGeometry empty. | |
void | setVertices (PointAttribHandle::Container &&vertices) |
Set vertices. | |
void | setVertices (const PointAttribHandle::Container &vertices) |
Set vertices. | |
const PointAttribHandle::Container & | vertices () const |
Access the vertices positions. | |
void | setNormals (PointAttribHandle::Container &&normals) |
Set normals. | |
void | setNormals (const PointAttribHandle::Container &normals) |
Set normals. | |
const NormalAttribHandle::Container & | normals () const |
Access the vertices normals. | |
template<typename T > | |
Utils::AttribHandle< T > | getAttribHandle (const std::string &name) const |
template<typename T > | |
bool | isValid (const Utils::AttribHandle< T > &h) const |
Return true if h refers to an existing attribute in *this. | |
bool | hasAttrib (const std::string &name) const |
template<typename T > | |
void | removeAttrib (Utils::AttribHandle< T > &h) |
void | clearAttributes () |
Erases all attributes, leaving the AttribArrayGeometry with geometry only. | |
virtual void | copyBaseGeometry (const AttribArrayGeometry &other) |
template<typename... Handles> | |
bool | copyAttributes (const AttribArrayGeometry &input, Handles... attribs) |
bool | copyAllAttributes (const AttribArrayGeometry &input) |
Aabb | computeAabb () const override |
Compute bounding box. | |
void | colorize (const Utils::Color &c) |
Utils::AttribManager & | vertexAttribs () |
const Utils::AttribManager & | vertexAttribs () const |
PointAttribHandle::Container & | verticesWithLock () |
void | verticesUnlock () |
Release lock on vertices positions. | |
NormalAttribHandle::Container & | normalsWithLock () |
void | normalsUnlock () |
Release lock on vertices normals. | |
template<typename T > | |
Utils::Attrib< T > & | getAttrib (const Utils::AttribHandle< T > &h) |
template<typename T > | |
const Utils::Attrib< T > & | getAttrib (const Utils::AttribHandle< T > &h) const |
template<typename T > | |
Utils::Attrib< T > & | getAttrib (const std::string &name) |
template<typename T > | |
const Utils::Attrib< T > & | getAttrib (const std::string &name) const |
template<typename T > | |
Utils::Attrib< T > * | getAttribPtr (const Utils::AttribHandle< T > &h) |
template<typename T > | |
const Utils::Attrib< T > * | getAttribPtr (const Utils::AttribHandle< T > &h) const |
Utils::AttribBase * | getAttribBase (const std::string &name) |
const Utils::AttribBase * | getAttribBase (const std::string &name) const |
template<typename T > | |
Utils::AttribHandle< T > | addAttrib (const std::string &name) |
template<typename T > | |
Utils::AttribHandle< T > | addAttrib (const std::string &name, const typename Core::VectorArray< T > &data) |
template<typename T > | |
Utils::AttribHandle< T > | addAttrib (const std::string &name, const typename Utils::Attrib< T >::Container &&data) |
Public Member Functions inherited from Ra::Core::Geometry::AbstractGeometry | |
AbstractGeometry (const AbstractGeometry &other) | |
AbstractGeometry & | operator= (const AbstractGeometry &other) |
Ra::Core::Utils::ObservableVoid & | getAabbObservable () |
Additional Inherited Members | |
Protected Member Functions inherited from Ra::Core::Geometry::MultiIndexedGeometry | |
void | unlockFirstLayerOccurrence (const LayerSemanticCollection &semantics) |
Unlock layer with write acces, notify observers of the update. More... | |
void | unlockFirstLayerOccurrence (const LayerSemantic &semanticName) |
Unlock layer with write acces, notify observers of the update. More... | |
Protected Member Functions inherited from Ra::Core::Geometry::AbstractGeometry | |
bool | isAabbValid () const |
Core::Aabb | getAabb () const |
void | invalidateAabb () const |
void | setAabb (const Core::Aabb &aabb) const |
A single layer MultiIndexedGeometry.
This class actually provide compatibility with old geometry with a main layer. Main layer contains indices of a specific type (point, line, triangle, poly). Derived classes explicit the kind of indices of the main layer. Since IndexedGeometry is a MultiIndexedGeometry, one can add index layer on the fly.
Definition at line 514 of file IndexedGeometry.hpp.
|
inline |
read write access to indices. Cause indices to be "lock" for the caller need to be unlock by the caller before any one can ask for write access.
Definition at line 750 of file IndexedGeometry.hpp.
|
inline |
set indices. Indices must be unlock, i.e. no one should have write access to it. Notify observers of the update.
Definition at line 761 of file IndexedGeometry.hpp.