Kanzi 3.9.10
kanzi::TrajectoryLayoutConcept Class Reference

Base class for TrajectoryLayout classes. More...

#include <kanzi/ui/node/concept/trajectory_layout.hpp>

Inheritance diagram for kanzi::TrajectoryLayoutConcept:
[legend]

Static Public Member Functions

static float getItemOffset (const Node &item)
 Gets the offset of an item in a Trajectory Layout node.
 
static optional< floatgetOverrideOffset (const Node &item)
 Gets the fixed offset of an item on the trajectory.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
static void setOverrideOffset (Node &item, float staticOffset)
 Sets the fixed offset of an item on the trajectory.
 

Static Public Attributes

Properties
static PropertyType< ResourceSharedPtrTrajectoryProperty
 Defines the Trajectory resource used by a Trajectory Layout node.
 
static PropertyType< floatItemAreaBeginProperty
 Defines the starting point of the trajectory segment in which the layout items are considered fully visible.
 
static PropertyType< floatItemAreaEndProperty
 Defines the ending point of the trajectory segment in which the layout items are considered fully visible.
 
static PropertyType< floatOverrideDistanceProperty
 Defines the fixed distance between items in the trajectory layout.
 
static PropertyType< floatStartOffsetProperty
 Defines the starting offset on the trajectory from where the items are laid out.
 
static PropertyType< boolAlignToTangentProperty
 Sets whether the items in the trajectory layout are aligned to the tangent of the trajectory.
 
static PropertyType< floatCalculatedOffsetProperty
 Defines the value where the layout stores the current calculated offset along the trajectory calculated for an item.
 
static PropertyType< floatOverrideOffsetProperty
 Defines the fixed offset on the trajectory, which the trajectory layout uses to position an item.
 
static PropertyType< boolStretchProperty
 If true, scale the trajectory to match layout size.
 

Detailed Description

Base class for TrajectoryLayout classes.

This class defines common properties for the TrajectoryLayout2D and TrajectoryLayout3D classes.

Member Function Documentation

◆ makeEditorInfo()

static PropertyTypeEditorInfoSharedPtr kanzi::TrajectoryLayoutConcept::makeEditorInfo ( )
static

◆ getItemOffset()

static float kanzi::TrajectoryLayoutConcept::getItemOffset ( const Node & item)
static

Gets the offset of an item in a Trajectory Layout node.

Parameters
itemA node that is an item in a Trajectory Layout node.
Returns
The last offset calculated for the item by the Trajectory Layout.

◆ getOverrideOffset()

static optional< float > kanzi::TrajectoryLayoutConcept::getOverrideOffset ( const Node & item)
static

Gets the fixed offset of an item on the trajectory.

Parameters
itemA node that is an item in a Trajectory Layout node.
Returns
The value of the OverrideOffsetProperty in the item, or if the property is not set, an empty optional.

◆ setOverrideOffset()

static void kanzi::TrajectoryLayoutConcept::setOverrideOffset ( Node & item,
float staticOffset )
static

Sets the fixed offset of an item on the trajectory.

Parameters
itemA node that is an item in a Trajectory Layout node.
staticOffsetThe fixed offset on the trajectory, which the Trajectory Layout uses to position the item.

Examples

To manually position items in a Trajectory Layout node:

// Position an item in the middle of the trajectory.
TrajectoryLayout3D::setOverrideOffset(*item2, 0.5f);
// Set the distance between the items to one third of the length of the trajectory.
trajectoryLayout->setOverrideDistance(0.3f);

Member Data Documentation

◆ TrajectoryProperty

PropertyType<ResourceSharedPtr> kanzi::TrajectoryLayoutConcept::TrajectoryProperty
static

Defines the Trajectory resource used by a Trajectory Layout node.

The default value is ResourceSharedPtr().

See also
TrajectoryLayoutConceptImpl::setTrajectory(), TrajectoryLayoutConceptImpl::getTrajectory()

◆ ItemAreaBeginProperty

PropertyType<float> kanzi::TrajectoryLayoutConcept::ItemAreaBeginProperty
static

Defines the starting point of the trajectory segment in which the layout items are considered fully visible.

The value is in [0, 1] range where 0 is the beginning and 1 is the end of the trajectory. See Node::VisibleAmountInParentProperty. The default value is 0.0f.

See also
TrajectoryLayoutConceptImpl::setItemAreaBegin(), TrajectoryLayoutConceptImpl::getItemAreaBegin()

◆ ItemAreaEndProperty

PropertyType<float> kanzi::TrajectoryLayoutConcept::ItemAreaEndProperty
static

Defines the ending point of the trajectory segment in which the layout items are considered fully visible.

The value is in [0, 1] range where 0 is the beginning and 1 is the end of the trajectory. See Node::VisibleAmountInParentProperty. The default value is 1.0f.

See also
TrajectoryLayoutConceptImpl::setItemAreaEnd(), TrajectoryLayoutConceptImpl::getItemAreaEnd()

◆ OverrideDistanceProperty

PropertyType<float> kanzi::TrajectoryLayoutConcept::OverrideDistanceProperty
static

Defines the fixed distance between items in the trajectory layout.

If not set, the trajectory layout calculates the distance and provides equal spacing between the items. The default value is 1.0f.

See also
TrajectoryLayoutConceptImpl::setOverrideDistance(), TrajectoryLayoutConceptImpl::getOverrideDistance()

◆ StartOffsetProperty

PropertyType<float> kanzi::TrajectoryLayoutConcept::StartOffsetProperty
static

Defines the starting offset on the trajectory from where the items are laid out.

The value is in [0, 1] range, where 0 is the beginning and 1 is the end of the trajectory. The default value is 0.0f.

See also
TrajectoryLayoutConceptImpl::setStartOffset(), TrajectoryLayoutConceptImpl::getStartOffset()

◆ AlignToTangentProperty

PropertyType<bool> kanzi::TrajectoryLayoutConcept::AlignToTangentProperty
static

Sets whether the items in the trajectory layout are aligned to the tangent of the trajectory.

The default value is false.

See also
TrajectoryLayoutConceptImpl::setAlignToTangent(), TrajectoryLayoutConceptImpl::isAlignToTangent()

◆ CalculatedOffsetProperty

PropertyType<float> kanzi::TrajectoryLayoutConcept::CalculatedOffsetProperty
static

Defines the value where the layout stores the current calculated offset along the trajectory calculated for an item.

The value is in [0, 1] range, where 0 is the beginning and 1 is the end of the trajectory. The default value is 0.0f.

See also
TrajectoryLayoutConceptImpl::getCalculatedOffset()

◆ OverrideOffsetProperty

PropertyType<float> kanzi::TrajectoryLayoutConcept::OverrideOffsetProperty
static

Defines the fixed offset on the trajectory, which the trajectory layout uses to position an item.

If not set, the trajectory layout calculates the offset automatically. The value is in [0, 1] range, where 0 is the beginning and 1 is the end of the trajectory. The default value is 0.0f.

See also
setOverrideOffset(), getOverrideOffset()

◆ StretchProperty

PropertyType<bool> kanzi::TrajectoryLayoutConcept::StretchProperty
static

If true, scale the trajectory to match layout size.

The default value is false.

See also
TrajectoryLayoutConceptImpl::setStretch(), TrajectoryLayoutConceptImpl::isStretch()

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