Package edu.cmu.cs.stage3.math

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


            disable();
    }
  }

  public void internalSchedule( double time, double dt ) {
    KeyMapping keyMapping = (KeyMapping)keyMap.getElementValue();
    int actions;
    if( keyMapping != null ) {
      actions = keyMapping.getActions();
    } else {
      actions = 0;
    }
        // accelerate if keys are pressed
        // decelerate otherwise
View Full Code Here


  public long m_clickTimeThreshold = 300;
  public int m_clickDistanceThresholdSquared = 100;

  public void manufactureAnyNecessaryDetails() {
    if( details.size()==2 ) {
      Question what = new PickQuestion();
      what.name.set( "what" );
      what.setParent( this );
      details.add( what );
    }
    for( int i=0; i<details.size(); i++ ) {
      Object o = details.get( i );
      if( o instanceof PickQuestion ) {
View Full Code Here

                        } else if( criterionType.isAssignableFrom( edu.cmu.cs.stage3.alice.core.criterion.ExternalReferenceKeyedCriterion.class ) ) {
                            criterion = new edu.cmu.cs.stage3.alice.core.criterion.ExternalReferenceKeyedCriterion( text );
                        } else {
                            criterion = (edu.cmu.cs.stage3.util.Criterion)getValueOf( criterionType, text );
                        }
                        referencesToBeResolved.addElement( new ObjectArrayPropertyReference( this, criterion, i, precedingReferenceTotal++ ) );
                    } catch( ClassNotFoundException cnfe ) {
                        throw new RuntimeException( criterionTypeName );
                    }
                } else {
                    String itemTypeName = itemNode.getAttribute( "class" );
View Full Code Here

            //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

TOP

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

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.