Package aspect.util

Examples of aspect.util.Vector3


        return f;
    }
   
    public static void transformVectors(float[] vectors, Matrix4x4 matrix, int start, int num) {
        for (int i = start; i < start + num; i+= 3) {
            Vector3 vec = new Vector3(vectors[i], vectors[i + 1], vectors[i + 2]);
            Vector3 transformed = matrix.transformVector(vec);
            copyVector3(transformed, vectors, i, 1);
        }
    }
View Full Code Here


        }
    }
   
    public static void transformPoints(float[] vectors, Matrix4x4 matrix, int start, int num) {
        for (int i = start; i < start + num; i+= 3) {
            Vector3 vec = new Vector3(vectors[i], vectors[i + 1], vectors[i + 2]);
            Vector3 transformed = matrix.transformPoint(vec);
            copyVector3(transformed, vectors, i, 1);
        }
    }
View Full Code Here

            copyVector3(transformed, vectors, i, 1);
        }
    }

    public static Vector3 normal(Vector3 v1, Vector3 v2, Vector3 v3) {
        Vector3 u = Vector3.subtract(v2, v1);
        Vector3 v = Vector3.subtract(v3, v1);
        Vector3 n = Vector3.cross(u, v).normalize();

        return n;
    }
View Full Code Here

                min.z = max.z;
                max.z = t;
            }
           
            pos = position();
            Vector3 size = size();
            model = box(material, size.x, size.y, size.z, size.x, size.y, size.z);
            valid = true;
        }
    }
View Full Code Here

        m = new Material(loadTexture(new File("textures/tex.jpg")));
        m.setTextureFilter(Material.Filter.MIPMAP, Material.Filter.LINEAR);

        shader = ShaderProgram.COLOR;

        cube = new EditorBlock(shader, m, new Vector3(-5, -4, -10), new Vector3(5, -2, -5));
        world.add(cube);
        cube.name = "Cube 1";

        updateList();
        addMouseListener(this);
View Full Code Here

TOP

Related Classes of aspect.util.Vector3

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.