   Design Question
  Hello!I have a question about my design. I'm writing a little C++ (DirectX10) Engine and currently I am writing on the math classes (Matrix, Spline etc). I put all math classes in the namespace "math" and obviously I thought this namespace has no dependecies. But now I want to be able to render some of my math classes; for example I want to be able to render my Spline or my Line. Of course I could add a D3DX10Device* member and a method render() to all my math classes that a renderable, but this would make my pure math classes dependent from render details. I dont like this idea because actually my math classes should just be concerned about the math and not some Device/DirectX/Render Details.How could I solve this problem? Thanks!   
  Introduce a helper class such as LineRenderer, which is a friend class of Math::Line. Pass the LineRenderer a Math::Line on construction. Place the rendering logic in the LineRenderer implementation, using the information it pulls out of the Math::Line to actually do the rendering.   