Enum Class CenterHeuristic

java.lang.Object
java.lang.Enum<CenterHeuristic>
com.jme3.bullet.animation.CenterHeuristic
All Implemented Interfaces:
Serializable, Comparable<CenterHeuristic>, Constable

public enum CenterHeuristic extends Enum<CenterHeuristic>
Enumerate algorithms to locate the center of mass for a PhysicsLink.
  • Enum Constant Details

    • AABB

      public static final CenterHeuristic AABB
      center of the smallest axis-aligned bounding box
    • Joint

      public static final CenterHeuristic Joint
      for bone links only: center on the joint's pivot
    • Mean

      public static final CenterHeuristic Mean
      unweighted average of vertex locations
    • Sphere

      public static final CenterHeuristic Sphere
      center of the smallest enclosing sphere (using Welzl's algorithm)
  • Method Details

    • values

      public static CenterHeuristic[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CenterHeuristic valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • center

      public com.jme3.math.Vector3f center(jme3utilities.math.VectorSet locations, com.jme3.math.Vector3f storeResult)
      Calculate a center for the specified set of location vectors. No implementation for Joint.
      Parameters:
      locations - the set of location vectors (not null, not empty, unaffected)
      storeResult - storage for the result (modified if not null)
      Returns:
      a location vector (either storeResult or a new vector, not null)