com.jme3.bullet.control.ragdoll
Class RagdollUtils
java.lang.Object
com.jme3.bullet.control.ragdoll.RagdollUtils
public class RagdollUtils
- extends java.lang.Object
Method Summary |
static java.util.Map<java.lang.Integer,java.util.List<java.lang.Float>> |
buildPointMap(Spatial model)
|
static java.util.List<java.lang.Integer> |
getBoneIndices(Bone bone,
Skeleton skeleton,
java.util.Set<java.lang.String> boneList)
|
static HullCollisionShape |
makeShapeFromPointMap(java.util.Map<java.lang.Integer,java.util.List<java.lang.Float>> pointsMap,
java.util.List<java.lang.Integer> boneIndices,
Vector3f initialScale,
Vector3f initialPosition)
Create a hull collision shape from linked vertices to this bone. |
static HullCollisionShape |
makeShapeFromVerticeWeights(Spatial model,
java.util.List<java.lang.Integer> boneIndices,
Vector3f initialScale,
Vector3f initialPosition,
float weightThreshold)
Create a hull collision shape from linked vertices to this bone. |
static void |
setJointLimit(SixDofJoint joint,
float maxX,
float minX,
float maxY,
float minY,
float maxZ,
float minZ)
|
static void |
setTransform(Bone bone,
Vector3f pos,
Quaternion rot,
boolean restoreBoneControl,
java.util.Set<java.lang.String> boneList)
Updates a bone position and rotation. |
static void |
setUserControl(Bone bone,
boolean bool)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RagdollUtils
public RagdollUtils()
setJointLimit
public static void setJointLimit(SixDofJoint joint,
float maxX,
float minX,
float maxY,
float minY,
float maxZ,
float minZ)
buildPointMap
public static java.util.Map<java.lang.Integer,java.util.List<java.lang.Float>> buildPointMap(Spatial model)
makeShapeFromPointMap
public static HullCollisionShape makeShapeFromPointMap(java.util.Map<java.lang.Integer,java.util.List<java.lang.Float>> pointsMap,
java.util.List<java.lang.Integer> boneIndices,
Vector3f initialScale,
Vector3f initialPosition)
- Create a hull collision shape from linked vertices to this bone.
Vertices have to be previoulsly gathered in a map using buildPointMap method
- Parameters:
link
- model
-
- Returns:
getBoneIndices
public static java.util.List<java.lang.Integer> getBoneIndices(Bone bone,
Skeleton skeleton,
java.util.Set<java.lang.String> boneList)
makeShapeFromVerticeWeights
public static HullCollisionShape makeShapeFromVerticeWeights(Spatial model,
java.util.List<java.lang.Integer> boneIndices,
Vector3f initialScale,
Vector3f initialPosition,
float weightThreshold)
- Create a hull collision shape from linked vertices to this bone.
- Parameters:
link
- model
-
- Returns:
setTransform
public static void setTransform(Bone bone,
Vector3f pos,
Quaternion rot,
boolean restoreBoneControl,
java.util.Set<java.lang.String> boneList)
- Updates a bone position and rotation.
if the child bones are not in the bone list this means, they are not associated with a physic shape.
So they have to be updated
- Parameters:
bone
- the bonepos
- the positionrot
- the rotation
setUserControl
public static void setUserControl(Bone bone,
boolean bool)