Ignore:
Timestamp:
09/02/08 00:56:48 (16 years ago)
Author:
mattausch
Message:

shadowing partly working

File:
1 edited

Legend:

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

    r2891 r2893  
    8686void Camera::GetModelViewMatrix(Matrix4x4 &mat) 
    8787{ 
    88         glGetFloatv(GL_MODELVIEW_MATRIX, (float *)mat.x); 
     88        mat = mViewOrientation; 
     89 
     90        Vector3 pos = mViewOrientation * -mPosition; 
     91         
     92        mat.x[3][0] = pos.x; 
     93        mat.x[3][1] = pos.y; 
     94        mat.x[3][2] = pos.z; 
     95 
     96        //glGetFloatv(GL_MODELVIEW_MATRIX, (float *)mat.x); 
    8997} 
    9098 
     
    154162void Camera::SetupCameraView() 
    155163{ 
    156         Matrix4x4 tview = mViewOrientation; 
    157  
    158         Vector3 pos = -mPosition; 
    159         pos = tview * pos; 
    160  
    161164        Matrix4x4 viewOrientation = mViewOrientation; 
     165 
     166        Vector3 pos = mViewOrientation * -mPosition; 
    162167 
    163168        viewOrientation.x[3][0] = pos.x; 
Note: See TracChangeset for help on using the changeset viewer.