3#include <Core/Asset/AssetData.hpp>
4#include <Core/Asset/MaterialData.hpp>
5#include <Core/Containers/VectorArray.hpp>
6#include <Core/Geometry/StandardAttribNames.hpp>
7#include <Core/Geometry/TriangleMesh.hpp>
8#include <Core/RaCore.hpp>
10#include <Core/Utils/Attribs.hpp>
11#include <Core/Utils/Index.hpp>
31 using ColorArray = Vector4Array;
61 inline GeometryType getType()
const;
64 inline void setType(
const GeometryType& type );
67 inline Transform getFrame()
const;
70 inline void setFrame(
const Transform& frame );
90 inline bool isPointCloud()
const;
93 inline bool isLineMesh()
const;
96 inline bool isTriMesh()
const;
99 inline bool isQuadMesh()
const;
103 inline bool isPolyMesh()
const;
106 inline bool isTetraMesh()
const;
109 inline bool isHexMesh()
const;
112 inline bool hasEdges()
const;
115 inline bool hasFaces()
const;
118 inline bool hasPolyhedra()
const;
121 inline bool hasMaterial()
const;
124 inline void setPrimitiveCount(
int n );
127 inline int getPrimitiveCount()
const;
132 void displayInfo()
const;
145 int m_primitiveCount { -1 };
180 return (
m_type == POINT_CLOUD );
184 return (
m_type == LINE_MESH );
188 return (
m_type == TRI_MESH );
192 return (
m_type == QUAD_MESH );
196 return (
m_type == POLY_MESH );
200 return (
m_type == TETRA_MESH );
204 return (
m_type == HEX_MESH );
215 layerSemanticName =
std::string( Geometry::TriangleIndexLayer::staticSemanticName );
218 layerSemanticName =
std::string( Geometry::QuadIndexLayer::staticSemanticName );
221 layerSemanticName =
std::string( Geometry::PolyIndexLayer::staticSemanticName );
int getPrimitiveCount() const
Return the number of primitives in the geometry data.
bool isLineMesh() const
Return true if the object is a Line Mesh.
int m_primitiveCount
Simple tracking of geometric primitive number.
bool isTetraMesh() const
Return true if the object is a Tetrahedron Mesh.
bool isTriMesh() const
Return true if the object is a Triangle Mesh.
bool hasFaces() const
Return true if the object has faces.
Transform m_frame
The transformation of the object.
GeometryType m_type
The type of geometry for the object.
bool isQuadMesh() const
Return true if the object is a Quadrangle Mesh.
bool isHexMesh() const
Return true if the object is a Hexahedron Mesh.
const MaterialData & getMaterial() const
Return the MaterialData associated to the objet.
void setMaterial(MaterialData *material)
Set the MaterialData for the object.
void setPrimitiveCount(int n)
Used to track easily the number of primitives in the geometry data.
void setType(const GeometryType &type)
Set the type of geometry.
GeometryType getType() const
Return the type of geometry.
Geometry::MultiIndexedGeometry & getGeometry()
Read/write access to the multiIndexedGeometry;.
std::shared_ptr< MaterialData > m_material
The MaterialData for the object.
bool hasPolyhedra() const
Return true if the object has polyhedra.
Core::Geometry::MultiIndexedGeometry m_geometry
Named attributes.
void setFrame(const Transform &frame)
Set the Transform of the object.
void setName(const std::string &name)
Return the name of the object.
Transform getFrame() const
Return the Transform of the object.
bool hasMaterial() const
Return true if the object has MaterialData.
bool isPointCloud() const
Return true if the object is a Point Cloud.
bool hasEdges() const
Return true if the object has lines.
represent material data loaded by a file loader. Material data must be identified by a unique name....
AbstractGeometry with per-vertex attributes and layers of indices. Each layer represents a different ...
bool containsLayer(const LayerKeyType &layerKey) const
Check if at least one layer with such properties exists.
hepler function to manage enum as underlying types in VariableSet