Kanzi 3.9.10
kanzi::SortByZObjectSourceRuntime Class Reference

Runtime for z-sort object source. More...

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

Inheritance diagram for kanzi::SortByZObjectSourceRuntime:
[legend]

Public Member Functions

CameraSharedPtr getCamera () const
 Gets the filtering camera.
 
optional< Matrix4x4getCameraMatrix () const
 Calculates the camera matrix from the assigned camera.
 
bool isSortNearestLast () const
 Is sort nearest first enabled?
 
- Public Member Functions inherited from kanzi::ObjectSourceRuntime
void filter (NodeList &outputNodes)
 Runs the filter on a given node.
 
NodeListSharedPtr getInputNodeList ()
 Gets the input node list for this particular object source.
 
ObjectSourceRuntimeSharedPtr getParentRuntime () const
 Gets the parent runtime.
 
NodeListSharedPtr getRootNodeList ()
 Gets the root node list, parents included.
 
bool isDirty ()
 Tells if the node filter considers itself dirty and needs re-executing.
 
bool matches (NodeListSharedPtr nodeList, ObjectSourceSharedPtr filter)
 Tells if this filter runtime matches the given node list and filter.
 
void setCamera (CameraSharedPtr camera)
 Sets the camera for this object source runtime.
 
void update (NodeList &nodes)
 Perform implementation-dependent per-frame update for internal data of the filter.
 
virtual ~ObjectSourceRuntime ()=default
 Destructor.
 

Static Public Member Functions

static SortByZObjectSourceRuntimeSharedPtr create (NodeListSharedPtr nodeList, ObjectSourceSharedPtr filter)
 Creates z-sort object source runtime.
 
static SortByZObjectSourceRuntimeSharedPtr create (NodeListSharedPtr nodeList, ObjectSourceSharedPtr filter, bool nearestLast)
 Creates z-sort object source runtime.
 

Protected Member Functions

bool isDirtyOverride () override
 ObjectSourceRuntime::isDirtyOverride() implementation.
 
void setCameraOverride (CameraSharedPtr camera) override
 ObjectSourceRuntime::setCameraOverride() implementation.
 
 SortByZObjectSourceRuntime (NodeListSharedPtr nodeList, ObjectSourceSharedPtr filter, bool nearestFirst)
 Constructor.
 
void updateOverride (NodeList &nodes) override
 ObjectSourceRuntime::filterOverride() implementation.
 
- Protected Member Functions inherited from kanzi::SortObjectSourceRuntime
void filterOverride (NodeList &inputNodes, NodeList &outputNodes) override
 ObjectSourceRuntime::filterOverride() implementation.
 
 SortObjectSourceRuntime (NodeListSharedPtr nodeList, ObjectSourceSharedPtr filter)
 Constructor.
 
- Protected Member Functions inherited from kanzi::ObjectSourceRuntime
 ObjectSourceRuntime (NodeListSharedPtr nodeList, ObjectSourceSharedPtr objectSource)
 Constructor.
 

Protected Attributes

CameraWeakPtr m_camera
 Camera to use for sorting.
 
bool m_nearestLast
 Indicates whether nearest objects should be sorted last.
 
- Protected Attributes inherited from kanzi::ObjectSourceRuntime
NodeListWeakPtr m_inputNodes
 Input node list.
 
ObjectSourceWeakPtr m_objectSource
 Parent object source.
 
NodeListSharedPtr m_parentNodeList
 Node list that is the result of the parent runtime being executed.
 
ObjectSourceRuntimeSharedPtr m_parentRuntime
 Runtime for the object source chain.
 

Detailed Description

Runtime for z-sort object source.

Since
Kanzi 3.9.0

Constructor & Destructor Documentation

◆ SortByZObjectSourceRuntime()

kanzi::SortByZObjectSourceRuntime::SortByZObjectSourceRuntime ( NodeListSharedPtr nodeList,
ObjectSourceSharedPtr filter,
bool nearestFirst )
inlineexplicitprotected

Constructor.

Parameters
nodeListNode list to filter.
filterParent filter.
nearestFirstIndicates whether nearest objects should be ordered first.

Member Function Documentation

◆ create() [1/2]

static SortByZObjectSourceRuntimeSharedPtr kanzi::SortByZObjectSourceRuntime::create ( NodeListSharedPtr nodeList,
ObjectSourceSharedPtr filter,
bool nearestLast )
static

Creates z-sort object source runtime.

Parameters
nodeListNode list to filter.
filterParent filter.
nearestLastIndicates whether nearest objects should be ordered last.
Returns
Newly created z-sort object source runtime.

◆ create() [2/2]

static SortByZObjectSourceRuntimeSharedPtr kanzi::SortByZObjectSourceRuntime::create ( NodeListSharedPtr nodeList,
ObjectSourceSharedPtr filter )
inlinestatic

Creates z-sort object source runtime.

Sorts nearest objects first.

Parameters
nodeListNode list to filter.
filterParent filter.
Returns
Newly created z-sort object source runtime.

◆ getCameraMatrix()

optional< Matrix4x4 > kanzi::SortByZObjectSourceRuntime::getCameraMatrix ( ) const

Calculates the camera matrix from the assigned camera.

Returns
Camera matrix to use for sorting, if available.

◆ getCamera()

CameraSharedPtr kanzi::SortByZObjectSourceRuntime::getCamera ( ) const
inline

Gets the filtering camera.

Returns
Camera used for filtering. May be empty.

◆ isSortNearestLast()

bool kanzi::SortByZObjectSourceRuntime::isSortNearestLast ( ) const
inline

Is sort nearest first enabled?

Returns
True if should sort nearest first.

◆ updateOverride()

void kanzi::SortByZObjectSourceRuntime::updateOverride ( NodeList & nodes)
overrideprotectedvirtual

◆ isDirtyOverride()

bool kanzi::SortByZObjectSourceRuntime::isDirtyOverride ( )
overrideprotectedvirtual

◆ setCameraOverride()

void kanzi::SortByZObjectSourceRuntime::setCameraOverride ( CameraSharedPtr camera)
overrideprotectedvirtual

Member Data Documentation

◆ m_camera

CameraWeakPtr kanzi::SortByZObjectSourceRuntime::m_camera
protected

Camera to use for sorting.

◆ m_nearestLast

bool kanzi::SortByZObjectSourceRuntime::m_nearestLast
protected

Indicates whether nearest objects should be sorted last.

Assumption is, that this is false (the default), and the nearest objects are sorted first.


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