MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / debugDrawCircle

Function debugDrawCircle

CryAnimation/DebugUtils.cpp:38–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void 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
59void debugDrawLines (const Vec3& a, const Vec3& b, const Vec3& d, int nSubdiv, const float* pColor = NULL)
60{

Callers 1

debugDrawSphereFunction · 0.85

Calls 4

g_GetIRendererFunction · 0.85
cosFunction · 0.50
sinFunction · 0.50
Draw3dPrimMethod · 0.45

Tested by

no test coverage detected