Package graphics.common

Examples of graphics.common.Vector


                     p2.getY() - p1.getY(),
                     p2.getZ() - p1.getZ() );
    }

    public static Vector crossProduct( Vector v1, Vector v2 ) {
        Vector ret = get();
        ret.setXPart( v1.getYPart() * v2.getZPart() - v1.getZPart() * v2.getYPart() );
        ret.setYPart( v1.getZPart() * v2.getXPart() - v1.getXPart() * v2.getZPart() );
        ret.setZPart( v1.getXPart() * v2.getYPart() - v1.getYPart() * v2.getXPart() );
        return ret;
    }
View Full Code Here


        ret.setZPart( v1.getXPart() * v2.getYPart() - v1.getYPart() * v2.getXPart() );
        return ret;
    }

    public static Vector normalize( Vector v ) {
        Vector ret = Vectors.get( v );
        ret.scalarDivide( v.getLen() );
        return ret;
    }
View Full Code Here

TOP

Related Classes of graphics.common.Vector

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.