Package com.jme3.bullet.animation
Enum Class CenterHeuristic
- All Implemented Interfaces:
Serializable
,Comparable<CenterHeuristic>
,Constable
Enumerate algorithms to locate the center of mass for a PhysicsLink.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.jme3.math.Vector3f
center
(jme3utilities.math.VectorSet locations, com.jme3.math.Vector3f storeResult) Calculate a center for the specified set of location vectors.static CenterHeuristic
Returns the enum constant of this class with the specified name.static CenterHeuristic[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AABB
center of the smallest axis-aligned bounding box -
Joint
for bone links only: center on the joint's pivot -
Mean
unweighted average of vertex locations -
Sphere
center of the smallest enclosing sphere (using Welzl's algorithm)
-
-
Method Details
-
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
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 nameNullPointerException
- 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 forJoint
.- 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)
-