git-svn-id: svn://db.shs.com.ru/libs@707 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
Camera::Camera() {
|
||||
type_ = glCamera;
|
||||
fov_ = 60.;
|
||||
roll_ = 0.;
|
||||
//setRotationX(90.f);
|
||||
depth_start = 0.1f;
|
||||
mirror_x = mirror_y = false;
|
||||
@@ -75,6 +76,7 @@ ObjectBase * Camera::clone(bool withChildren) {
|
||||
o->trans = trans;
|
||||
o->aim_dist = aim_dist;
|
||||
o->fov_ = fov_;
|
||||
o->roll_ = roll_;
|
||||
o->mirror_x = mirror_x;
|
||||
o->mirror_y = mirror_y;
|
||||
o->depth_start = depth_start;
|
||||
@@ -87,10 +89,10 @@ QMatrix4x4 Camera::viewMatrix() const {
|
||||
QMatrix4x4 ret;
|
||||
//qDebug() << pos() << aim();
|
||||
ret.translate(0., 0., -distance());
|
||||
ret.rotate(-roll_, 0., 0., 1.);
|
||||
ret *= trans.matrixRotateScale().inverted();
|
||||
//ret.rotate(angles_.y(), 1., 0., 0.);
|
||||
//ret.rotate(angles_.x(), 0., 1., 0.);
|
||||
//ret.rotate(angles_.z(), 0., 0., 1.);
|
||||
//pm.translate(-aim_);
|
||||
if (parent_) {
|
||||
QMatrix4x4 pmat = parent_->worldTransform();
|
||||
|
||||
Reference in New Issue
Block a user