RamsesNodeBinding¶
-
class
rlogic
::
RamsesNodeBinding
: public rlogic::RamsesBinding¶ The RamsesNodeBinding is a rlogic::RamsesBinding which allows manipulation of a Ramses node. RamsesNodeBinding can be created using rlogic::LogicEngine::createRamsesNodeBinding.
The RamsesNodeBinding has a fixed set of inputs which correspond to the properties of a ramses::Node: ‘visibility’ (type bool) - binds to node’s visibility mode to switch between visible and invisible, see also ‘enabled’ input for more options ‘rotation’ (type vec3f, or vec4f in case of quaternion) - binds to node’s rotation ‘translation’ (type vec3f) - binds to node’s translation ‘scaling’ (type vec3f) - binds to node’s scaling ‘enabled’ (type bool) - binds to node’s visibility mode to be able to switch node to off mode (see ramses::EVisibilityMode). When ‘enabled’ is true (default) the visibility mode is determined by the ‘visibility’ input above. When ‘enabled’ is false, the visibility mode is Off, regardless of the ‘visibility’ input. This property is only available in rlogic::EFeatureLevel_02!
The default values of the input properties are taken from the bound ramses::Node provided during construction. This also applies for rotations, if the rlogic::ERotationType and ramses::ERotationConvention values of the ramses node match (both are Euler, and both correspond to the same axis ordering). Otherwise a warning is issued and the rotation values are set to 0.
The RamsesNodeBinding class has no output properties (thus getOutputs() will return nullptr) because the outputs are implicitly the properties of the bound Ramses node.
Note
Not all states of the #ramses::Node must be managed via #RamsesNodeBinding, input properties which are not modified via #RamsesNodeBinding (i.e. user never set a value explicitly nor linked the input) will not alter the corresponding Ramses object state. This allows the user code to control some states via Ramses logic nodes and some directly using Ramses object.
The changes via binding objects are applied to the bound object right away when calling rlogic::LogicEngine::update(), however keep in mind that Ramses has a mechanism for bundling scene changes and applying them at once using ramses::Scene::flush, so the changes will be applied all the way only after calling this method on the scene.
Public Functions
-
ramses::Node &
getRamsesNode
() const¶ Returns the bound ramses node.
- Return
the bound ramses node
-
ERotationType
getRotationType
() const¶ Returns the statically configured rotation type for the node rotation property.
- Return
the currently used rotation type
-
RamsesNodeBinding
(std::unique_ptr<internal::RamsesNodeBindingImpl> impl) noexcept¶ Constructor of RamsesNodeBinding. User is not supposed to call this - RamsesNodeBindings are created by other factory classes
- Parameters
impl
: implementation details of the RamsesNodeBinding
-
~RamsesNodeBinding
() noexcept override¶ Destructor of RamsesNodeBinding.
-
RamsesNodeBinding
(const RamsesNodeBinding &other) = delete¶ Copy Constructor of RamsesNodeBinding is deleted because RamsesNodeBindings are not supposed to be copied
- Parameters
other
: RamsesNodeBindings to copy from
-
RamsesNodeBinding
(RamsesNodeBinding &&other) = delete¶ Move Constructor of RamsesNodeBinding is deleted because RamsesNodeBindings are not supposed to be moved
- Parameters
other
: RamsesNodeBindings to move from
-
RamsesNodeBinding &
operator=
(const RamsesNodeBinding &other) = delete¶ Assignment operator of RamsesNodeBinding is deleted because RamsesNodeBindings are not supposed to be copied
- Parameters
other
: RamsesNodeBindings to assign from
-
RamsesNodeBinding &
operator=
(RamsesNodeBinding &&other) = delete¶ Move assignment operator of RamsesNodeBinding is deleted because RamsesNodeBindings are not supposed to be moved
- Parameters
other
: RamsesNodeBindings to assign from
Public Members
-
internal::RamsesNodeBindingImpl &
m_nodeBinding
¶ Implementation detail of RamsesNodeBinding
-
ramses::Node &