Inviwo  0.9.10.1
Inviwo documentation
inviwo::MeshRenderProcessorGL Class Reference

#include <meshrenderprocessorgl.h>

+ Inheritance diagram for inviwo::MeshRenderProcessorGL:

Public Member Functions

 MeshRenderProcessorGL (const MeshRenderProcessorGL &)=delete
 
MeshRenderProcessorGLoperator= (const MeshRenderProcessorGL &)=delete
 
virtual const ProcessorInfo getProcessorInfo () const override
 
virtual void initializeResources () override
 
virtual void process () override
 
- Public Member Functions inherited from inviwo::Processor
 Processor (const std::string &identifier="", const std::string &displayName="")
 
std::string getClassIdentifier () const
 
std::string getCategory () const
 
CodeState getCodeState () const
 
Tags getTags () const
 
void setIdentifier (const std::string &identifier)
 
const std::string & getIdentifier () const
 
void setDisplayName (const std::string &displayName)
 
const std::string & getDisplayName () const
 
virtual std::vector< std::string > getPath () const override
 
virtual void setProcessorWidget (std::unique_ptr< ProcessorWidget > processorWidget)
 
ProcessorWidgetgetProcessorWidget () const
 
bool hasProcessorWidget () const
 
virtual void setNetwork (ProcessorNetwork *network)
 
ProcessorNetworkgetNetwork () const
 
PortgetPort (const std::string &identifier) const
 
InportgetInport (const std::string &identifier) const
 
OutportgetOutport (const std::string &identifier) const
 
const std::vector< Inport * > & getInports () const
 
const std::vector< Outport * > & getOutports () const
 
const std::string & getPortGroup (Port *port) const
 
std::vector< std::string > getPortGroups () const
 
const std::vector< Port * > & getPortsInGroup (const std::string &portGroup) const
 
const std::vector< Port * > & getPortsInSameGroup (Port *port) const
 
bool allInportsConnected () const
 
bool allInportsAreReady () const
 
bool isSource () const
 
bool isSink () const
 
bool isReady () const
 
virtual void doIfNotReady ()
 
virtual void setValid () override
 
virtual void invalidate (InvalidationLevel invalidationLevel, Property *modifiedProperty=nullptr) override
 
void addInteractionHandler (InteractionHandler *interactionHandler)
 
void removeInteractionHandler (InteractionHandler *interactionHandler)
 
bool hasInteractionHandler () const
 
const std::vector< InteractionHandler * > & getInteractionHandlers () const
 
virtual void invokeEvent (Event *event) override
 
virtual void propagateEvent (Event *event, Outport *source) override
 
virtual ProcessorgetProcessor () override
 
virtual const ProcessorgetProcessor () const override
 
virtual void serialize (Serializer &s) const override
 
virtual void deserialize (Deserializer &d) override
 
template<typename T , typename std::enable_if_t< std::is_base_of< Inport, T >::value, int > = 0>
T & addPort (std::unique_ptr< T > port, const std::string &portGroup="default")
 
template<typename T , typename std::enable_if_t< std::is_base_of< Outport, T >::value, int > = 0>
T & addPort (std::unique_ptr< T > port, const std::string &portGroup="default")
 
template<typename T >
T & addPort (T &port, const std::string &portGroup="default")
 
PortremovePort (const std::string &identifier)
 
InportremovePort (Inport *port)
 
OutportremovePort (Outport *port)
 
- Public Member Functions inherited from inviwo::PropertyOwner
virtual ~PropertyOwner ()
 Removes all properties and notifies its observers of the removal.
 
virtual void addProperty (Property *property, bool owner=true)
 
virtual void addProperty (Property &property)
 
template<typename... Ts>
void addProperties (Ts &... properties)
 
virtual void insertProperty (size_t index, Property *property, bool owner=true)
 insert property property at position index If index is not valid, the property is appended. More...
 
virtual void insertProperty (size_t index, Property &property)
 insert property property at position index If index is not valid, the property is appended. More...
 
virtual PropertyremoveProperty (const std::string &identifier)
 
virtual PropertyremoveProperty (Property *property)
 
virtual PropertyremoveProperty (Property &property)
 
virtual PropertyremoveProperty (size_t index)
 remove property referred to by index More...
 
const std::vector< Property * > & getProperties () const
 
const std::vector< CompositeProperty * > & getCompositeProperties () const
 
std::vector< Property * > getPropertiesRecursive () const
 
PropertygetPropertyByIdentifier (const std::string &identifier, bool recursiveSearch=false) const
 
PropertygetPropertyByPath (const std::vector< std::string > &path) const
 
template<class T >
std::vector< T * > getPropertiesByType (bool recursiveSearch=false) const
 
size_t size () const
 
Propertyoperator[] (size_t)
 
const Propertyoperator[] (size_t) const
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
virtual bool isValid () const
 
InvalidationLevel getInvalidationLevel () const
 
void setAllPropertiesCurrentStateAsDefault ()
 
void resetAllPoperties ()
 
virtual InviwoApplicationgetInviwoApplication ()
 
- Public Member Functions inherited from inviwo::PropertyOwnerObservable
void notifyObserversWillAddProperty (Property *property, size_t index)
 
void notifyObserversDidAddProperty (Property *property, size_t index)
 
void notifyObserversWillRemoveProperty (Property *property, size_t index)
 
void notifyObserversDidRemoveProperty (Property *property, size_t index)
 
- Public Member Functions inherited from inviwo::Observable< PropertyOwnerObserver >
 Observable (const Observable< PropertyOwnerObserver > &other)
 
 Observable (Observable< PropertyOwnerObserver > &&other)
 
Observable< PropertyOwnerObserver > & operator= (const Observable< PropertyOwnerObserver > &other)
 
Observable< PropertyOwnerObserver > & operator= (Observable< PropertyOwnerObserver > &&other)
 
void addObserver (PropertyOwnerObserver *observer)
 
void removeObserver (PropertyOwnerObserver *observer)
 
virtual void startBlockingNotifications () override final
 
virtual void stopBlockingNotifications () override final
 
- Public Member Functions inherited from inviwo::MetaDataOwner
 MetaDataOwner (const MetaDataOwner &rhs)=default
 
MetaDataOwneroperator= (const MetaDataOwner &rhs)=default
 
void copyMetaDataFrom (const MetaDataOwner &src)
 
void copyMetaDataTo (MetaDataOwner &dst)
 
template<typename T >
T * createMetaData (const std::string &key)
 
template<typename T , typename U >
void setMetaData (const std::string &key, U value)
 
template<typename T >
bool unsetMetaData (const std::string &key)
 unset, i.e. remove the metadata entry matching the given key and type More...
 
template<typename T , typename U >
getMetaData (const std::string &key, U val) const
 
template<typename T >
T * getMetaData (const std::string &key)
 
template<typename T >
const T * getMetaData (const std::string &key) const
 
MetaDataMapgetMetaDataMap ()
 
const MetaDataMapgetMetaDataMap () const
 
template<typename T >
bool hasMetaData (const std::string &key) const
 
- Public Member Functions inherited from inviwo::Observable< ProcessorObserver >
 Observable (const Observable< ProcessorObserver > &other)
 
 Observable (Observable< ProcessorObserver > &&other)
 
Observable< ProcessorObserver > & operator= (const Observable< ProcessorObserver > &other)
 
Observable< ProcessorObserver > & operator= (Observable< ProcessorObserver > &&other)
 
void addObserver (ProcessorObserver *observer)
 
void removeObserver (ProcessorObserver *observer)
 
virtual void startBlockingNotifications () override final
 
virtual void stopBlockingNotifications () override final
 

Static Public Attributes

static const ProcessorInfo processorInfo_
 

Protected Types

using DrawerMap = std::multimap< const Outport *, std::unique_ptr< MeshDrawer > >
 

Protected Member Functions

void updateDrawers ()
 
- Protected Member Functions inherited from inviwo::Processor
void addPortToGroup (Port *port, const std::string &portGroup)
 
void removePortFromGroups (Port *port)
 
- Protected Member Functions inherited from inviwo::PropertyOwner
 PropertyOwner (const PropertyOwner &rhs)
 
PropertyOwneroperator= (const PropertyOwner &that)=delete
 
- Protected Member Functions inherited from inviwo::Observable< PropertyOwnerObserver >
void forEachObserver (C callback)
 
- Protected Member Functions inherited from inviwo::ObservableInterface
void addObservationHelper (Observer *observer)
 
void removeObservationHelper (Observer *observer)
 
- Protected Member Functions inherited from inviwo::ProcessorObservable
void notifyObserversAboutPropertyChange (Property *p)
 
void notifyObserversInvalidationBegin (Processor *p)
 
void notifyObserversInvalidationEnd (Processor *p)
 
void notifyObserversIdentifierChanged (Processor *p, const std::string &oldIdentifier)
 
void notifyObserversDisplayNameChanged (Processor *p, const std::string &oldDisplayName)
 
void notifyObserversProcessorPortAdded (Processor *p, Port *port)
 
void notifyObserversProcessorPortRemoved (Processor *p, Port *port)
 
void notifyObserversAboutToProcess (Processor *p)
 
void notifyObserversFinishedProcess (Processor *p)
 
void notifyObserversSourceChange (Processor *p)
 
void notifyObserversSinkChange (Processor *p)
 
void notifyObserversReadyChange (Processor *p)
 
- Protected Member Functions inherited from inviwo::Observable< ProcessorObserver >
void forEachObserver (C callback)
 

Protected Attributes

MeshFlatMultiInport inport_
 
ImageInport imageInport_
 
ImageOutport outport_
 
CameraProperty camera_
 
CameraTrackball trackball_
 
BoolProperty overrideColorBuffer_
 
FloatVec4Property overrideColor_
 
CompositeProperty geomProperties_
 
OptionPropertyInt cullFace_
 
BoolProperty enableDepthTest_
 
SimpleLightingProperty lightingProperty_
 
CompositeProperty layers_
 
BoolProperty colorLayer_
 
BoolProperty texCoordLayer_
 
BoolProperty normalsLayer_
 
BoolProperty viewNormalsLayer_
 
Shader shader_
 
DrawerMap drawers_
 
- Protected Attributes inherited from inviwo::Processor
std::unique_ptr< ProcessorWidgetprocessorWidget_
 
StateCoordinator< bool > isReady_
 
StateCoordinator< bool > isSink_
 
StateCoordinator< bool > isSource_
 
- Protected Attributes inherited from inviwo::PropertyOwner
std::vector< Property * > properties_
 
std::vector< EventProperty * > eventProperties_
 
std::vector< CompositeProperty * > compositeProperties_
 
std::vector< std::unique_ptr< Property > > ownedProperties_
 
- Protected Attributes inherited from inviwo::MetaDataOwner
MetaDataMap metaData_
 
- Protected Attributes inherited from inviwo::ProcessorObservable
friend ProcessorNetworkEvaluator
 
friend Property
 

Additional Inherited Members

- Public Types inherited from inviwo::PropertyOwner
using iterator = std::vector< Property * >::iterator
 
using const_iterator = std::vector< Property * >::const_iterator
 

Detailed Description

Renders a set of meshes using OpenGL on top of an image. Different rendering modes can be selected.

Inports

  • geometry Input meshes
  • imageInport Optional background image

Outports

  • image output image containing the rendered mesh and the optional input image

Properties

  • Camera Camera used for rendering the mesh
  • Fit View to Mesh Contains button properties to set the view of the camera to contain all input meshes
  • Reset Camera Reset the camera to its default state
  • Geometry Rendering Properties
    • Cull Face (None, Front, Back, Back and Front)
    • Polygon Mode (Points, Lines, Fill)
    • Point Size Defines the point size when polygon mode is set to "Points"
    • Line Width Defines the line width when polygon mode is set to "Lines" (not supported)
    • Enable Depth Test Toggles the depth test during rendering
  • Lighting Standard lighting settings
  • Output Layers
    • Color Toggle output of color layer
    • Texture Coordinates Toggle output of texture coordinates
    • Normals (World Space) Toggle output of normals (world space)
    • Normals (View space) Toggle output of view space normals

Member Function Documentation

◆ initializeResources()

void inviwo::MeshRenderProcessorGL::initializeResources ( )
overridevirtual

InitializeResources is called whenever a property with InvalidationLevel::InvalidResources is changes.

Reimplemented from inviwo::Processor.

◆ process()

void inviwo::MeshRenderProcessorGL::process ( )
overridevirtual

Deriving classes should override this function to do the main work of the processor. This function is called by the ProcessorNetworkEvaluator when the network is evaluated and the processor is invalid, i.e. some of its inports or properties has been modified, and is ready i.e. all non optional inports have valid data.

See also
ProcessorNetworkEvaluator
Inport
Property

Reimplemented from inviwo::Processor.

Member Data Documentation

◆ processorInfo_

const ProcessorInfo inviwo::MeshRenderProcessorGL::processorInfo_
static
Initial value:
{
"org.inviwo.GeometryRenderGL",
"Mesh Renderer",
"Mesh Rendering",
CodeState::Stable,
Tags::GL,
}

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