3434import com .jme3 .scene .Spatial ;
3535
3636/**
37- * Extension of {@link ArmatureMask}.
38- *
39- * <p>Provides a feature which checks higher layers for joint use before it
40- * approves the layer to use a joint.
37+ * Mask that excludes joints from participating in the layer
38+ * if a higher layer is using those joints in an animation.
4139 *
4240 * @author codex
4341 */
@@ -49,7 +47,7 @@ public class AlertArmatureMask extends ArmatureMask {
4947 private boolean checkUpperLayers = true ;
5048
5149 /**
52- * @param layer The layer this mask is targeted for. It is extremely important
50+ * @param layer The layer this mask is targeted for. It is important
5351 * that this match the name of the layer this mask is (or will be) part of. You
5452 * can use {@link makeLayer} to ensure this.
5553 * @param spatial Spatial containing necessary controls ({@link AnimComposer} and {@link SkinningControl})
@@ -60,6 +58,13 @@ public AlertArmatureMask(String layer, Spatial spatial) {
6058 anim = spatial .getControl (AnimComposer .class );
6159 skin = spatial .getControl (SkinningControl .class );
6260 }
61+ /**
62+ * @param layer The layer this mask is targeted for. It is important
63+ * that this match the name of the layer this mask is (or will be) part of. You
64+ * can use {@link makeLayer} to ensure this.
65+ * @param anim anim composer this mask is assigned to
66+ * @param skin skinning control complimenting the anim composer.
67+ */
6368 public AlertArmatureMask (String layer , AnimComposer anim , SkinningControl skin ) {
6469 super ();
6570 this .layer = layer ;
@@ -68,15 +73,15 @@ public AlertArmatureMask(String layer, AnimComposer anim, SkinningControl skin)
6873 }
6974
7075 /**
71- * Makes a layer for this mask.
76+ * Makes a layer from this mask.
7277 */
7378 public void makeLayer () {
7479 anim .makeLayer (layer , this );
7580 }
7681
7782 /**
7883 * Adds all joints to this mask.
79- * @return
84+ * @return this.instance
8085 */
8186 public AlertArmatureMask addAll () {
8287 for (Joint j : skin .getArmature ().getJointList ()) {
@@ -88,7 +93,7 @@ public AlertArmatureMask addAll() {
8893 /**
8994 * Adds the given joint and all its children to this mask.
9095 * @param joint
91- * @return
96+ * @return this instance
9297 */
9398 public AlertArmatureMask addFromJoint (String joint ) {
9499 super .addFromJoint (skin .getArmature (), joint );
@@ -98,7 +103,7 @@ public AlertArmatureMask addFromJoint(String joint) {
98103 /**
99104 * Adds the given joints to this mask.
100105 * @param joints
101- * @return
106+ * @return this instance
102107 */
103108 public AlertArmatureMask addJoints (String ... joints ) {
104109 super .addBones (skin .getArmature (), joints );
@@ -111,7 +116,7 @@ public AlertArmatureMask addJoints(String... joints) {
111116 * <p>Not checking is more efficient, but checking can avoid some
112117 * interpolation issues between layers. Default=true
113118 * @param check
114- * @return
119+ * @return this instance
115120 */
116121 public AlertArmatureMask setCheckUpperLayers (boolean check ) {
117122 checkUpperLayers = check ;
@@ -131,15 +136,15 @@ public String getTargetLayer() {
131136
132137 /**
133138 * Get the {@link AnimComposer} this mask is for.
134- * @return
139+ * @return anim composer
135140 */
136141 public AnimComposer getAnimComposer () {
137142 return anim ;
138143 }
139144
140145 /**
141146 * Get the {@link SkinningControl} this mask is for.
142- * @return
147+ * @return skinning control
143148 */
144149 public SkinningControl getSkinningControl () {
145150 return skin ;
@@ -190,20 +195,20 @@ else if (lyr.getMask().contains(target)) {
190195
191196 /**
192197 * Creates an {@code AlertArmatureMask} for all joints.
193- * @param layer
194- * @param spatial
195- * @return
198+ * @param layer layer the returned mask is, or will be, be assigned to
199+ * @param spatial spatial containing anim composer and skinning control
200+ * @return new mask
196201 */
197202 public static AlertArmatureMask all (String layer , Spatial spatial ) {
198203 return new AlertArmatureMask (layer , spatial ).addAll ();
199204 }
200205
201206 /**
202207 * Creates an {@code AlertArmatureMask} for all joints.
203- * @param layer
204- * @param anim
205- * @param skin
206- * @return
208+ * @param layer layer the returned mask is, or will be, assigned to
209+ * @param anim anim composer
210+ * @param skin skinning control
211+ * @return new mask
207212 */
208213 public static AlertArmatureMask all (String layer , AnimComposer anim , SkinningControl skin ) {
209214 return new AlertArmatureMask (layer , anim , skin ).addAll ();
0 commit comments