Package edu.cmu.cs.stage3.math

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


            //if( indexText.length()>0 ) {
            //    referencesToBeResolved.addElement( new ObjectArrayPropertyReference( (edu.cmu.cs.stage3.alice.core.property.ObjectArrayProperty)this, criterion, Integer.parseInt( indexText ), 0 ) );
            //} else {
            //    referencesToBeResolved.addElement( new PropertyReference( this, criterion ) );
            //}
            referencesToBeResolved.addElement( new PropertyReference( this, criterion ) );
        } catch( ClassNotFoundException cnfe ) {
            throw new RuntimeException( typeName );
        }
    }
View Full Code Here


    private java.awt.Font m_font = null;
    private int m_curvature = 0;

    public Text3D() {
        super( new IndexedTriangleArray() );
        //charCache = new java.util.Hastable();
        updateGeometry();
    }
View Full Code Here

        if (pg.getVertices()!=null) {
            Vertex3d[] verts = new Vertex3d[pg.getVertices().length];
            double height = getSceneGraphGeometry().getBoundingBox().getHeight()/(double)lineCount;
            for (int i=0; i<verts.length; i++) {
                    verts[i] = new Vertex3d((Point3d)pg.getVertices()[i].position.clone(), pg.getVertices()[i].normal, null, null, new TexCoord2f());
                    verts[i].scale(1.0/height,1.0/height,1);
            }
            ((IndexedTriangleArray)this.getSceneGraphGeometry()).setVertices(verts);
        }
    }
View Full Code Here

        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

      //BEGIN CLK
      model.vehicle.set(vehicle);
      if (edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.isExperimentalSceneSupportEnabled()) {
        //save current camera position
        if (camera != null) {
          Matrix44 savedCameraPosition = camera.getTransformation(world);
 
          // create default camera position - pretty hackish
          edu.cmu.cs.stage3.math.Matrix33 camOrient = edu.cmu.cs.stage3.math.Matrix33.IDENTITY;
          camOrient.setForwardUpGuide(new javax.vecmath.Vector3d(0.50029057264328,0.0,-0.865857720375061), new javax.vecmath.Vector3d(0,1,0));
          Matrix44 defaultCameraPosition = Matrix44.IDENTITY;
          defaultCameraPosition.setAxes(camOrient);
          defaultCameraPosition.setPosition(new javax.vecmath.Vector3d(-4.262701051336885,1.600000023841858,7.384681409266034));
          camera.setTransformationRightNow(defaultCameraPosition, world);
 
          // get offset of model from default camera position
          Matrix44 modelTransFromCamera = model.getTransformation(camera);
 
          // move camera back to it's real position
          camera.setTransformationRightNow(savedCameraPosition, world);
          camera.standUpRightNow();
 
          // reset the yoffset so that it's always on the ground
          double yOffset = defaultCameraPosition.getPosition().y - (savedCameraPosition.getPosition().y%256.0) + modelTransFromCamera.getPosition().y;
          modelTransFromCamera.m31 = yOffset;
 
          // move the model to its transformation relative to the camera
          model.setTransformationRightNow(modelTransFromCamera, camera);
 
View Full Code Here

      onPropertyChange( BACKGROUND_PROPERTY );
    }
  }

  public Matrix44 getTransformation( ReferenceFrame asSeenBy ) {
    return new Matrix44( asSeenBy.getInverseAbsoluteTransformation() );
  }
View Full Code Here

            tmp.setOrientationRightNow(direction,new Vector3(0,0,-1));
        else
            tmp.setOrientationRightNow(direction,new Vector3(0,1,0));
        Matrix44 coordSys = tmp.getLocalTransformation();
        */
        Matrix44 coordSys = Matrix44.IDENTITY;


        javax.vecmath.Vector4d point;
    javax.vecmath.Vector4d normal;

View Full Code Here

TOP

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

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.