Workspace 6.21.5
Public Member Functions | List of all members
WSGLFacetedGeometry Class Reference

Struct for containing the geometry of the model when it is faceted (i.e. broken up into individual elements. More...

#include <Rendering/OpenGL/Shaders/wsglpickelementshader.h>

Inheritance diagram for WSGLFacetedGeometry:
[legend]

Public Member Functions

 WSGLFacetedGeometry (WSGLRenderer &renderer, WSGLRenderItem &model)
 
bool render (WSGLRenderer &renderer, const WSGLRenderElementsFilter *elementFilter=nullptr, bool ignorePickFilter=false) override
 
bool requiresUpdate ()
 
bool update (const Mesh::MeshModelInterface &model)
 
- Public Member Functions inherited from WSGLRenderItem
 WSGLRenderItem (const QString &modelId, const QString &name)
 
 WSGLRenderItem (const WSGLRenderItem &)
 
virtual ~WSGLRenderItem ()
 
void clearAllGlyphs ()
 
void clearGlyphs ()
 
const ClipRegionListgetClipRegions () const
 
unsigned char getDepthLayer () const
 
WSGLInstancedItemgetElementGlyph (const Mesh::ElementType::Type *elementType, int i) const
 
const ElementGlyphSetsgetElementGlyphs () const
 
const WSGLGlyphSetPtrgetElementGlyphs (const Mesh::ElementType::Type *elementType) const
 
Mesh::ElementType::List getElementTypesGlyphed () const
 
WSGLGeometrygetGeometry ()
 
const WSGLGeometrygetGeometry () const
 
WSGLInstancedItemgetGlyph (int i) const
 
const WSGLGlyphSuperSetPtrgetGlyphs () const
 
Mesh::MeshModelLibrarygetMeshModelLibrary ()
 
const Mesh::MeshModelLibrarygetMeshModelLibrary () const
 
const QString & getModelId () const
 
const QString & getModelName () const
 
WSGLInstancedItemgetNodeGlyph (int i) const
 
const WSGLGlyphSetPtrgetNodeGlyphs () const
 
const QString & getOpIdPath () const
 
ShadergetShader ()
 
const ShadergetShader () const
 
SortingKey getSortingKey () const
 
const Mesh::BoundingBoxMinimalgetWorldBoundingBox () const
 
const Mesh::TransformMatrixgetWorldTransform () const
 
bool hasElementGlyphs (const Mesh::ElementType::Type *elementType=nullptr) const
 
bool hasGlyphs () const
 
bool hasNodeGlyphs () const
 
bool isDepthTested () const
 
bool isInteractive () const
 
bool isManipulatorSymbol () const
 
bool isSymbol () const
 
WSGLRenderItemoperator= (const WSGLRenderItem &)
 
void releaseAllCachedData ()
 
virtual bool render (WSGLRenderer &renderer, const WSGLRenderElementsFilter *elementFilter=nullptr, bool ignorePickFilter=false)
 
void setClipRegions (const ClipRegionList &list)
 
void setElementGlyphs (const Mesh::ElementType::Type *elementType, const WSGLGlyphSetPtr &glyphs)
 
void setFlags (RenderItemFlags flags)
 
void setGeometry (WSGLGeometry *geometry)
 
void setGlyphs (const WSGLGlyphSuperSetPtr &glyphs)
 
void setMeshModelLibrary (Mesh::MeshModelLibrary &)
 
void setModelId (const QString &)
 
void setModelName (const QString &)
 
void setNodeGlyphs (const WSGLGlyphSetPtr &glyphs)
 
void setOpIdPath (const QString &path)
 
void setShader (Shader *shader)
 
void setSortingKey (const SortingKey &key)
 
void setWorldBoundingBox (const Mesh::BoundingBoxMinimal &bb)
 
void setWorldTransform (const Mesh::TransformMatrix &matrix)
 

Additional Inherited Members

- Public Types inherited from WSGLRenderItem
enum  RenderItemFlag { IsSymbol = 0x01 , IsManipulatorSymbol = 0x02 , IsInteractive = 0x04 , IsDepthTested = 0x08 }
 
using SortingKey = quint64
 
- Static Public Attributes inherited from WSGLRenderItem
static const unsigned ID_ATTRIB_LOCATION = 2
 
static const unsigned NORMAL_ATTRIB_LOCATION = 1
 
static const unsigned VERTEX_ATTRIB_LOCATION = 0
 

Detailed Description

This is used by the WSGLPickElementShader (and other shaders that choose to use the same geometry style if they wish) to render each individual facet of the geometry.

Constructor & Destructor Documentation

◆ WSGLFacetedGeometry()

WSGLFacetedGeometry ( WSGLRenderer renderer,
WSGLRenderItem model 
)

Member Function Documentation

◆ render()

bool render ( WSGLRenderer renderer,
const WSGLRenderElementsFilter elementFilter = nullptr,
bool  ignorePickFilter = false 
)
overridevirtual

Renders the geometric primitives contained within the render item. Assumes that a shader has been activated prior to rendering and that the current framebuffer state is valid.

Parameters
rendererThe renderer with which this item is going to be rendered. Not const because depending on the element types being rendered, render state may need to be altered in order to correctly visualise the element type.
elementFilterUsed to filter out certain element types from the rendered item.
ignorePickFilterIf true, then the pick filter will not be taken into account during the render (e.g. picking a given elt type doesn't mean we should not render complete glyphs)
Returns
True if the render was successful, false otherwise.

Reimplemented from WSGLRenderItem.

◆ requiresUpdate()

bool requiresUpdate ( )

◆ update()

bool update ( const Mesh::MeshModelInterface model)