yage.scene.model
Authors:
Eric Poggel
License:
LGPL v3
- class
ModelNode
: yage.scene.visible.VisibleNode;
- A node used for rendering a 3D model.
- this();
- Create a ModelNode and optionally set the model from an already loaded model or a model filename.
- void delegate(ModelNode self)
onAnimationComplete
;
- Call this function from onUpdate when the model's current animation completes.
The animation is considered complete when the animation timer reachers its pauseAfter value
or if a range is set and it loops.
- ModelNode
clone
(bool children = false);
- Make a duplicate of this node, unattached to any parent Node.
Animation is not yet cloned since its current implementation may soon change.
Params:
bool children |
recursively
clone
children (and descendants) and add them as children to the new Node. |
Returns:
The cloned Node.
- Model
getModel
();
void
setModel
(Geometry model = cast(Geometry)null);
void
setModel
(char[] filename);
- Get / set the 3D model used by this Node.
If a filename is passed, the ResourceManager Manager will ensure that no Model is loaded twice.
If no argument is passed to setModel(), the model will be cleared.
Equivalent of setModel(ResourceManager.model(filename));
- void
setSize
(Vec3f s);
- Ditto
Overridden to cache the radius if changed by the scale.
- float
getRadius
();
- Get the radius of the culling sphere used when rendering the 3D Model
This is usually the distance from the center of its coordinate plane to
the most distant vertex. There is no setRadius()
|