Vector3.inl

Go to the documentation of this file.
00001 /**<!-------------------------------------------------------------------->
00002    @file   Vector3.inl
00003    @author Travis Fischer (fisch0920@gmail.com)
00004    @date   Fall 2008
00005    
00006    @brief
00007       Standard specialized implementation of a 3-element vector
00008    
00009    @note this file is not meant to be #included directly
00010    @see Vector.h for more details
00011    <!-------------------------------------------------------------------->**/
00012 
00013 #ifndef VECTOR3_INL_
00014 #define VECTOR3_INL_
00015 
00016 inline Vector3 convertHemisphere(const Vector3 &w, const Vector3 &normal) {
00017    Vector3 U, V, N = normal;
00018    N.getOrthonormalBasis(U, V);
00019    
00020    return (U * w[0] + N * w[1] + V * w[2]);
00021    /*const Vector3 &NL  = Vector3(0, 1, 0); // local normal
00022    const real_t angle = acos(NL.dot(N));
00023    
00024    const Vector3 &u   = NL.cross(N);
00025    
00026    if (!u.isUnit())
00027       return w;
00028    
00029    const Vector3 &wo  = getRotMat(Point3(), u, angle) * w;
00030    ASSERT(wo.dot(N) > -EPSILON);
00031    
00032    return wo;*/
00033 }
00034 
00035 #endif // VECTOR3_INL_
00036 

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6