|
3 | 3 | #include "../../model/mesh/wire/wire_material_4d.h" |
4 | 4 | #include "wireframe_render_canvas_4d.h" |
5 | 5 |
|
6 | | -Color _get_material_edge_color(const Ref<Material4D> &p_material, const Ref<Mesh4D> &p_mesh, int p_edge_index) { |
| 6 | +Color WireframeCanvasRenderingEngine4D::_get_material_edge_color(const Ref<Material4D> &p_material, const Ref<Mesh4D> &p_mesh, int p_edge_index) { |
7 | 7 | if (p_material.is_null()) { |
8 | 8 | return Color(1.0f, 1.0f, 1.0f); |
9 | 9 | } |
@@ -46,7 +46,7 @@ void WireframeCanvasRenderingEngine4D::render_frame() { |
46 | 46 | for (int mesh_index = 0; mesh_index < mesh_instances.size(); mesh_index++) { |
47 | 47 | MeshInstance4D *mesh_inst = Object::cast_to<MeshInstance4D>(mesh_instances[mesh_index]); |
48 | 48 | ERR_CONTINUE(mesh_inst == nullptr); |
49 | | - Ref<Material4D> material = mesh_inst->get_active_material(); |
| 49 | + const Ref<Material4D> material = mesh_inst->get_active_material(); |
50 | 50 | Projection mesh_relative_basis = mesh_relative_basises[mesh_index]; |
51 | 51 | Vector4 mesh_relative_position = mesh_relative_positions[mesh_index]; |
52 | 52 | const PackedVector4Array camera_relative_vertices = Transform4D(mesh_relative_basis, mesh_relative_position).xform_many(mesh_inst->get_mesh()->get_vertices()); |
@@ -141,7 +141,7 @@ void WireframeCanvasRenderingEngine4D::render_frame() { |
141 | 141 | continue; |
142 | 142 | } |
143 | 143 | edge_colors_to_draw.push_back(edge_colors); |
144 | | - Ref<WireMaterial4D> wire_material = material; |
| 144 | + const Ref<WireMaterial4D> wire_material = material; |
145 | 145 | if (wire_material.is_valid()) { |
146 | 146 | edge_thicknesses_to_draw.push_back(wire_material->get_line_thickness() > 0.0f ? wire_material->get_line_thickness() : -1.0f); |
147 | 147 | } else { |
|
0 commit comments