Explorar o código

Added SkeletonControl info.

mitm %!s(int64=7) %!d(string=hai) anos
pai
achega
481cfb63e0
Modificáronse 1 ficheiros con 44 adicións e 1 borrados
  1. 44 1
      src/docs/asciidoc/jme3/advanced/animation.adoc

+ 44 - 1
src/docs/asciidoc/jme3/advanced/animation.adoc

@@ -82,6 +82,35 @@ There often are situations where you want to run several animation sequences at
 To reset a Control, call `control.clearChannels()`.
 
 
+=== Skeleton Control
+
+
+The Skeleton control deforms a model according to a skeleton. Use it to attach other geometries to your model such as clothing, weapons, accessories or a particle emitter effect. You access the control the same way as you would the AnimControl. 
+
+.Control resides in the main node of your model
+[source,java]
+----
+
+SkeletonControl skeletonControl;
+
+skeletonControl = player.getControl(SkeletonControl.class);
+
+----
+
+.Control rsides somewhere other than main node
+[source,java]
+----
+player.depthFirstTraversal(new SceneGraphVisitorAdapter() {
+    @Override
+    public void visit(Node node) {
+        if (node.getControl(SkeletonControl.class) != null) {
+            skeletonControl = node.getControl(SkeletonControl.class);
+        }
+    }
+});
+----
+
+
 == Animation Control Properties
 
 The following information is available for an AnimControl.
@@ -143,6 +172,21 @@ a|Usage
 a|getSkeleton()
 a|The Skeleton object controlled by this Control.
 
+|===
+
+== Skeleton Control Properties
+
+The following information is available for an SkeletonControl.
+
+[cols="2", options="header"]
+|===
+
+a|SkeletonControl Property
+a|Usage
+
+a|getSkeleton()
+a|The Skeleton object controlled by this Control.
+
 a|getTargets()
 a|The Skin objects controlled by this Control, as Mesh array.
 
@@ -151,7 +195,6 @@ a|Returns the attachment node of a bone. Attach models and effects to this node
 
 |===
 
-
 == Animation Channel Properties
 
 The following properties are set per AnimChannel.