Kanzi  3.9.7
Kanzi Engine API
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. More...
 
static optional< float > getOverrideOffset (const Node &item)
 Gets the fixed offset of an item on the trajectory. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
static void setOverrideOffset (Node &item, float staticOffset)
 Sets the fixed offset of an item on the trajectory. More...
 

Static Public Attributes

Properties
static PropertyType< ResourceSharedPtrTrajectoryProperty
 Defines the Trajectory resource used by a Trajectory Layout node. More...
 
static PropertyType< float > ItemAreaBeginProperty
 Defines the starting point of the trajectory segment in which the layout items are considered fully visible. More...
 
static PropertyType< float > ItemAreaEndProperty
 Defines the ending point of the trajectory segment in which the layout items are considered fully visible. More...
 
static PropertyType< float > OverrideDistanceProperty
 Defines the fixed distance between items in the trajectory layout. More...
 
static PropertyType< float > StartOffsetProperty
 Defines the starting offset on the trajectory from where the items are laid out. More...
 
static PropertyType< bool > AlignToTangentProperty
 Sets whether the items in the trajectory layout are aligned to the tangent of the trajectory. More...
 
static PropertyType< float > CalculatedOffsetProperty
 Defines the value where the layout stores the current calculated offset along the trajectory calculated for an item. More...
 
static PropertyType< float > OverrideOffsetProperty
 Defines the fixed offset on the trajectory, which the trajectory layout uses to position an item. More...
 
static PropertyType< bool > StretchProperty
 If true, scale the trajectory to match layout size. More...
 

Detailed Description

Base class for TrajectoryLayout classes.

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

Member Function Documentation

static PropertyTypeEditorInfoSharedPtr kanzi::TrajectoryLayoutConcept::makeEditorInfo ( )
static
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.
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.
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.
// Set the distance between the items to one third of the length of the trajectory.
trajectoryLayout->setOverrideDistance(0.3f);

Member Data Documentation

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()
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()
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()
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()
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()
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()
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()
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()
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: