Radium Engine  1.5.0
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::string & getName () 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 Enumeration Documentation

◆ GeometryType

The type of geometry.

Definition at line 39 of file GeometryData.hpp.

Member Function Documentation

◆ 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 197 of file GeometryData.hpp.


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