MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / Draw

Method Draw

Source/Objects/decalobject.cpp:86–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void DecalObject::Draw() {
87 if (g_debug_runtime_disable_decal_object_draw) {
88 return;
89 }
90
91 // Add fading line in the direction of the decal projector
92 DebugDraw::Instance()->AddLine(
93 GetTransform() * vec3(0.0f, 0.5f, 0.0f),
94 GetTransform() * vec3(0.0f, -0.5f, 0.0f),
95 vec4(0.0f, 0.0f, 0.0f, 1.0f),
96 vec4(0.0f, 0.0f, 0.0f, 0.0f),
97 _delete_on_draw);
98 // Add cross on the side from which the decal is projected
99 DebugDraw::Instance()->AddLine(
100 GetTransform() * vec3(-0.5f, 0.5f, -0.5f),
101 GetTransform() * vec3(0.5f, 0.5f, 0.5f),
102 vec4(0.0f, 0.0f, 0.0f, 1.0f),
103 vec4(0.0f, 0.0f, 0.0f, 1.0f),
104 _delete_on_draw);
105 DebugDraw::Instance()->AddLine(
106 GetTransform() * vec3(-0.5f, 0.5f, 0.5f),
107 GetTransform() * vec3(0.5f, 0.5f, -0.5f),
108 vec4(0.0f, 0.0f, 0.0f, 1.0f),
109 vec4(0.0f, 0.0f, 0.0f, 1.0f),
110 _delete_on_draw);
111}
112
113void DecalObject::ReceiveObjectMessageVAList(OBJECT_MSG::Type type, va_list args) {
114 switch (type) {

Callers

nothing calls this directly

Calls 3

vec3Class · 0.50
vec4Class · 0.50
AddLineMethod · 0.45

Tested by

no test coverage detected