Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::ObjectSourceRuntime Class Reference

Runtime for an object source. More...

#include <kanzi/core.ui/graphics3d/object_source_runtime.hpp>

Inheritance diagram for kanzi::ObjectSourceRuntime:
[legend]

Public Member Functions

void filter (NodeList &outputNodes)
 Runs the filter on a given node. More...
 
NodeListSharedPtr getInputNodeList ()
 Gets the input node list for this particular object source. More...
 
ObjectSourceRuntimeSharedPtr getParentRuntime () const
 Gets the parent runtime. More...
 
NodeListSharedPtr getRootNodeList ()
 Gets the root node list, parents included. More...
 
bool isDirty ()
 Tells if the node filter considers itself dirty and needs re-executing. More...
 
bool matches (NodeListSharedPtr nodeList, ObjectSourceSharedPtr filter)
 Tells if this filter runtime matches the given node list and filter. More...
 
void setCamera (CameraSharedPtr camera)
 Sets the camera for this object source runtime. More...
 
void update (NodeList &nodes)
 Perform implementation-dependent per-frame update for internal data of the filter. More...
 
virtual ~ObjectSourceRuntime ()=default
 Destructor. More...
 

Protected Member Functions

virtual void filterOverride (NodeList &inputNodes, NodeList &outputNodes)
 Filtering implementation. More...
 
virtual bool isDirtyOverride ()
 Object source -specific implementation of dirty check. More...
 
 ObjectSourceRuntime (NodeListSharedPtr nodeList, ObjectSourceSharedPtr objectSource)
 Constructor. More...
 
virtual void setCameraOverride (CameraSharedPtr camera)
 Object source -specific camera assignment. More...
 
virtual void updateOverride (NodeList &nodes)
 Object source -specific implementation of per-frame update. More...
 

Protected Attributes

NodeListWeakPtr m_inputNodes
 Input node list. More...
 
ObjectSourceWeakPtr m_objectSource
 Parent object source. More...
 
NodeListSharedPtr m_parentNodeList
 Node list that is the result of the parent runtime being executed. More...
 
ObjectSourceRuntimeSharedPtr m_parentRuntime
 Runtime for the object source chain. More...
 

Detailed Description

Runtime for an object source.

Since
Kanzi 3.9.0

Constructor & Destructor Documentation

virtual kanzi::ObjectSourceRuntime::~ObjectSourceRuntime ( )
virtualdefault

Destructor.

kanzi::ObjectSourceRuntime::ObjectSourceRuntime ( NodeListSharedPtr  nodeList,
ObjectSourceSharedPtr  objectSource 
)
explicitprotected

Constructor.

Parameters
nodeListNode list to filter.
objectSourceParent object source.

Member Function Documentation

void kanzi::ObjectSourceRuntime::filter ( NodeList outputNodes)

Runs the filter on a given node.

Parameters
outputNodesOutput node list.
NodeListSharedPtr kanzi::ObjectSourceRuntime::getRootNodeList ( )

Gets the root node list, parents included.

Returns
Input node list for the root source.
bool kanzi::ObjectSourceRuntime::matches ( NodeListSharedPtr  nodeList,
ObjectSourceSharedPtr  filter 
)

Tells if this filter runtime matches the given node list and filter.

Parameters
nodeListNode list to test.
filterFilter to test.
Returns
True if this runtime was created for the given filter and node list, false otherwise.
void kanzi::ObjectSourceRuntime::update ( NodeList nodes)

Perform implementation-dependent per-frame update for internal data of the filter.

Parameters
nodesNode to update.
bool kanzi::ObjectSourceRuntime::isDirty ( )

Tells if the node filter considers itself dirty and needs re-executing.

Returns
True if yes, false if no.
void kanzi::ObjectSourceRuntime::setCamera ( CameraSharedPtr  camera)

Sets the camera for this object source runtime.

Not all runtimes have any use for the camera. Object sources do not take ownership of the camera.

Parameters
cameraCamera input.
ObjectSourceRuntimeSharedPtr kanzi::ObjectSourceRuntime::getParentRuntime ( ) const
inline

Gets the parent runtime.

NodeListSharedPtr kanzi::ObjectSourceRuntime::getInputNodeList ( )
inline

Gets the input node list for this particular object source.

Parent runtimes are not taken into account.

Returns
Input node list.
virtual void kanzi::ObjectSourceRuntime::filterOverride ( NodeList inputNodes,
NodeList outputNodes 
)
protectedvirtual

Filtering implementation.

Parameters
inputNodesInput node list.
outputNodesOutput node list.

Reimplemented in kanzi::FrustumCullFilterRuntime, kanzi::DistanceFilterRuntime, kanzi::FilterObjectSourceRuntime, and kanzi::SortObjectSourceRuntime.

virtual void kanzi::ObjectSourceRuntime::updateOverride ( NodeList nodes)
protectedvirtual

Object source -specific implementation of per-frame update.

The default implementation does nothing.

Parameters
nodesNode to update.

Reimplemented in kanzi::SortByZObjectSourceRuntime, and kanzi::SortByShaderObjectSourceRuntime.

virtual bool kanzi::ObjectSourceRuntime::isDirtyOverride ( )
protectedvirtual
virtual void kanzi::ObjectSourceRuntime::setCameraOverride ( CameraSharedPtr  camera)
protectedvirtual

Object source -specific camera assignment.

Default implementation does nothing.

Parameters
cameraCamera input.

Reimplemented in kanzi::FrustumCullFilterRuntime, and kanzi::SortByZObjectSourceRuntime.

Member Data Documentation

ObjectSourceWeakPtr kanzi::ObjectSourceRuntime::m_objectSource
protected

Parent object source.

ObjectSourceRuntimeSharedPtr kanzi::ObjectSourceRuntime::m_parentRuntime
protected

Runtime for the object source chain.

NodeListSharedPtr kanzi::ObjectSourceRuntime::m_parentNodeList
protected

Node list that is the result of the parent runtime being executed.

NodeListWeakPtr kanzi::ObjectSourceRuntime::m_inputNodes
protected

Input node list.


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