Path: blob/master/modules/jolt_physics/jolt_project_settings.h
10277 views
/**************************************************************************/1/* jolt_project_settings.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#include <cstdint>3334enum JoltJointWorldNode : int {35JOLT_JOINT_WORLD_NODE_A,36JOLT_JOINT_WORLD_NODE_B,37};3839class JoltProjectSettings {40public:41inline static int simulation_velocity_steps;42inline static int simulation_position_steps;43inline static bool use_enhanced_internal_edge_removal_for_bodies;44inline static bool generate_all_kinematic_contacts;45inline static float penetration_slop;46inline static float speculative_contact_distance;47inline static float baumgarte_stabilization_factor;48inline static float soft_body_point_radius;49inline static float bounce_velocity_threshold;50inline static bool sleep_allowed;51inline static float sleep_velocity_threshold;52inline static float sleep_time_threshold;53inline static float ccd_movement_threshold;54inline static float ccd_max_penetration;55inline static bool body_pair_contact_cache_enabled;56inline static float body_pair_cache_distance_sq;57inline static float body_pair_cache_angle_cos_div2;5859inline static bool use_enhanced_internal_edge_removal_for_queries;60inline static bool enable_ray_cast_face_index;6162inline static bool use_enhanced_internal_edge_removal_for_motion_queries;63inline static int motion_query_recovery_iterations;64inline static float motion_query_recovery_amount;6566inline static float collision_margin_fraction;67inline static float active_edge_threshold_cos;6869inline static JoltJointWorldNode joint_world_node;7071inline static int temp_memory_mib;72inline static int64_t temp_memory_b;73inline static float world_boundary_shape_size;74inline static float max_linear_velocity;75inline static float max_angular_velocity;76inline static int max_bodies;77inline static int max_body_pairs;78inline static int max_contact_constraints;7980static void register_settings();81static void read_settings();82};838485