MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / OnRender

Method OnRender

ogsr_engine/xrGame/script_zone.cpp:85–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84#ifdef DEBUG
85void CScriptZone::OnRender()
86{
87 if (!bDebug)
88 return;
89 DRender->OnFrameEnd();
90 Fvector l_half;
91 l_half.set(.5f, .5f, .5f);
92 Fmatrix l_ball, l_box;
93 xr_vector<CCF_Shape::shape_def>& l_shapes = ((CCF_Shape*)CFORM())->Shapes();
94 xr_vector<CCF_Shape::shape_def>::iterator l_pShape;
95
96 for (l_pShape = l_shapes.begin(); l_shapes.end() != l_pShape; ++l_pShape)
97 {
98 switch (l_pShape->type)
99 {
100 case 0: {
101 Fsphere& l_sphere = l_pShape->data.sphere;
102 l_ball.scale(l_sphere.R, l_sphere.R, l_sphere.R);
103 Fvector l_p;
104 XFORM().transform(l_p, l_sphere.P);
105 l_ball.translate_add(l_p);
106 Level().debug_renderer().draw_ellipse(l_ball, D3DCOLOR_XRGB(0, 255, 255));
107 }
108 break;
109 case 1: {
110 l_box.mul(XFORM(), l_pShape->data.box);
111 Level().debug_renderer().draw_obb(l_box, l_half, D3DCOLOR_XRGB(0, 255, 255));
112 }
113 break;
114 }
115 }
116}
117#endif
118
119bool CScriptZone::active_contact(u16 id) const

Callers

nothing calls this directly

Calls 12

CFORMFunction · 0.85
XFORMFunction · 0.85
translate_addMethod · 0.80
draw_ellipseMethod · 0.80
draw_obbMethod · 0.80
OnFrameEndMethod · 0.45
setMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
scaleMethod · 0.45
transformMethod · 0.45
mulMethod · 0.45

Tested by

no test coverage detected