Beispiel #1
0
void PolyLoop3<Real>::Scale( Real fScaleX, Real fScaleY, Real fScaleZ, const Wml::Vector3<Real> & vOrigin )
{
	size_t nCount = m_vVertices.size();
	for (unsigned int i = 0; i < nCount; ++i) {
		m_vVertices[i].X() = (m_vVertices[i].X() - vOrigin.X()) * fScaleX + vOrigin.X();
		m_vVertices[i].Y() = (m_vVertices[i].Y() - vOrigin.Y()) * fScaleY + vOrigin.Y();
		m_vVertices[i].Z() = (m_vVertices[i].Z() - vOrigin.Z()) * fScaleZ + vOrigin.Z();
	}
}
Beispiel #2
0
void rms::FitAABox( const Wml::Vector3<Real> & vCenter, Real fRadius, Wml::AxisAlignedBox3<Real> & aaBox )
{
	aaBox.Min[0] = vCenter.X() - fRadius;
	aaBox.Max[0] = vCenter.X() + fRadius;
	aaBox.Min[1] = vCenter.Y() - fRadius;
	aaBox.Max[1] = vCenter.Y() + fRadius;
	aaBox.Min[2] = vCenter.Z() - fRadius;
	aaBox.Max[2] = vCenter.Z() + fRadius;
}