git-svn-id: svn://db.shs.com.ru/libs@47 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -208,6 +208,32 @@ void GLObjectBase::render(int * id, QMap<int, GLObjectBase * > * ids, int sh_id_
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Light::Light(): GLObjectBase(), shadow_map(true, 1, GL_R16F) {
|
||||
type_ = GLObjectBase::Light;
|
||||
light_type = Omni;
|
||||
intensity = 1.;
|
||||
angle_start = angle_end = 180.;
|
||||
decay_linear = decay_quadratic = decay_start = 0.;
|
||||
decay_const = decay_end = 1.;
|
||||
direction.setZ(1.);
|
||||
}
|
||||
|
||||
|
||||
Light::Light(const QVector3D & p, const QColor & c, GLdouble i): GLObjectBase(), shadow_map(true, 1, GL_R16F) {
|
||||
type_ = GLObjectBase::Light;
|
||||
light_type = Omni;
|
||||
pos_ = p;
|
||||
intensity = i;
|
||||
/*color_ = c;*/
|
||||
angle_start = angle_end = 180.;
|
||||
decay_linear = decay_quadratic = decay_start = 0.;
|
||||
decay_const = decay_end = 1.;
|
||||
direction.setZ(1.);
|
||||
}
|
||||
|
||||
|
||||
GLObjectBase * Light::clone(bool withChildren) {
|
||||
Light * o = new Light(*this);
|
||||
//GLObjectBase::clone(withChildren);
|
||||
@@ -219,12 +245,14 @@ GLObjectBase * Light::clone(bool withChildren) {
|
||||
for (int i = 0; i < children_.size(); ++i)
|
||||
o->addChild(children_[i]->clone(withChildren));
|
||||
}
|
||||
o->light_type = light_type;
|
||||
o->direction = direction;
|
||||
o->angle_start = angle_start;
|
||||
o->angle_end = angle_end;
|
||||
o->intensity = intensity;
|
||||
o->decay_const = decay_const;
|
||||
o->decay_linear = decay_linear;
|
||||
o->decay_quadratic = decay_quadratic;
|
||||
o->light_type = light_type;
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user