godot/scene/resources/3d/primitive_meshes.cpp

/**************************************************************************/
/*  primitive_meshes.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 "primitive_meshes.h"

#include "core/config/project_settings.h"
#include "scene/resources/theme.h"
#include "scene/theme/theme_db.h"
#include "servers/rendering_server.h"
#include "thirdparty/misc/polypartition.h"

#define PADDING_REF_SIZE

/**
  PrimitiveMesh
*/
void PrimitiveMesh::_update() const {}

void PrimitiveMesh::request_update() {}

int PrimitiveMesh::get_surface_count() const {}

int PrimitiveMesh::surface_get_array_len(int p_idx) const {}

int PrimitiveMesh::surface_get_array_index_len(int p_idx) const {}

Array PrimitiveMesh::surface_get_arrays(int p_surface) const {}

Dictionary PrimitiveMesh::surface_get_lods(int p_surface) const {}

TypedArray<Array> PrimitiveMesh::surface_get_blend_shape_arrays(int p_surface) const {}

BitField<Mesh::ArrayFormat> PrimitiveMesh::surface_get_format(int p_idx) const {}

Mesh::PrimitiveType PrimitiveMesh::surface_get_primitive_type(int p_idx) const {}

void PrimitiveMesh::surface_set_material(int p_idx, const Ref<Material> &p_material) {}

Ref<Material> PrimitiveMesh::surface_get_material(int p_idx) const {}

int PrimitiveMesh::get_blend_shape_count() const {}

StringName PrimitiveMesh::get_blend_shape_name(int p_index) const {}

void PrimitiveMesh::set_blend_shape_name(int p_index, const StringName &p_name) {}

AABB PrimitiveMesh::get_aabb() const {}

RID PrimitiveMesh::get_rid() const {}

void PrimitiveMesh::_bind_methods() {}

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

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

Array PrimitiveMesh::get_mesh_arrays() const {}

void PrimitiveMesh::set_custom_aabb(const AABB &p_custom) {}

AABB PrimitiveMesh::get_custom_aabb() const {}

void PrimitiveMesh::set_flip_faces(bool p_enable) {}

bool PrimitiveMesh::get_flip_faces() const {}

void PrimitiveMesh::set_add_uv2(bool p_enable) {}

void PrimitiveMesh::set_uv2_padding(float p_padding) {}

Vector2 PrimitiveMesh::get_uv2_scale(Vector2 p_margin_scale) const {}

float PrimitiveMesh::get_lightmap_texel_size() const {}

void PrimitiveMesh::_on_settings_changed() {}

PrimitiveMesh::PrimitiveMesh() {}

PrimitiveMesh::~PrimitiveMesh() {}

/**
	CapsuleMesh
*/

void CapsuleMesh::_update_lightmap_size() {}

void CapsuleMesh::_create_mesh_array(Array &p_arr) const {}

void CapsuleMesh::create_mesh_array(Array &p_arr, const float radius, const float height, const int radial_segments, const int rings, bool p_add_uv2, const float p_uv2_padding) {}

void CapsuleMesh::_bind_methods() {}

void CapsuleMesh::set_radius(const float p_radius) {}

float CapsuleMesh::get_radius() const {}

void CapsuleMesh::set_height(const float p_height) {}

float CapsuleMesh::get_height() const {}

void CapsuleMesh::set_radial_segments(const int p_segments) {}

int CapsuleMesh::get_radial_segments() const {}

void CapsuleMesh::set_rings(const int p_rings) {}

int CapsuleMesh::get_rings() const {}

CapsuleMesh::CapsuleMesh() {}

/**
  BoxMesh
*/

void BoxMesh::_update_lightmap_size() {}

void BoxMesh::_create_mesh_array(Array &p_arr) const {}

void BoxMesh::create_mesh_array(Array &p_arr, Vector3 size, int subdivide_w, int subdivide_h, int subdivide_d, bool p_add_uv2, const float p_uv2_padding) {}

void BoxMesh::_bind_methods() {}

void BoxMesh::set_size(const Vector3 &p_size) {}

Vector3 BoxMesh::get_size() const {}

void BoxMesh::set_subdivide_width(const int p_divisions) {}

int BoxMesh::get_subdivide_width() const {}

void BoxMesh::set_subdivide_height(const int p_divisions) {}

int BoxMesh::get_subdivide_height() const {}

void BoxMesh::set_subdivide_depth(const int p_divisions) {}

int BoxMesh::get_subdivide_depth() const {}

BoxMesh::BoxMesh() {}

/**
	CylinderMesh
*/

void CylinderMesh::_update_lightmap_size() {}

void CylinderMesh::_create_mesh_array(Array &p_arr) const {}

void CylinderMesh::create_mesh_array(Array &p_arr, float top_radius, float bottom_radius, float height, int radial_segments, int rings, bool cap_top, bool cap_bottom, bool p_add_uv2, const float p_uv2_padding) {}

void CylinderMesh::_bind_methods() {}

void CylinderMesh::set_top_radius(const float p_radius) {}

float CylinderMesh::get_top_radius() const {}

void CylinderMesh::set_bottom_radius(const float p_radius) {}

float CylinderMesh::get_bottom_radius() const {}

void CylinderMesh::set_height(const float p_height) {}

float CylinderMesh::get_height() const {}

void CylinderMesh::set_radial_segments(const int p_segments) {}

int CylinderMesh::get_radial_segments() const {}

void CylinderMesh::set_rings(const int p_rings) {}

int CylinderMesh::get_rings() const {}

void CylinderMesh::set_cap_top(bool p_cap_top) {}

bool CylinderMesh::is_cap_top() const {}

void CylinderMesh::set_cap_bottom(bool p_cap_bottom) {}

bool CylinderMesh::is_cap_bottom() const {}

CylinderMesh::CylinderMesh() {}

/**
  PlaneMesh
*/

void PlaneMesh::_update_lightmap_size() {}

void PlaneMesh::_create_mesh_array(Array &p_arr) const {}

void PlaneMesh::_bind_methods() {}

void PlaneMesh::set_size(const Size2 &p_size) {}

Size2 PlaneMesh::get_size() const {}

void PlaneMesh::set_subdivide_width(const int p_divisions) {}

int PlaneMesh::get_subdivide_width() const {}

void PlaneMesh::set_subdivide_depth(const int p_divisions) {}

int PlaneMesh::get_subdivide_depth() const {}

void PlaneMesh::set_center_offset(const Vector3 p_offset) {}

Vector3 PlaneMesh::get_center_offset() const {}

void PlaneMesh::set_orientation(const Orientation p_orientation) {}

PlaneMesh::Orientation PlaneMesh::get_orientation() const {}

PlaneMesh::PlaneMesh() {}

/**
  PrismMesh
*/

void PrismMesh::_update_lightmap_size() {}

void PrismMesh::_create_mesh_array(Array &p_arr) const {}

void PrismMesh::_bind_methods() {}

void PrismMesh::set_left_to_right(const float p_left_to_right) {}

float PrismMesh::get_left_to_right() const {}

void PrismMesh::set_size(const Vector3 &p_size) {}

Vector3 PrismMesh::get_size() const {}

void PrismMesh::set_subdivide_width(const int p_divisions) {}

int PrismMesh::get_subdivide_width() const {}

void PrismMesh::set_subdivide_height(const int p_divisions) {}

int PrismMesh::get_subdivide_height() const {}

void PrismMesh::set_subdivide_depth(const int p_divisions) {}

int PrismMesh::get_subdivide_depth() const {}

PrismMesh::PrismMesh() {}

/**
  SphereMesh
*/

void SphereMesh::_update_lightmap_size() {}

void SphereMesh::_create_mesh_array(Array &p_arr) const {}

void SphereMesh::create_mesh_array(Array &p_arr, float radius, float height, int radial_segments, int rings, bool is_hemisphere, bool p_add_uv2, const float p_uv2_padding) {}

void SphereMesh::_bind_methods() {}

void SphereMesh::set_radius(const float p_radius) {}

float SphereMesh::get_radius() const {}

void SphereMesh::set_height(const float p_height) {}

float SphereMesh::get_height() const {}

void SphereMesh::set_radial_segments(const int p_radial_segments) {}

int SphereMesh::get_radial_segments() const {}

void SphereMesh::set_rings(const int p_rings) {}

int SphereMesh::get_rings() const {}

void SphereMesh::set_is_hemisphere(const bool p_is_hemisphere) {}

bool SphereMesh::get_is_hemisphere() const {}

SphereMesh::SphereMesh() {}

/**
  TorusMesh
*/

void TorusMesh::_update_lightmap_size() {}

void TorusMesh::_create_mesh_array(Array &p_arr) const {}

void TorusMesh::_bind_methods() {}

void TorusMesh::set_inner_radius(const float p_inner_radius) {}

float TorusMesh::get_inner_radius() const {}

void TorusMesh::set_outer_radius(const float p_outer_radius) {}

float TorusMesh::get_outer_radius() const {}

void TorusMesh::set_rings(const int p_rings) {}

int TorusMesh::get_rings() const {}

void TorusMesh::set_ring_segments(const int p_ring_segments) {}

int TorusMesh::get_ring_segments() const {}

TorusMesh::TorusMesh() {}

/**
  PointMesh
*/

void PointMesh::_create_mesh_array(Array &p_arr) const {}

PointMesh::PointMesh() {}
// TUBE TRAIL

void TubeTrailMesh::set_radius(const float p_radius) {}
float TubeTrailMesh::get_radius() const {}

void TubeTrailMesh::set_radial_steps(const int p_radial_steps) {}
int TubeTrailMesh::get_radial_steps() const {}

void TubeTrailMesh::set_sections(const int p_sections) {}
int TubeTrailMesh::get_sections() const {}

void TubeTrailMesh::set_section_length(float p_section_length) {}
float TubeTrailMesh::get_section_length() const {}

void TubeTrailMesh::set_section_rings(const int p_section_rings) {}
int TubeTrailMesh::get_section_rings() const {}

void TubeTrailMesh::set_cap_top(bool p_cap_top) {}

bool TubeTrailMesh::is_cap_top() const {}

void TubeTrailMesh::set_cap_bottom(bool p_cap_bottom) {}

bool TubeTrailMesh::is_cap_bottom() const {}

void TubeTrailMesh::set_curve(const Ref<Curve> &p_curve) {}
Ref<Curve> TubeTrailMesh::get_curve() const {}

void TubeTrailMesh::_curve_changed() {}
int TubeTrailMesh::get_builtin_bind_pose_count() const {}

Transform3D TubeTrailMesh::get_builtin_bind_pose(int p_index) const {}

void TubeTrailMesh::_create_mesh_array(Array &p_arr) const {}

void TubeTrailMesh::_bind_methods() {}

TubeTrailMesh::TubeTrailMesh() {}

// RIBBON TRAIL

void RibbonTrailMesh::set_shape(Shape p_shape) {}
RibbonTrailMesh::Shape RibbonTrailMesh::get_shape() const {}

void RibbonTrailMesh::set_size(const float p_size) {}
float RibbonTrailMesh::get_size() const {}

void RibbonTrailMesh::set_sections(const int p_sections) {}
int RibbonTrailMesh::get_sections() const {}

void RibbonTrailMesh::set_section_length(float p_section_length) {}
float RibbonTrailMesh::get_section_length() const {}

void RibbonTrailMesh::set_section_segments(const int p_section_segments) {}
int RibbonTrailMesh::get_section_segments() const {}

void RibbonTrailMesh::set_curve(const Ref<Curve> &p_curve) {}
Ref<Curve> RibbonTrailMesh::get_curve() const {}

void RibbonTrailMesh::_curve_changed() {}
int RibbonTrailMesh::get_builtin_bind_pose_count() const {}

Transform3D RibbonTrailMesh::get_builtin_bind_pose(int p_index) const {}

void RibbonTrailMesh::_create_mesh_array(Array &p_arr) const {}

void RibbonTrailMesh::_bind_methods() {}

RibbonTrailMesh::RibbonTrailMesh() {}

/*************************************************************************/
/*  TextMesh                                                             */
/*************************************************************************/

void TextMesh::_generate_glyph_mesh_data(const GlyphMeshKey &p_key, const Glyph &p_gl) const {}

void TextMesh::_create_mesh_array(Array &p_arr) const {}

void TextMesh::_bind_methods() {}

void TextMesh::_notification(int p_what) {}

TextMesh::TextMesh() {}

TextMesh::~TextMesh() {}

void TextMesh::set_horizontal_alignment(HorizontalAlignment p_alignment) {}

HorizontalAlignment TextMesh::get_horizontal_alignment() const {}

void TextMesh::set_vertical_alignment(VerticalAlignment p_alignment) {}

VerticalAlignment TextMesh::get_vertical_alignment() const {}

void TextMesh::set_text(const String &p_string) {}

String TextMesh::get_text() const {}

void TextMesh::_font_changed() {}

void TextMesh::set_font(const Ref<Font> &p_font) {}

Ref<Font> TextMesh::get_font() const {}

Ref<Font> TextMesh::_get_font_or_default() const {}

void TextMesh::set_font_size(int p_size) {}

int TextMesh::get_font_size() const {}

void TextMesh::set_line_spacing(float p_line_spacing) {}

float TextMesh::get_line_spacing() const {}

void TextMesh::set_autowrap_mode(TextServer::AutowrapMode p_mode) {}

TextServer::AutowrapMode TextMesh::get_autowrap_mode() const {}

void TextMesh::set_justification_flags(BitField<TextServer::JustificationFlag> p_flags) {}

BitField<TextServer::JustificationFlag> TextMesh::get_justification_flags() const {}

void TextMesh::set_depth(real_t p_depth) {}

real_t TextMesh::get_depth() const {}

void TextMesh::set_width(real_t p_width) {}

real_t TextMesh::get_width() const {}

void TextMesh::set_pixel_size(real_t p_amount) {}

real_t TextMesh::get_pixel_size() const {}

void TextMesh::set_offset(const Point2 &p_offset) {}

Point2 TextMesh::get_offset() const {}

void TextMesh::set_curve_step(real_t p_step) {}

real_t TextMesh::get_curve_step() const {}

void TextMesh::set_text_direction(TextServer::Direction p_text_direction) {}

TextServer::Direction TextMesh::get_text_direction() const {}

void TextMesh::set_language(const String &p_language) {}

String TextMesh::get_language() const {}

void TextMesh::set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser) {}

TextServer::StructuredTextParser TextMesh::get_structured_text_bidi_override() const {}

void TextMesh::set_structured_text_bidi_override_options(Array p_args) {}

Array TextMesh::get_structured_text_bidi_override_options() const {}

void TextMesh::set_uppercase(bool p_uppercase) {}

bool TextMesh::is_uppercase() const {}