29 #ifndef MESH_DATA_TOOL_H 30 #define MESH_DATA_TOOL_H 32 #include "scene/resources/mesh.h" 78 static void _bind_methods();
82 Error create_from_surface(
const Ref<Mesh>& p_mesh,
int p_surface);
83 Error commit_to_surface(
const Ref<Mesh>& p_mesh);
85 int get_format()
const;
87 int get_vertex_count()
const;
88 int get_edge_count()
const;
89 int get_face_count()
const;
91 Vector3 get_vertex(
int p_idx)
const;
92 void set_vertex(
int p_idx,
const Vector3& p_vertex);
94 Vector3 get_vertex_normal(
int p_idx)
const;
95 void set_vertex_normal(
int p_idx,
const Vector3& p_normal);
97 Plane get_vertex_tangent(
int p_idx)
const;
98 void set_vertex_tangent(
int p_idx,
const Plane& p_tangent);
100 Vector2 get_vertex_uv(
int p_idx)
const;
101 void set_vertex_uv(
int p_idx,
const Vector2& p_uv);
103 Vector2 get_vertex_uv2(
int p_idx)
const;
104 void set_vertex_uv2(
int p_idx,
const Vector2& p_uv2);
106 Color get_vertex_color(
int p_idx)
const;
107 void set_vertex_color(
int p_idx,
const Color& p_color);
110 void set_vertex_bones(
int p_idx,
const Vector<int>& p_bones);
113 void set_vertex_weights(
int p_idx,
const Vector<float>& p_weights);
115 Variant get_vertex_meta(
int p_idx)
const;
116 void set_vertex_meta(
int p_idx,
const Variant& p_meta);
121 int get_edge_vertex(
int p_edge,
int p_vertex)
const;
123 Variant get_edge_meta(
int p_idx)
const;
124 void set_edge_meta(
int p_idx,
const Variant& p_meta);
126 int get_face_vertex(
int p_face,
int p_vertex)
const;
127 int get_face_edge(
int p_face,
int p_vertex)
const;
128 Variant get_face_meta(
int p_face)
const;
129 void set_face_meta(
int p_face,
const Variant& p_meta);
130 Vector3 get_face_normal(
int p_face)
const;
138 #endif // MESH_DATA_TOOL_H
Definition: reference.h:40