diff options
Diffstat (limited to 'scene/3d')
27 files changed, 196 insertions, 0 deletions
diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp index 4592b12bf8..3b5b6c0dd6 100644 --- a/scene/3d/area_3d.cpp +++ b/scene/3d/area_3d.cpp @@ -38,6 +38,7 @@ void Area3D::set_space_override_mode(SpaceOverride p_mode) { space_override = p_mode; PhysicsServer3D::get_singleton()->area_set_space_override_mode(get_rid(), PhysicsServer3D::AreaSpaceOverrideMode(p_mode)); } + Area3D::SpaceOverride Area3D::get_space_override_mode() const { return space_override; } @@ -46,6 +47,7 @@ void Area3D::set_gravity_is_point(bool p_enabled) { gravity_is_point = p_enabled; PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_GRAVITY_IS_POINT, p_enabled); } + bool Area3D::is_gravity_a_point() const { return gravity_is_point; } @@ -63,6 +65,7 @@ void Area3D::set_gravity_vector(const Vector3 &p_vec) { gravity_vec = p_vec; PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_GRAVITY_VECTOR, p_vec); } + Vector3 Area3D::get_gravity_vector() const { return gravity_vec; } @@ -71,13 +74,16 @@ void Area3D::set_gravity(real_t p_gravity) { gravity = p_gravity; PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_GRAVITY, p_gravity); } + real_t Area3D::get_gravity() const { return gravity; } + void Area3D::set_linear_damp(real_t p_linear_damp) { linear_damp = p_linear_damp; PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_LINEAR_DAMP, p_linear_damp); } + real_t Area3D::get_linear_damp() const { return linear_damp; } @@ -95,6 +101,7 @@ void Area3D::set_priority(real_t p_priority) { priority = p_priority; PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_PRIORITY, p_priority); } + real_t Area3D::get_priority() const { return priority; } @@ -251,6 +258,7 @@ void Area3D::_clear_monitoring() { } } } + void Area3D::_notification(int p_what) { if (p_what == NOTIFICATION_EXIT_TREE) { _clear_monitoring(); @@ -439,6 +447,7 @@ bool Area3D::overlaps_body(Node *p_body) const { return false; return E->get().in_tree; } + void Area3D::set_collision_mask(uint32_t p_mask) { collision_mask = p_mask; PhysicsServer3D::get_singleton()->area_set_collision_mask(get_rid(), p_mask); @@ -447,6 +456,7 @@ void Area3D::set_collision_mask(uint32_t p_mask) { uint32_t Area3D::get_collision_mask() const { return collision_mask; } + void Area3D::set_collision_layer(uint32_t p_layer) { collision_layer = p_layer; PhysicsServer3D::get_singleton()->area_set_collision_layer(get_rid(), p_layer); @@ -493,6 +503,7 @@ bool Area3D::is_overriding_audio_bus() const { void Area3D::set_audio_bus(const StringName &p_audio_bus) { audio_bus = p_audio_bus; } + StringName Area3D::get_audio_bus() const { for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) { if (AudioServer::get_singleton()->get_bus_name(i) == audio_bus) { @@ -505,6 +516,7 @@ StringName Area3D::get_audio_bus() const { void Area3D::set_use_reverb_bus(bool p_enable) { use_reverb_bus = p_enable; } + bool Area3D::is_using_reverb_bus() const { return use_reverb_bus; } @@ -512,6 +524,7 @@ bool Area3D::is_using_reverb_bus() const { void Area3D::set_reverb_bus(const StringName &p_audio_bus) { reverb_bus = p_audio_bus; } + StringName Area3D::get_reverb_bus() const { for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) { if (AudioServer::get_singleton()->get_bus_name(i) == reverb_bus) { @@ -524,6 +537,7 @@ StringName Area3D::get_reverb_bus() const { void Area3D::set_reverb_amount(float p_amount) { reverb_amount = p_amount; } + float Area3D::get_reverb_amount() const { return reverb_amount; } @@ -531,6 +545,7 @@ float Area3D::get_reverb_amount() const { void Area3D::set_reverb_uniformity(float p_uniformity) { reverb_uniformity = p_uniformity; } + float Area3D::get_reverb_uniformity() const { return reverb_uniformity; } diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index 83cf5b0142..4f37087d7e 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -645,6 +645,7 @@ Ref<AudioStream> AudioStreamPlayer3D::get_stream() const { void AudioStreamPlayer3D::set_unit_db(float p_volume) { unit_db = p_volume; } + float AudioStreamPlayer3D::get_unit_db() const { return unit_db; } @@ -652,6 +653,7 @@ float AudioStreamPlayer3D::get_unit_db() const { void AudioStreamPlayer3D::set_unit_size(float p_volume) { unit_size = p_volume; } + float AudioStreamPlayer3D::get_unit_size() const { return unit_size; } @@ -659,6 +661,7 @@ float AudioStreamPlayer3D::get_unit_size() const { void AudioStreamPlayer3D::set_max_db(float p_boost) { max_db = p_boost; } + float AudioStreamPlayer3D::get_max_db() const { return max_db; } @@ -667,6 +670,7 @@ void AudioStreamPlayer3D::set_pitch_scale(float p_pitch_scale) { ERR_FAIL_COND(p_pitch_scale <= 0.0); pitch_scale = p_pitch_scale; } + float AudioStreamPlayer3D::get_pitch_scale() const { return pitch_scale; } @@ -721,6 +725,7 @@ void AudioStreamPlayer3D::set_bus(const StringName &p_bus) { bus = p_bus; AudioServer::get_singleton()->unlock(); } + StringName AudioStreamPlayer3D::get_bus() const { for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) { if (AudioServer::get_singleton()->get_bus_name(i) == bus) { @@ -733,6 +738,7 @@ StringName AudioStreamPlayer3D::get_bus() const { void AudioStreamPlayer3D::set_autoplay(bool p_enable) { autoplay = p_enable; } + bool AudioStreamPlayer3D::is_autoplay_enabled() { return autoplay; } @@ -743,6 +749,7 @@ void AudioStreamPlayer3D::_set_playing(bool p_enable) { else stop(); } + bool AudioStreamPlayer3D::_is_active() const { return active; } @@ -813,6 +820,7 @@ float AudioStreamPlayer3D::get_emission_angle_filter_attenuation_db() const { void AudioStreamPlayer3D::set_attenuation_filter_cutoff_hz(float p_hz) { attenuation_filter_cutoff_hz = p_hz; } + float AudioStreamPlayer3D::get_attenuation_filter_cutoff_hz() const { return attenuation_filter_cutoff_hz; } @@ -820,6 +828,7 @@ float AudioStreamPlayer3D::get_attenuation_filter_cutoff_hz() const { void AudioStreamPlayer3D::set_attenuation_filter_db(float p_db) { attenuation_filter_db = p_db; } + float AudioStreamPlayer3D::get_attenuation_filter_db() const { return attenuation_filter_db; } @@ -1014,5 +1023,6 @@ AudioStreamPlayer3D::AudioStreamPlayer3D() { AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &AudioStreamPlayer3D::_bus_layout_changed)); set_disable_scale(true); } + AudioStreamPlayer3D::~AudioStreamPlayer3D() { } diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 8838295e93..33db919d49 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -52,6 +52,7 @@ void BakedLightmapData::add_user(const NodePath &p_path, const Rect2 &p_uv_scale int BakedLightmapData::get_user_count() const { return users.size(); } + NodePath BakedLightmapData::get_user_path(int p_user) const { ERR_FAIL_INDEX_V(p_user, users.size(), NodePath()); return users[p_user].path; @@ -142,9 +143,11 @@ void BakedLightmapData::set_capture_data(const AABB &p_bounds, bool p_interior, PackedVector3Array BakedLightmapData::get_capture_points() const { return RS::get_singleton()->lightmap_get_probe_capture_points(lightmap); } + PackedColorArray BakedLightmapData::get_capture_sh() const { return RS::get_singleton()->lightmap_get_probe_capture_sh(lightmap); } + PackedInt32Array BakedLightmapData::get_capture_tetrahedra() const { return RS::get_singleton()->lightmap_get_probe_capture_tetrahedra(lightmap); } @@ -181,6 +184,7 @@ Dictionary BakedLightmapData::_get_probe_data() const { d["interior"] = is_interior(); return d; } + void BakedLightmapData::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_user_data", "data"), &BakedLightmapData::_set_user_data); ClassDB::bind_method(D_METHOD("_get_user_data"), &BakedLightmapData::_get_user_data); @@ -569,6 +573,7 @@ void BakedLightmap::_plot_triangle_into_octree(GenProbesOctree *p_cell, float p_ } } } + void BakedLightmap::_gen_new_positions_from_octree(const GenProbesOctree *p_cell, float p_cell_size, const Vector<Vector3> &probe_positions, LocalVector<Vector3> &new_probe_positions, HashMap<Vector3i, bool, Vector3iHash> &positions_used, const AABB &p_bounds) { for (int i = 0; i < 8; i++) { Vector3i pos = p_cell->offset; @@ -608,6 +613,7 @@ void BakedLightmap::_gen_new_positions_from_octree(const GenProbesOctree *p_cell } } } + BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, String p_image_data_path, Lightmapper::BakeStepFunc p_bake_step, void *p_bake_userdata) { if (p_image_data_path == "" && (get_light_data().is_null() || !get_light_data()->get_path().is_resource_file())) { return BAKE_ERROR_NO_SAVE_PATH; @@ -1262,6 +1268,7 @@ BakedLightmap::BakeQuality BakedLightmap::get_bake_quality() const { AABB BakedLightmap::get_aabb() const { return AABB(); } + Vector<Face3> BakedLightmap::get_faces(uint32_t p_usage_flags) const { return Vector<Face3>(); } @@ -1285,6 +1292,7 @@ bool BakedLightmap::is_directional() const { void BakedLightmap::set_interior(bool p_enable) { interior = p_enable; } + bool BakedLightmap::is_interior() const { return interior; } @@ -1309,6 +1317,7 @@ Ref<Sky> BakedLightmap::get_environment_custom_sky() const { void BakedLightmap::set_environment_custom_color(const Color &p_color) { environment_custom_color = p_color; } + Color BakedLightmap::get_environment_custom_color() const { return environment_custom_color; } @@ -1316,6 +1325,7 @@ Color BakedLightmap::get_environment_custom_color() const { void BakedLightmap::set_environment_custom_energy(float p_energy) { environment_custom_energy = p_energy; } + float BakedLightmap::get_environment_custom_energy() const { return environment_custom_energy; } diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp index 0f7aa28bf3..99d3b68996 100644 --- a/scene/3d/camera_3d.cpp +++ b/scene/3d/camera_3d.cpp @@ -166,6 +166,7 @@ void Camera3D::set_perspective(float p_fovy_degrees, float p_z_near, float p_z_f update_gizmo(); force_change = false; } + void Camera3D::set_orthogonal(float p_size, float p_z_near, float p_z_far) { if (!force_change && size == p_size && p_z_near == near && p_z_far == far && mode == PROJECTION_ORTHOGONAL) return; @@ -632,6 +633,7 @@ Vector3 Camera3D::get_doppler_tracked_velocity() const { return Vector3(); } } + Camera3D::Camera3D() { camera = RenderingServer::get_singleton()->camera_create(); size = 1; @@ -665,9 +667,11 @@ Camera3D::~Camera3D() { void ClippedCamera3D::set_margin(float p_margin) { margin = p_margin; } + float ClippedCamera3D::get_margin() const { return margin; } + void ClippedCamera3D::set_process_mode(ProcessMode p_mode) { if (process_mode == p_mode) { return; @@ -676,6 +680,7 @@ void ClippedCamera3D::set_process_mode(ProcessMode p_mode) { set_process_internal(process_mode == CLIP_PROCESS_IDLE); set_physics_process_internal(process_mode == CLIP_PROCESS_PHYSICS); } + ClippedCamera3D::ProcessMode ClippedCamera3D::get_process_mode() const { return process_mode; } @@ -855,6 +860,7 @@ void ClippedCamera3D::_bind_methods() { BIND_ENUM_CONSTANT(CLIP_PROCESS_PHYSICS); BIND_ENUM_CONSTANT(CLIP_PROCESS_IDLE); } + ClippedCamera3D::ClippedCamera3D() { margin = 0; clip_offset = 0; @@ -867,6 +873,7 @@ ClippedCamera3D::ClippedCamera3D() { clip_to_areas = false; clip_to_bodies = true; } + ClippedCamera3D::~ClippedCamera3D() { PhysicsServer3D::get_singleton()->free(pyramid_shape); } diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp index 9aaa182a13..f1ca3770e0 100644 --- a/scene/3d/collision_object_3d.cpp +++ b/scene/3d/collision_object_3d.cpp @@ -218,6 +218,7 @@ void CollisionObject3D::shape_owner_set_transform(uint32_t p_owner, const Transf } } } + Transform CollisionObject3D::shape_owner_get_transform(uint32_t p_owner) const { ERR_FAIL_COND_V(!shapes.has(p_owner), Transform()); @@ -247,17 +248,20 @@ void CollisionObject3D::shape_owner_add_shape(uint32_t p_owner, const Ref<Shape3 total_subshapes++; } + int CollisionObject3D::shape_owner_get_shape_count(uint32_t p_owner) const { ERR_FAIL_COND_V(!shapes.has(p_owner), 0); return shapes[p_owner].shapes.size(); } + Ref<Shape3D> CollisionObject3D::shape_owner_get_shape(uint32_t p_owner, int p_shape) const { ERR_FAIL_COND_V(!shapes.has(p_owner), Ref<Shape3D>()); ERR_FAIL_INDEX_V(p_shape, shapes[p_owner].shapes.size(), Ref<Shape3D>()); return shapes[p_owner].shapes[p_shape].shape; } + int CollisionObject3D::shape_owner_get_shape_index(uint32_t p_owner, int p_shape) const { ERR_FAIL_COND_V(!shapes.has(p_owner), -1); ERR_FAIL_INDEX_V(p_shape, shapes[p_owner].shapes.size(), -1); diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp index bf123fa417..4a87ce0def 100644 --- a/scene/3d/collision_polygon_3d.cpp +++ b/scene/3d/collision_polygon_3d.cpp @@ -165,6 +165,7 @@ String CollisionPolygon3D::get_configuration_warning() const { bool CollisionPolygon3D::_is_editable_3d_polygon() const { return true; } + void CollisionPolygon3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_depth", "depth"), &CollisionPolygon3D::set_depth); ClassDB::bind_method(D_METHOD("get_depth"), &CollisionPolygon3D::get_depth); diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 631ab4e0f7..cd80607692 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -38,6 +38,7 @@ AABB CPUParticles3D::get_aabb() const { return AABB(); } + Vector<Face3> CPUParticles3D::get_faces(uint32_t p_usage_flags) const { return Vector<Face3>(); } @@ -74,6 +75,7 @@ void CPUParticles3D::set_amount(int p_amount) { particle_order.resize(p_amount); } + void CPUParticles3D::set_lifetime(float p_lifetime) { ERR_FAIL_COND_MSG(p_lifetime <= 0, "Particles lifetime must be greater than 0."); lifetime = p_lifetime; @@ -86,18 +88,23 @@ void CPUParticles3D::set_one_shot(bool p_one_shot) { void CPUParticles3D::set_pre_process_time(float p_time) { pre_process_time = p_time; } + void CPUParticles3D::set_explosiveness_ratio(float p_ratio) { explosiveness_ratio = p_ratio; } + void CPUParticles3D::set_randomness_ratio(float p_ratio) { randomness_ratio = p_ratio; } + void CPUParticles3D::set_lifetime_randomness(float p_random) { lifetime_randomness = p_random; } + void CPUParticles3D::set_use_local_coordinates(bool p_enable) { local_coords = p_enable; } + void CPUParticles3D::set_speed_scale(float p_scale) { speed_scale = p_scale; } @@ -105,12 +112,15 @@ void CPUParticles3D::set_speed_scale(float p_scale) { bool CPUParticles3D::is_emitting() const { return emitting; } + int CPUParticles3D::get_amount() const { return particles.size(); } + float CPUParticles3D::get_lifetime() const { return lifetime; } + bool CPUParticles3D::get_one_shot() const { return one_shot; } @@ -118,12 +128,15 @@ bool CPUParticles3D::get_one_shot() const { float CPUParticles3D::get_pre_process_time() const { return pre_process_time; } + float CPUParticles3D::get_explosiveness_ratio() const { return explosiveness_ratio; } + float CPUParticles3D::get_randomness_ratio() const { return randomness_ratio; } + float CPUParticles3D::get_lifetime_randomness() const { return lifetime_randomness; } @@ -246,6 +259,7 @@ float CPUParticles3D::get_spread() const { void CPUParticles3D::set_flatness(float p_flatness) { flatness = p_flatness; } + float CPUParticles3D::get_flatness() const { return flatness; } @@ -255,6 +269,7 @@ void CPUParticles3D::set_param(Parameter p_param, float p_value) { parameters[p_param] = p_value; } + float CPUParticles3D::get_param(Parameter p_param) const { ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0); @@ -266,6 +281,7 @@ void CPUParticles3D::set_param_randomness(Parameter p_param, float p_value) { randomness[p_param] = p_value; } + float CPUParticles3D::get_param_randomness(Parameter p_param) const { ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0); @@ -324,6 +340,7 @@ void CPUParticles3D::set_param_curve(Parameter p_param, const Ref<Curve> &p_curv } } } + Ref<Curve> CPUParticles3D::get_param_curve(Parameter p_param) const { ERR_FAIL_INDEX_V(p_param, PARAM_MAX, Ref<Curve>()); @@ -387,12 +404,15 @@ void CPUParticles3D::set_emission_colors(const Vector<Color> &p_colors) { float CPUParticles3D::get_emission_sphere_radius() const { return emission_sphere_radius; } + Vector3 CPUParticles3D::get_emission_box_extents() const { return emission_box_extents; } + Vector<Vector3> CPUParticles3D::get_emission_points() const { return emission_points; } + Vector<Vector3> CPUParticles3D::get_emission_normals() const { return emission_normals; } @@ -404,6 +424,7 @@ Vector<Color> CPUParticles3D::get_emission_colors() const { CPUParticles3D::EmissionShape CPUParticles3D::get_emission_shape() const { return emission_shape; } + void CPUParticles3D::set_gravity(const Vector3 &p_gravity) { gravity = p_gravity; } diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp index b97859f44a..fb72e10171 100644 --- a/scene/3d/decal.cpp +++ b/scene/3d/decal.cpp @@ -47,6 +47,7 @@ void Decal::set_texture(DecalTexture p_type, const Ref<Texture2D> &p_texture) { RID texture_rid = p_texture.is_valid() ? p_texture->get_rid() : RID(); RS::get_singleton()->decal_set_texture(decal, RS::DecalTexture(p_type), texture_rid); } + Ref<Texture2D> Decal::get_texture(DecalTexture p_type) const { ERR_FAIL_INDEX_V(p_type, TEXTURE_MAX, Ref<Texture2D>()); return textures[p_type]; @@ -56,6 +57,7 @@ void Decal::set_emission_energy(float p_energy) { emission_energy = p_energy; RS::get_singleton()->decal_set_emission_energy(decal, emission_energy); } + float Decal::get_emission_energy() const { return emission_energy; } @@ -64,6 +66,7 @@ void Decal::set_albedo_mix(float p_mix) { albedo_mix = p_mix; RS::get_singleton()->decal_set_albedo_mix(decal, albedo_mix); } + float Decal::get_albedo_mix() const { return albedo_mix; } @@ -72,6 +75,7 @@ void Decal::set_upper_fade(float p_fade) { upper_fade = p_fade; RS::get_singleton()->decal_set_fade(decal, upper_fade, lower_fade); } + float Decal::get_upper_fade() const { return upper_fade; } @@ -80,6 +84,7 @@ void Decal::set_lower_fade(float p_fade) { lower_fade = p_fade; RS::get_singleton()->decal_set_fade(decal, upper_fade, lower_fade); } + float Decal::get_lower_fade() const { return lower_fade; } @@ -88,6 +93,7 @@ void Decal::set_normal_fade(float p_fade) { normal_fade = p_fade; RS::get_singleton()->decal_set_normal_fade(decal, normal_fade); } + float Decal::get_normal_fade() const { return normal_fade; } @@ -105,6 +111,7 @@ void Decal::set_enable_distance_fade(bool p_enable) { distance_fade_enabled = p_enable; RS::get_singleton()->decal_set_distance_fade(decal, distance_fade_enabled, distance_fade_begin, distance_fade_length); } + bool Decal::is_distance_fade_enabled() const { return distance_fade_enabled; } @@ -113,6 +120,7 @@ void Decal::set_distance_fade_begin(float p_distance) { distance_fade_begin = p_distance; RS::get_singleton()->decal_set_distance_fade(decal, distance_fade_enabled, distance_fade_begin, distance_fade_length); } + float Decal::get_distance_fade_begin() const { return distance_fade_begin; } @@ -121,6 +129,7 @@ void Decal::set_distance_fade_length(float p_length) { distance_fade_length = p_length; RS::get_singleton()->decal_set_distance_fade(decal, distance_fade_enabled, distance_fade_begin, distance_fade_length); } + float Decal::get_distance_fade_length() const { return distance_fade_length; } @@ -129,6 +138,7 @@ void Decal::set_cull_mask(uint32_t p_layers) { cull_mask = p_layers; RS::get_singleton()->decal_set_cull_mask(decal, cull_mask); } + uint32_t Decal::get_cull_mask() const { return cull_mask; } @@ -139,6 +149,7 @@ AABB Decal::get_aabb() const { aabb.size = extents * 2.0; return aabb; } + Vector<Face3> Decal::get_faces(uint32_t p_usage_flags) const { return Vector<Face3>(); } diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 0ba1b3d984..97040f55ef 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -101,15 +101,19 @@ void GIProbeData::allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, AABB GIProbeData::get_bounds() const { return bounds; } + Vector3 GIProbeData::get_octree_size() const { return octree_size; } + Vector<uint8_t> GIProbeData::get_octree_cells() const { return RS::get_singleton()->gi_probe_get_octree_cells(probe); } + Vector<uint8_t> GIProbeData::get_data_cells() const { return RS::get_singleton()->gi_probe_get_data_cells(probe); } + Vector<uint8_t> GIProbeData::get_distance_field() const { return RS::get_singleton()->gi_probe_get_distance_field(probe); } @@ -117,6 +121,7 @@ Vector<uint8_t> GIProbeData::get_distance_field() const { Vector<int> GIProbeData::get_level_counts() const { return RS::get_singleton()->gi_probe_get_level_counts(probe); } + Transform GIProbeData::get_to_cell_xform() const { return to_cell_xform; } @@ -417,6 +422,7 @@ Vector3i GIProbe::get_estimated_cell_size() const { return Vector3i(axis_cell_size[0], axis_cell_size[1], axis_cell_size[2]); } + void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) { static const int subdiv_value[SUBDIV_MAX] = { 6, 7, 8, 9 }; diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index 1ce25f1e6e..a87b57bd4d 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -38,6 +38,7 @@ AABB GPUParticles3D::get_aabb() const { return AABB(); } + Vector<Face3> GPUParticles3D::get_faces(uint32_t p_usage_flags) const { return Vector<Face3>(); } @@ -57,6 +58,7 @@ void GPUParticles3D::set_amount(int p_amount) { amount = p_amount; RS::get_singleton()->particles_set_amount(particles, amount); } + void GPUParticles3D::set_lifetime(float p_lifetime) { ERR_FAIL_COND_MSG(p_lifetime <= 0, "Particles lifetime must be greater than 0."); lifetime = p_lifetime; @@ -81,24 +83,29 @@ void GPUParticles3D::set_pre_process_time(float p_time) { pre_process_time = p_time; RS::get_singleton()->particles_set_pre_process_time(particles, pre_process_time); } + void GPUParticles3D::set_explosiveness_ratio(float p_ratio) { explosiveness_ratio = p_ratio; RS::get_singleton()->particles_set_explosiveness_ratio(particles, explosiveness_ratio); } + void GPUParticles3D::set_randomness_ratio(float p_ratio) { randomness_ratio = p_ratio; RS::get_singleton()->particles_set_randomness_ratio(particles, randomness_ratio); } + void GPUParticles3D::set_visibility_aabb(const AABB &p_aabb) { visibility_aabb = p_aabb; RS::get_singleton()->particles_set_custom_aabb(particles, visibility_aabb); update_gizmo(); _change_notify("visibility_aabb"); } + void GPUParticles3D::set_use_local_coordinates(bool p_enable) { local_coords = p_enable; RS::get_singleton()->particles_set_use_local_coordinates(particles, local_coords); } + void GPUParticles3D::set_process_material(const Ref<Material> &p_material) { process_material = p_material; RID material_rid; @@ -117,12 +124,15 @@ void GPUParticles3D::set_speed_scale(float p_scale) { bool GPUParticles3D::is_emitting() const { return RS::get_singleton()->particles_get_emitting(particles); } + int GPUParticles3D::get_amount() const { return amount; } + float GPUParticles3D::get_lifetime() const { return lifetime; } + bool GPUParticles3D::get_one_shot() const { return one_shot; } @@ -130,18 +140,23 @@ bool GPUParticles3D::get_one_shot() const { float GPUParticles3D::get_pre_process_time() const { return pre_process_time; } + float GPUParticles3D::get_explosiveness_ratio() const { return explosiveness_ratio; } + float GPUParticles3D::get_randomness_ratio() const { return randomness_ratio; } + AABB GPUParticles3D::get_visibility_aabb() const { return visibility_aabb; } + bool GPUParticles3D::get_use_local_coordinates() const { return local_coords; } + Ref<Material> GPUParticles3D::get_process_material() const { return process_material; } @@ -165,6 +180,7 @@ void GPUParticles3D::set_draw_passes(int p_count) { RS::get_singleton()->particles_set_draw_passes(particles, p_count); _change_notify(); } + int GPUParticles3D::get_draw_passes() const { return draw_passes.size(); } diff --git a/scene/3d/immediate_geometry_3d.cpp b/scene/3d/immediate_geometry_3d.cpp index 0d0ce1505f..7f90176271 100644 --- a/scene/3d/immediate_geometry_3d.cpp +++ b/scene/3d/immediate_geometry_3d.cpp @@ -80,6 +80,7 @@ void ImmediateGeometry3D::clear() { AABB ImmediateGeometry3D::get_aabb() const { return aabb; } + Vector<Face3> ImmediateGeometry3D::get_faces(uint32_t p_usage_flags) const { return Vector<Face3>(); } diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index 1fa50b6872..e1ac562e94 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -70,6 +70,7 @@ void Light3D::set_shadow(bool p_enable) { update_configuration_warning(); } } + bool Light3D::has_shadow() const { return shadow; } @@ -78,6 +79,7 @@ void Light3D::set_negative(bool p_enable) { negative = p_enable; RS::get_singleton()->light_set_negative(light, p_enable); } + bool Light3D::is_negative() const { return negative; } @@ -86,6 +88,7 @@ void Light3D::set_cull_mask(uint32_t p_cull_mask) { cull_mask = p_cull_mask; RS::get_singleton()->light_set_cull_mask(light, p_cull_mask); } + uint32_t Light3D::get_cull_mask() const { return cull_mask; } @@ -96,6 +99,7 @@ void Light3D::set_color(const Color &p_color) { // The gizmo color depends on the light color, so update it. update_gizmo(); } + Color Light3D::get_color() const { return color; } @@ -355,6 +359,7 @@ Light3D::~Light3D() { if (light.is_valid()) RenderingServer::get_singleton()->free(light); } + ///////////////////////////////////////// void DirectionalLight3D::set_shadow_mode(ShadowMode p_mode) { diff --git a/scene/3d/listener_3d.cpp b/scene/3d/listener_3d.cpp index 6a5307565b..2015662401 100644 --- a/scene/3d/listener_3d.cpp +++ b/scene/3d/listener_3d.cpp @@ -51,6 +51,7 @@ bool Listener3D::_set(const StringName &p_name, const Variant &p_value) { return true; } + bool Listener3D::_get(const StringName &p_name, Variant &r_ret) const { if (p_name == "current") { if (is_inside_tree() && get_tree()->is_node_being_edited(this)) { diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp index 08a2426e1c..2e79f08bcd 100644 --- a/scene/3d/mesh_instance_3d.cpp +++ b/scene/3d/mesh_instance_3d.cpp @@ -133,6 +133,7 @@ void MeshInstance3D::set_mesh(const Ref<Mesh> &p_mesh) { _change_notify(); } + Ref<Mesh> MeshInstance3D::get_mesh() const { return mesh; } diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index c823e7e532..2a1b35ae39 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -89,6 +89,7 @@ void Node3D::_update_local_transform() const { data.dirty &= ~DIRTY_LOCAL; } + void Node3D::_propagate_transform_changed(Node3D *p_origin) { if (!is_inside_tree()) { return; @@ -246,6 +247,7 @@ Transform Node3D::get_transform() const { return data.local_transform; } + Transform Node3D::get_global_transform() const { ERR_FAIL_COND_V(!is_inside_tree(), Transform()); @@ -560,6 +562,7 @@ void Node3D::rotate_y(float p_angle) { t.basis.rotate(Vector3(0, 1, 0), p_angle); set_transform(t); } + void Node3D::rotate_z(float p_angle) { Transform t = get_transform(); t.basis.rotate(Vector3(0, 0, 1), p_angle); diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 01e456debc..68a13f5612 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -47,6 +47,7 @@ Vector3 PhysicsBody3D::get_linear_velocity() const { return Vector3(); } + Vector3 PhysicsBody3D::get_angular_velocity() const { return Vector3(); } @@ -195,6 +196,7 @@ void StaticBody3D::set_constant_angular_velocity(const Vector3 &p_vel) { Vector3 StaticBody3D::get_constant_linear_velocity() const { return constant_linear_velocity; } + Vector3 StaticBody3D::get_constant_angular_velocity() const { return constant_angular_velocity; } @@ -486,6 +488,7 @@ void RigidBody3D::set_mass(real_t p_mass) { _change_notify("weight"); PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_MASS, mass); } + real_t RigidBody3D::get_mass() const { return mass; } @@ -493,6 +496,7 @@ real_t RigidBody3D::get_mass() const { void RigidBody3D::set_weight(real_t p_weight) { set_mass(p_weight / real_t(GLOBAL_DEF("physics/3d/default_gravity", 9.8))); } + real_t RigidBody3D::get_weight() const { return mass * real_t(GLOBAL_DEF("physics/3d/default_gravity", 9.8)); } @@ -520,6 +524,7 @@ void RigidBody3D::set_gravity_scale(real_t p_gravity_scale) { gravity_scale = p_gravity_scale; PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_GRAVITY_SCALE, gravity_scale); } + real_t RigidBody3D::get_gravity_scale() const { return gravity_scale; } @@ -529,6 +534,7 @@ void RigidBody3D::set_linear_damp(real_t p_linear_damp) { linear_damp = p_linear_damp; PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_LINEAR_DAMP, linear_damp); } + real_t RigidBody3D::get_linear_damp() const { return linear_damp; } @@ -538,6 +544,7 @@ void RigidBody3D::set_angular_damp(real_t p_angular_damp) { angular_damp = p_angular_damp; PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_ANGULAR_DAMP, angular_damp); } + real_t RigidBody3D::get_angular_damp() const { return angular_damp; } @@ -574,6 +581,7 @@ void RigidBody3D::set_angular_velocity(const Vector3 &p_velocity) { else PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_ANGULAR_VELOCITY, angular_velocity); } + Vector3 RigidBody3D::get_angular_velocity() const { return angular_velocity; } @@ -585,6 +593,7 @@ void RigidBody3D::set_use_custom_integrator(bool p_enable) { custom_integrator = p_enable; PhysicsServer3D::get_singleton()->body_set_omit_force_integration(get_rid(), p_enable); } + bool RigidBody3D::is_using_custom_integrator() { return custom_integrator; } @@ -1058,6 +1067,7 @@ bool KinematicBody3D::is_on_floor() const { bool KinematicBody3D::is_on_wall() const { return on_wall; } + bool KinematicBody3D::is_on_ceiling() const { return on_ceiling; } @@ -1128,6 +1138,7 @@ void KinematicBody3D::set_safe_margin(float p_margin) { float KinematicBody3D::get_safe_margin() const { return margin; } + int KinematicBody3D::get_slide_count() const { return colliders.size(); } @@ -1216,6 +1227,7 @@ KinematicBody3D::KinematicBody3D() : PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed"); } + KinematicBody3D::~KinematicBody3D() { if (motion_cache.is_valid()) { motion_cache->owner = nullptr; @@ -1227,20 +1239,25 @@ KinematicBody3D::~KinematicBody3D() { } } } + /////////////////////////////////////// Vector3 KinematicCollision3D::get_position() const { return collision.collision; } + Vector3 KinematicCollision3D::get_normal() const { return collision.normal; } + Vector3 KinematicCollision3D::get_travel() const { return collision.travel; } + Vector3 KinematicCollision3D::get_remainder() const { return collision.remainder; } + Object *KinematicCollision3D::get_local_shape() const { if (!owner) return nullptr; @@ -1255,9 +1272,11 @@ Object *KinematicCollision3D::get_collider() const { return nullptr; } + ObjectID KinematicCollision3D::get_collider_id() const { return collision.collider; } + Object *KinematicCollision3D::get_collider_shape() const { Object *collider = get_collider(); if (collider) { @@ -1270,12 +1289,15 @@ Object *KinematicCollision3D::get_collider_shape() const { return nullptr; } + int KinematicCollision3D::get_collider_shape_index() const { return collision.collider_shape; } + Vector3 KinematicCollision3D::get_collider_velocity() const { return collision.collider_vel; } + Variant KinematicCollision3D::get_collider_metadata() const { return Variant(); } diff --git a/scene/3d/physics_joint_3d.cpp b/scene/3d/physics_joint_3d.cpp index d1a26f33bf..99d0473d9b 100644 --- a/scene/3d/physics_joint_3d.cpp +++ b/scene/3d/physics_joint_3d.cpp @@ -88,6 +88,7 @@ void Joint3D::set_node_b(const NodePath &p_node_b) { b = p_node_b; _update_joint(); } + NodePath Joint3D::get_node_b() const { return b; } @@ -173,6 +174,7 @@ void PinJoint3D::set_param(Param p_param, float p_value) { if (get_joint().is_valid()) PhysicsServer3D::get_singleton()->pin_joint_set_param(get_joint(), PhysicsServer3D::PinJointParam(p_param), p_value); } + float PinJoint3D::get_param(Param p_param) const { ERR_FAIL_INDEX_V(p_param, 3, 0); return params[p_param]; @@ -270,6 +272,7 @@ void HingeJoint3D::set_param(Param p_param, float p_value) { update_gizmo(); } + float HingeJoint3D::get_param(Param p_param) const { ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0); return params[p_param]; @@ -283,6 +286,7 @@ void HingeJoint3D::set_flag(Flag p_flag, bool p_value) { update_gizmo(); } + bool HingeJoint3D::get_flag(Flag p_flag) const { ERR_FAIL_INDEX_V(p_flag, FLAG_MAX, false); return flags[p_flag]; @@ -416,6 +420,7 @@ void SliderJoint3D::set_param(Param p_param, float p_value) { PhysicsServer3D::get_singleton()->slider_joint_set_param(get_joint(), PhysicsServer3D::SliderJointParam(p_param), p_value); update_gizmo(); } + float SliderJoint3D::get_param(Param p_param) const { ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0); return params[p_param]; @@ -521,6 +526,7 @@ void ConeTwistJoint3D::set_param(Param p_param, float p_value) { update_gizmo(); } + float ConeTwistJoint3D::get_param(Param p_param) const { ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0); return params[p_param]; @@ -781,6 +787,7 @@ void Generic6DOFJoint3D::set_param_x(Param p_param, float p_value) { update_gizmo(); } + float Generic6DOFJoint3D::get_param_x(Param p_param) const { ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0); return params_x[p_param]; @@ -793,6 +800,7 @@ void Generic6DOFJoint3D::set_param_y(Param p_param, float p_value) { PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value); update_gizmo(); } + float Generic6DOFJoint3D::get_param_y(Param p_param) const { ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0); return params_y[p_param]; @@ -805,6 +813,7 @@ void Generic6DOFJoint3D::set_param_z(Param p_param, float p_value) { PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value); update_gizmo(); } + float Generic6DOFJoint3D::get_param_z(Param p_param) const { ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0); return params_z[p_param]; @@ -817,6 +826,7 @@ void Generic6DOFJoint3D::set_flag_x(Flag p_flag, bool p_enabled) { PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled); update_gizmo(); } + bool Generic6DOFJoint3D::get_flag_x(Flag p_flag) const { ERR_FAIL_INDEX_V(p_flag, FLAG_MAX, false); return flags_x[p_flag]; @@ -829,6 +839,7 @@ void Generic6DOFJoint3D::set_flag_y(Flag p_flag, bool p_enabled) { PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled); update_gizmo(); } + bool Generic6DOFJoint3D::get_flag_y(Flag p_flag) const { ERR_FAIL_INDEX_V(p_flag, FLAG_MAX, false); return flags_y[p_flag]; @@ -841,6 +852,7 @@ void Generic6DOFJoint3D::set_flag_z(Flag p_flag, bool p_enabled) { PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled); update_gizmo(); } + bool Generic6DOFJoint3D::get_flag_z(Flag p_flag) const { ERR_FAIL_INDEX_V(p_flag, FLAG_MAX, false); return flags_z[p_flag]; diff --git a/scene/3d/ray_cast_3d.cpp b/scene/3d/ray_cast_3d.cpp index 7693906f6f..1b91e58f8f 100644 --- a/scene/3d/ray_cast_3d.cpp +++ b/scene/3d/ray_cast_3d.cpp @@ -71,6 +71,7 @@ bool RayCast3D::get_collision_mask_bit(int p_bit) const { bool RayCast3D::is_colliding() const { return collided; } + Object *RayCast3D::get_collider() const { if (against.is_null()) return nullptr; @@ -81,9 +82,11 @@ Object *RayCast3D::get_collider() const { int RayCast3D::get_collider_shape() const { return against_shape; } + Vector3 RayCast3D::get_collision_point() const { return collision_point; } + Vector3 RayCast3D::get_collision_normal() const { return collision_normal; } diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp index 2cc7913d1c..b1f19053d9 100644 --- a/scene/3d/reflection_probe.cpp +++ b/scene/3d/reflection_probe.cpp @@ -70,6 +70,7 @@ void ReflectionProbe::set_max_distance(float p_distance) { max_distance = p_distance; RS::get_singleton()->reflection_probe_set_max_distance(probe, p_distance); } + float ReflectionProbe::get_max_distance() const { return max_distance; } @@ -93,6 +94,7 @@ void ReflectionProbe::set_extents(const Vector3 &p_extents) { _change_notify("extents"); update_gizmo(); } + Vector3 ReflectionProbe::get_extents() const { return extents; } @@ -111,6 +113,7 @@ void ReflectionProbe::set_origin_offset(const Vector3 &p_extents) { _change_notify("origin_offset"); update_gizmo(); } + Vector3 ReflectionProbe::get_origin_offset() const { return origin_offset; } @@ -119,6 +122,7 @@ void ReflectionProbe::set_enable_box_projection(bool p_enable) { box_projection = p_enable; RS::get_singleton()->reflection_probe_set_enable_box_projection(probe, p_enable); } + bool ReflectionProbe::is_box_projection_enabled() const { return box_projection; } @@ -137,6 +141,7 @@ void ReflectionProbe::set_enable_shadows(bool p_enable) { enable_shadows = p_enable; RS::get_singleton()->reflection_probe_set_enable_shadows(probe, p_enable); } + bool ReflectionProbe::are_shadows_enabled() const { return enable_shadows; } @@ -145,6 +150,7 @@ void ReflectionProbe::set_cull_mask(uint32_t p_layers) { cull_mask = p_layers; RS::get_singleton()->reflection_probe_set_cull_mask(probe, p_layers); } + uint32_t ReflectionProbe::get_cull_mask() const { return cull_mask; } @@ -164,6 +170,7 @@ AABB ReflectionProbe::get_aabb() const { aabb.size = origin_offset + extents; return aabb; } + Vector<Face3> ReflectionProbe::get_faces(uint32_t p_usage_flags) const { return Vector<Face3>(); } diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index c834dad2d0..899579fdbc 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -150,6 +150,7 @@ bool Skeleton3D::_get(const StringName &p_path, Variant &r_ret) const { return true; } + void Skeleton3D::_get_property_list(List<PropertyInfo> *p_list) const { for (int i = 0; i < bones.size(); i++) { String prep = "bones/" + itos(i) + "/"; @@ -407,6 +408,7 @@ void Skeleton3D::add_bone(const String &p_name) { _make_dirty(); update_gizmo(); } + int Skeleton3D::find_bone(const String &p_name) const { for (int i = 0; i < bones.size(); i++) { if (bones[i].name == p_name) @@ -415,6 +417,7 @@ int Skeleton3D::find_bone(const String &p_name) const { return -1; } + String Skeleton3D::get_bone_name(int p_bone) const { ERR_FAIL_INDEX_V(p_bone, bones.size(), ""); @@ -485,6 +488,7 @@ void Skeleton3D::set_bone_rest(int p_bone, const Transform &p_rest) { bones.write[p_bone].rest = p_rest; _make_dirty(); } + Transform Skeleton3D::get_bone_rest(int p_bone) const { ERR_FAIL_INDEX_V(p_bone, bones.size(), Transform()); @@ -497,6 +501,7 @@ void Skeleton3D::set_bone_enabled(int p_bone, bool p_enabled) { bones.write[p_bone].enabled = p_enabled; _make_dirty(); } + bool Skeleton3D::is_bone_enabled(int p_bone) const { ERR_FAIL_INDEX_V(p_bone, bones.size(), false); return bones[p_bone].enabled; @@ -515,6 +520,7 @@ void Skeleton3D::bind_child_node_to_bone(int p_bone, Node *p_node) { bones.write[p_bone].nodes_bound.push_back(id); } + void Skeleton3D::unbind_child_node_from_bone(int p_bone, Node *p_node) { ERR_FAIL_NULL(p_node); ERR_FAIL_INDEX(p_bone, bones.size()); @@ -522,6 +528,7 @@ void Skeleton3D::unbind_child_node_from_bone(int p_bone, Node *p_node) { ObjectID id = p_node->get_instance_id(); bones.write[p_bone].nodes_bound.erase(id); } + void Skeleton3D::get_bound_child_nodes_to_bone(int p_bone, List<Node *> *p_bound) const { ERR_FAIL_INDEX(p_bone, bones.size()); @@ -549,6 +556,7 @@ void Skeleton3D::set_bone_pose(int p_bone, const Transform &p_pose) { _make_dirty(); } } + Transform Skeleton3D::get_bone_pose(int p_bone) const { ERR_FAIL_INDEX_V(p_bone, bones.size(), Transform()); return bones[p_bone].pose; diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index ea89f07266..47c568e9b4 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -495,6 +495,7 @@ void SoftBody3D::set_collision_mask(uint32_t p_mask) { uint32_t SoftBody3D::get_collision_mask() const { return collision_mask; } + void SoftBody3D::set_collision_layer(uint32_t p_layer) { collision_layer = p_layer; PhysicsServer3D::get_singleton()->soft_body_set_collision_layer(physics_rid, p_layer); diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 9764bf77c5..b6f71fcbf8 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -95,6 +95,7 @@ void SpriteBase3D::set_offset(const Point2 &p_offset) { offset = p_offset; _queue_update(); } + Point2 SpriteBase3D::get_offset() const { return offset; } @@ -103,6 +104,7 @@ void SpriteBase3D::set_flip_h(bool p_flip) { hflip = p_flip; _queue_update(); } + bool SpriteBase3D::is_flipped_h() const { return hflip; } @@ -111,6 +113,7 @@ void SpriteBase3D::set_flip_v(bool p_flip) { vflip = p_flip; _queue_update(); } + bool SpriteBase3D::is_flipped_v() const { return vflip; } @@ -129,6 +132,7 @@ void SpriteBase3D::set_pixel_size(float p_amount) { pixel_size = p_amount; _queue_update(); } + float SpriteBase3D::get_pixel_size() const { return pixel_size; } @@ -137,6 +141,7 @@ void SpriteBase3D::set_opacity(float p_amount) { opacity = p_amount; _queue_update(); } + float SpriteBase3D::get_opacity() const { return opacity; } @@ -146,6 +151,7 @@ void SpriteBase3D::set_axis(Vector3::Axis p_axis) { axis = p_axis; _queue_update(); } + Vector3::Axis SpriteBase3D::get_axis() const { return axis; } @@ -170,6 +176,7 @@ void SpriteBase3D::_queue_update() { AABB SpriteBase3D::get_aabb() const { return aabb; } + Vector<Face3> SpriteBase3D::get_faces(uint32_t p_usage_flags) const { return Vector<Face3>(); } @@ -562,6 +569,7 @@ void Sprite3D::set_vframes(int p_amount) { _queue_update(); _change_notify(); } + int Sprite3D::get_vframes() const { return vframes; } @@ -572,6 +580,7 @@ void Sprite3D::set_hframes(int p_amount) { _queue_update(); _change_notify(); } + int Sprite3D::get_hframes() const { return hframes; } @@ -931,6 +940,7 @@ void AnimatedSprite3D::set_frame(int p_frame) { _change_notify("frame"); emit_signal(SceneStringNames::get_singleton()->frame_changed); } + int AnimatedSprite3D::get_frame() const { return frame; } @@ -1016,6 +1026,7 @@ void AnimatedSprite3D::set_animation(const StringName &p_animation) { _change_notify(); _queue_update(); } + StringName AnimatedSprite3D::get_animation() const { return animation; } diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index 186bb48744..1e70b30d66 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -153,6 +153,7 @@ void VehicleWheel3D::set_suspension_rest_length(float p_length) { m_suspensionRestLength = p_length; update_gizmo(); } + float VehicleWheel3D::get_suspension_rest_length() const { return m_suspensionRestLength; } @@ -160,6 +161,7 @@ float VehicleWheel3D::get_suspension_rest_length() const { void VehicleWheel3D::set_suspension_travel(float p_length) { m_maxSuspensionTravelCm = p_length / 0.01; } + float VehicleWheel3D::get_suspension_travel() const { return m_maxSuspensionTravelCm * 0.01; } @@ -167,6 +169,7 @@ float VehicleWheel3D::get_suspension_travel() const { void VehicleWheel3D::set_suspension_stiffness(float p_value) { m_suspensionStiffness = p_value; } + float VehicleWheel3D::get_suspension_stiffness() const { return m_suspensionStiffness; } @@ -174,6 +177,7 @@ float VehicleWheel3D::get_suspension_stiffness() const { void VehicleWheel3D::set_suspension_max_force(float p_value) { m_maxSuspensionForce = p_value; } + float VehicleWheel3D::get_suspension_max_force() const { return m_maxSuspensionForce; } @@ -181,6 +185,7 @@ float VehicleWheel3D::get_suspension_max_force() const { void VehicleWheel3D::set_damping_compression(float p_value) { m_wheelsDampingCompression = p_value; } + float VehicleWheel3D::get_damping_compression() const { return m_wheelsDampingCompression; } @@ -188,6 +193,7 @@ float VehicleWheel3D::get_damping_compression() const { void VehicleWheel3D::set_damping_relaxation(float p_value) { m_wheelsDampingRelaxation = p_value; } + float VehicleWheel3D::get_damping_relaxation() const { return m_wheelsDampingRelaxation; } @@ -195,6 +201,7 @@ float VehicleWheel3D::get_damping_relaxation() const { void VehicleWheel3D::set_friction_slip(float p_value) { m_frictionSlip = p_value; } + float VehicleWheel3D::get_friction_slip() const { return m_frictionSlip; } @@ -292,6 +299,7 @@ float VehicleWheel3D::get_engine_force() const { void VehicleWheel3D::set_brake(float p_brake) { m_brake = p_brake; } + float VehicleWheel3D::get_brake() const { return m_brake; } @@ -299,6 +307,7 @@ float VehicleWheel3D::get_brake() const { void VehicleWheel3D::set_steering(float p_steering) { m_steering = p_steering; } + float VehicleWheel3D::get_steering() const { return m_steering; } @@ -892,6 +901,7 @@ void VehicleBody3D::set_brake(float p_brake) { wheelInfo.m_brake = p_brake; } } + float VehicleBody3D::get_brake() const { return brake; } @@ -904,6 +914,7 @@ void VehicleBody3D::set_steering(float p_steering) { wheelInfo.m_steering = p_steering; } } + float VehicleBody3D::get_steering() const { return m_steeringValue; } diff --git a/scene/3d/velocity_tracker_3d.cpp b/scene/3d/velocity_tracker_3d.cpp index f4f3c7a200..216330939a 100644 --- a/scene/3d/velocity_tracker_3d.cpp +++ b/scene/3d/velocity_tracker_3d.cpp @@ -38,6 +38,7 @@ void VelocityTracker3D::set_track_physics_step(bool p_track_physics_step) { bool VelocityTracker3D::is_tracking_physics_step() const { return physics_step; } + void VelocityTracker3D::update_position(const Vector3 &p_position) { PositionHistory ph; ph.position = p_position; @@ -56,6 +57,7 @@ void VelocityTracker3D::update_position(const Vector3 &p_position) { position_history.write[0] = ph; } + Vector3 VelocityTracker3D::get_tracked_linear_velocity() const { Vector3 linear_velocity; diff --git a/scene/3d/visibility_notifier_3d.cpp b/scene/3d/visibility_notifier_3d.cpp index 9c2035f1d8..afc7293b13 100644 --- a/scene/3d/visibility_notifier_3d.cpp +++ b/scene/3d/visibility_notifier_3d.cpp @@ -232,6 +232,7 @@ void VisibilityEnabler3D::set_enabler(Enabler p_enabler, bool p_enable) { ERR_FAIL_INDEX(p_enabler, ENABLER_MAX); enabler[p_enabler] = p_enable; } + bool VisibilityEnabler3D::is_enabler_enabled(Enabler p_enabler) const { ERR_FAIL_INDEX_V(p_enabler, ENABLER_MAX, false); return enabler[p_enabler]; diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp index 3af0c0dff0..cf67ba71c9 100644 --- a/scene/3d/visual_instance_3d.cpp +++ b/scene/3d/visual_instance_3d.cpp @@ -235,6 +235,7 @@ bool GeometryInstance3D::_get(const StringName &p_name, Variant &r_ret) const { return false; } + void GeometryInstance3D::_get_property_list(List<PropertyInfo> *p_list) const { List<PropertyInfo> pinfo; RS::get_singleton()->instance_geometry_get_shader_parameter_list(get_instance(), &pinfo); @@ -290,6 +291,7 @@ void GeometryInstance3D::set_shader_instance_uniform(const StringName &p_uniform Variant GeometryInstance3D::get_shader_instance_uniform(const StringName &p_uniform) const { return RS::get_singleton()->instance_geometry_get_shader_parameter(get_instance(), p_uniform); } + void GeometryInstance3D::set_custom_aabb(AABB aabb) { RS::get_singleton()->instance_set_custom_aabb(get_instance(), aabb); } diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp index 333c486165..886ec89c28 100644 --- a/scene/3d/voxelizer.cpp +++ b/scene/3d/voxelizer.cpp @@ -664,9 +664,11 @@ void Voxelizer::end_bake() { int Voxelizer::get_gi_probe_octree_depth() const { return cell_subdiv; } + Vector3i Voxelizer::get_giprobe_octree_size() const { return Vector3i(axis_cell_size[0], axis_cell_size[1], axis_cell_size[2]); } + int Voxelizer::get_giprobe_cell_count() const { return bake_cells.size(); } @@ -690,6 +692,7 @@ Vector<uint8_t> Voxelizer::get_giprobe_octree_cells() const { return data; } + Vector<uint8_t> Voxelizer::get_giprobe_data_cells() const { Vector<uint8_t> data; data.resize((4 * 4) * bake_cells.size()); //8 uint32t values @@ -989,6 +992,7 @@ Ref<MultiMesh> Voxelizer::create_debug_multimesh() { Transform Voxelizer::get_to_cell_space_xform() const { return to_cell_space; } + Voxelizer::Voxelizer() { sorted = false; color_scan_cell_width = 4; |