Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Core::Asset::GeometryData Class Reference

#include <Core/Asset/GeometryData.hpp>

+ Inheritance diagram for Ra::Core::Asset::GeometryData:
+ Collaboration diagram for Ra::Core::Asset::GeometryData:

Public Types

enum  GeometryType {
  UNKNOWN = 1 << 0 , POINT_CLOUD = 1 << 1 , LINE_MESH = 1 << 2 , TRI_MESH = 1 << 3 ,
  QUAD_MESH = 1 << 4 , POLY_MESH = 1 << 5 , TETRA_MESH = 1 << 6 , HEX_MESH = 1 << 7
}
 
using ColorArray = Vector4Array
 

Public Member Functions

 GeometryData (const std::string &name="", const GeometryType &type=UNKNOWN)
 
 GeometryData (const GeometryData &data)=delete
 
void displayInfo () const
 Print stast info to the Debug output.
 
Data access
void setName (const std::string &name)
 Return the name of the object.
 
GeometryType getType () const
 Return the type of geometry.
 
void setType (const GeometryType &type)
 Set the type of geometry.
 
Transform getFrame () const
 Return the Transform of the object.
 
void setFrame (const Transform &frame)
 Set the Transform of the object.
 
const MaterialDatagetMaterial () const
 Return the MaterialData associated to the objet.
 
void setMaterial (MaterialData *material)
 Set the MaterialData for the object.
 
Geometry::MultiIndexedGeometrygetGeometry ()
 Read/write access to the multiIndexedGeometry;.
 
const Geometry::MultiIndexedGeometrygetGeometry () const
 Read only access to the multiIndexedGeometry;.
 
Status queries
bool isPointCloud () const
 Return true if the object is a Point Cloud.
 
bool isLineMesh () const
 Return true if the object is a Line Mesh.
 
bool isTriMesh () const
 Return true if the object is a Triangle Mesh.
 
bool isQuadMesh () const
 Return true if the object is a Quadrangle Mesh.
 
bool isPolyMesh () const
 
bool isTetraMesh () const
 Return true if the object is a Tetrahedron Mesh.
 
bool isHexMesh () const
 Return true if the object is a Hexahedron Mesh.
 
bool hasEdges () const
 Return true if the object has lines.
 
bool hasFaces () const
 Return true if the object has faces.
 
bool hasPolyhedra () const
 Return true if the object has polyhedra.
 
bool hasMaterial () const
 Return true if the object has MaterialData.
 
void setPrimitiveCount (int n)
 Used to track easily the number of primitives in the geometry data.
 
int getPrimitiveCount () const
 Return the number of primitives in the geometry data.
 
- Public Member Functions inherited from Ra::Core::Asset::AssetData
 AssetData (const std::string &name)
 Construct an asset data given its name.
 
 AssetData (const AssetData &other)=default
 Copy constructor. Default here.
 
virtual ~AssetData ()
 Simple delete operator.
 
virtual const std::stringgetName () const
 Acces to the name of the asset.
 

Protected Attributes

Transform m_frame
 The transformation of the object.
 
GeometryType m_type
 The type of geometry for the object.
 
Core::Geometry::MultiIndexedGeometry m_geometry
 Named attributes.
 
int m_primitiveCount { -1 }
 Simple tracking of geometric primitive number.
 
std::shared_ptr< MaterialDatam_material
 The MaterialData for the object.
 
- Protected Attributes inherited from Ra::Core::Asset::AssetData
std::string m_name
 

Detailed Description

The GeometryData class stores all the geometry related data of a loaded object.

Definition at line 28 of file GeometryData.hpp.

Member Typedef Documentation

◆ ColorArray

using Ra::Core::Asset::GeometryData::ColorArray = Vector4Array

Definition at line 31 of file GeometryData.hpp.

Member Enumeration Documentation

◆ GeometryType

The type of geometry.

Definition at line 37 of file GeometryData.hpp.

Constructor & Destructor Documentation

◆ GeometryData()

Ra::Core::Asset::GeometryData::GeometryData ( const std::string & name = "",
const GeometryType & type = UNKNOWN )

Definition at line 10 of file GeometryData.cpp.

◆ ~GeometryData()

Ra::Core::Asset::GeometryData::~GeometryData ( )

Definition at line 17 of file GeometryData.cpp.

Member Function Documentation

◆ displayInfo()

void Ra::Core::Asset::GeometryData::displayInfo ( ) const

Print stast info to the Debug output.

Definition at line 19 of file GeometryData.cpp.

◆ getFrame()

Transform Ra::Core::Asset::GeometryData::getFrame ( ) const
inline

Return the Transform of the object.

Definition at line 163 of file GeometryData.hpp.

◆ getGeometry() [1/2]

Geometry::MultiIndexedGeometry & Ra::Core::Asset::GeometryData::getGeometry ( )
inline

Read/write access to the multiIndexedGeometry;.

Definition at line 241 of file GeometryData.hpp.

◆ getGeometry() [2/2]

const Geometry::MultiIndexedGeometry & Ra::Core::Asset::GeometryData::getGeometry ( ) const
inline

Read only access to the multiIndexedGeometry;.

Definition at line 237 of file GeometryData.hpp.

◆ getMaterial()

const MaterialData & Ra::Core::Asset::GeometryData::getMaterial ( ) const
inline

Return the MaterialData associated to the objet.

Definition at line 171 of file GeometryData.hpp.

◆ getPrimitiveCount()

int Ra::Core::Asset::GeometryData::getPrimitiveCount ( ) const
inline

Return the number of primitives in the geometry data.

Definition at line 248 of file GeometryData.hpp.

◆ getType()

GeometryData::GeometryType Ra::Core::Asset::GeometryData::getType ( ) const
inline

Return the type of geometry.

Definition at line 155 of file GeometryData.hpp.

◆ hasEdges()

bool Ra::Core::Asset::GeometryData::hasEdges ( ) const
inline

Return true if the object has lines.

Definition at line 207 of file GeometryData.hpp.

+ Here is the call graph for this function:

◆ hasFaces()

bool Ra::Core::Asset::GeometryData::hasFaces ( ) const
inline

Return true if the object has faces.

Definition at line 211 of file GeometryData.hpp.

+ Here is the call graph for this function:

◆ hasMaterial()

bool Ra::Core::Asset::GeometryData::hasMaterial ( ) const
inline

Return true if the object has MaterialData.

Definition at line 233 of file GeometryData.hpp.

◆ hasPolyhedra()

bool Ra::Core::Asset::GeometryData::hasPolyhedra ( ) const
inline

Return true if the object has polyhedra.

Definition at line 229 of file GeometryData.hpp.

+ Here is the call graph for this function:

◆ isHexMesh()

bool Ra::Core::Asset::GeometryData::isHexMesh ( ) const
inline

Return true if the object is a Hexahedron Mesh.

Definition at line 203 of file GeometryData.hpp.

◆ isLineMesh()

bool Ra::Core::Asset::GeometryData::isLineMesh ( ) const
inline

Return true if the object is a Line Mesh.

Definition at line 183 of file GeometryData.hpp.

◆ isPointCloud()

bool Ra::Core::Asset::GeometryData::isPointCloud ( ) const
inline

Return true if the object is a Point Cloud.

Definition at line 179 of file GeometryData.hpp.

◆ isPolyMesh()

bool Ra::Core::Asset::GeometryData::isPolyMesh ( ) const
inline

Return true if the object is a Polygon Mesh.

Note
Return false for Triangle and Quadrangle meshes.

Definition at line 195 of file GeometryData.hpp.

◆ isQuadMesh()

bool Ra::Core::Asset::GeometryData::isQuadMesh ( ) const
inline

Return true if the object is a Quadrangle Mesh.

Definition at line 191 of file GeometryData.hpp.

◆ isTetraMesh()

bool Ra::Core::Asset::GeometryData::isTetraMesh ( ) const
inline

Return true if the object is a Tetrahedron Mesh.

Definition at line 199 of file GeometryData.hpp.

◆ isTriMesh()

bool Ra::Core::Asset::GeometryData::isTriMesh ( ) const
inline

Return true if the object is a Triangle Mesh.

Definition at line 187 of file GeometryData.hpp.

◆ setFrame()

void Ra::Core::Asset::GeometryData::setFrame ( const Transform & frame)
inline

Set the Transform of the object.

Definition at line 167 of file GeometryData.hpp.

◆ setMaterial()

void Ra::Core::Asset::GeometryData::setMaterial ( MaterialData * material)
inline

Set the MaterialData for the object.

Definition at line 175 of file GeometryData.hpp.

◆ setName()

void Ra::Core::Asset::GeometryData::setName ( const std::string & name)
inline

Return the name of the object.

Definition at line 151 of file GeometryData.hpp.

◆ setPrimitiveCount()

void Ra::Core::Asset::GeometryData::setPrimitiveCount ( int n)
inline

Used to track easily the number of primitives in the geometry data.

Definition at line 245 of file GeometryData.hpp.

◆ setType()

void Ra::Core::Asset::GeometryData::setType ( const GeometryType & type)
inline

Set the type of geometry.

Definition at line 159 of file GeometryData.hpp.

Member Data Documentation

◆ m_frame

Transform Ra::Core::Asset::GeometryData::m_frame
protected

The transformation of the object.

Definition at line 136 of file GeometryData.hpp.

◆ m_geometry

Core::Geometry::MultiIndexedGeometry Ra::Core::Asset::GeometryData::m_geometry
protected

Named attributes.

Definition at line 142 of file GeometryData.hpp.

◆ m_material

std::shared_ptr<MaterialData> Ra::Core::Asset::GeometryData::m_material
protected

The MaterialData for the object.

Definition at line 148 of file GeometryData.hpp.

◆ m_primitiveCount

int Ra::Core::Asset::GeometryData::m_primitiveCount { -1 }
protected

Simple tracking of geometric primitive number.

Definition at line 145 of file GeometryData.hpp.

◆ m_type

GeometryType Ra::Core::Asset::GeometryData::m_type
protected

The type of geometry for the object.

Definition at line 139 of file GeometryData.hpp.


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