![]() |
Murl Engine API
Version 2018.3
|
The IAligner graph node interface. More...
#include <murl_graph_i_aligner.h>
The IAligner graph node interface.
IAligner nodes allow to automatically arrange a number of child sub-graphs along one dedicated main axis (see SetAxis()), in either ascending or descending order (see SetOrder()). By design, each individual child represents a closed sub-graph for which the common bounding volume is calculated when the aligner performs its layout procedure. In other words, if for example five plane geometry nodes should be arranged, each of these planes must be in a separate child sub-graph. If two or more planes are within the same child sub-graph, their bounding volumes are combined, and this combined volume is used for arranging the respective child graph.
For the remaining two axes and the dedicated main axis set via SetAxis(), it is possible to specify an alignment mode so that the linearly aligned children are also aligned to either side or center of the aligner. By default, these object alignment modes (which can be set via SetObjectAlignment()) are set to UNDEFINED, which means that no alignment is done for any axis other than the main axis.
It is also possible to specify a minimum and maximum container size (see SetMinContainerSize() and SetMaxContainerSize(), respectively), together with a container alignment property (see SetContainerAlignment()) to control the actual size and pivot point of the resulting layout container.
Aligned objects can be arranged with an optional spacing parameter (see SetSpacing()), which represents the space left out between two consecutive child sub-graphs.
In addition, it is possible to specify padding values (see SetPadding()) to add an extra border to the resulting container after layouting.
See also Graph::IBoundingBox.
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual ITransform * | GetTransformInterface ()=0 |
Get the mutable Graph::ITransform interface. More... | |
virtual const ITransform * | GetTransformInterface () const =0 |
Get the constant Graph::ITransform interface. More... | |
virtual Bool | SetInstanceProcessingEnabled (Bool enabled)=0 |
Enable/disable instance processing. More... | |
virtual Bool | IsInstanceProcessingEnabled () const =0 |
Check if instance processing is enabled. More... | |
virtual Bool | SetAxis (IEnums::Axis axis)=0 |
Set the alignment axis. More... | |
virtual IEnums::Axis | GetAxis () const =0 |
Get the alignment axis. More... | |
virtual Bool | SetOrder (IEnums::SortOrder order)=0 |
Set the alignment order. More... | |
virtual IEnums::SortOrder | GetOrder () const =0 |
Get the alignment order. More... | |
virtual Bool | SetSpacing (Real spacing)=0 |
Set the alignment spacing. More... | |
virtual Real | GetSpacing () const =0 |
Get the alignment spacing. More... | |
virtual Bool | SetPadding (const Vector &padding)=0 |
Set the alignment padding. More... | |
virtual Bool | SetPadding (Real paddingX, Real paddingY, Real paddingZ)=0 |
Set the alignment padding. More... | |
virtual Bool | SetPaddingX (Real paddingX)=0 |
Set the alignment padding in X direction. More... | |
virtual Bool | SetPaddingY (Real paddingY)=0 |
Set the alignment padding in Y direction. More... | |
virtual Bool | SetPaddingZ (Real paddingZ)=0 |
Set the alignment padding in Z direction. More... | |
virtual const Vector & | GetPadding () const =0 |
Get the alignment padding as a vector. More... | |
virtual Real | GetPaddingX () const =0 |
Get the alignment padding in X direction. More... | |
virtual Real | GetPaddingY () const =0 |
Get the alignment padding in Y direction. More... | |
virtual Real | GetPaddingZ () const =0 |
Get the alignment padding in Z direction. More... | |
virtual Bool | SetContainerSize (const Vector &size)=0 |
Set the exact container size used for layouting. More... | |
virtual Bool | SetContainerSize (Real sizeX, Real sizeY, Real sizeZ)=0 |
Set the exact container size used for layouting. More... | |
virtual Bool | SetContainerSizeX (Real sizeX)=0 |
Set the exact container size used for layouting, in X direction. More... | |
virtual Bool | SetContainerSizeY (Real sizeY)=0 |
Set the exact container size used for layouting, in Y direction. More... | |
virtual Bool | SetContainerSizeZ (Real sizeZ)=0 |
Set the exact container size used for layouting, in Z direction. More... | |
virtual Bool | SetMinContainerSize (const Vector &size)=0 |
Set the minimum container size used for layouting. More... | |
virtual Bool | SetMinContainerSize (Real sizeX, Real sizeY, Real sizeZ)=0 |
Set the minimum container size used for layouting. More... | |
virtual Bool | SetMinContainerSizeX (Real sizeX)=0 |
Set the minimum container size used for layouting, in X direction. More... | |
virtual Bool | SetMinContainerSizeY (Real sizeY)=0 |
Set the minimum container size used for layouting, in Y direction. More... | |
virtual Bool | SetMinContainerSizeZ (Real sizeZ)=0 |
Set the minimum container size used for layouting, in Z direction. More... | |
virtual const Vector & | GetMinContainerSize () const =0 |
Get the minimum container size used for layouting. More... | |
virtual Real | GetMinContainerSizeX () const =0 |
Get the minimum container size in X direction used for layouting. More... | |
virtual Real | GetMinContainerSizeY () const =0 |
Get the minimum container size in Y direction used for layouting. More... | |
virtual Real | GetMinContainerSizeZ () const =0 |
Get the minimum container size in Z direction used for layouting. More... | |
virtual Bool | SetMaxContainerSize (const Vector &size)=0 |
Set the maximum container size used for layouting. More... | |
virtual Bool | SetMaxContainerSize (Real sizeX, Real sizeY, Real sizeZ)=0 |
Set the maximum container size used for layouting. More... | |
virtual Bool | SetMaxContainerSizeX (Real sizeX)=0 |
Set the maximum container size used for layouting, in X direction. More... | |
virtual Bool | SetMaxContainerSizeY (Real sizeY)=0 |
Set the maximum container size used for layouting, in Y direction. More... | |
virtual Bool | SetMaxContainerSizeZ (Real sizeZ)=0 |
Set the maximum container size used for layouting, in Z direction. More... | |
virtual const Vector & | GetMaxContainerSize () const =0 |
Get the maximum container size used for layouting. More... | |
virtual Real | GetMaxContainerSizeX () const =0 |
Get the maximum container size in X direction used for layouting. More... | |
virtual Real | GetMaxContainerSizeY () const =0 |
Get the maximum container size in Y direction used for layouting. More... | |
virtual Real | GetMaxContainerSizeZ () const =0 |
Get the maximum container size in Z direction used for layouting. More... | |
virtual Bool | SetContainerAlignment (IEnums::AlignmentX alignX, IEnums::AlignmentY alignY, IEnums::AlignmentZ alignZ)=0 |
Set the container alignment for all three axes. More... | |
virtual Bool | SetContainerAlignmentX (IEnums::AlignmentX alignX)=0 |
Set the container alignment for the X axis. More... | |
virtual Bool | SetContainerAlignmentY (IEnums::AlignmentY alignY)=0 |
Set the container alignment for the Y axis. More... | |
virtual Bool | SetContainerAlignmentZ (IEnums::AlignmentZ alignZ)=0 |
Set the container alignment for the Z axis. More... | |
virtual IEnums::AlignmentX | GetContainerAlignmentX () const =0 |
Get the container alignment for the X axis. More... | |
virtual IEnums::AlignmentY | GetContainerAlignmentY () const =0 |
Get the container alignment for the Y axis. More... | |
virtual IEnums::AlignmentZ | GetContainerAlignmentZ () const =0 |
Get the container alignment for the Z axis. More... | |
virtual Bool | SetObjectAlignment (IEnums::AlignmentX alignX, IEnums::AlignmentY alignY, IEnums::AlignmentZ alignZ)=0 |
Set the object alignment for all three axes. More... | |
virtual Bool | SetObjectAlignmentX (IEnums::AlignmentX alignX)=0 |
Set the object alignment on the X axis. More... | |
virtual Bool | SetObjectAlignmentY (IEnums::AlignmentY alignY)=0 |
Set the object alignment on the Y axis. More... | |
virtual Bool | SetObjectAlignmentZ (IEnums::AlignmentZ alignZ)=0 |
Set the object alignment on the Z axis. More... | |
virtual IEnums::AlignmentX | GetObjectAlignmentX () const =0 |
Get the object alignment on the X axis. More... | |
virtual IEnums::AlignmentY | GetObjectAlignmentY () const =0 |
Get the object alignment on the Y axis. More... | |
virtual IEnums::AlignmentZ | GetObjectAlignmentZ () const =0 |
Get the object alignment on the Z axis. More... | |
virtual Bool | SetAlignmentUnit (Real unitX, Real unitY, Real unitZ)=0 |
Set the object alignment unit. More... | |
virtual Bool | SetAlignmentUnitX (Real unitX)=0 |
Set the object alignment unit along the X axis. More... | |
virtual Bool | SetAlignmentUnitY (Real unitY)=0 |
Set the object alignment unit along the Y axis. More... | |
virtual Bool | SetAlignmentUnitZ (Real unitZ)=0 |
Set the object alignment unit along the Z axis. More... | |
virtual Real | GetAlignmentUnitX () const =0 |
Set the object alignment unit along the X axis. More... | |
virtual Real | GetAlignmentUnitY () const =0 |
Set the object alignment unit along the Y axis. More... | |
virtual Real | GetAlignmentUnitZ () const =0 |
Set the object alignment unit along the Z axis. More... | |
virtual IBoundingVolume * | GetBoundingVolume ()=0 |
Get the aligner's bounding volume. More... | |
virtual const IBoundingVolume * | GetBoundingVolume () const =0 |
Get the aligner's bounding volume. More... | |
|
pure virtual |
Get the mutable Graph::INode interface.
This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.
|
pure virtual |
Get the constant Graph::INode interface.
This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.
|
pure virtual |
Get the mutable Graph::ITransform interface.
This method returns a mutable pointer to the node's Graph::ITransform interface, to be able to query or modify the node's transformation matrix and depth order.
|
pure virtual |
Get the constant Graph::ITransform interface.
This method returns a constant pointer to the node's Graph::ITransform interface, to be able to query the node's transformation matrix and depth order.
Enable/disable instance processing.
If enabled, child nodes that implement the IInstance interface are processed separately, so that all their individual replications are treated as if they were direct children of the aligner. Note that in this case, activating or deactivating the instance node itself has no effect; if all replications of an instance should be made invisible, one must iterate over all the instance's children manually. By default, instance processing is enabled.
enabled | If true, instance processing is enabled. |
|
pure virtual |
Check if instance processing is enabled.
|
pure virtual |
Set the alignment axis.
This method can be used to set the aligner's main axis. When performing its layout operation, the position of each child sub-graph is increased or decreased (depending on the order defined by SetOrder()), but only for the given axis. The other two coordinates of each sub-graph are left unchanged, unless explicitly set via SetObjectAlignment().
axis | The alignment axis. |
|
pure virtual |
Get the alignment axis.
|
pure virtual |
Set the alignment order.
This method sets the alignment order to either ascending or descending, along the main axis. See SetAxis().
order | The alignment order. |
|
pure virtual |
Get the alignment order.
Set the alignment spacing.
This method defines the size of the empty space between two consecutive sub-graphs, along the main axis defined via SetAxis().
spacing | The spacing value. |
|
pure virtual |
Get the alignment spacing.
Set the alignment padding.
This method defines the "border size", added to both sides of each axis to effectively enlarge the alignment container by twice the given values, individually for each of the three axes.
padding | A vector containing three individual padding values, one for each axis (X, Y and Z). |
|
pure virtual |
Set the alignment padding.
See SetPadding(const Vector&).
paddingX | The X axis padding value. |
paddingY | The Y axis padding value. |
paddingZ | The Z axis padding value. |
Set the alignment padding in X direction.
See SetPadding(const Vector&).
paddingX | The X axis padding value. |
Set the alignment padding in Y direction.
See SetPadding(const Vector&).
paddingY | The Y axis padding value. |
Set the alignment padding in Z direction.
See SetPadding(const Vector&).
paddingZ | The Z axis padding value. |
|
pure virtual |
Get the alignment padding as a vector.
|
pure virtual |
Get the alignment padding in X direction.
|
pure virtual |
Get the alignment padding in Y direction.
|
pure virtual |
Get the alignment padding in Z direction.
Set the exact container size used for layouting.
This method sets both minimum and maximum size values for the layout container to the given ones, effectively restricting the container to always have constant dimensions. See SetMinContainerSize() and SetMaxContainerSize(). The exact container size cannot be queried directly, use both GetMinContainerSize() and GetMaxContainerSize(), which return the same values when an exact container size was specified.
size | A vector containing the container size for X, Y and Z axes. |
|
pure virtual |
Set the exact container size used for layouting.
See SetContainerSize(const Vector&).
sizeX | The container size in X direction. |
sizeY | The container size in Y direction. |
sizeZ | The container size in Z direction. |
Set the exact container size used for layouting, in X direction.
See SetContainerSize(const Vector&).
sizeX | The container size in X direction. |
Set the exact container size used for layouting, in Y direction.
See SetContainerSize(const Vector&).
sizeY | The container size in Y direction. |
Set the exact container size used for layouting, in Z direction.
See SetContainerSize(const Vector&).
sizeZ | The container size in Z direction. |
Set the minimum container size used for layouting.
This method sets the minimum overall container size used for layouting. Using a minimum container size is usually useful when an aligner is itself embedded into another (parent) aligner. When the total size of the aligned contents is smaller than the size values given here, the container maintains that minimum size. If the contents are larger, then also the container is enlarged, unless a maximum size is defined via SetMaxContainerSize(). If any of the three axis values is negative, this axis is considered unrestricted. See also SetContainerSize() to set an exact container size.
size | A vector containing the minimum container size for X, Y and Z. |
|
pure virtual |
Set the minimum container size used for layouting.
See SetMinContainerSize(const Vector&).
sizeX | The minimum container size in X direction. |
sizeY | The minimum container size in Y direction. |
sizeZ | The minimum container size in Z direction. |
Set the minimum container size used for layouting, in X direction.
See SetMinContainerSize(const Vector&).
sizeX | The minimum container size in X direction. |
Set the minimum container size used for layouting, in Y direction.
See SetMinContainerSize(const Vector&).
sizeY | The minimum container size in Y direction. |
Set the minimum container size used for layouting, in Z direction.
See SetMinContainerSize(const Vector&).
sizeZ | The minimum container size in Z direction. |
|
pure virtual |
Get the minimum container size used for layouting.
|
pure virtual |
Get the minimum container size in X direction used for layouting.
|
pure virtual |
Get the minimum container size in Y direction used for layouting.
|
pure virtual |
Get the minimum container size in Z direction used for layouting.
Set the maximum container size used for layouting.
This method sets the maximum overall container size used for layouting. Using a minimum container size is usually useful when an aligner is itself embedded into another (parent) aligner. When the total size of the aligned contents is higher than the size values given here, the container is restricted to that maximum size. If the contents are smaller, this smaller size is accepted, unless a minimum size is defined via SetMinContainerSize(). If any of the three axis values is negative, this axis is considered unrestricted. See also SetContainerSize() to set an exact container size.
size | A vector containing the maximum container size for X, Y and Z. |
|
pure virtual |
Set the maximum container size used for layouting.
See SetMaxContainerSize(const Vector&).
sizeX | The maximum container size in X direction. |
sizeY | The maximum container size in Y direction. |
sizeZ | The maximum container size in Z direction. |
Set the maximum container size used for layouting, in X direction.
See SetMaxContainerSize(const Vector&).
sizeX | The maximum container size in X direction. |
Set the maximum container size used for layouting, in Y direction.
See SetMaxContainerSize(const Vector&).
sizeY | The maximum container size in Y direction. |
Set the maximum container size used for layouting, in Z direction.
See SetMaxContainerSize(const Vector&).
sizeZ | The maximum container size in Z direction. |
|
pure virtual |
Get the maximum container size used for layouting.
|
pure virtual |
Get the maximum container size in X direction used for layouting.
|
pure virtual |
Get the maximum container size in Y direction used for layouting.
|
pure virtual |
Get the maximum container size in Z direction used for layouting.
|
pure virtual |
Set the container alignment for all three axes.
The container alignment properties specify the actual pivot (or anchor) point for handling the aligner. For example, using IEnums::ALIGNMENT_X_LEFT for the X axis and IEnums::ALIGNMENT_Y_TOP will layout the aligner's contents to the right (positive X axis) and bottom (negative Y axis) from the aligner's origin. By default, the aligner's container alignment is set to CENTER for all three axes.
alignX | The container alignment in X direction. |
alignY | The container alignment in Y direction. |
alignZ | The container alignment in Z direction. |
|
pure virtual |
Set the container alignment for the X axis.
alignX | The container alignment in X direction. |
|
pure virtual |
Set the container alignment for the Y axis.
alignY | The container alignment in Y direction. |
|
pure virtual |
Set the container alignment for the Z axis.
alignZ | The container alignment in Z direction. |
|
pure virtual |
Get the container alignment for the X axis.
|
pure virtual |
Get the container alignment for the Y axis.
|
pure virtual |
Get the container alignment for the Z axis.
|
pure virtual |
Set the object alignment for all three axes.
The object alignment properties specify how the contents of the aligner are arranged for each axis. If for example the main axis is set to X in ascending order, the X alignment is set to LEFT, and the Y object alignment value is set to BOTTOM, all sub-graphs are aligned in their given order from left to right, and their Y start coordinates are aligned at the bottom of the container. Note that for all axes with object alignment set to UNDEFINED, the respective sub-graphs' coordinate along that axis remains unchanged.
alignX | The object alignment in X direction. |
alignY | The object alignment in Y direction. |
alignZ | The object alignment in Z direction. |
|
pure virtual |
Set the object alignment on the X axis.
alignX | The object alignment in X direction. |
|
pure virtual |
Set the object alignment on the Y axis.
alignY | The object alignment in Y direction. |
|
pure virtual |
Set the object alignment on the Z axis.
alignZ | The object alignment in Z direction. |
|
pure virtual |
Get the object alignment on the X axis.
|
pure virtual |
Get the object alignment on the Y axis.
|
pure virtual |
Get the object alignment on the Z axis.
|
pure virtual |
Set the object alignment unit.
This method sets the alignment unit for all three axes, which can be used to round the aligner container's positions to some given values, in order to e.g. position the resulting container on integer pixel coordinates. By default, the alignment units for all axes are set to -1.0, which means "no rounding".
unitX | The alignment unit in X direction. |
unitY | The alignment unit in Y direction. |
unitZ | The alignment unit in Z direction. |
Set the object alignment unit along the X axis.
See SetAlignmentUnit().
unitX | The alignment unit in X direction. |
Set the object alignment unit along the Y axis.
See SetAlignmentUnit().
unitY | The alignment unit in Y direction. |
Set the object alignment unit along the Z axis.
See SetAlignmentUnit().
unitZ | The alignment unit in Z direction. |
|
pure virtual |
Set the object alignment unit along the X axis.
|
pure virtual |
Set the object alignment unit along the Y axis.
|
pure virtual |
Set the object alignment unit along the Z axis.
|
pure virtual |
Get the aligner's bounding volume.
|
pure virtual |
Get the aligner's bounding volume.