Examples of PartSet


Examples of com.l2client.model.PartSet

      //left empty by purpose
    }

    @Override
    public Animation getAnimation(String name, AnimControl control) {
      PartSet p = anims.get(name);
      Animation anim = null;
      if (p != null) {
        anim = Singleton.get().getAnimManager().getAnimation(
            p.getNext());
      }
      if(anim == null){
        //try default substitute
        if(defaultSet != null){
          AnimationProvider an = Singleton.get().getAnimManager().getAnimationProvider(defaultSet);
View Full Code Here

Examples of com.l2client.model.PartSet

    return ret;
  }

  public static HashMap<String, PartSet> getAnimations(/*PartSet top, */String animSet, String defaultSet) {
    HashMap<String, PartSet> animParts = new HashMap<String, PartSet>();
    PartSet parts = Singleton.get().getPartManager().getPart("anim");
    if(parts == null)
      return animParts;
    PartSet det = parts.getPart(animSet);
    if( det != null )
//      for(PartSet e : det.getParts()){
        animParts = Singleton.get().getAnimManager().precacheAnimations(det);
//      }
    if(defaultSet != null){
View Full Code Here

Examples of com.l2client.model.PartSet

    return animParts;
  }

  public static Skeleton getSkeleton(PartSet top) {
    //get skeleton
    PartSet det = top.getPart("skel");
    //FIXME always the 1.0 or is this deprecated?
    return Singleton.get().getSkeletonManager().getSkeleton(det.getNext(), 1.0f);
  }
View Full Code Here

Examples of com.l2client.model.PartSet

   * @param hwSkinning
   * @return
   */
  private static Node getModelInternal(Class<?> controller, String template, boolean optimized, boolean hwSkinning){

    PartSet top = getTopPart(template);
    //FIMXE error handling
    if(top == null) {
      new Exception("Failed to find temple <"+template+"> in megaset").printStackTrace();
      return new Node("NULL");
    }
View Full Code Here

Examples of com.l2client.model.PartSet

  }
 
  private void addPartSets(String row) {
    String[] token = row.split(";");

    PartSet last = getCreatePart(token[0]);
    PartSet top = last;
    for(int i = 1; i<token.length; i++){
      PartSet next =  last.getPart(token[i]);
      if(next == null)
        next = new PartSet(token[i]);

//      if(i==token.length-2)
//        last.setDetail(token[i+1]);
     
      last.setPart(next);
View Full Code Here

Examples of com.l2client.model.PartSet

    if(ROOT_ENTITY.equals(token[0]))
      entityTemplates.add(token[1]);
  }
 
  private PartSet getCreatePart(String id){
    PartSet set = sets.get(id);
    if(set == null){
      set = new PartSet(id);
    }
    return set;
  }
View Full Code Here

Examples of com.l2client.model.PartSet

   * Top of the template partset containing all sub parts
   * @param id
   * @return
   */
  public static PartSet getTopPart(String id){
    PartSet ret = Singleton.get().getPartManager().getPart("entity");
    if(ret != null)
      return ret.getPart(id);
    else return null;
  }
View Full Code Here

Examples of com.l2client.model.PartSet

   * @param top the top partset of this entity
   * @return  Hashmap of material names from this entity and the asset of the mat instance
   */
  public static HashMap<String, Asset> getMaterials(PartSet top){
    HashMap<String, Asset> materials = new HashMap<String, Asset>();
    PartSet det = top.getPart("mat");
    if(det != null){
    for( PartSet m : det.getParts()){
      String next = m.getNext();
      Asset a = new Asset(next,m.getName());
      Singleton.get().getAssetManager().loadAsset(a, false);
      materials.put(m.getName(),a);
    }
View Full Code Here

Examples of com.l2client.model.PartSet

   */
  public static HashMap<Asset,String> getMeshesWithMaterial(PartSet top){
    //get meshes (w.o. weapon sets)
    HashMap<Asset,String> meshArray = new HashMap<Asset,String>();
    //mesh
    PartSet det = top.getPart("mesh");
      for( PartSet oSet : det.getParts()){
    //mesh part
        String name = oSet.getName();
        if(name.startsWith("weapon") || name.startsWith("shield"))//skip weapon+shield model
          continue;
    //materials
View Full Code Here

Examples of com.l2client.model.PartSet

   * @param i    the nth hair style to chose
   * @return  the asset representing the desired hairstyle
   */
  public static Asset getHair(PartSet top, int i){
    Asset ret = null;
    PartSet det = top.getPart("mesh");
    if(det != null)
      det = det.getPart("hair");
    if(det != null){     
      String hair = null;
      if(i>=0){
        hair = det.get(i);
      }else{
        hair = det.getNext();
      }
      if(hair != null && !"".equals(hair)){
        ret = new Asset(hair,"hair");
        Singleton.get().getAssetManager().loadAsset(ret, false);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.