Vector3f Scene::center()
{
  GeometryVisitor visitor;
  m_rootNode.accept(visitor);

  // For an empty scene ensure that a minimum radius of 4.0 (gives space).
  m_center = visitor.center();
  m_radius = std::max(4.0f, visitor.radius()) + 2.0f;

  return m_center;
}
Beispiel #2
0
void Solid::accept( GeometryVisitor & visitor )
{
	return visitor.visit(*this);
}
Beispiel #3
0
void MultiPoint::accept( GeometryVisitor& visitor )
{
    return visitor.visit( *this );
}
Beispiel #4
0
void LineString::accept( GeometryVisitor& visitor )
{
    return visitor.visit( *this );
}
Beispiel #5
0
void PolyhedralSurface::accept( GeometryVisitor& visitor )
{
    return visitor.visit( *this );
}
Beispiel #6
0
void Polygon::accept( GeometryVisitor& visitor )
{
    return visitor.visit( *this );
}