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

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

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

origin: jMonkeyEngine/jmonkeyengine

/**
 * Creates a skeleton from a bone list. 
 * The root bones are found automatically.
 * <p>
 * Note that using this constructor will cause the bones in the list
 * to have their bind pose recomputed based on their local transforms.
 * 
 * @param boneList The list of bones to manage by this Skeleton
 */
public Skeleton(Bone[] boneList) {
  this.boneList = boneList;
  List<Bone> rootBoneList = new ArrayList<>();
  for (int i = boneList.length - 1; i >= 0; i--) {
    Bone b = boneList[i];
    if (b.getParent() == null) {
      rootBoneList.add(b);
    }
  }
  rootBones = rootBoneList.toArray(new Bone[rootBoneList.size()]);
  createSkinningMatrices();
  for (int i = rootBones.length - 1; i >= 0; i--) {
    Bone rootBone = rootBones[i];
    rootBone.update();
    rootBone.setBindingPose();
  }
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Special-purpose copy constructor.
 * <p>
 * Shallow copies bind pose data from the source skeleton, does not
 * copy any other data.
 * 
 * @param source The source Skeleton to copy from
 */
public Skeleton(Skeleton source) {
  Bone[] sourceList = source.boneList;
  boneList = new Bone[sourceList.length];
  for (int i = 0; i < sourceList.length; i++) {
    boneList[i] = new Bone(sourceList[i]);
  }
  rootBones = new Bone[source.rootBones.length];
  for (int i = 0; i < rootBones.length; i++) {
    rootBones[i] = recreateBoneStructure(source.rootBones[i]);
  }
  createSkinningMatrices();
  for (int i = rootBones.length - 1; i >= 0; i--) {
    rootBones[i].update();
  }
}
origin: jMonkeyEngine/jmonkeyengine

@Override
public void read(JmeImporter im) throws IOException {
  InputCapsule input = im.getCapsule(this);
  Savable[] boneRootsAsSav = input.readSavableArray("rootBones", null);
  rootBones = new Bone[boneRootsAsSav.length];
  System.arraycopy(boneRootsAsSav, 0, rootBones, 0, boneRootsAsSav.length);
  Savable[] boneListAsSavable = input.readSavableArray("boneList", null);
  boneList = new Bone[boneListAsSavable.length];
  System.arraycopy(boneListAsSavable, 0, boneList, 0, boneListAsSavable.length);
  createSkinningMatrices();
  for (Bone rootBone : rootBones) {
    rootBone.reset();
    rootBone.update();
    rootBone.setBindingPose();
  }
}
origin: org.jmonkeyengine/jme3-core

/**
 * Creates a skeleton from a bone list. 
 * The root bones are found automatically.
 * <p>
 * Note that using this constructor will cause the bones in the list
 * to have their bind pose recomputed based on their local transforms.
 * 
 * @param boneList The list of bones to manage by this Skeleton
 */
public Skeleton(Bone[] boneList) {
  this.boneList = boneList;
  List<Bone> rootBoneList = new ArrayList<>();
  for (int i = boneList.length - 1; i >= 0; i--) {
    Bone b = boneList[i];
    if (b.getParent() == null) {
      rootBoneList.add(b);
    }
  }
  rootBones = rootBoneList.toArray(new Bone[rootBoneList.size()]);
  createSkinningMatrices();
  for (int i = rootBones.length - 1; i >= 0; i--) {
    Bone rootBone = rootBones[i];
    rootBone.update();
    rootBone.setBindingPose();
  }
}
origin: info.projectkyoto/mms-engine

/**
 * Creates a skeleton from a bone list. 
 * The root bones are found automatically.
 * <p>
 * Note that using this constructor will cause the bones in the list
 * to have their bind pose recomputed based on their local transforms.
 * 
 * @param boneList The list of bones to manage by this Skeleton
 */
public Skeleton(Bone[] boneList) {
  this.boneList = boneList;
  List<Bone> rootBoneList = new ArrayList<Bone>();
  for (int i = boneList.length - 1; i >= 0; i--) {
    Bone b = boneList[i];
    if (b.getParent() == null) {
      rootBoneList.add(b);
    }
  }
  rootBones = rootBoneList.toArray(new Bone[rootBoneList.size()]);
  createSkinningMatrices();
  for (int i = rootBones.length - 1; i >= 0; i--) {
    Bone rootBone = rootBones[i];
    rootBone.update();
    rootBone.setBindingPose();
  }
}
origin: info.projectkyoto/mms-engine

public void read(JmeImporter im) throws IOException {
  InputCapsule input = im.getCapsule(this);
  Savable[] boneRootsAsSav = input.readSavableArray("rootBones", null);
  rootBones = new Bone[boneRootsAsSav.length];
  System.arraycopy(boneRootsAsSav, 0, rootBones, 0, boneRootsAsSav.length);
  Savable[] boneListAsSavable = input.readSavableArray("boneList", null);
  boneList = new Bone[boneListAsSavable.length];
  System.arraycopy(boneListAsSavable, 0, boneList, 0, boneListAsSavable.length);
  createSkinningMatrices();
  for (Bone rootBone : rootBones) {
    rootBone.update();
    rootBone.setBindingPose();
  }
}
origin: org.jmonkeyengine/jme3-core

@Override
public void read(JmeImporter im) throws IOException {
  InputCapsule input = im.getCapsule(this);
  Savable[] boneRootsAsSav = input.readSavableArray("rootBones", null);
  rootBones = new Bone[boneRootsAsSav.length];
  System.arraycopy(boneRootsAsSav, 0, rootBones, 0, boneRootsAsSav.length);
  Savable[] boneListAsSavable = input.readSavableArray("boneList", null);
  boneList = new Bone[boneListAsSavable.length];
  System.arraycopy(boneListAsSavable, 0, boneList, 0, boneListAsSavable.length);
  createSkinningMatrices();
  for (Bone rootBone : rootBones) {
    rootBone.reset();
    rootBone.update();
    rootBone.setBindingPose();
  }
}
origin: org.jmonkeyengine/jme3-core

/**
 * Special-purpose copy constructor.
 * <p>
 * Shallow copies bind pose data from the source skeleton, does not
 * copy any other data.
 * 
 * @param source The source Skeleton to copy from
 */
public Skeleton(Skeleton source) {
  Bone[] sourceList = source.boneList;
  boneList = new Bone[sourceList.length];
  for (int i = 0; i < sourceList.length; i++) {
    boneList[i] = new Bone(sourceList[i]);
  }
  rootBones = new Bone[source.rootBones.length];
  for (int i = 0; i < rootBones.length; i++) {
    rootBones[i] = recreateBoneStructure(source.rootBones[i]);
  }
  createSkinningMatrices();
  for (int i = rootBones.length - 1; i >= 0; i--) {
    rootBones[i].update();
  }
}
origin: info.projectkyoto/mms-engine

/**
 * Special-purpose copy constructor.
 * <p>
 * Shallow copies bind pose data from the source skeleton, does not
 * copy any other data.
 * 
 * @param source The source Skeleton to copy from
 */
public Skeleton(Skeleton source) {
  Bone[] sourceList = source.boneList;
  boneList = new Bone[sourceList.length];
  for (int i = 0; i < sourceList.length; i++) {
    boneList[i] = new Bone(sourceList[i]);
  }
  rootBones = new Bone[source.rootBones.length];
  for (int i = 0; i < rootBones.length; i++) {
    rootBones[i] = recreateBoneStructure(source.rootBones[i]);
  }
  createSkinningMatrices();
  for (int i = rootBones.length - 1; i >= 0; i--) {
    rootBones[i].update();
  }
}
com.jme3.animationSkeletoncreateSkinningMatrices

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
  • resetAndUpdate
    Reset the skeleton to bind pose and updates the bones
  • <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.
  • recreateBoneStructure
  • recreateBoneStructure

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JCheckBox (javax.swing)
  • JFileChooser (javax.swing)
  • Top plugins for WebStorm
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