|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsyn3d.base.Syn3DPlugin
public class Syn3DPlugin
This is the entry point to extend Syn3D. Plugins may bring in Shapes and other 3D elements for the scene graph. Together with the ActiveNode interface, each node can handle its own actions. In addition, plugins will automatically be passed events if implementing the mouse or keyboard Swing listeners (ex: MouseMotionListener). Empty methods are provided, so the plugin acts as a developer-friendly Adaptator object. Additionally, the event source has been set to the Scene Node object initiating the event, so it is easy to act on the scene. Warning: All handlers are called, in unspecified order. This allows to easily implement additional key events in your plugin, for example. Default handlers are provided by the builtin plugin. It is possible to de-activate them if necessary : use the PluginManager to find the builtin reference, and use its API.
Field Summary | |
---|---|
protected PluginManager |
pluginManager
A reference to the pluginManager whitch manages the scene |
Constructor Summary | |
---|---|
Syn3DPlugin()
|
Method Summary | |
---|---|
boolean |
canCreate(java.lang.String node,
ActiveNode parent)
This method is used for screne graph building, and should be fast. |
ActiveNode |
create(java.lang.String node,
ActiveNode parent)
Node factory. |
ActiveNode |
createFromKey(java.lang.String key,
ActiveNode parent)
Utility wrapper method to create a node of a known type without resorting to reading the resources... |
java.lang.String[] |
getNodes()
This plugin may bring its own nodes for the scene graph. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PluginManager pluginManager
Constructor Detail |
---|
public Syn3DPlugin()
Method Detail |
---|
public java.lang.String[] getNodes()
public boolean canCreate(java.lang.String node, ActiveNode parent)
node
- A node type, previously returned by the getNodes() methodparent
- The candidate node on which the systems want to know if a new node of the given type could be added as a child.
public ActiveNode create(java.lang.String node, ActiveNode parent)
node
- A node type, previously returned by the getNodes() methodparent
- The existing node on which to attach the new node as a child.
public ActiveNode createFromKey(java.lang.String key, ActiveNode parent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |