Package net.br410bury.graphics

Examples of net.br410bury.graphics.GraphicsPoint


  /**
   * Creates an empty bone with the origin for the starting point.
   */
  public Bone()
  {
    this.start = new GraphicsPoint();
    this.ends = new ArrayList<Bone>();
  }
View Full Code Here


   *
   * @return The maximum x, y, and z location in this skeleton.
   */
  public GraphicsPoint getMaxes()
  {
    GraphicsPoint maxes = new GraphicsPoint(start.get());
   
    for(Bone child : ends) maxes = child.getMaxes(maxes);
   
    return maxes;
  }
View Full Code Here

   *
   * @return The minimum x, y, and z location in this skeleton.
   */
  public GraphicsPoint getMins()
  {
    GraphicsPoint mins = new GraphicsPoint(start.get());
   
    for(Bone child : ends) mins = child.getMins(mins);
   
    return mins;
  }
View Full Code Here

        case ZTran: result[2] += motarr[start + i]; break;
      }
    }
    result[3] = 1;
   
    return new GraphicsPoint(result);
  }
View Full Code Here

 
 
 
  protected GraphicsPoint calcEye(GraphicsPoint min, GraphicsPoint max, GraphicsPoint center)
  {
    GraphicsPoint eye = new GraphicsPoint();
    double x = Math.pow(max.getX() - min.getX(), 2);
    double y = Math.pow(max.getY() - min.getY(), 2);
    double azi = azimuth * Math.sqrt(x + y);
     
    eye.setX(azi + center.getX());
    eye.setY(elevation * center.getY());
    eye.setZ(azi + center.getZ());
   
    return eye;
  }
View Full Code Here

  }
 
  protected void drawMotion()
  {
    Bone boneframe;
    GraphicsPoint min;
    GraphicsPoint max;
    GraphicsPoint eye;
    GraphicsPoint center;
    GraphicsPoint up;
   
    if(file.isRead())
    {
      file.segment(frame);
     
      boneframe = file.getSkeleton(frame);
      min = boneframe.getMins();
      max = boneframe.getMaxes();
     
      center = GraphicsPoint.center(min, max);
      eye = calcEye(min, max, center);
      up = new GraphicsPoint(0, 1, 0);
     
      setSyncSpeed();
      clear();
     
      setPerspective(0, 100);
View Full Code Here

    }
  }
 
  protected void drawBone(Bone bone)
  {
    GraphicsPoint start;
    GraphicsPoint end;
     
    start = bone.getStart();
    for(Bone child : bone.getEnds())
    {
      end = child.getStart();
View Full Code Here

TOP

Related Classes of net.br410bury.graphics.GraphicsPoint

Copyright © 2018 www.massapicom. 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.