Visual Computing Library  devel
Loading...
Searching...
No Matches
vcl::AbstractDrawableMesh Class Referenceabstract

The AbstractDrawableMesh class is the base class for all the drawable meshes in the VCLib render system. More...

#include <vclib/render/drawable/abstract_drawable_mesh.h>

Inheritance diagram for vcl::AbstractDrawableMesh:

Public Member Functions

 AbstractDrawableMesh (const AbstractDrawableMesh &other)=default
 
template<MeshConcept MeshType>
 AbstractDrawableMesh (const MeshType &m)
 
virtual uint edgeNumber () const =0
 
virtual uint faceNumber () const =0
 
bool isVisible () const
 This member function is used to check if the object is visible.
 
const MeshRenderSettingsrenderSettings () const
 
virtual void setRenderSettings (const MeshRenderSettings &rs)
 
void setVisibility (bool vis)
 This member function is used to set the visibility of the object.
 
virtual std::vector< std::string > textures () const
 
virtual vcl::Matrix44d transformMatrix () const =0
 
virtual void updateBuffers (MeshRenderInfo::BuffersBitSet buffersToUpdate=MeshRenderInfo::BUFFERS_ALL)=0
 
virtual uint vertexNumber () const =0
 
- Public Member Functions inherited from vcl::DrawableObject
virtual vcl::Box3d boundingBox () const =0
 This member function is used to find a good camera position to render object. It should return the the bounding box of the object. Return a null bounding box if the object shouldn't influence the position of the camera.
 
virtual std::shared_ptr< DrawableObjectclone () &&=0
 This member function is used to create a new DrawableObject that is a moved from the current one. This object will be destroyed after the call of this function. Each derived class must implement this member function, that returns a shared pointer pointing to the moved object. For more details about this paradigm, check polimorphism clone in modern c++: https://www.fluentcpp.com/2017/09/08/make-polymorphic-copy-modern-cpp/.
 
virtual std::shared_ptr< DrawableObjectclone () const &=0
 This member function is used to create a new copy of the DrawableObject. Each derived class must implement this member function, that returns a shared pointer pointing to a copy of the current one. for more details about this paradigm, check polimorphism clone in modern c++: https://www.fluentcpp.com/2017/09/08/make-polymorphic-copy-modern-cpp/.
 
virtual void draw (uint viewId=0) const =0
 This member function must draw the object. It will be called at every frame.
 
 DrawableObject ()=default
 Empty constructor.
 
virtual void drawId (uint viewId, uint id) const
 This member function should draw the object. It will be called on request when the renderer needs to draw the ID of the object.
 
std::string & info ()
 Returns a reference of the info of the object, that allows to modify it.
 
const std::string & info () const
 Returns the info of the object.
 
virtual void init ()
 This member function is called after the initialization of the Context. It must initialize and bind data to the GPU like buffers and textures.
 
virtual std::string & name ()
 Returns a reference of the name of the object, that allows to modify it.
 
virtual const std::string & name () const
 Returns the name of the object.
 

Protected Member Functions

void swap (AbstractDrawableMesh &other)
 
- Protected Member Functions inherited from vcl::DrawableObject
void swap (DrawableObject &other)
 Utility swap function that allows to swap the content of two DrawableObject instances.
 

Protected Attributes

MeshRenderSettings mMRS
 

Detailed Description

The AbstractDrawableMesh class is the base class for all the drawable meshes in the VCLib render system.

It provides a common interface for drawable meshes, allowing to handle their render settings.

Member Function Documentation

◆ isVisible()

bool vcl::AbstractDrawableMesh::isVisible ( ) const
inlinevirtual

This member function is used to check if the object is visible.

Returns
true if the object is visible;

Implements vcl::DrawableObject.

◆ setVisibility()

void vcl::AbstractDrawableMesh::setVisibility ( bool  vis)
inlinevirtual

This member function is used to set the visibility of the object.

Parameters
[in]vistrue if the object should be visible;

Implements vcl::DrawableObject.

Reimplemented in vcl::DrawableMeshBGFX< MeshType >.


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