Workspace 6.21.5
Public Types | Public Member Functions | Static Public Attributes | List of all members
WSGLRenderItem Class Reference

Memento-like structure for holding everything we need to know in order to render some geometry in the scene.

#include <Rendering/OpenGL/wsglrenderitem.h>

Inheritance diagram for WSGLRenderItem:
[legend]

Public Types

enum  RenderItemFlag { IsSymbol = 0x01 , IsManipulatorSymbol = 0x02 , IsInteractive = 0x04 , IsDepthTested = 0x08 }
 
using SortingKey = quint64
 

Public Member Functions

 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)
 

Static Public Attributes

static const unsigned ID_ATTRIB_LOCATION = 2
 
static const unsigned NORMAL_ATTRIB_LOCATION = 1
 
static const unsigned VERTEX_ATTRIB_LOCATION = 0
 

Member Typedef Documentation

◆ SortingKey

using SortingKey = quint64

Member Enumeration Documentation

◆ RenderItemFlag

Flags for various properties of the render item.

Enumerator
IsSymbol 
IsManipulatorSymbol 
IsInteractive 
IsDepthTested 

Constructor & Destructor Documentation

◆ WSGLRenderItem() [1/2]

WSGLRenderItem ( const QString &  modelId,
const QString &  name 
)

◆ WSGLRenderItem() [2/2]

WSGLRenderItem ( const WSGLRenderItem other)

◆ ~WSGLRenderItem()

~WSGLRenderItem ( )
virtual

Member Function Documentation

◆ clearAllGlyphs()

void clearAllGlyphs ( )

◆ clearGlyphs()

void clearGlyphs ( )

◆ getClipRegions()

const ClipRegionList & getClipRegions ( ) const

◆ getDepthLayer()

unsigned char getDepthLayer ( ) const

◆ getElementGlyph()

CSIRO::Rendering::WSGLInstancedItem * getElementGlyph ( const Mesh::ElementType::Type elementType,
int  i 
) const

◆ getElementGlyphs() [1/2]

const CSIRO::Rendering::ElementGlyphSets & getElementGlyphs ( ) const

◆ getElementGlyphs() [2/2]

const CSIRO::Rendering::WSGLGlyphSetPtr & getElementGlyphs ( const Mesh::ElementType::Type elementType) const

◆ getElementTypesGlyphed()

CSIRO::Mesh::ElementType::List getElementTypesGlyphed ( ) const

◆ getGeometry() [1/2]

WSGLGeometry * getGeometry ( )

◆ getGeometry() [2/2]

const WSGLGeometry * getGeometry ( ) const

◆ getGlyph()

WSGLInstancedItem * getGlyph ( int  i) const

◆ getGlyphs()

const WSGLGlyphSuperSetPtr & getGlyphs ( ) const

◆ getMeshModelLibrary() [1/2]

Mesh::MeshModelLibrary & getMeshModelLibrary ( )

◆ getMeshModelLibrary() [2/2]

const Mesh::MeshModelLibrary & getMeshModelLibrary ( ) const

◆ getModelId()

const QString & getModelId ( ) const

◆ getModelName()

const QString & getModelName ( ) const

◆ getNodeGlyph()

CSIRO::Rendering::WSGLInstancedItem * getNodeGlyph ( int  i) const

◆ getNodeGlyphs()

const WSGLGlyphSetPtr & getNodeGlyphs ( ) const

◆ getOpIdPath()

const QString & getOpIdPath ( ) const

◆ getShader() [1/2]

Shader * getShader ( )

◆ getShader() [2/2]

const Shader * getShader ( ) const

◆ getSortingKey()

WSGLRenderItem::SortingKey getSortingKey ( ) const

◆ getWorldBoundingBox()

const Mesh::BoundingBoxMinimal & getWorldBoundingBox ( ) const

◆ getWorldTransform()

const Mesh::TransformMatrix & getWorldTransform ( ) const

◆ hasElementGlyphs()

bool hasElementGlyphs ( const Mesh::ElementType::Type elementType = nullptr) const

◆ hasGlyphs()

bool hasGlyphs ( ) const

◆ hasNodeGlyphs()

bool hasNodeGlyphs ( ) const

◆ isDepthTested()

bool isDepthTested ( ) const

◆ isInteractive()

bool isInteractive ( ) const

◆ isManipulatorSymbol()

bool isManipulatorSymbol ( ) const

◆ isSymbol()

bool isSymbol ( ) const
Returns
True if the render item is a symbol, false if it is a genuine, bonafide model instance.

◆ operator=()

WSGLRenderItem & operator= ( const WSGLRenderItem other)

◆ releaseAllCachedData()

void releaseAllCachedData ( )

Releases all of the cached data associated with the render item, namely, VBOs, GlyphCacheItems and Textures.

◆ render()

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

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 in WSGLFacetedGeometry, and WSGLNodeGeometry.

◆ setClipRegions()

void setClipRegions ( const ClipRegionList list)

◆ setElementGlyphs()

void setElementGlyphs ( const Mesh::ElementType::Type elementType,
const WSGLGlyphSetPtr glyphs 
)

◆ setFlags()

void setFlags ( RenderItemFlags  flags)

◆ setGeometry()

void setGeometry ( WSGLGeometry geometry)

◆ setGlyphs()

void setGlyphs ( const WSGLGlyphSuperSetPtr glyphs)

◆ setMeshModelLibrary()

void setMeshModelLibrary ( Mesh::MeshModelLibrary library)

◆ setModelId()

void setModelId ( const QString &  id)

◆ setModelName()

void setModelName ( const QString &  name)

◆ setNodeGlyphs()

void setNodeGlyphs ( const WSGLGlyphSetPtr glyphs)

◆ setOpIdPath()

void setOpIdPath ( const QString &  path)

◆ setShader()

void setShader ( Shader shader)

◆ setSortingKey()

void setSortingKey ( const SortingKey key)

◆ setWorldBoundingBox()

void setWorldBoundingBox ( const Mesh::BoundingBoxMinimal bb)

◆ setWorldTransform()

void setWorldTransform ( const Mesh::TransformMatrix matrix)

Member Data Documentation

◆ ID_ATTRIB_LOCATION

const unsigned ID_ATTRIB_LOCATION = 2
static

◆ NORMAL_ATTRIB_LOCATION

const unsigned NORMAL_ATTRIB_LOCATION = 1
static

◆ VERTEX_ATTRIB_LOCATION

const unsigned VERTEX_ATTRIB_LOCATION = 0
static