godot/scene/resources/surface_tool.cpp

/**************************************************************************/
/*  surface_tool.cpp                                                      */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "surface_tool.h"

#define EQ_VERTEX_DIST

SurfaceTool::OptimizeVertexCacheFunc SurfaceTool::optimize_vertex_cache_func =;
SurfaceTool::SimplifyFunc SurfaceTool::simplify_func =;
SurfaceTool::SimplifyWithAttribFunc SurfaceTool::simplify_with_attrib_func =;
SurfaceTool::SimplifyScaleFunc SurfaceTool::simplify_scale_func =;
SurfaceTool::SimplifySloppyFunc SurfaceTool::simplify_sloppy_func =;
SurfaceTool::GenerateRemapFunc SurfaceTool::generate_remap_func =;
SurfaceTool::RemapVertexFunc SurfaceTool::remap_vertex_func =;
SurfaceTool::RemapIndexFunc SurfaceTool::remap_index_func =;

void SurfaceTool::strip_mesh_arrays(PackedVector3Array &r_vertices, PackedInt32Array &r_indices) {}

bool SurfaceTool::Vertex::operator==(const Vertex &p_vertex) const {}

uint32_t SurfaceTool::VertexHasher::hash(const Vertex &p_vtx) {}

bool SurfaceTool::SmoothGroupVertex::operator==(const SmoothGroupVertex &p_vertex) const {}

uint32_t SurfaceTool::SmoothGroupVertexHasher::hash(const SmoothGroupVertex &p_vtx) {}

uint32_t SurfaceTool::TriangleHasher::hash(const int *p_triangle) {}

bool SurfaceTool::TriangleHasher::compare(const int *p_lhs, const int *p_rhs) {}

void SurfaceTool::begin(Mesh::PrimitiveType p_primitive) {}

void SurfaceTool::add_vertex(const Vector3 &p_vertex) {}

void SurfaceTool::set_color(Color p_color) {}

void SurfaceTool::set_normal(const Vector3 &p_normal) {}

void SurfaceTool::set_tangent(const Plane &p_tangent) {}

void SurfaceTool::set_uv(const Vector2 &p_uv) {}

void SurfaceTool::set_uv2(const Vector2 &p_uv2) {}

void SurfaceTool::set_custom(int p_channel_index, const Color &p_custom) {}

void SurfaceTool::set_bones(const Vector<int> &p_bones) {}

void SurfaceTool::set_weights(const Vector<float> &p_weights) {}

void SurfaceTool::set_smooth_group(uint32_t p_group) {}

void SurfaceTool::_add_triangle_fan(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<Color> &p_colors, const Vector<Vector2> &p_uv2s, const Vector<Vector3> &p_normals, const TypedArray<Plane> &p_tangents) {}

void SurfaceTool::add_triangle_fan(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<Color> &p_colors, const Vector<Vector2> &p_uv2s, const Vector<Vector3> &p_normals, const Vector<Plane> &p_tangents) {}

void SurfaceTool::add_index(int p_index) {}

Array SurfaceTool::commit_to_arrays() {}

Ref<ArrayMesh> SurfaceTool::commit(const Ref<ArrayMesh> &p_existing, uint64_t p_compress_flags) {}

void SurfaceTool::index() {}

void SurfaceTool::deindex() {}

void SurfaceTool::_create_list(const Ref<Mesh> &p_existing, int p_surface, LocalVector<Vertex> *r_vertex, LocalVector<int> *r_index, uint64_t &lformat) {}

const uint32_t SurfaceTool::custom_mask[RS::ARRAY_CUSTOM_COUNT] =;
const uint32_t SurfaceTool::custom_shift[RS::ARRAY_CUSTOM_COUNT] =;

void SurfaceTool::create_vertex_array_from_arrays(const Array &p_arrays, LocalVector<SurfaceTool::Vertex> &ret, uint64_t *r_format) {}

void SurfaceTool::_create_list_from_arrays(Array arr, LocalVector<Vertex> *r_vertex, LocalVector<int> *r_index, uint64_t &lformat) {}

void SurfaceTool::create_from_arrays(const Array &p_arrays, Mesh::PrimitiveType p_primitive_type) {}

void SurfaceTool::create_from_triangle_arrays(const Array &p_arrays) {}

void SurfaceTool::create_from(const Ref<Mesh> &p_existing, int p_surface) {}

void SurfaceTool::create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String &p_blend_shape_name) {}

void SurfaceTool::append_from(const Ref<Mesh> &p_existing, int p_surface, const Transform3D &p_xform) {}

//mikktspace callbacks
namespace {
struct TangentGenerationContextUserData {};
} // namespace

int SurfaceTool::mikktGetNumFaces(const SMikkTSpaceContext *pContext) {}

int SurfaceTool::mikktGetNumVerticesOfFace(const SMikkTSpaceContext *pContext, const int iFace) {}

void SurfaceTool::mikktGetPosition(const SMikkTSpaceContext *pContext, float fvPosOut[], const int iFace, const int iVert) {}

void SurfaceTool::mikktGetNormal(const SMikkTSpaceContext *pContext, float fvNormOut[], const int iFace, const int iVert) {}

void SurfaceTool::mikktGetTexCoord(const SMikkTSpaceContext *pContext, float fvTexcOut[], const int iFace, const int iVert) {}

void SurfaceTool::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fvBiTangent[], const float fMagS, const float fMagT,
		const tbool bIsOrientationPreserving, const int iFace, const int iVert) {}

void SurfaceTool::generate_tangents() {}

void SurfaceTool::generate_normals(bool p_flip) {}

void SurfaceTool::set_material(const Ref<Material> &p_material) {}

Ref<Material> SurfaceTool::get_material() const {}

void SurfaceTool::clear() {}

void SurfaceTool::set_skin_weight_count(SkinWeightCount p_weights) {}
SurfaceTool::SkinWeightCount SurfaceTool::get_skin_weight_count() const {}

void SurfaceTool::set_custom_format(int p_channel_index, CustomFormat p_format) {}

Mesh::PrimitiveType SurfaceTool::get_primitive_type() const {}
SurfaceTool::CustomFormat SurfaceTool::get_custom_format(int p_channel_index) const {}
void SurfaceTool::optimize_indices_for_cache() {}

AABB SurfaceTool::get_aabb() const {}
Vector<int> SurfaceTool::generate_lod(float p_threshold, int p_target_index_count) {}

void SurfaceTool::_bind_methods() {}

SurfaceTool::SurfaceTool() {}