|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectcom.jme3.bullet.control.KinematicRagdollControl
public class KinematicRagdollControl
This control is still a WIP, use it at your own risk
To use this control you need a model with an AnimControl and a SkeletonControl.
This should be the case if you imported an animated model from Ogre or blender.
Note enabling/disabling the control add/removes it from the physic space
This control creates collision shapes for each bones of the skeleton when you call spatial.addControl(ragdollControl).
There are 2 modes for this control :
入れ子のクラスの概要 | |
---|---|
static class |
KinematicRagdollControl.Mode
|
コンストラクタの概要 | |
---|---|
KinematicRagdollControl()
contruct a KinematicRagdollControl |
|
KinematicRagdollControl(float weightThreshold)
|
|
KinematicRagdollControl(RagdollPreset preset)
|
|
KinematicRagdollControl(RagdollPreset preset,
float weightThreshold)
|
メソッドの概要 | |
---|---|
void |
addBoneName(java.lang.String name)
Add a bone name to this control Using this method you can specify which bones of the skeleton will be used to build the collision shapes. |
void |
addCollisionListener(RagdollCollisionListener listener)
add a |
void |
blendToKinematicMode(float blendTime)
Smoothly blend from Ragdoll mode to Kinematic mode This is useful to blend ragdoll actual position to a keyframe animation for example |
Control |
cloneForSpatial(Spatial spatial)
Creates a clone of the Control, the given Spatial is the cloned version of the spatial to which this control is attached to. |
void |
collision(PhysicsCollisionEvent event)
For internal use only callback for collisionevent |
PhysicsRigidBody |
getBoneRigidBody(java.lang.String boneName)
return the rigidBody associated to the given bone |
float |
getEventDispatchImpulseThreshold()
|
SixDofJoint |
getJoint(java.lang.String boneName)
Return the joint between the given bone and its parent. |
KinematicRagdollControl.Mode |
getMode()
retruns the mode of this control |
PhysicsSpace |
getPhysicsSpace()
returns the physic space |
float |
getTotalMass()
|
float |
getWeightThreshold()
|
boolean |
isEnabled()
returns true if the control is enabled |
void |
read(JmeImporter im)
de-serialize this control |
void |
reBuild()
rebuild the ragdoll this is useful if you applied scale on the ragdoll after it's been initialized |
void |
render(RenderManager rm,
ViewPort vp)
For internal use only specific render for the ragdoll(if debugging) |
void |
setBoneCcdMotionThreshold(java.lang.String boneName,
float value)
推奨されていません。 use getBoneRigidBody(String BoneName).setCcdMotionThreshold(float) instead |
void |
setBoneCcdSweptSphereRadius(java.lang.String boneName,
float value)
推奨されていません。 use getBoneRigidBody(String BoneName).setCcdSweptSphereRadius(float) instead |
void |
setCcdMotionThreshold(float value)
Set the CcdMotionThreshold of all the bone's rigidBodies of the ragdoll |
void |
setCcdSweptSphereRadius(float value)
Set the CcdSweptSphereRadius of all the bone's rigidBodies of the ragdoll |
void |
setEnabled(boolean enabled)
enable or disable the control note that if enabled is true and that the physic space has been set on the ragdoll, the ragdoll is added to the physic space if enabled is false the ragdoll is removed from physic space. |
void |
setEventDispatchImpulseThreshold(float eventDispatchImpulseThreshold)
|
void |
setJointLimit(java.lang.String boneName,
float maxX,
float minX,
float maxY,
float minY,
float maxZ,
float minZ)
Set the joint limits for the joint between the given bone and its parent. |
void |
setKinematicMode()
Set the control into Kinematic mode In theis mode, the collision shapes follow the movements of the skeleton, and can interact with physical environement |
void |
setPhysicsSpace(PhysicsSpace space)
set the physic space to this ragdoll |
void |
setRagdollMode()
Sets the control into Ragdoll mode The skeleton is entirely controlled by physics. |
void |
setRootMass(float rootMass)
|
void |
setSpatial(Spatial model)
|
void |
setWeightThreshold(float weightThreshold)
|
void |
update(float tpf)
Updates the control. |
void |
write(JmeExporter ex)
serialize this control |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public KinematicRagdollControl()
public KinematicRagdollControl(float weightThreshold)
public KinematicRagdollControl(RagdollPreset preset, float weightThreshold)
public KinematicRagdollControl(RagdollPreset preset)
メソッドの詳細 |
---|
public void update(float tpf)
Control
の記述:
Control
内の update
tpf
- Time per frame.public Control cloneForSpatial(Spatial spatial)
Control
の記述:
Control
内の cloneForSpatial
public void reBuild()
public void setSpatial(Spatial model)
Control
内の setSpatial
model
- the spatial to be controlled. This should not be called
from user code.public void addBoneName(java.lang.String name)
name
- public void setJointLimit(java.lang.String boneName, float maxX, float minX, float maxY, float minY, float maxZ, float minZ)
boneName
- the name of the bonemaxX
- the maximum rotation on the x axis (in radians)minX
- the minimum rotation on the x axis (in radians)maxY
- the maximum rotation on the y axis (in radians)minY
- the minimum rotation on the z axis (in radians)maxZ
- the maximum rotation on the z axis (in radians)minZ
- the minimum rotation on the z axis (in radians)public SixDofJoint getJoint(java.lang.String boneName)
boneName
- the name of the bone
public void setEnabled(boolean enabled)
PhysicsControl
内の setEnabled
Control
内の setEnabled
enabled
- public boolean isEnabled()
Control
内の isEnabled
Control.setEnabled(boolean)
public void render(RenderManager rm, ViewPort vp)
Control
内の render
rm
- vp
- public void setPhysicsSpace(PhysicsSpace space)
PhysicsControl
内の setPhysicsSpace
space
- public PhysicsSpace getPhysicsSpace()
PhysicsControl
内の getPhysicsSpace
public void write(JmeExporter ex) throws java.io.IOException
Savable
内の write
ex
-
java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
Savable
内の read
im
-
java.io.IOException
public void collision(PhysicsCollisionEvent event)
PhysicsCollisionListener
内の collision
event
- public void blendToKinematicMode(float blendTime)
blendTime
- the blending time between ragdoll to anim.public void setKinematicMode()
public void setRagdollMode()
public KinematicRagdollControl.Mode getMode()
public void addCollisionListener(RagdollCollisionListener listener)
listener
- public void setRootMass(float rootMass)
public float getTotalMass()
public float getWeightThreshold()
public void setWeightThreshold(float weightThreshold)
public float getEventDispatchImpulseThreshold()
public void setEventDispatchImpulseThreshold(float eventDispatchImpulseThreshold)
public void setCcdMotionThreshold(float value)
value
- PhysicsRigidBody.setCcdMotionThreshold(float)
public void setCcdSweptSphereRadius(float value)
value
- PhysicsRigidBody.setCcdSweptSphereRadius(float)
@Deprecated public void setBoneCcdMotionThreshold(java.lang.String boneName, float value)
value
- PhysicsRigidBody.setCcdMotionThreshold(float)
@Deprecated public void setBoneCcdSweptSphereRadius(java.lang.String boneName, float value)
value
- PhysicsRigidBody.setCcdSweptSphereRadius(float)
public PhysicsRigidBody getBoneRigidBody(java.lang.String boneName)
boneName
- the name of the bone
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |