Browse Source

DebugTools: support for InvertedSphere in ShapeRenderer.

Currently drawn in the same way as Sphere.
pull/23/head
Vladimír Vondruš 13 years ago
parent
commit
c5280d9a0f
  1. 2
      src/DebugTools/ShapeRenderer.cpp
  2. 2
      src/DebugTools/ShapeRenderer.h

2
src/DebugTools/ShapeRenderer.cpp

@ -56,6 +56,7 @@ template<> void createDebugMesh(ShapeRenderer<2>& renderer, const Shapes::Implem
renderer.renderers.push_back(new Implementation::PointRenderer<2>(shape));
break;
case Shapes::AbstractShape2D::Type::Sphere:
case Shapes::AbstractShape2D::Type::InvertedSphere: /* Isn't publicly subclassed, but shouldn't matter */
renderer.renderers.push_back(new Implementation::SphereRenderer<2>(shape));
break;
case Shapes::AbstractShape2D::Type::Capsule:
@ -90,6 +91,7 @@ template<> void createDebugMesh(ShapeRenderer<3>& renderer, const Shapes::Implem
renderer.renderers.push_back(new Implementation::PointRenderer<3>(shape));
break;
case Shapes::AbstractShape3D::Type::Sphere:
case Shapes::AbstractShape3D::Type::InvertedSphere: /* Isn't publicly subclassed, but shouldn't matter */
renderer.renderers.push_back(new Implementation::SphereRenderer<3>(shape));
break;
case Shapes::AbstractShape3D::Type::Capsule:

2
src/DebugTools/ShapeRenderer.h

@ -134,6 +134,8 @@ new DebugTools::ShapeRenderer2D(shape, "red", debugDrawables);
@endcode
@see @ref ShapeRenderer2D, @ref ShapeRenderer3D, @ref ShapeRendererOptions
@todo Different drawing style for inverted shapes? (marking the "inside" somehow)
*/
template<UnsignedInt dimensions> class MAGNUM_DEBUGTOOLS_EXPORT ShapeRenderer: public SceneGraph::Drawable<dimensions, Float> {
friend void Implementation::createDebugMesh<>(ShapeRenderer<dimensions>&, const Shapes::Implementation::AbstractShape<dimensions>&);

Loading…
Cancel
Save