mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
refactored light-resizing
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@30 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
93060cb634
commit
e79765eb15
2 changed files with 7 additions and 4 deletions
|
@ -234,6 +234,12 @@ public:
|
|||
|
||||
return AABB(vector3_mid(min, max), vector3_scaled(vector3_subtracted(max, min), 0.5));
|
||||
}
|
||||
AABB evaluateResize(const Vector3& translation, const Matrix4& rotation) const
|
||||
{
|
||||
AABB aabb(evaluateResize(translation_to_local(translation, rotation)));
|
||||
aabb.origin = m_bounds.origin + translation_from_local(aabb.origin - m_bounds.origin, rotation);
|
||||
return aabb;
|
||||
}
|
||||
Matrix4 evaluateTransform(const Vector3& translation) const
|
||||
{
|
||||
AABB aabb(evaluateResize(translation));
|
||||
|
|
|
@ -1686,10 +1686,7 @@ public:
|
|||
//globalOutputStream() << getTranslation() << "\n";
|
||||
|
||||
m_dragPlanes.m_bounds = m_contained.aabb();
|
||||
AABB aabb(m_dragPlanes.evaluateResize(translation_to_local(getTranslation(), rotation())));
|
||||
aabb.origin = m_contained.aabb().origin + translation_from_local(aabb.origin - m_contained.aabb().origin, rotation());
|
||||
|
||||
m_contained.setLightRadius(aabb);
|
||||
m_contained.setLightRadius(m_dragPlanes.evaluateResize(getTranslation(), rotation()));
|
||||
}
|
||||
}
|
||||
void applyTransform()
|
||||
|
|
Loading…
Reference in a new issue