Package javax.media.j3d

Examples of javax.media.j3d.Transform3D.transform()


            si.setMaximumScale(1.25f);
            fscale.addChild(co);
            Transform3D sftrans = new Transform3D();
            sftrans.rotZ(facing(sdir-dir));
            Vector3d sv = new Vector3d(0.0, 5*BoardModel.HEX_DIAMETER/12, 0.0);
            sftrans.transform(sv);
            sftrans.setTranslation(sv);
            TransformGroup sfacing = new TransformGroup(sftrans);
            sfacing.addChild(fscale);
            sfacing.addChild(si);
            facing.addChild(sfacing);
View Full Code Here


        Transform3D rot = new Transform3D();
        mtg.getTransformGroup(1).getTransform(rot);
        Vector3d transv = new Vector3d();
        trans.get(transv);
        Point3d transp = new Point3d(transv);
        rot.transform(transp);
        old.transform(transp);
        old.setTranslation(new Vector3d(transp));
        mtg.getTransformGroup(0).setTransform(old);
        mtg.getTransformGroup(2).setTransform(new Transform3D());
    }
View Full Code Here

        }

        Transform3D v2i = new Transform3D();
        getVworldToImagePlate(v2i);
        Point3d p = BoardModel.getHexLocation(c, level);
        v2i.transform(p);
        Point2d pixel = new Point2d();
        getPixelLocationFromImagePlate(p, pixel);
        ((PopupMenu)popup).show(this, (int) pixel.x, (int) pixel.y);
    }
View Full Code Here

        default:
            centerOffset = -BoardModel.HEX_DIAMETER/3;
            trans.rotZ(-Math.PI/3*step.getFacing());
        }
        Vector3d translate = new Vector3d(0.0, centerOffset, -BoardModel.HEX_HEIGHT-count*.1);
        trans.transform(translate);
        trans.setTranslation(translate);
       
        if (label == null) {
            StringBuffer costStringBuf = new StringBuffer();
            costStringBuf.append(step.getMpUsed());
View Full Code Here

           
            penProjectionOntoDesk.set(penPosition);
            penProjectionOntoDesk.sub(penProjectionOntoDeskNormal);
           
            penProjectionInDeskFrame.set(penProjectionOntoDesk);
            transformFromWorldToDesk.transform(penProjectionInDeskFrame);
           
            // Only apply a force on the pen, not the desk. Doesn't follow Newton's third law, but the force is probably pretty small anyway.
            // Maybe later we'll track the other force point, and perhaps even check if energy is conserved...
           
            if (!penIsAboveDesk.getBooleanValue())
View Full Code Here

        Point3f p0 = layout.transform(v);
//        Transform3D vwip = new Transform3D();
//        canvas.getVworldToImagePlate(vwip);
//        System.err.println("vwip=\n"+vwip);
//        t3d.mul(lvw);
        t3d.transform(p1);
//        scale.transform(p1);
        System.err.println("change location for vertex "+v+", transformGroup "+tg+" from "+p0+" to "+p1);
//        p1.set(p1.getX()*2,p1.getY()*2,p1.getZ()*2);
//        layout.setLocation(v, p1);
       
View Full Code Here

/* 182 */     double distancePtToDelta = ptToDelta.length();
/* 183 */     distancePtToDelta *= this.tolerance;
/*     */
/* 185 */     this.canvas.getImagePlateToVworld(motion);
/*     */
/* 192 */     motion.transform(eyePosn);
/* 193 */     this.start = new Point3d(eyePosn);
/* 194 */     motion.transform(mousePosn);
/* 195 */     mouseVec.sub(mousePosn, eyePosn);
/* 196 */     mouseVec.normalize();
/*     */
View Full Code Here

/*     */
/* 185 */     this.canvas.getImagePlateToVworld(motion);
/*     */
/* 192 */     motion.transform(eyePosn);
/* 193 */     this.start = new Point3d(eyePosn);
/* 194 */     motion.transform(mousePosn);
/* 195 */     mouseVec.sub(mousePosn, eyePosn);
/* 196 */     mouseVec.normalize();
/*     */
/* 204 */     if (this.tolerance == 0.0D) {
/* 205 */       if ((this.pickShape != null) && ((this.pickShape instanceof PickRay)))
View Full Code Here

/* 240 */       eyePosn.y = mousePosn.y;
/*     */     }
/*     */
/* 243 */     this.canvas.getImagePlateToVworld(motion);
/*     */
/* 250 */     motion.transform(eyePosn);
/* 251 */     motion.transform(mousePosn);
/* 252 */     mouseVec.sub(mousePosn, eyePosn);
/* 253 */     mouseVec.normalize();
/*     */
/* 261 */     this.pickRay.set(eyePosn, mouseVec);
View Full Code Here

/*     */     }
/*     */
/* 243 */     this.canvas.getImagePlateToVworld(motion);
/*     */
/* 250 */     motion.transform(eyePosn);
/* 251 */     motion.transform(mousePosn);
/* 252 */     mouseVec.sub(mousePosn, eyePosn);
/* 253 */     mouseVec.normalize();
/*     */
/* 261 */     this.pickRay.set(eyePosn, mouseVec);
/*     */
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.