From be87deea93b34af5d032c16aaf925e932b34b934 Mon Sep 17 00:00:00 2001 From: pavl_g Date: Sat, 27 May 2023 20:50:23 +0300 Subject: [PATCH 01/22] com.jme3.anim.tween.action.BlendSpace: basic javadoc --- .../jme3/anim/tween/action/BlendSpace.java | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index a88be7529c..d1f1d53322 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -1,10 +1,79 @@ +/* + * Copyright (c) 2009-2023 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.jme3.anim.tween.action; +/** + * Controls the blending between 2 successive actions in a {@link BlendAction} by adjusting blending weight value + * {@link BlendSpace#getWeight()} during application runtime based on an arbitrary value {@link BlendSpace#setValue(float)}. + * + *

+ * Notes: + *

  • Blending is the action of mixing between 2 successive animation {@link BlendableAction}s by interpolating their transforms and + * then applying them on a {@link HasLocalTransform} object, the {@link BlendSpace} provides this blending action with a blend weight value.
  • + *
  • The blend weight is the value for the interpolation for the target transforms.
  • + *
  • The blend weight value should lie in this interval [0, 1].
  • + *
  • Blending weight = 0 means only the first action will run at interpolation value 1.
  • + *
  • Blending weight = 1 means the blending is finished and only the second action will continue to run.
  • + *
  • Blending weight between 1 and 0 means the blending is executed each update among 2 actions, the first action will use + * a blend value of 1 and the second action will use the blend space weight as a value for the interpolation.
  • + *

    + * + * + * Created by Nehon. + * @see LinearBlendSpace an example of blendspace implementation + */ public interface BlendSpace { + /** + * Adjusts the target blend-action instance that utilize the blend-weight value provided by this blend-space implementation. + * + * @param action the blend-action instance that will utilize this blend-space. + */ public void setBlendAction(BlendAction action); + /** + * Used for passing the desired weight to the selected {@link BlendAction} instance, + * this value will be used for interpolating a collection of actions' transformations. + * + * @return the blending weight value. + * @see LinearBlendSpace#getWeight() + */ public float getWeight(); + /** + * An arbitrary value used for adjusting the blending weight value. + * + * @param value the value in floats. + * @see LinearBlendSpace#setValue(float) + */ public void setValue(float value); } From 4a5100d70f9ac57c3ecd1862cf35836489c867c7 Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Sun, 28 May 2023 10:20:11 +0300 Subject: [PATCH 02/22] class-entry-javadoc: documentation of different cases of blending-weight value --- .../java/com/jme3/anim/tween/action/BlendSpace.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index d1f1d53322..0f318ec240 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -41,13 +41,17 @@ * then applying them on a {@link HasLocalTransform} object, the {@link BlendSpace} provides this blending action with a blend weight value. *
  • The blend weight is the value for the interpolation for the target transforms.
  • *
  • The blend weight value should lie in this interval [0, 1].
  • - *
  • Blending weight = 0 means only the first action will run at interpolation value 1.
  • - *
  • Blending weight = 1 means the blending is finished and only the second action will continue to run.
  • - *
  • Blending weight between 1 and 0 means the blending is executed each update among 2 actions, the first action will use + *

    + * + *

    + * Different blending weight case scenarios managed by {@link BlendAction} internally: + *

  • In case of (0 < Blending weight < 1), the blending is executed each update among 2 actions, the first action will use * a blend value of 1 and the second action will use the blend space weight as a value for the interpolation.
  • + *
  • In case of (Blending weight = -x, where x < 0), the behavior is the same as the case (0 < Blending weight < 1).
  • + *
  • In case of (Blending weight = 1), the blending is finished and only the second action will continue to run.
  • + *
  • In case of (Blending weight > 1), the blending is finished and only the second action will continue to run, but with extrapolation.
  • *

    * - * * Created by Nehon. * @see LinearBlendSpace an example of blendspace implementation */ From c90cd7821c3713076fffbfe389eb90b23f150f65 Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Sun, 28 May 2023 10:25:51 +0300 Subject: [PATCH 03/22] class-entry-javadoc: inlined value domain with the value at 'Blending weight < 0' case --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 0f318ec240..1d02f7172d 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -47,7 +47,7 @@ * Different blending weight case scenarios managed by {@link BlendAction} internally: *
  • In case of (0 < Blending weight < 1), the blending is executed each update among 2 actions, the first action will use * a blend value of 1 and the second action will use the blend space weight as a value for the interpolation.
  • - *
  • In case of (Blending weight = -x, where x < 0), the behavior is the same as the case (0 < Blending weight < 1).
  • + *
  • In case of (Blending weight < 0), the behavior is the same as the case (0 < Blending weight < 1).
  • *
  • In case of (Blending weight = 1), the blending is finished and only the second action will continue to run.
  • *
  • In case of (Blending weight > 1), the blending is finished and only the second action will continue to run, but with extrapolation.
  • *

    From 7c5e36c689003d9eeff42e78a16e2d4102735d2e Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Sun, 28 May 2023 10:30:40 +0300 Subject: [PATCH 04/22] BlendSpace#getWeight(): extra clarification of the transformations word --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 1d02f7172d..ab82480372 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -66,7 +66,7 @@ public interface BlendSpace { /** * Used for passing the desired weight to the selected {@link BlendAction} instance, - * this value will be used for interpolating a collection of actions' transformations. + * this value will be used for interpolating a collection of actions' transformations (keyframes). * * @return the blending weight value. * @see LinearBlendSpace#getWeight() From 8ca8d9d6fe07f754c067468bf79a154daa8eab40 Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Sun, 28 May 2023 10:36:25 +0300 Subject: [PATCH 05/22] class-entry-javadoc: added reference for more --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index ab82480372..e1369153cd 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -50,6 +50,7 @@ *
  • In case of (Blending weight < 0), the behavior is the same as the case (0 < Blending weight < 1).
  • *
  • In case of (Blending weight = 1), the blending is finished and only the second action will continue to run.
  • *
  • In case of (Blending weight > 1), the blending is finished and only the second action will continue to run, but with extrapolation.
  • + *
  • Find more at {@link BlendAction#doInterpolate(double)} and {@link BlendAction#collectTransform(HasLocalTransform, Transform, float, BlendableAction)}.
  • *

    * * Created by Nehon. From d4570dc4eef66a197f5007c2de2841a1da7f00ac Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Sun, 28 May 2023 11:51:20 +0300 Subject: [PATCH 06/22] class-entry-javadoc: added zero and negative case scenarios --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index e1369153cd..0bef517176 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -47,7 +47,7 @@ * Different blending weight case scenarios managed by {@link BlendAction} internally: *
  • In case of (0 < Blending weight < 1), the blending is executed each update among 2 actions, the first action will use * a blend value of 1 and the second action will use the blend space weight as a value for the interpolation.
  • - *
  • In case of (Blending weight < 0), the behavior is the same as the case (0 < Blending weight < 1).
  • + *
  • In case of (Blending weight <= 0), the blending hasn't started yet, only the first action will be interpolated at (weight = 1).
  • *
  • In case of (Blending weight = 1), the blending is finished and only the second action will continue to run.
  • *
  • In case of (Blending weight > 1), the blending is finished and only the second action will continue to run, but with extrapolation.
  • *
  • Find more at {@link BlendAction#doInterpolate(double)} and {@link BlendAction#collectTransform(HasLocalTransform, Transform, float, BlendableAction)}.
  • From 433bf5da15ff232fc228a465f5786ec76980b467 Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Mon, 29 May 2023 10:45:51 +0300 Subject: [PATCH 07/22] class-entry-javadoc: restricts blend weight values to [0, 1] --- .../main/java/com/jme3/anim/tween/action/BlendSpace.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 0bef517176..04b7624454 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -47,9 +47,9 @@ * Different blending weight case scenarios managed by {@link BlendAction} internally: *
  • In case of (0 < Blending weight < 1), the blending is executed each update among 2 actions, the first action will use * a blend value of 1 and the second action will use the blend space weight as a value for the interpolation.
  • - *
  • In case of (Blending weight <= 0), the blending hasn't started yet, only the first action will be interpolated at (weight = 1).
  • - *
  • In case of (Blending weight = 1), the blending is finished and only the second action will continue to run.
  • - *
  • In case of (Blending weight > 1), the blending is finished and only the second action will continue to run, but with extrapolation.
  • + *
  • In case of (Blending weight = 0), the blending hasn't started yet, only the first action will be interpolated at (weight = 1).
  • + *
  • In case of (Blending weight = 1), the blending is finished and only the second action will continue to run at (weight = 1).
  • + *
  • Negative values and values greater than 1 aren't allowed and will result in an IllegalArgumentException.
  • *
  • Find more at {@link BlendAction#doInterpolate(double)} and {@link BlendAction#collectTransform(HasLocalTransform, Transform, float, BlendableAction)}.
  • *

    * From a8602f84164f61e632c4cb07ed266cf573eae91d Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Mon, 29 May 2023 10:57:27 +0300 Subject: [PATCH 08/22] BlendSpace: better documentation formatting --- .../main/java/com/jme3/anim/tween/action/BlendSpace.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 04b7624454..0f47f02ce2 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -59,14 +59,14 @@ public interface BlendSpace { /** - * Adjusts the target blend-action instance that utilize the blend-weight value provided by this blend-space implementation. + * Adjusts the target blend action instance that will utilize the blend weight value provided by this blend-space implementation. * - * @param action the blend-action instance that will utilize this blend-space. + * @param action the blend action instance that will utilize this blend-space. */ public void setBlendAction(BlendAction action); /** - * Used for passing the desired weight to the selected {@link BlendAction} instance, + * Provides the blend weight value to the assigned {@link BlendAction} instance, * this value will be used for interpolating a collection of actions' transformations (keyframes). * * @return the blending weight value. From bbd041c1020b1e80154a5c78f9ae45513bcc977e Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Mon, 29 May 2023 11:11:07 +0300 Subject: [PATCH 09/22] class-entry-javadoc: more clarifications on the 'blending' definition --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 0f47f02ce2..198711a6ee 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -38,7 +38,7 @@ *

    * Notes: *

  • Blending is the action of mixing between 2 successive animation {@link BlendableAction}s by interpolating their transforms and - * then applying them on a {@link HasLocalTransform} object, the {@link BlendSpace} provides this blending action with a blend weight value.
  • + * then applying the result on the assigned {@link HasLocalTransform} object, the {@link BlendSpace} provides this blending action with a blend weight value. *
  • The blend weight is the value for the interpolation for the target transforms.
  • *
  • The blend weight value should lie in this interval [0, 1].
  • *

    From a3603f27454a7b9a67c84101c714f1a53cbaf3a5 Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Mon, 29 May 2023 12:01:23 +0300 Subject: [PATCH 10/22] class-entry-javadoc: removed irrelevant IllegalArgumentException documentation --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 198711a6ee..2200b3e7a3 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -49,7 +49,7 @@ * a blend value of 1 and the second action will use the blend space weight as a value for the interpolation. *
  • In case of (Blending weight = 0), the blending hasn't started yet, only the first action will be interpolated at (weight = 1).
  • *
  • In case of (Blending weight = 1), the blending is finished and only the second action will continue to run at (weight = 1).
  • - *
  • Negative values and values greater than 1 aren't allowed and will result in an IllegalArgumentException.
  • + *
  • Negative values and values greater than 1 aren't allowed.
  • *
  • Find more at {@link BlendAction#doInterpolate(double)} and {@link BlendAction#collectTransform(HasLocalTransform, Transform, float, BlendableAction)}.
  • *

    * From dd1dbac758a0344b9fa2d7856ac64fd39938867b Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Mon, 29 May 2023 12:06:04 +0300 Subject: [PATCH 11/22] Strict blend weight range --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 2200b3e7a3..523a0ce2cc 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -40,7 +40,7 @@ *
  • Blending is the action of mixing between 2 successive animation {@link BlendableAction}s by interpolating their transforms and * then applying the result on the assigned {@link HasLocalTransform} object, the {@link BlendSpace} provides this blending action with a blend weight value.
  • *
  • The blend weight is the value for the interpolation for the target transforms.
  • - *
  • The blend weight value should lie in this interval [0, 1].
  • + *
  • The blend weight value must be in this interval [0, 1].
  • *

    * *

    @@ -68,6 +68,7 @@ public interface BlendSpace { /** * Provides the blend weight value to the assigned {@link BlendAction} instance, * this value will be used for interpolating a collection of actions' transformations (keyframes). + * Blend weight value must be in the range from 0 to 1. * * @return the blending weight value. * @see LinearBlendSpace#getWeight() From bffb6a9f75f49f71d0241b300ec888c8359665da Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Mon, 29 May 2023 12:09:46 +0300 Subject: [PATCH 12/22] BlendSpace#getWeight(): sentence typos --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 523a0ce2cc..11d4ca51f8 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -68,7 +68,7 @@ public interface BlendSpace { /** * Provides the blend weight value to the assigned {@link BlendAction} instance, * this value will be used for interpolating a collection of actions' transformations (keyframes). - * Blend weight value must be in the range from 0 to 1. + * The Blend weight value must be in the range from 0 to 1. * * @return the blending weight value. * @see LinearBlendSpace#getWeight() From 6c8a00f44bb05018641bb0dd60743354c2ff430b Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Tue, 30 May 2023 15:39:18 +0300 Subject: [PATCH 13/22] BlendSpace#setBlendAction(...): javadoc mark the argument as not-null --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 11d4ca51f8..ea16972a2a 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -61,7 +61,7 @@ public interface BlendSpace { /** * Adjusts the target blend action instance that will utilize the blend weight value provided by this blend-space implementation. * - * @param action the blend action instance that will utilize this blend-space. + * @param action the blend action instance that will utilize this blend-space (not null). */ public void setBlendAction(BlendAction action); From 95f815bc7a999072a32352542c5ad36caec07df2 Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Wed, 31 May 2023 17:47:46 +0300 Subject: [PATCH 14/22] BlendSpace#getWeight(): moved the blend weight range to the return tag description --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index ea16972a2a..814380946b 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -68,9 +68,8 @@ public interface BlendSpace { /** * Provides the blend weight value to the assigned {@link BlendAction} instance, * this value will be used for interpolating a collection of actions' transformations (keyframes). - * The Blend weight value must be in the range from 0 to 1. * - * @return the blending weight value. + * @return the blending weight value in the range from 0 to 1. * @see LinearBlendSpace#getWeight() */ public float getWeight(); From 637275f51f3c1bcb6d1291b317283a8f65f3d570 Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Wed, 31 May 2023 17:51:20 +0300 Subject: [PATCH 15/22] BlendSpace#getWeight(): explicitly saying "negative values and values above 1 aren't allowed" --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 814380946b..ebaf3178b6 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -69,7 +69,8 @@ public interface BlendSpace { * Provides the blend weight value to the assigned {@link BlendAction} instance, * this value will be used for interpolating a collection of actions' transformations (keyframes). * - * @return the blending weight value in the range from 0 to 1. + * @return the blending weight value in the range from 0 to 1, + * negative values and values above 1 aren't allowed. * @see LinearBlendSpace#getWeight() */ public float getWeight(); From bf378244ce6b766f24142601baba76025f74e673 Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Mon, 22 Jan 2024 21:12:47 +0300 Subject: [PATCH 16/22] BlendSpace.java: updated copyright to 2024 --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index ebaf3178b6..1f3ecc94e3 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2023 jMonkeyEngine + * Copyright (c) 2009-2024 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without From 9bc1edad85e641667c52fec32313e30032d554fd Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Wed, 24 Jan 2024 08:18:40 +0300 Subject: [PATCH 17/22] Class-JavaDoc: better explanation of the interface purpose --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 1f3ecc94e3..3c2df938e2 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -32,8 +32,8 @@ package com.jme3.anim.tween.action; /** - * Controls the blending between 2 successive actions in a {@link BlendAction} by adjusting blending weight value - * {@link BlendSpace#getWeight()} during application runtime based on an arbitrary value {@link BlendSpace#setValue(float)}. + * A provider interface which provides a value {@link BlendSpace#getWeight()} to control the blending between 2 successive actions in a {@link BlendAction}. + * The blending weight is a read-only value, and it's manipulatable using the arbitrary value {@link BlendSpace#setValue(float)} during the application runtime. * *

    * Notes: From ab466ac7066155692c340d6eb80e712573c566e7 Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Wed, 24 Jan 2024 08:21:12 +0300 Subject: [PATCH 18/22] Class-JavaDoc: denoted that extrapolations are disabled in a blending space --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 3c2df938e2..b115ee1759 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -49,7 +49,7 @@ * a blend value of 1 and the second action will use the blend space weight as a value for the interpolation. *

  • In case of (Blending weight = 0), the blending hasn't started yet, only the first action will be interpolated at (weight = 1).
  • *
  • In case of (Blending weight = 1), the blending is finished and only the second action will continue to run at (weight = 1).
  • - *
  • Negative values and values greater than 1 aren't allowed.
  • + *
  • Negative values and values greater than 1 aren't allowed (extrapolations are disabled).
  • *
  • Find more at {@link BlendAction#doInterpolate(double)} and {@link BlendAction#collectTransform(HasLocalTransform, Transform, float, BlendableAction)}.
  • *

    * From 7a18af3617fcec14b6c7638ce69ae3aed449417c Mon Sep 17 00:00:00 2001 From: pavl_g <60224159+Scrappers-glitch@users.noreply.github.com> Date: Wed, 24 Jan 2024 08:23:03 +0300 Subject: [PATCH 19/22] Update BlendSpace.java --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index b115ee1759..3a44141537 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -49,7 +49,7 @@ * a blend value of 1 and the second action will use the blend space weight as a value for the interpolation. *
  • In case of (Blending weight = 0), the blending hasn't started yet, only the first action will be interpolated at (weight = 1).
  • *
  • In case of (Blending weight = 1), the blending is finished and only the second action will continue to run at (weight = 1).
  • - *
  • Negative values and values greater than 1 aren't allowed (extrapolations are disabled).
  • + *
  • Negative values and values greater than 1 aren't allowed (extrapolations aren't allowed).
  • *
  • Find more at {@link BlendAction#doInterpolate(double)} and {@link BlendAction#collectTransform(HasLocalTransform, Transform, float, BlendableAction)}.
  • *

    * From 1b91c0d3d2c36aafe32f1661235a41be0fa90904 Mon Sep 17 00:00:00 2001 From: "Pavly Gerges (pavl_g)" <60224159+pavly-gerges@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:14:35 +0200 Subject: [PATCH 20/22] BlendSpace.java: updated Jme3 Copyright to 2025 --- .../src/main/java/com/jme3/anim/tween/action/BlendSpace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 3a44141537..b469097d05 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2024 jMonkeyEngine + * Copyright (c) 2009-2025 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without From b03dec8be3959153ce678da8fea7ae2756f01835 Mon Sep 17 00:00:00 2001 From: "Pavly Gerges (pavl_g)" <60224159+pavly-gerges@users.noreply.github.com> Date: Sun, 16 Feb 2025 19:10:12 +0200 Subject: [PATCH 21/22] BlendSpace: re-enforcements at the class-entry docs --- .../java/com/jme3/anim/tween/action/BlendSpace.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index b469097d05..60832c33c3 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -33,24 +33,28 @@ /** * A provider interface which provides a value {@link BlendSpace#getWeight()} to control the blending between 2 successive actions in a {@link BlendAction}. - * The blending weight is a read-only value, and it's manipulatable using the arbitrary value {@link BlendSpace#setValue(float)} during the application runtime. + * The blending weight is a read-only value, and it can be manipulated using the arbitrary value {@link BlendSpace#setValue(float)} during the application runtime. * *

    * Notes: + *

    *

    * *

    * Different blending weight case scenarios managed by {@link BlendAction} internally: + *

    *

    * * Created by Nehon. @@ -67,7 +71,7 @@ public interface BlendSpace { /** * Provides the blend weight value to the assigned {@link BlendAction} instance, - * this value will be used for interpolating a collection of actions' transformations (keyframes). + * this value will be used for interpolating a collection of actions' transformations (i.e., keyframes). * * @return the blending weight value in the range from 0 to 1, * negative values and values above 1 aren't allowed. From adf114785847765ebb044bcaeadc5c246a77f112 Mon Sep 17 00:00:00 2001 From: "Pavly Gerges (pavl_g)" <60224159+pavly-gerges@users.noreply.github.com> Date: Sun, 16 Feb 2025 19:26:09 +0200 Subject: [PATCH 22/22] BlendSpace.java: decomposed notes at the class-entry from the blend weight values meaning --- .../java/com/jme3/anim/tween/action/BlendSpace.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java index 60832c33c3..17b66f8b07 100644 --- a/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java +++ b/jme3-core/src/main/java/com/jme3/anim/tween/action/BlendSpace.java @@ -36,7 +36,7 @@ * The blending weight is a read-only value, and it can be manipulated using the arbitrary value {@link BlendSpace#setValue(float)} during the application runtime. * *

    - * Notes: + * Notes about the blending action and its relations with the blending weight: *

    *

    * + *

    + * Notes about the blending weight value: + *

    + *

    + * * Created by Nehon. * @see LinearBlendSpace an example of blendspace implementation */