Kanzi  3.9.6
Kanzi Engine API
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. More...
 
optional< Matrix4x4getCameraMatrix () const
 Calculates the camera matrix from the assigned camera. More...
 
bool isSortNearestLast () const
 Is sort nearest first enabled? More...
 
- Public Member Functions inherited from kanzi::ObjectSourceRuntime
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...
 

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

CameraWeakPtr m_camera
 Camera to use for sorting. More...
 
bool m_nearestLast
 Indicates whether nearest objects should be sorted last. More...
 
- Protected Attributes inherited from kanzi::ObjectSourceRuntime
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 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: