Examples of Transform


Examples of aspect.util.Transform

            };
        }

        @Override
        public void update() {
            Transform transform = new Transform();

            float x = PlayerControl.getMouseDX() * 0.02f;
            float y = PlayerControl.getMouseDY() * 0.02f;

            PlayerControl.centerMouse();

            angles.pitch += y;
            angles.yaw += x;

            angles.pitch = Math.max(angles.pitch, 0);
            angles.pitch = Math.min(angles.pitch, Trig.EIGHTH_CIRCLE);

            transform.position = turret.transform.position;
            transform.setEulerAngles(angles);
            //transform.up = m.transformVector(transform.up);

            turret.transform.forward = turret.transform.forward.rotateTowards(transform.forward, 4 * Time.deltaTime());
            turret.transform.up = Vector3.yAxis();

            Transform t = Frigate.this.transform.concat(transform);

            t.position = t.position.plus(t.forward().times(0.3f));
            t.position = t.position.plus(t.up().times(0.15f));
            view.set(t);
           
            shooty.update();
        }
View Full Code Here

Examples of at.bestsolution.efxclipse.formats.fxg.fxg.Transform

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetTransform(Transform newTransform, NotificationChain msgs) {
    Transform oldTransform = transform;
    transform = newTransform;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FxgPackage.ELLIPSE__TRANSFORM, oldTransform, newTransform);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

Examples of chunmap.model.coord.Transform

    double minx = x - d;
    double miny = y - d;
    double maxx = x + d;
    double maxy = y + d;
    Envelope env = new Envelope(minx, miny, maxx, maxy);
    Transform trans = map.getView().screen2World();
    Envelope env2 = env.transform(trans);
    select(env2);
  }
View Full Code Here

Examples of com.anotherbigidea.flash.movie.Transform

        Frame frame = movie.appendFrame();
       
        com.anotherbigidea.flash.movie.Image.Lossless img = ImageUtil.createLosslessImage( picture_, SWFConstants.BITMAP_FORMAT_32_BIT, true );
        Shape shape = ImageUtil.shapeForImage( img, (double)picture_.getWidth(), (double)picture_.getHeight() );
       
        Transform transe = new Transform();
        transe.setScaleX(scale_);
        transe.setScaleY(scale_);
        transe.setTranslateX( position_.getX() );
        transe.setTranslateY( position_.getY() );
       
        Instance instance = frame.placeSymbol( shape, transe, null );
       
        // sleep in flash...
        for (int count = 0; count < 5; count++ )
View Full Code Here

Examples of com.ardor3d.math.Transform

    }

    @Override
    public void drawTo(final BufferedImage image, final ReadOnlyTransform localTransform, final int clipmapLevel) {
        // apply the two transforms together and then use result to scale/translate and rotate image
        final Transform trans = new Transform();
        localTransform.multiply(getTransform(), trans);

        // grab a copy of the graphics so we don't bleed state to next image
        final Graphics2D g2d = (Graphics2D) image.getGraphics().create();

        // apply hints
        for (final RenderingHints.Key key : hints.keySet()) {
            g2d.setRenderingHint(key, hints.get(key));
        }

        // set transform
        g2d.translate(trans.getTranslation().getX(), trans.getTranslation().getY());
        g2d.rotate(trans.getMatrix().toAngles(null)[2]); // rotation about z
        g2d.scale(trans.getScale().getX(), trans.getScale().getY());

        // set composite
        if (_compositeOverride != null) {
            g2d.setComposite(_compositeOverride);
        }
View Full Code Here

Examples of com.bulletphysics.linearmath.Transform

        ConstraintSolver solver = new SequentialImpulseConstraintSolver();
        dynamicsWorld = new DiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration);
        dynamicsWorld.setGravity(new Vector3f(0, -10 /* m/s2 */, 0));
        CollisionShape groundShape = new StaticPlaneShape(new Vector3f(0, 1, 0), 0.25f /* m */);
        CollisionShape ballShape = new SphereShape(3.0f);
        MotionState groundMotionState = new DefaultMotionState(new Transform(new Matrix4f(
                new Quat4f(0, 0, 0, 1),
                new Vector3f(0, 0, 0), 1.0f)));
        RigidBodyConstructionInfo groundBodyConstructionInfo = new RigidBodyConstructionInfo(0, groundMotionState, groundShape, new Vector3f(0, 0, 0));
        groundBodyConstructionInfo.restitution = 0.25f;
        RigidBody groundRigidBody = new RigidBody(groundBodyConstructionInfo);
View Full Code Here

Examples of com.bulletphysics.linearmath.Transform

    private static void render() {
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        for (RigidBody body : balls) {
            glPushMatrix();
            Vector3f ballPosition = body.getWorldTransform(new Transform()).origin;
            glTranslatef(ballPosition.x, ballPosition.y, ballPosition.z);
            sphere.setDrawStyle(GLU.GLU_SILHOUETTE);
            if (body.equals(controlBall)) {
                glColor4f(0, 1, 0, 1);
            } else {
View Full Code Here

Examples of com.bulletphysics.linearmath.Transform

        glLoadIdentity();
        camera.applyTranslations();
        dynamicsWorld.stepSimulation(1.0f / 60.0f);
        Set<RigidBody> ballsToBeRemoved = new HashSet<RigidBody>();
        for (RigidBody body : balls) {
            Vector3f position = body.getMotionState().getWorldTransform(new Transform()).origin;
            if (!body.equals(controlBall) && (position.x < -50 || position.x > 50 || position.z < -50 || position.z > 50)) {
                ballsToBeRemoved.add(body);
            }
        }
        for (RigidBody body : ballsToBeRemoved) {
            balls.remove(body);
            dynamicsWorld.removeRigidBody(body);
        }
        if (applyForce) {
            Transform controlBallTransform = new Transform();
            controlBall.getMotionState().getWorldTransform(controlBallTransform);
            Vector3f controlBallLocation = controlBallTransform.origin;
            Vector3f cameraPosition = new Vector3f(camera.x(), camera.y(), camera.z());
            Vector3f force = new Vector3f();
            force.sub(cameraPosition, controlBallLocation);
            controlBall.activate(true);
            controlBall.applyCentralForce(force);
        }
        if (createNewShape) {
            CollisionShape shape = new SphereShape(3.0f);
            DefaultMotionState motionState = new DefaultMotionState(new Transform(new Matrix4f(new Quat4f(0, 0, 0, 1), new Vector3f(camera.x(), 35, camera.z()), 1)));
            Vector3f inertia = new Vector3f();
            shape.calculateLocalInertia(1.0f, inertia);
            RigidBodyConstructionInfo constructionInfo = new RigidBodyConstructionInfo(1.0f, motionState, shape, inertia);
            constructionInfo.restitution = 0.75f;
            RigidBody body = new RigidBody(constructionInfo);
View Full Code Here

Examples of com.bulletphysics.linearmath.Transform

        PhysicsSphere(Vector4f colour, Vector3f position, DynamicsWorld physicsWorld, float mass, float radius, int slices, int stacks) {
            this.colour = colour;
            this.radius = radius;
            this.slices = slices;
            this.stacks = stacks;
            MotionState motion = new DefaultMotionState(new Transform(new Matrix4f(new Quat4f(0, 0, 0, 1), position, 1.0f)));
            CollisionShape shape = new SphereShape(radius);
            this.physicsBody = new RigidBody(mass, motion, shape);
            this.physicsWorld = physicsWorld;
            this.physicsWorld.addRigidBody(physicsBody);
            this.renderSphere = new org.lwjgl.util.glu.Sphere();
View Full Code Here

Examples of com.bulletphysics.linearmath.Transform

        CollisionShape groundShape = new StaticPlaneShape(new Vector3f(0, 1, 0), 0.25f);
        // Initialise 'ballShape' to a sphere with a radius of 3 metres.
        CollisionShape ballShape = new SphereShape(3);
        // Initialise 'groundMotionState' to a motion state that simply assigns the origin [0, 0, 0] as the origin of
        // the ground.
        MotionState groundMotionState = new DefaultMotionState(new Transform(new Matrix4f(new Quat4f(0, 0, 0, 1), new Vector3f(0, 0, 0), 1.0f)));
        // Initialise 'groundBodyConstructionInfo' to a value that contains the mass, the motion state, the shape, and the inertia (= resistance to change).
        RigidBodyConstructionInfo groundBodyConstructionInfo = new RigidBodyConstructionInfo(0, groundMotionState, groundShape, new Vector3f(0, 0, 0));
        // Set the restitution, also known as the bounciness or spring, to 0.25. The restitution may range from 0.0
        // not bouncy) to 1.0 (extremely bouncy).
        groundBodyConstructionInfo.restitution = 0.25f;
        // Initialise 'groundRigidBody', the final variable representing the ground, to a rigid body with the previously
        // assigned construction information.
        RigidBody groundRigidBody = new RigidBody(groundBodyConstructionInfo);
        // Add the ground to the JBullet world.
        dynamicsWorld.addRigidBody(groundRigidBody);
        // Initialise 'ballMotion' to a motion state that assigns a specified location to the ball.
        MotionState ballMotion = new DefaultMotionState(new Transform(DEFAULT_BALL_TRANSFORM));
        // Calculate the ball's inertia (resistance to movement) using its mass (2.5 kilograms).
        Vector3f ballInertia = new Vector3f(0, 0, 0);
        ballShape.calculateLocalInertia(2.5f, ballInertia);
        // Composes the ball's construction info of its mass, its motion state, its shape, and its inertia.
        RigidBodyConstructionInfo ballConstructionInfo = new RigidBodyConstructionInfo(2.5f, ballMotion, ballShape, ballInertia);
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.