Package edu.cmu.cs.stage3.math

Examples of edu.cmu.cs.stage3.math.Matrix33


        Vector3d norm2 = new Vector3d(0,0,1);

        li = triangulator.points.listIterator();
        for (int i=0; li.hasNext(); i++) {
            Point2d curPoint = (Point2d)li.next();
            triVertices[i]=new Vertex3d(new Point3d(curPoint.x,curPoint.y,-extz/2),norm1,null,null,new TexCoord2f());
            triVertices[triangulator.points.size()+i]=new Vertex3d(new Point3d(curPoint.x,curPoint.y,extz/2),norm2,null,null,new TexCoord2f());
        }

        li = triangulator.triangles.listIterator();
        for (int i=0; li.hasNext(); i++) {
            Triangle curTri = (Triangle)li.next();
View Full Code Here


        java.util.ListIterator li = points.listIterator();
        for (int i=0; li.hasNext(); i++) {
            Point2d point = (Point2d)li.next();

            Point3d pos = new Point3d(point.x,point.y,-extz/2);
            sideVertices[i*2]=new Vertex3d(pos,new Vector3d((Vector3f)normals.elementAt(i*2)),null,null,new TexCoord2f());
            sideVertices[i*2+1]=new Vertex3d(pos,new Vector3d((Vector3f)normals.elementAt(i*2+1)),null,null,new TexCoord2f());
            pos = new Point3d(point.x,point.y,extz/2);
            sideVertices[points.size()*2+i*2]=new Vertex3d(pos,new Vector3d((Vector3f)normals.elementAt(i*2)),null,null,new TexCoord2f());
            sideVertices[points.size()*2+i*2+1]=new Vertex3d(pos,new Vector3d((Vector3f)normals.elementAt(i*2+1)),null,null,new TexCoord2f());
        }

        for (int i=0; i<points.size()-1; i++) {
            //if (outside) {
                indices[i*6]=2*i;
 
View Full Code Here

    }
  }
  protected void onBoundsChange() {
    m_boundingBox = null;
    m_boundingSphere = null;
    onBoundsChange( new BoundEvent( this ) );
  }
View Full Code Here

            triVertices[triangulator.points.size()+i]=new Vertex3d(new Point3d(curPoint.x,curPoint.y,extz/2),norm2,null,null,new TexCoord2f());
        }

        li = triangulator.triangles.listIterator();
        for (int i=0; li.hasNext(); i++) {
            Triangle curTri = (Triangle)li.next();
            indices[i*3]=triangulator.indexOfPoint(curTri.vertices[2]);
            indices[i*3+1]=triangulator.indexOfPoint(curTri.vertices[1]);
            indices[i*3+2]=triangulator.indexOfPoint(curTri.vertices[0]);
            indices[triangulator.triangles.size()*3+i*3]=triangulator.points.size()+indices[i*3+2];
            indices[triangulator.triangles.size()*3+i*3+1]=triangulator.points.size()+indices[i*3+1];
 
View Full Code Here

      super.prologue(t);
      findCamera();
      getActualStepLength();
     
      m_orient0 = subject.getOrientationAsAxes(camera);
      m_orient1 = new Matrix33();
     
      if (exitDirection.getDirectionValue().equals(edu.cmu.cs.stage3.alice.core.Direction.LEFT)) {
        m_orient1.setForwardUpGuide(new javax.vecmath.Vector3d(-1,0,0), m_orient0.getRow(1));
      } else {
        m_orient1.setForwardUpGuide(new javax.vecmath.Vector3d(1,0,0), m_orient0.getRow(1));
View Full Code Here

        width = .04;
        children = new Vector();
        base_position = new javax.vecmath.Vector3d(0,0,0);
        position = new javax.vecmath.Vector3d(0,0,0);
        direction = new javax.vecmath.Vector3d(0,0,1);
        base_axis = new Matrix33();
        axis = new Matrix33();

        realMod = null;
        lastTime = Double.NEGATIVE_INFINITY;
        hasFrame = false;
        accumulated = false;
View Full Code Here

                    mod.turnRightNow(Direction.LEFT,.5);
            }

            base_axis = model.getOrientationAsAxes(mod.vehicle.getReferenceFrameValue());

            Matrix33 toCharacter = mod.getOrientationAsAxes();
            Matrix33 base_axis_inv = new Matrix33(base_axis);
            base_axis_inv.invert();

            model_transform = Matrix33.multiply(toCharacter,base_axis_inv);

            base_position = MathUtilities.subtract(mod.getPosition(),base_position);
        }
View Full Code Here

            while (tokenizer.ttype==StreamTokenizer.TT_WORD) {
                bone = (ASFBone)skel.bones_dict.get(tokenizer.sval);
                tokenizer.nextToken();

                bone.position = (Vector3)bone.base_position.clone();
                bone.axis = new Matrix33();

                ListIterator li2;
                li2 = bone.dof.listIterator();
                while (li2.hasNext()) {
                    Integer d = (Integer)li2.next();
View Full Code Here

  }
  public Matrix33 getAxes( ReferenceFrame asSeenBy ) {
    return getTransformation( asSeenBy ).getAxes();
  }
  public Vector3[] getOrientation( ReferenceFrame asSeenBy ) {
    Matrix33 axes = getAxes( asSeenBy );
    Vector3[] array = { axes.getRow( 2 ), axes.getRow( 1 ) };
    return array;
  }
View Full Code Here

  public Matrix33 getOrientationAsAxes( ReferenceFrame asSeenBy ) {
    return getTransformation( asSeenBy ).getAxes();
  }
  public Vector3[] getOrientationAsForwardAndUpGuide( ReferenceFrame asSeenBy ) {
    Matrix33 axes = getOrientationAsAxes( asSeenBy );
    Vector3[] orientation = { axes.getRow( 2 ), axes.getRow( 1 ) };
    return orientation;
  }
View Full Code Here

TOP

Related Classes of edu.cmu.cs.stage3.math.Matrix33

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.