generate a proper AABB for the hair compound shape

metadata
Wenzel Jakob 2010-08-18 23:49:04 +02:00
parent 0d76becf5d
commit 4228002df0
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,7 @@ public:
} else {
std::istringstream iss(line);
iss >> p.x >> p.y >> p.z;
m_aabb.expandBy(m_objectToWorld(p));
if (segments++ > 0)
m_segments.push_back(HairSegment(prev, p));
@ -53,6 +54,8 @@ public:
prev = p;
}
}
m_aabb.min -= Vector(m_radius, m_radius, m_radius);
m_aabb.max += Vector(m_radius, m_radius, m_radius);
Log(EDebug, "Read %i hair segments.", m_segments.size());
}