Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Plane3.normal()


            public boolean isFront() {
              return true;
            }
            public void prepareShadingContext(ShadingContext context) {
              Plane3 plane = Plane3.throughPoints(vertices[vertexIndex], vertices[vertexIndex+1], vertices[vertexIndex+2]);
              Vector3 n = plane.normal();
              Vector3 v = ray.direction();
              context.setPosition(ray.pointAt(t));
              context.setNormal(v.dot(n) > 0.0 ? n.opposite() : n);
              context.setMaterial(hairMaterial != null ? hairMaterial : emitterContext.getMaterial());
              context.setModifier(emitterContext.getModifier());
View Full Code Here


             */
            double cx = (p.x() - p00.x()) / (p10.x() - p00.x());
            double cz = (p.z() - p10.z()) / (p11.z() - p10.z());

            if (cx > cz) {
              Intersection x = newIntersection(ray, t, ray.direction().dot(plane.normal()) < 0.0)
                .setBasis(Basis3.fromW(plane.normal(), Basis3.Orientation.RIGHT_HANDED))
                .setLocation(p);

              recorder.record(x);

View Full Code Here

            double cx = (p.x() - p00.x()) / (p10.x() - p00.x());
            double cz = (p.z() - p10.z()) / (p11.z() - p10.z());

            if (cx > cz) {
              Intersection x = newIntersection(ray, t, ray.direction().dot(plane.normal()) < 0.0)
                .setBasis(Basis3.fromW(plane.normal(), Basis3.Orientation.RIGHT_HANDED))
                .setLocation(p);

              recorder.record(x);

              hit = true;
View Full Code Here

             */
            double cx = (p.x() - p00.x()) / (p10.x() - p00.x());
            double cz = (p.z() - p10.z()) / (p11.z() - p10.z());

            if (cx < cz) {
              Intersection x = newIntersection(ray, t, ray.direction().dot(plane.normal()) < 0.0)
                .setBasis(Basis3.fromW(plane.normal(), Basis3.Orientation.RIGHT_HANDED))
                .setLocation(p);

              recorder.record(x);

View Full Code Here

            double cx = (p.x() - p00.x()) / (p10.x() - p00.x());
            double cz = (p.z() - p10.z()) / (p11.z() - p10.z());

            if (cx < cz) {
              Intersection x = newIntersection(ray, t, ray.direction().dot(plane.normal()) < 0.0)
                .setBasis(Basis3.fromW(plane.normal(), Basis3.Orientation.RIGHT_HANDED))
                .setLocation(p);

              recorder.record(x);

              hit = true;
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.