| 36 | } |
| 37 | |
| 38 | void debugDrawCircle (const Matrix34& m34, float fRadius, int nAxis, const float* pColor = NULL) |
| 39 | { |
| 40 | IRenderer* pRenderer = g_GetIRenderer(); |
| 41 | Vec3 ptPrev (0,0,0); |
| 42 | ptPrev[(nAxis+1)%3] = fRadius; |
| 43 | ptPrev = m34*ptPrev; |
| 44 | |
| 45 | const int nSteps = 16; |
| 46 | |
| 47 | for (int i = 1; i <= nSteps; ++i) |
| 48 | { |
| 49 | Vec3 ptNext(0,0,0); |
| 50 | ptNext[(nAxis+1)%3] = float(cos (2*gPi*i/nSteps) * fRadius); |
| 51 | ptNext[(nAxis+2)%3] = float(sin (2*gPi*i/nSteps) * fRadius); |
| 52 | ptNext = m34*ptNext; |
| 53 | |
| 54 | pRenderer->Draw3dPrim (ptPrev, ptNext, DPRIM_LINE, pColor); |
| 55 | ptPrev = ptNext; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | void debugDrawLines (const Vec3& a, const Vec3& b, const Vec3& d, int nSubdiv, const float* pColor = NULL) |
| 60 | { |
no test coverage detected