Package eas.math.geometry

Examples of eas.math.geometry.Vector3D


    double facX = 1.1;
    double facY = 1.1;
    double facZ = 1.1;
    int id = 1;
   
    env.addAgent(new RocketAgent(0, env, params, new Vector3D(0, 0, (maxZ * facZ + 1) + (facZ + 1) + 3)));
   
    for (int i = 0; i < maxX; i++) {
        for (int j = 0; j < maxY; j++) {
            for (int k = 0; k < maxZ; k++) {
                env.addAgent(new PassiveAgent(id++, env, params, new Vector3D(i * facX, j * facY, (maxZ - k + 1) * facZ)));
            }
        }
    }
   
//    float[] xyz = new float[] {0,-6,6};
View Full Code Here


        envSizeTrans.div(-1);
       
        Vector2D fieldPos = new Vector2D(fieldPos2.x, fieldPos2.y);
        fieldPos.translate(envSizeTrans);
       
        Vector3D fieldPos3D = new Vector3D(
                (fieldPos.x) * 10 / (Math.abs(fieldPos.y) + 12),
                (fieldPos.y) * 10 / (Math.abs(fieldPos.x) + 12),
                0);

        return super.getPointInVisualization(fieldPos3D);
View Full Code Here

            x2d /= aspect;
        } else {
            y2d *= aspect;
        }
       
        Vector3D fieldPos = new Vector3D(x2d, y2d, 0);
        return super.getPointInVisualization(fieldPos);
    }
View Full Code Here

        super(environment);
    }

    @Override
    public Vector2D getPointInVisualization(Vector3D fieldPos2) {
        Vector3D fieldPos = new Vector3D(Math.sin(fieldPos2.y) + fieldPos2.x, Math.sin(fieldPos2.x) + fieldPos2.y, 0);
        return super.getPointInVisualization(fieldPos);
    }
View Full Code Here

     * @param fieldPos  The position in the actual field.
     *
     * @return  The position in the visualized field.
     */
    public Vector2D getPointInVisualization(final Vector2D fieldPos2) {
        return this.envVisualizerObject.getPointInVisualization(new Vector3D(fieldPos2.x, fieldPos2.y, 0));
    }
View Full Code Here

            int x2 = (int) Math.ceil(pointInMatrix.x);
            int y1 = (int) Math.floor(pointInMatrix.y);
            int y2 = (int) Math.ceil(pointInMatrix.y);
   
                if (pointInMatrix.distance(new Vector2D(x1, y1)) < pointInMatrix.distance(new Vector2D(x2, y2))) {
                    planePoint1 = new Vector3D(x1, y1, this.heightProfile.get(x1, y1));
                } else {
                    planePoint1 = new Vector3D(x2, y2, this.heightProfile.get(x2, y2));
                }
                planePoint2 = new Vector3D(x2, y1, this.heightProfile.get(x2, y1));
                planePoint3 = new Vector3D(x1, y2, this.heightProfile.get(x1, y2));
           
            Plane2D plane = new Plane2D(planePoint1, planePoint2, planePoint3);
           
            Vector3D normalVector = plane.getNormalizedZPositiveNormalVector();
           
            Vector2D gradient = new Vector2D(normalVector.x, normalVector.y);
           
            return gradient;
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of eas.math.geometry.Vector3D

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.