Tabnine Logo
Skeleton.resetAndUpdate
Code IndexAdd Tabnine to your IDE (free)

How to use
resetAndUpdate
method
in
com.jme3.animation.Skeleton

Best Java code snippets using com.jme3.animation.Skeleton.resetAndUpdate (Showing top 14 results out of 315)

origin: jMonkeyEngine/jmonkeyengine

final void reset() {
  if (skeleton != null) {
    skeleton.resetAndUpdate();
  }
}
origin: jMonkeyEngine/jmonkeyengine

public void reset(boolean rewind){
  if(rewind){
    setTime(0);        
    if(control.getSkeleton()!=null){
      control.getSkeleton().resetAndUpdate();
    }else{
      TempVars vars = TempVars.get();
      update(0, vars);
      vars.release();    
    }
  }
  animation = null;
  notified = false;
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Generate physics shapes and bone links for the skeleton.
 *
 * @param model the spatial with the model's SkeletonControl (not null)
 */
protected void scanSpatial(Spatial model) {
  AnimControl animControl = model.getControl(AnimControl.class);
  Map<Integer, List<Float>> pointsMap = null;
  if (weightThreshold == -1.0f) {
    pointsMap = RagdollUtils.buildPointMap(model);
  }
  skeleton = animControl.getSkeleton();
  skeleton.resetAndUpdate();
  for (int i = 0; i < skeleton.getRoots().length; i++) {
    Bone childBone = skeleton.getRoots()[i];
    if (childBone.getParent() == null) {
      logger.log(Level.FINE, "Found root bone in skeleton {0}", skeleton);
      boneRecursion(model, childBone, baseRigidBody, 1, pointsMap);
    }
  }
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Generate physics shapes and bone links for the skeleton.
 *
 * @param model the spatial with the model's SkeletonControl (not null)
 */
protected void scanSpatial(Spatial model) {
  AnimControl animControl = model.getControl(AnimControl.class);
  Map<Integer, List<Float>> pointsMap = null;
  if (weightThreshold == -1.0f) {
    pointsMap = RagdollUtils.buildPointMap(model);
  }
  skeleton = animControl.getSkeleton();
  skeleton.resetAndUpdate();
  for (int i = 0; i < skeleton.getRoots().length; i++) {
    Bone childBone = skeleton.getRoots()[i];
    if (childBone.getParent() == null) {
      logger.log(Level.FINE, "Found root bone in skeleton {0}", skeleton);
      boneRecursion(model, childBone, baseRigidBody, 1, pointsMap);
    }
  }
}
origin: info.projectkyoto/mms-engine

final void reset() {
  if (skeleton != null) {
    skeleton.resetAndUpdate();
  }
}
origin: org.jmonkeyengine/jme3-core

final void reset() {
  if (skeleton != null) {
    skeleton.resetAndUpdate();
  }
}
origin: org.jmonkeyengine/jme3-bullet

protected void scanSpatial(Spatial model) {
  AnimControl animControl = model.getControl(AnimControl.class);
  Map<Integer, List<Float>> pointsMap = null;
  if (weightThreshold == -1.0f) {
    pointsMap = RagdollUtils.buildPointMap(model);
  }
  skeleton = animControl.getSkeleton();
  skeleton.resetAndUpdate();
  for (int i = 0; i < skeleton.getRoots().length; i++) {
    Bone childBone = skeleton.getRoots()[i];
    if (childBone.getParent() == null) {
      logger.log(Level.FINE, "Found root bone in skeleton {0}", skeleton);
      boneRecursion(model, childBone, baseRigidBody, 1, pointsMap);
    }
  }
}
origin: info.projectkyoto/mms-engine

public void reset(boolean rewind){
  if(rewind){
    setTime(0);        
    if(control.getSkeleton()!=null){
      control.getSkeleton().resetAndUpdate();
    }else{
      TempVars vars = TempVars.get();
      update(0, vars);
      vars.release();    
    }
  }
  animation = null;
  // System.out.println("Setting notified false");
  notified = false;
}
origin: org.jmonkeyengine/jme3-core

public void reset(boolean rewind){
  if(rewind){
    setTime(0);        
    if(control.getSkeleton()!=null){
      control.getSkeleton().resetAndUpdate();
    }else{
      TempVars vars = TempVars.get();
      update(0, vars);
      vars.release();    
    }
  }
  animation = null;
  notified = false;
}
origin: org.jmonkeyengine/jme3-jbullet

/**
 * Generate physics shapes and bone links for the skeleton.
 *
 * @param model the spatial with the model's SkeletonControl (not null)
 */
protected void scanSpatial(Spatial model) {
  AnimControl animControl = model.getControl(AnimControl.class);
  Map<Integer, List<Float>> pointsMap = null;
  if (weightThreshold == -1.0f) {
    pointsMap = RagdollUtils.buildPointMap(model);
  }
  skeleton = animControl.getSkeleton();
  skeleton.resetAndUpdate();
  for (int i = 0; i < skeleton.getRoots().length; i++) {
    Bone childBone = skeleton.getRoots()[i];
    if (childBone.getParent() == null) {
      logger.log(Level.FINE, "Found root bone in skeleton {0}", skeleton);
      boneRecursion(model, childBone, baseRigidBody, 1, pointsMap);
    }
  }
}
origin: info.projectkyoto/mms-engine

private void scanSpatial(Spatial model) {
  AnimControl animControl = model.getControl(AnimControl.class);
  Map<Integer, List<Float>> pointsMap = null;
  if (weightThreshold == -1.0f) {
    pointsMap = RagdollUtils.buildPointMap(model);
  }
  skeleton = animControl.getSkeleton();
  skeleton.resetAndUpdate();
  for (int i = 0; i < skeleton.getRoots().length; i++) {
    Bone childBone = skeleton.getRoots()[i];
    if (childBone.getParent() == null) {
      logger.log(Level.INFO, "Found root bone in skeleton {0}", skeleton);
      baseRigidBody = new PhysicsRigidBody(new BoxCollisionShape(Vector3f.UNIT_XYZ.mult(0.1f)), 1);
      baseRigidBody.setKinematic(mode == Mode.Kinetmatic);
      boneRecursion(model, childBone, baseRigidBody, 1, pointsMap);
    }
  }
}
origin: info.projectkyoto/mms-engine

protected void resetBonePos() {
  for (int i = 0; i < pmdNode.getSkeleton().getBoneCount(); i++) {
    Bone bone = pmdNode.getSkeleton().getBone(i);
    bone.setUserControl(false);
  }
  pmdNode.getSkeleton().resetAndUpdate();
  for (int i = 0; i < pmdNode.getSkeleton().getBoneCount(); i++) {
    Bone bone = pmdNode.getSkeleton().getBone(i);
    bone.setUserControl(true);
  }
}
origin: org.jmonkeyengine/jme3-plugins

private void computeBindTransforms(BoneWrapper boneWrapper, Skeleton skeleton) {
  Bone bone = boneWrapper.bone;
  tmpTransforms.fromTransformMatrix(boneWrapper.modelBindMatrix);
  if (bone.getParent() != null) {
    //root bone, model transforms are the same as the local transforms
    //but for child bones we need to combine it with the parents inverse model transforms.
    tmpMat.setTranslation(bone.getParent().getModelSpacePosition());
    tmpMat.setRotationQuaternion(bone.getParent().getModelSpaceRotation());
    tmpMat.setScale(bone.getParent().getModelSpaceScale());
    tmpMat.invertLocal();
    tmpTransforms2.fromTransformMatrix(tmpMat);
    tmpTransforms.combineWithParent(tmpTransforms2);
  }
  bone.setBindTransforms(tmpTransforms.getTranslation(), tmpTransforms.getRotation(), tmpTransforms.getScale());
  //resets the local transforms to bind transforms for all bones.
  //then computes the model transforms from local transforms for each bone.
  skeleton.resetAndUpdate();
  skeleton.setBindingPose();
  for (Integer childIndex : boneWrapper.children) {
    BoneWrapper child = fetchFromCache("nodes", childIndex, BoneWrapper.class);
    computeBindTransforms(child, skeleton);
  }
}
origin: org.jmonkeyengine/jme3-dae

skeleton.setBindingPose();
skeleton.updateWorldVectors();
skeleton.resetAndUpdate();
skeleton.computeSkinningMatrices();
com.jme3.animationSkeletonresetAndUpdate

Javadoc

Reset the skeleton to bind pose and updates the bones

Popular methods of Skeleton

  • getBoneIndex
    returns the bone index of the bone that has the given name
  • getBone
    returns the bone with the given name
  • getRoots
    returns the array of all root bones of this skeleton
  • <init>
    Creates a skeleton from a bone list. The root bones are found automatically. Note that using this c
  • getBoneCount
    returns the number of bones of this skeleton
  • updateWorldVectors
    Updates world transforms for all bones in this skeleton. Typically called after setting local animat
  • computeSkinningMatrices
    Compute the skining matrices for each bone of the skeleton that would be used to transform vertices
  • reset
    Reset the skeleton to bind pose.
  • setBindingPose
    Saves the current skeleton state as its binding pose.
  • createSkinningMatrices
  • recreateBoneStructure
  • recreateBoneStructure

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Table (org.hibernate.mapping)
    A relational table
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now