Ignore:
Timestamp:
06/20/08 04:34:24 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp

    r2782 r2787  
    2929        mDirection.Normalize(); 
    3030 
    31         //Vector3 side = CrossProd(Vector3(0, 1, 0), mDirection); 
    32         Vector3 side = CrossProd(Vector3(0, 0, 1), mDirection); 
    33          
     31        /*Vector3 side = CrossProd(Vector3(0, 0, 1), mDirection); 
    3432        mUp = -Normalize(CrossProd(side, mDirection)); 
    35         mRight = -Normalize(CrossProd(mDirection, mUp)); 
    36  
    37         /*float k = tan(mFovy/2); 
    38         mUp *= k; 
    39         mRight *= k*mWidth/mHeight;*/ 
     33        mRight = -Normalize(CrossProd(mDirection, mUp));*/ 
     34 
     35        mUp = Vector3(0, 0, 1); 
     36        mRight = -CrossProd(mDirection, mUp); 
     37        mUp = -Normalize(CrossProd(mRight, mDirection)); 
    4038} 
    4139 
     
    179177        const float w_far = h_far * GetAspect(); 
    180178 
     179        //const Vector3 view = mDirection; 
    181180        const Vector3 view = mDirection; 
    182181        const Vector3 fc = mPosition + view * z_far;  
    183182         
    184183        const Vector3 up = mUp; 
    185  
    186184        const Vector3 right = mRight; 
    187185 
Note: See TracChangeset for help on using the changeset viewer.