Added ViewPoint support into NodeVistor/CullStack/CullVisitor/LOD/PagedLOD etc to facilate

management of LOD settings for RTT cameras.
This commit is contained in:
Robert Osfield
2006-12-15 17:27:18 +00:00
parent d88b996df1
commit 982a4db9e2
13 changed files with 116 additions and 79 deletions

View File

@@ -52,6 +52,12 @@ float CollectOccludersVisitor::getDistanceToEyePoint(const Vec3& pos, bool withL
else return (pos-getEyeLocal()).length();
}
float CollectOccludersVisitor::getDistanceToViewPoint(const Vec3& pos, bool withLODScale) const
{
if (withLODScale) return (pos-getViewPointLocal()).length()*getLODScale();
else return (pos-getViewPointLocal()).length();
}
float CollectOccludersVisitor::getDistanceFromEyePoint(const Vec3& pos, bool withLODScale) const
{
const Matrix& matrix = *_modelviewStack.back();