Examples of lookAt()


Examples of com.ardor3d.math.Matrix3.lookAt()

        SkeletalDebugger.bone.setWorldTranslation(stPnt.add(endPnt, store).divideLocal(2.0));
        Vector3.releaseTempInstance(store);

        // Orient bone to point along axis formed by start and end points.
        final Matrix3 orient = Matrix3.fetchTempInstance();
        orient.lookAt(endPnt.subtractLocal(stPnt).normalizeLocal(), Vector3.UNIT_Y);
        final Quaternion q = new Quaternion().fromRotationMatrix(orient);
        q.normalizeLocal();
        SkeletalDebugger.bone.setWorldRotation(q);

        // Offset with skin transform
View Full Code Here

Examples of com.ardor3d.math.Matrix3.lookAt()

                sphere.setTranslation(intersectionPoint);

                final Vector3 intersectionNormal = pickResults.getPickData(0).getIntersectionRecord()
                        .getIntersectionNormal(0);
                final Matrix3 rotation = new Matrix3();
                rotation.lookAt(intersectionNormal, Vector3.UNIT_Z);
                arrow.setRotation(rotation);
                arrow.setTranslation(intersectionPoint);
            }
        }
    }
View Full Code Here

Examples of com.ardor3d.math.Matrix3.lookAt()

                sphere.setTranslation(intersectionPoint);

                final Vector3 intersectionNormal = pickResults.getPickData(0).getIntersectionRecord()
                        .getIntersectionNormal(0);
                final Matrix3 rotation = new Matrix3();
                rotation.lookAt(intersectionNormal, Vector3.UNIT_Z);
                arrow.setRotation(rotation);
                arrow.setTranslation(intersectionPoint);
            }
        }
    }
View Full Code Here

Examples of com.ardor3d.math.Matrix3.lookAt()

            } else if (type == TransformElementType.Lookat) {
                final Vector3 pos = new Vector3(array[0], array[1], array[2]);
                final Vector3 target = new Vector3(array[3], array[4], array[5]);
                final Vector3 up = new Vector3(array[6], array[7], array[8]);
                final Matrix3 rot = new Matrix3();
                rot.lookAt(target.subtractLocal(pos), up);
                workingMat.set(rot);
                workingMat.setColumn(3, new Vector4(array[0], array[1], array[2], 1.0));
                finalMat.multiplyLocal(workingMat);
            } else {
                if (logger.isLoggable(Level.WARNING)) {
View Full Code Here

Examples of com.ardor3d.math.Matrix3.lookAt()

            } else if ("lookat".equals(transform.getName())) {
                final Vector3 pos = new Vector3(array[0], array[1], array[2]);
                final Vector3 target = new Vector3(array[3], array[4], array[5]);
                final Vector3 up = new Vector3(array[6], array[7], array[8]);
                final Matrix3 rot = new Matrix3();
                rot.lookAt(target.subtractLocal(pos), up);
                workingMat.set(rot);
                workingMat.setColumn(3, new Vector4(array[0], array[1], array[2], 1));
                finalMat.multiplyLocal(workingMat);
            } else {
                logger.warning("transform not currently supported: " + transform.getClass().getCanonicalName());
View Full Code Here

Examples of com.ardor3d.math.Quaternion.lookAt()

                if (nextPoint != null) {
                    direction.set(nextPoint).subtractLocal(point);
                } else {
                    direction.set(point).subtractLocal(lastPoint);
                }
                rotation.lookAt(direction, up);

                if (shapeNormalBuffer != null && normals != null) {
                    vector.set(shapeNormalBuffer.get(), shapeNormalBuffer.get(), shapeNormalBuffer.get());
                    rotation.apply(vector, vector);
                    normals.put(vector.getXf());
View Full Code Here

Examples of com.ardor3d.renderer.Camera.lookAt()

        cam.setFrustumFar(3000);
        _canvas.getCanvasRenderer().setFrameClear(Renderer.BUFFER_NONE); // needed for motion blur
        // _canvas.setVSyncEnabled( true );
        _canvas.setTitle("Box Madness");
        cam.setLocation(new Vector3(0, 600, 800));
        cam.lookAt(new Vector3(0, 0, 0), Vector3.UNIT_Y);

        _controlHandle.setMoveSpeed(200);

        buildShader();
        buildPointSprites();
View Full Code Here

Examples of com.ardor3d.renderer.Camera.lookAt()

            }
        });
        _canvas.setVSyncEnabled(true);
        _canvas.setTitle("PointSprites");
        cam.setLocation(new Vector3(0, 30, 40));
        cam.lookAt(new Vector3(0, 0, 0), Vector3.UNIT_Y);

        buildShader();

        buildPointSprites();
    }
View Full Code Here

Examples of com.ardor3d.renderer.Camera.lookAt()

    protected void initExample() {
        _canvas.setTitle("Interact Example");

        final Camera camera = _canvas.getCanvasRenderer().getCamera();
        camera.setLocation(-20, 70, 180);
        camera.lookAt(0, 0, 0, Vector3.UNIT_Y);

        // setup our interact controls
        addControls();

        // create a floor to act as a reference.
View Full Code Here

Examples of com.ardor3d.renderer.Camera.lookAt()

            }
        });
        _canvas.setVSyncEnabled(true);
        _canvas.setTitle("WireframeGeometryShader Test");
        cam.setLocation(new Vector3(0, 0, 50));
        cam.lookAt(new Vector3(0, 0, 0), Vector3.UNIT_Y);

        buildShader();

        box = new Box("box", Vector3.ZERO, 10, 10, 10);
        box.setRenderState(_wireframeShaderState);
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.