Kanzi  3.9.6
Kanzi Engine 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

◆ ~ObjectSourceRuntime()

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

Destructor.

◆ ObjectSourceRuntime()

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

Constructor.

Parameters
nodeListNode list to filter.
objectSourceParent object source.

Member Function Documentation

◆ filter()

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

Runs the filter on a given node.

Parameters
outputNodesOutput node list.

◆ getRootNodeList()

NodeListSharedPtr kanzi::ObjectSourceRuntime::getRootNodeList ( )

Gets the root node list, parents included.

Returns
Input node list for the root source.

◆ matches()

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.

◆ update()

void kanzi::ObjectSourceRuntime::update ( NodeList nodes)

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

Parameters
nodesNode to update.

◆ isDirty()

bool kanzi::ObjectSourceRuntime::isDirty ( )

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

Returns
True if yes, false if no.

◆ setCamera()

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.

◆ getParentRuntime()

ObjectSourceRuntimeSharedPtr kanzi::ObjectSourceRuntime::getParentRuntime ( ) const
inline

Gets the parent runtime.

◆ getInputNodeList()

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.

◆ filterOverride()

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.

◆ updateOverride()

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.

◆ isDirtyOverride()

virtual bool kanzi::ObjectSourceRuntime::isDirtyOverride ( )
protectedvirtual

◆ setCameraOverride()

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

◆ m_objectSource

ObjectSourceWeakPtr kanzi::ObjectSourceRuntime::m_objectSource
protected

Parent object source.

◆ m_parentRuntime

ObjectSourceRuntimeSharedPtr kanzi::ObjectSourceRuntime::m_parentRuntime
protected

Runtime for the object source chain.

◆ m_parentNodeList

NodeListSharedPtr kanzi::ObjectSourceRuntime::m_parentNodeList
protected

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

◆ m_inputNodes

NodeListWeakPtr kanzi::ObjectSourceRuntime::m_inputNodes
protected

Input node list.


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