Package nl.colorize.multimedialib.stage
Class Group
java.lang.Object
nl.colorize.multimedialib.stage.Group
- All Implemented Interfaces:
Iterable<StageNode3D>,StageNode3D
Stage node that does not provide any graphics, but can instead be used to
add additional graphics as children. Modifying the group's transform will
propagate to its children.
Groups can optionally have a name. This name is only used for identification, it does not influence the group's appearance or behavior in any way.
Children are limited to 3D graphics, since the stage has a hard separation
between 2D and 3D graphics. Use Container for 2D graphics.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(StageNode3D child) Convenience method that creates a new group, adds it as a child to this group, then returns the created child group.voidCalled by the renderer at the end of frame updates, while rendering the stage.voidprotected nl.colorize.util.SubscribableCollection<StageNode3D> Returns this node's global transform, which is interpreted relative to the stage.getName()Returns this node's local transform, which is interpreted relative to its parent node.iterator()voidremoveChild(StageNode3D child) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Group
-
Group
public Group()
-
-
Method Details
-
addChild
-
addChildGroup
Convenience method that creates a new group, adds it as a child to this group, then returns the created child group. -
removeChild
-
clearChildren
public void clearChildren() -
animate
Description copied from interface:StageNode3DCalled by the renderer at the end of frame updates, while rendering the stage.animationTimercontains the elapsed time since the currently active scene was started. This allows animations to display correctly, without the need to update every single node during each frame update.- Specified by:
animatein interfaceStageNode3D
-
iterator
- Specified by:
iteratorin interfaceIterable<StageNode3D>
-
toString
-
getName
-
getTransform
Description copied from interface:StageNode3DReturns this node's local transform, which is interpreted relative to its parent node. The local transform can be modified by application code to modify how and where the node is displayed.- Specified by:
getTransformin interfaceStageNode3D
-
getGlobalTransform
Description copied from interface:StageNode3DReturns this node's global transform, which is interpreted relative to the stage. The global transform is updated by the renderer when drawing the stage at the end of frame updates. Recalculating the global transform is relatively expensive, and is therefore only done once per frame. This means that any changes made to a node's local transform since the last frame update may not yet been reflected in the current state of its global transform.- Specified by:
getGlobalTransformin interfaceStageNode3D
-
getChildren
-