Examples of scale()


Examples of eas.math.geometry.Vector2D.scale()

        if (env.getVisualizationAngleCenterPoint() != null) {
            pos.rotate(env.getVisualizationAngleCenterPoint(), env.getVisualizationAngleRAD());
        }

        pos.scale(Vector2D.NULL_VECTOR, new Vector2D(scale, scale));
        Vector2D midTranslation = new Vector2D(
                env.getScreenWidth() / 2,
                env.getScreenHeight() / 2);
        midTranslation.sub(b.centerPoint());
        pos.translate(midTranslation);
View Full Code Here

Examples of eas.simulation.spatial.sim2D.physicalSimulation.physicsEngine.net.phys2d.math.Vector2f.scale()

    float torq = (float) Math.asin(MathUtil.cross(ndp, V))
        * compressConstant / invDT;
    float P = torq / length;
    Vector2f n = new Vector2f(ndp.y, -ndp.x);
    Vector2f impulse = new Vector2f(n);
    impulse.scale(P);
    if (!body1.isStatic()) {
      Vector2f accum1 = new Vector2f(impulse);
      accum1.scale(body1.getInvMass());
      body1.adjustVelocity(accum1);
      body1.adjustAngularVelocity((body1.getInvI() * MathUtil.cross(dp,
 
View Full Code Here

Examples of edu.cmu.cs.stage3.math.Matrix44.scale()

  public void scale( javax.vecmath.Vector3d axis, ReferenceFrame asSeenBy ) {
    if( asSeenBy==null ) {
      asSeenBy = this;
    }
    Matrix44 m = getTransformation( asSeenBy );
    m.scale( axis );
    setTransformation( m, asSeenBy );
  }
  public void transform( javax.vecmath.Matrix4d trans, ReferenceFrame asSeenBy ) {
    if( asSeenBy==null ) {
      asSeenBy = this;
View Full Code Here

Examples of edu.stanford.nlp.neural.SimpleTensor.scale()

  }

  SimpleTensor randomBinaryTensor() {
    double range = 1.0 / (4.0 * numHid);
    SimpleTensor tensor = SimpleTensor.random(numHid * 2, numHid * 2, numHid, -range, range, rand);
    return tensor.scale(op.trainOptions.scalingForInit);
  }

  SimpleMatrix randomTransformMatrix() {
    SimpleMatrix binary = new SimpleMatrix(numHid, numHid * 2 + 1);
    // bias column values are initialized zero
View Full Code Here

Examples of edu.uci.ics.jung.visualization.control.CrossoverScalingControl.scale()

        final ScalingControl scaler = new CrossoverScalingControl();
        jBtnZoomPlus.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                VisualizationViewer vv = _parent.getMap().getVV(_parent.getNameSelectedTab());
                if (scaler != null && vv != null)
                    scaler.scale(vv, 1.1f, vv.getCenter());
            }
        });

        jBtnZoomMinus.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

Examples of edu.uci.ics.jung.visualization.control.ScalingControl.scale()

        final ScalingControl scaler = new CrossoverScalingControl();
        jBtnZoomPlus.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                VisualizationViewer vv = _parent.getMap().getVV(_parent.getNameSelectedTab());
                if (scaler != null && vv != null)
                    scaler.scale(vv, 1.1f, vv.getCenter());
            }
        });

        jBtnZoomMinus.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

Examples of edu.uci.ics.jung.visualization.transform.MutableTransformer.scale()

   */
    public void scale(VisualizationServer vv, float amount, Point2D from) {
       
        Point2D ivtfrom = vv.getRenderContext().getMultiLayerTransformer().inverseTransform(Layer.VIEW, from);
        MutableTransformer modelTransformer = vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.LAYOUT);
        modelTransformer.scale(amount, amount, ivtfrom);
        vv.repaint();
    }
}
View Full Code Here

Examples of es.iiia.shapegrammar.shape.ShapeModel.scale()

            / (bounds.getWidth() > bounds.getHeight() ? bounds
                .getWidth() : bounds.getHeight());
        // resize graphics
        ShapeModel newShape = shape.clone();
        newShape.moveToCenter();
        newShape.scale(resize, resize);
        // now move it to centre of the icon
        newShape.translate(iconSize / 2, iconSize  / 2);
               
       
        for (LineModel line : newShape.getLines()) {
View Full Code Here

Examples of fcagnin.jglsdk.glm.Vec3.scale()

        float cosTheta = (float) Math.cos( theta );
        float cosPhi = (float) Math.cos( phi );
        float sinPhi = (float) Math.sin( phi );

        Vec3 dirToCamera = new Vec3( sinTheta * cosPhi, cosTheta, sinTheta * sinPhi );
        return (dirToCamera.scale( sphereCamRelPos.z )).add( camTarget );
    }


    private Mat4 calcLookAtMatrix(Vec3 cameraPt, Vec3 lookPt, Vec3 upPt) {
        Vec3 lookDir = Glm.normalize( Vec3.sub( lookPt, cameraPt ) );
View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.scale()

        glUseProgram( theProgram );

        {
            currMatrix.push();
            currMatrix.scale( 100.0f, 1.0f, 100.0f );

            glUniform4f( baseColorUnif, 0.2f, 0.5f, 0.2f, 1.0f );
            glUniformMatrix4( modelToCameraMatrixUnif, false, currMatrix.top().fillAndFlipBuffer( mat4Buffer ) );

            plane.render();
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.