Changeset 1302


Ignore:
Timestamp:
Apr 27, 2012, 8:04:48 PM (11 years ago)
Author:
sam
Message:

orbital: make better use of the camera.

Location:
trunk/orbital
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/orbital/camera.h

    r1301 r1302  
    3939
    4040        m_view_matrix = mat4::lookat(m_position, m_target, m_up);
    41         m_proj_matrix = mat4::perspective(45.0f, 640.0f, 480.0f, 0.1f, 10.0f);
     41        m_proj_matrix = mat4::perspective(45.0f, 640.0f, 480.0f, 1.f, 1000.0f);
     42        //m_proj_matrix = mat4::ortho(0, 640, 0, -480, .1f, 2000.0f);
    4243    }
    4344
  • trunk/orbital/orbital.cpp

    r1301 r1302  
    3333    m.SendCommand("t0,0,-60,fl");
    3434
    35     m.SendCommand("sc1,0,1,1,afcb10,10,10,2,rx45,rz45");
     35    m.SendCommand("sc1,0,1,1,afcb10,10,10,1,rx45,rz45");
    3636    m.SendCommand("t-20,-20,0,fl");
    3737
     
    6464
    6565    m_particlesystem = new ParticleSystem();
    66     m_camera = new Camera(vec3(0, 0, -4),
    67                           vec3(0, 1, 0),
    68                           vec3(0, 2, 0));
     66    m_camera = new Camera(vec3(0, 150, 200),
     67                          vec3(0, 0, 0),
     68                          vec3(0, 1, 0));
    6969
    7070    m_angle = 0;
     
    8484    mat4 anim = mat4::rotate(m_angle, vec3(0, 1, 0))
    8585              * mat4::rotate(m_angle * 0.25f, vec3(0, 0, 1));
    86     mat4 model = mat4::translate(vec3(0, 0, -4.5))
    87                * mat4::scale(vec3(0.025));
     86    mat4 model = mat4::translate(vec3(0));
    8887
    8988    m_modelview = m_camera->GetViewMatrix() * model * anim;
Note: See TracChangeset for help on using the changeset viewer.