summaryrefslogtreecommitdiff
path: root/scene/resources/importer_mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/importer_mesh.cpp')
-rw-r--r--scene/resources/importer_mesh.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/importer_mesh.cpp b/scene/resources/importer_mesh.cpp
index 7afa4c91f0..b2b90f019e 100644
--- a/scene/resources/importer_mesh.cpp
+++ b/scene/resources/importer_mesh.cpp
@@ -485,7 +485,7 @@ void ImporterMesh::generate_lods(float p_normal_merge_angle, float p_normal_spli
raycaster->intersect(rays);
LocalVector<Vector3> ray_normals;
- LocalVector<float> ray_normal_weights;
+ LocalVector<real_t> ray_normal_weights;
ray_normals.resize(new_index_count);
ray_normal_weights.resize(new_index_count);
@@ -517,10 +517,10 @@ void ImporterMesh::generate_lods(float p_normal_merge_angle, float p_normal_spli
Vector3 normal = n0 * w + n1 * u + n2 * v;
Vector2 orig_uv = ray_uvs[j];
- float orig_bary[3] = { 1.0f - orig_uv.x - orig_uv.y, orig_uv.x, orig_uv.y };
+ real_t orig_bary[3] = { 1.0f - orig_uv.x - orig_uv.y, orig_uv.x, orig_uv.y };
for (int k = 0; k < 3; k++) {
int idx = orig_tri_id * 3 + k;
- float weight = orig_bary[k];
+ real_t weight = orig_bary[k];
ray_normals[idx] += normal * weight;
ray_normal_weights[idx] += weight;
}
@@ -653,7 +653,7 @@ Ref<ArrayMesh> ImporterMesh::get_mesh(const Ref<ArrayMesh> &p_base) {
if (surfaces[i].material.is_valid()) {
mesh->surface_set_material(mesh->get_surface_count() - 1, surfaces[i].material);
}
- if (surfaces[i].name != String()) {
+ if (!surfaces[i].name.is_empty()) {
mesh->surface_set_name(mesh->get_surface_count() - 1, surfaces[i].name);
}
}
@@ -839,7 +839,7 @@ Dictionary ImporterMesh::_get_data() const {
d["material"] = surfaces[i].material;
}
- if (surfaces[i].name != String()) {
+ if (!surfaces[i].name.is_empty()) {
d["name"] = surfaces[i].name;
}