gz/rendering/base/BaseMesh.hh
STL class.
Describes how a Mesh should be loaded.
Definition: gz/rendering/MeshDescriptor.hh:44
void SetDescriptor(const MeshDescriptor &_desc) override
Set the mesh's mesh descriptor.
Definition: gz/rendering/base/BaseMesh.hh:380
virtual bool HasSkeleton() const override
Check whether the mesh has skeleton.
Definition: gz/rendering/base/BaseMesh.hh:182
const MeshDescriptor & Descriptor() const override
Get the mesh's mesh descriptor.
Definition: gz/rendering/base/BaseMesh.hh:373
virtual unsigned int SubMeshCount() const override
Get the sub-mesh count.
Definition: gz/rendering/base/BaseMesh.hh:243
virtual void Destroy() override
Destroy any resources associated with this object. Invoking any other functions after destroying an o...
Definition: gz/rendering/base/BaseMesh.hh:387
virtual MaterialPtr Material() const override
Get the currently assigned material.
Definition: gz/rendering/base/BaseMesh.hh:450
virtual std::string Name() const =0
Get name of the render-engine.
virtual RenderEngine * Engine() const =0
Get the creating render-engine of the scene.
bool ownsMaterial
Flag to indicate whether or not this submesh should be responsible for destroying the material.
Definition: gz/rendering/base/BaseMesh.hh:160
virtual bool HasSubMeshName(const std::string &_name) const override
Determine if has sub-mesh with given name.
Definition: gz/rendering/base/BaseMesh.hh:257
Definition: gz/rendering/base/BaseMesh.hh:130
MeshDescriptor meshDescriptor
MeshDescriptor for this mesh.
Definition: gz/rendering/base/BaseMesh.hh:125
virtual void UpdateSkeletonAnimation(std::chrono::steady_clock::duration _time) override
Play the active skeleton animation to the specified time.
Definition: gz/rendering/base/BaseMesh.hh:236
MaterialPtr material
Pointer to currently assigned material.
Definition: gz/rendering/base/BaseMesh.hh:122
#define ignerr
Manages a single scene-graph. This class updates scene-wide properties and holds the root scene node....
Definition: gz/rendering/Scene.hh:49
MaterialPtr material
Pointer to currently assigned material.
Definition: gz/rendering/base/BaseMesh.hh:163
Represents a collection of mesh geometries.
Definition: gz/rendering/Mesh.hh:37
virtual GeometryPtr Clone() const override
Clone the geometry.
Definition: gz/rendering/base/BaseMesh.hh:332
virtual SubMeshPtr SubMeshByIndex(unsigned int _index) const override
Get sub-mesh at given index.
Definition: gz/rendering/base/BaseMesh.hh:271
BaseSubMesh()
Definition: gz/rendering/base/BaseMesh.hh:401
virtual SubMeshPtr SubMeshByName(const std::string &_name) const override
Get sub-mesh with given name.
Definition: gz/rendering/base/BaseMesh.hh:264
virtual SubMeshStorePtr SubMeshes() const =0
virtual void PreRender()=0
Prepare this object and any of its children for rendering. This should be called for each object in a...
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
Definition: gz/rendering/base/BaseMesh.hh:317
virtual std::unordered_map< std::string, float > SkeletonWeights() const override
Get skeleton node weight.
Definition: gz/rendering/base/BaseMesh.hh:205
Definition: gz/rendering/base/BaseMesh.hh:36
STL class.
virtual ~BaseMesh()
Definition: gz/rendering/base/BaseMesh.hh:176
virtual MaterialPtr Material(const std::string &_name) const =0
Get material registered under the given name. If no material is registered under the given name,...
virtual std::map< std::string, math::Matrix4d > SkeletonLocalTransforms() const override
Get the skeleton local transforms.
Definition: gz/rendering/base/BaseMesh.hh:190
virtual bool SkeletonAnimationEnabled(const std::string &_name) const override
Get whether a skeleton animation is enabled or not.
Definition: gz/rendering/base/BaseMesh.hh:229
T endl(T... args)
virtual MeshPtr CreateMesh(const std::string &_meshName)=0
Create new mesh geomerty. The rendering::Mesh will be created from a common::Mesh retrieved from comm...
virtual void SetMaterial(const std::string &_name, bool _unique=true) override
Set the materials of this SubMesh. The specified material will be retrieved from the parent Scene....
Definition: gz/rendering/base/BaseMesh.hh:424
virtual void SetSkeletonAnimationEnabled(const std::string &_name, bool _enabled, bool _loop=true, float _weight=1.0) override
Set whether a skeleton animation should be enabled or not.
Definition: gz/rendering/base/BaseMesh.hh:222
virtual void SetSkeletonWeights(const std::unordered_map< std::string, float > &_weights) override
Set skeleton node weight.
Definition: gz/rendering/base/BaseMesh.hh:213
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
Definition: gz/rendering/base/BaseMesh.hh:457
virtual void SetMaterial(const std::string &_name, bool _unique=true) override
Set the materials of this Geometry. The specified material will be retrieved from the parent Scene....
Definition: gz/rendering/base/BaseMesh.hh:287
virtual void Destroy() override
Destroy any resources associated with this object. Invoking any other functions after destroying an o...
Definition: gz/rendering/base/BaseMesh.hh:413
virtual ~BaseSubMesh()
Definition: gz/rendering/base/BaseMesh.hh:407
bool ownsMaterial
Flag to indicate whether or not this mesh should be responsible for destroying the material.
Definition: gz/rendering/base/BaseMesh.hh:119
virtual void SetSkeletonLocalTransforms(const std::map< std::string, math::Matrix4d > &_tfs) override
Set transforms for the skeleton.
Definition: gz/rendering/base/BaseMesh.hh:198
shared_ptr< Material > MaterialPtr
Shared pointer to Material.
Definition: gz/rendering/RenderTypes.hh:191
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47
virtual bool HasSubMesh(ConstSubMeshPtr _subMesh) const override
Determine if has given sub-mesh.
Definition: gz/rendering/base/BaseMesh.hh:250
STL class.
virtual void SetMaterialImpl(MaterialPtr _material)=0
Engine implementation for setting the material of this SubMesh.
virtual MaterialPtr Material() const override
Get the material of this geometry.
Definition: gz/rendering/base/BaseMesh.hh:278
virtual void DestroyMaterial(MaterialPtr _material)=0
Unregister and destroy a material.