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

Function debugDrawBBox

CryAnimation/DebugUtils.cpp:87–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void debugDrawBBox (const Matrix34& matModel, const CryAABB& BBox, int nSubdiv, const float* pColor)
88{
89/* IRenderer* pRenderer = g_GetIRenderer();
90 float fColor[4] = {0,1,0,1};
91 extern float g_YLine;
92 g_pIRenderer->Draw2dLabel( 1,g_YLine, 1.3f, fColor, false,"%15.10f %15.10f %15.10f %15.10f",matModel(0,0),matModel(0,1),matModel(0,2),matModel(0,3) ); g_YLine+=16.0f;
93 g_pIRenderer->Draw2dLabel( 1,g_YLine, 1.3f, fColor, false,"%15.10f %15.10f %15.10f %15.10f",matModel(1,0),matModel(1,1),matModel(1,2),matModel(1,3) ); g_YLine+=16.0f;
94 g_pIRenderer->Draw2dLabel( 1,g_YLine, 1.3f, fColor, false,"%15.10f %15.10f %15.10f %15.10f",matModel(2,0),matModel(2,1),matModel(2,2),matModel(2,3) ); g_YLine+=16.0f;
95 g_YLine+=16.0f; */
96
97 Vec3 v000 = matModel*BBox.vMin;
98 Vec3 v111 = matModel*BBox.vMax;
99 Vec3 v100 = matModel*Vec3(BBox.vMin.x, BBox.vMin.y,BBox.vMax.z);
100 Vec3 v010 = matModel*Vec3(BBox.vMin.x, BBox.vMax.y,BBox.vMin.z);
101 Vec3 v110 = matModel*Vec3(BBox.vMin.x, BBox.vMax.y,BBox.vMax.z);
102 Vec3 v001 = matModel*Vec3(BBox.vMax.x, BBox.vMin.y,BBox.vMin.z);
103 Vec3 v101 = matModel*Vec3(BBox.vMax.x, BBox.vMin.y,BBox.vMax.z);
104 Vec3 v011 = matModel*Vec3(BBox.vMax.x, BBox.vMax.y,BBox.vMin.z);
105
106 // around X
107 debugDrawLines(v000, v001, v010, nSubdiv, pColor);
108 debugDrawLines(v010, v011, v110, nSubdiv, pColor);
109 debugDrawLines(v110, v111, v100, nSubdiv, pColor);
110 debugDrawLines(v100, v101, v000, nSubdiv, pColor);
111 // around Y
112 debugDrawLines(v000, v010, v001, nSubdiv, pColor);
113 debugDrawLines(v001, v011, v101, nSubdiv, pColor);
114 debugDrawLines(v101, v111, v100, nSubdiv, pColor);
115 debugDrawLines(v100, v110, v000, nSubdiv, pColor);
116 // around Z
117 debugDrawLines(v000, v100, v001, nSubdiv, pColor);
118 debugDrawLines(v001, v101, v011, nSubdiv, pColor);
119 debugDrawLines(v011, v111, v010, nSubdiv, pColor);
120 debugDrawLines(v010, v110, v000, nSubdiv, pColor);
121 /*
122 pRenderer->Draw3dBBox(v000, v010, true);
123 pRenderer->Draw3dBBox(v000, v100, true);
124
125 pRenderer->Draw3dBBox(v111, v011, true);
126 pRenderer->Draw3dBBox(v111, v101, true);
127 pRenderer->Draw3dBBox(v111, v110, true);
128
129 pRenderer->Draw3dBBox(v011, v001, true);
130 pRenderer->Draw3dBBox(v011, v010, true);
131
132 pRenderer->Draw3dBBox(v101, v001, true);
133 pRenderer->Draw3dBBox(v101, v100, true);
134
135 pRenderer->Draw3dBBox(v110, v100, true);
136 pRenderer->Draw3dBBox(v110, v010, true);
137 */
138}
139
140
141void debugDrawSphere (const Matrix34& m34, float fRadius, const float pColor[4])

Callers 8

DrawBoundObjectsMethod · 0.85
UpdateHeatSourcesMethod · 0.85
debugDrawBonesMethod · 0.85
debugDrawBoundingBoxMethod · 0.85
GetTPVWeaponHelperMethod · 0.85
RenderShadowVolumesMethod · 0.85
DrawBoundObjectsMethod · 0.85

Calls 1

debugDrawLinesFunction · 0.85

Tested by

no test coverage detected