Examples of Quat


Examples of cofh.repack.codechicken.lib.vec.Quat

    verts[8] = new Vector3(phi, 0, -1);
    verts[9] = new Vector3(phi, 0, 1);
    verts[10] = new Vector3(-phi, 0, 1);
    verts[11] = new Vector3(-phi, 0, -1);

    Quat quat = Quat.aroundAxis(0, 0, 1, Math.atan(1 / phi));
    for (Vector3 vec : verts) {
      quat.rotate(vec);
    }

    icosahedron4 = CCModel.newModel(4, 60);
    icosahedron7 = CCModel.newModel(7, 80);
View Full Code Here

Examples of com.math.Quat

    super(new Vector(1,1,2), pos, rot,int2color(0));
 

  public void rotate(float dx,float dy,float dz){

    Quat tmpQ = new Quat();


    tmpQ.fromEulerAngles(dx,dy,dz);

    //    System.out.println(tmpQ + " --- " + r);

    r.multiply(tmpQ);
View Full Code Here

Examples of com.math.Quat

    rotate(0,0,0);
  }

  public void reset(){
    p = new Vector(0,0,-500);
    r = new Quat();
    center.set(0,0,0);
    rad = 500f;
    xy = 0; xz = 0;
    cm = CamMode.stand;
    e.set(0,0,-3000);
View Full Code Here

Examples of com.math.Quat

 
  public static void initSim(){
    shapes = new ArrayList<Shape> ();
    sim_shapes = new ArrayList<Shape> ();
    distroy_shapes = new ArrayList<Shape> ();
    cam  = new Camera(new Vector(0,0,-500),new Quat());
  }
View Full Code Here

Examples of com.math.Quat

    x = new int[points_num];
    y = new int[points_num];

    this.p = new Vector(pos);
    this.r = new Quat(rot);

    target = new Vector(0,0,0);

    shape = buildMeSomeFish(type,this);
    SHAPE_NUM = shape.length;
View Full Code Here

Examples of com.math.Quat

    return fish;
  }

  public static Fish fromXML(Element e, Camera cam){
    Vector p = Vector.parseVector(e.getAttribute("position"));
    Quat r = Quat.parseQuat(e.getAttribute("rotation"));
    Vector d = Vector.parseVector(e.getAttribute("dimmention"));
    String type = e.getAttribute("type");

    Fish f = new Fish(cam,d,p,r,type);
View Full Code Here

Examples of com.math.Quat

 
  public Aqu(Camera cam,Vector dim) {
    this.cam = cam;
    d = new Vector(dim);
    p = new Vector();
    r = new Quat();
   
    shapeS = new ArrayList<>();
    boxes = new Box[1];
    shape = new Shape[12];
View Full Code Here

Examples of com.math.Quat

//  static final float MAX_LIN_VEL = 2f;
//  static final float MIN_LIN_VEL = MAX_LIN_VEL/5f;
 
  public State(){
    p = new Vector();
    r = new Quat();
    linVel = new Vector();
    angVel = new Vector();
    target = new Vector();
    build();
  }
View Full Code Here

Examples of com.math.Quat

  }
 
  public State(Fish f) {
    p = new Vector(0,0,f.d.z);
    p.transformation(f.r, f.p);
    r = new Quat(f.r);
   
    linVel = new Vector();
    angVel = new Vector();
    target = new Vector(f.target);
    fi = f;
View Full Code Here

Examples of com.math.Quat

    resetTries();
    p_p = new Vector[PREDICT_NUM];
    p_r = new Quat[PREDICT_NUM]
    for(int i=0;i<PREDICT_NUM;i++){
      p_p[i] = new Vector();
      p_r[i] = new Quat();
    }
   
    for(int i=0;i<PREDICT_NUM;i++)
      tmpa[i] = new Vector();
  }
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.