feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -31,19 +31,15 @@
|
|||
#include "importer_mesh.h"
|
||||
|
||||
#include "core/io/marshalls.h"
|
||||
#include "core/math/convex_hull.h"
|
||||
#include "core/math/random_pcg.h"
|
||||
#include "scene/resources/surface_tool.h"
|
||||
|
||||
#include <cstdint>
|
||||
#ifndef PHYSICS_3D_DISABLED
|
||||
#include "core/math/convex_hull.h"
|
||||
#endif // PHYSICS_3D_DISABLED
|
||||
|
||||
String ImporterMesh::validate_blend_shape_name(const String &p_name) {
|
||||
String name = p_name;
|
||||
const char *characters = ":";
|
||||
for (const char *p = characters; *p; p++) {
|
||||
name = name.replace(String::chr(*p), "_");
|
||||
}
|
||||
return name;
|
||||
return p_name.replace_char(':', '_');
|
||||
}
|
||||
|
||||
void ImporterMesh::add_blend_shape(const String &p_name) {
|
||||
|
|
@ -91,13 +87,11 @@ void ImporterMesh::add_surface(Mesh::PrimitiveType p_primitive, const Array &p_a
|
|||
s.blend_shape_data.push_back(bs);
|
||||
}
|
||||
|
||||
List<Variant> lods;
|
||||
p_lods.get_key_list(&lods);
|
||||
for (const Variant &E : lods) {
|
||||
ERR_CONTINUE(!E.is_num());
|
||||
for (const KeyValue<Variant, Variant> &kv : p_lods) {
|
||||
ERR_CONTINUE(!kv.key.is_num());
|
||||
Surface::LOD lod;
|
||||
lod.distance = E;
|
||||
lod.indices = p_lods[E];
|
||||
lod.distance = kv.key;
|
||||
lod.indices = kv.value;
|
||||
ERR_CONTINUE(lod.indices.is_empty());
|
||||
s.lods.push_back(lod);
|
||||
}
|
||||
|
|
@ -787,6 +781,7 @@ Vector<Face3> ImporterMesh::get_faces() const {
|
|||
return faces;
|
||||
}
|
||||
|
||||
#ifndef PHYSICS_3D_DISABLED
|
||||
Vector<Ref<Shape3D>> ImporterMesh::convex_decompose(const Ref<MeshConvexDecompositionSettings> &p_settings) const {
|
||||
ERR_FAIL_NULL_V(Mesh::convex_decomposition_function, Vector<Ref<Shape3D>>());
|
||||
|
||||
|
|
@ -874,7 +869,7 @@ Ref<ConvexPolygonShape3D> ImporterMesh::create_convex_shape(bool p_clean, bool p
|
|||
|
||||
Ref<ConcavePolygonShape3D> ImporterMesh::create_trimesh_shape() const {
|
||||
Vector<Face3> faces = get_faces();
|
||||
if (faces.size() == 0) {
|
||||
if (faces.is_empty()) {
|
||||
return Ref<ConcavePolygonShape3D>();
|
||||
}
|
||||
|
||||
|
|
@ -892,10 +887,11 @@ Ref<ConcavePolygonShape3D> ImporterMesh::create_trimesh_shape() const {
|
|||
shape->set_faces(face_points);
|
||||
return shape;
|
||||
}
|
||||
#endif // PHYSICS_3D_DISABLED
|
||||
|
||||
Ref<NavigationMesh> ImporterMesh::create_navigation_mesh() {
|
||||
Vector<Face3> faces = get_faces();
|
||||
if (faces.size() == 0) {
|
||||
if (faces.is_empty()) {
|
||||
return Ref<NavigationMesh>();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue