git-svn-id: svn://db.shs.com.ru/libs@60 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -150,7 +150,7 @@ void GLObjectBase::buildTransform() {
|
||||
if (p != 0)
|
||||
itransform_ = p->itransform_;
|
||||
if (raw_matrix) {
|
||||
itransform_.translate(is_root ? dcam_pos_ : pos_);
|
||||
itransform_.translate(pos_);
|
||||
itransform_ *= mat_;
|
||||
//qDebug() << "raw_matrix" << itransform_;
|
||||
} else
|
||||
@@ -162,7 +162,7 @@ void GLObjectBase::buildTransform() {
|
||||
|
||||
|
||||
void GLObjectBase::localTransform(QMatrix4x4 & m) {
|
||||
m.translate(is_root ? dcam_pos_ : pos_);
|
||||
m.translate(pos_);
|
||||
m.rotate(angles_.z(), 0., 0., 1.);
|
||||
m.rotate(angles_.y(), 0., 1., 0.);
|
||||
m.rotate(angles_.x(), 1., 0., 0.);
|
||||
@@ -176,12 +176,6 @@ void GLObjectBase::checkPass() {
|
||||
}
|
||||
|
||||
|
||||
void GLObjectBase::preparePos(const Camera & cam) {
|
||||
dcam_pos_ = pos_ - cam.aim();
|
||||
buildTransform();
|
||||
}
|
||||
|
||||
|
||||
QMatrix4x4 GLObjectBase::worldMatrix(QMatrix4x4 parent) const {
|
||||
QMatrix4x4 mat;
|
||||
mat.translate(pos_);
|
||||
@@ -217,7 +211,7 @@ void GLObjectBase::render(int * id, QMap<int, GLObjectBase * > * ids, int sh_id_
|
||||
|
||||
|
||||
|
||||
Light::Light(): GLObjectBase(), shadow_map(1, true, GL_R16F) {
|
||||
Light::Light(): GLObjectBase(), shadow_map(0, true, GL_R16F) {
|
||||
type_ = GLObjectBase::Light;
|
||||
light_type = Omni;
|
||||
intensity = 1.;
|
||||
@@ -228,7 +222,7 @@ Light::Light(): GLObjectBase(), shadow_map(1, true, GL_R16F) {
|
||||
}
|
||||
|
||||
|
||||
Light::Light(const QVector3D & p, const QColor & c, GLdouble i): GLObjectBase(), shadow_map(1, true, GL_R16F) {
|
||||
Light::Light(const QVector3D & p, const QColor & c, GLdouble i): GLObjectBase(), shadow_map(0, true, GL_R16F) {
|
||||
type_ = GLObjectBase::Light;
|
||||
light_type = Omni;
|
||||
pos_ = p;
|
||||
|
||||
Reference in New Issue
Block a user