summaryrefslogtreecommitdiff
path: root/servers/visual/rasterizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual/rasterizer.h')
-rw-r--r--servers/visual/rasterizer.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 164baa8c9b..21d059c48e 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -234,7 +234,7 @@ public:
virtual RID mesh_create() = 0;
- virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const Rect3 &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<Rect3> &p_bone_aabbs = Vector<Rect3>()) = 0;
+ virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector<uint8_t> &p_array, int p_vertex_count, const PoolVector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<PoolVector<uint8_t> > &p_blend_shapes = Vector<PoolVector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()) = 0;
virtual void mesh_set_blend_shape_count(RID p_mesh, int p_amount) = 0;
virtual int mesh_get_blend_shape_count(RID p_mesh) const = 0;
@@ -242,6 +242,8 @@ public:
virtual void mesh_set_blend_shape_mode(RID p_mesh, VS::BlendShapeMode p_mode) = 0;
virtual VS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const = 0;
+ virtual void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const PoolVector<uint8_t> &p_data) = 0;
+
virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) = 0;
virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const = 0;
@@ -254,17 +256,17 @@ public:
virtual uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const = 0;
virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const = 0;
- virtual Rect3 mesh_surface_get_aabb(RID p_mesh, int p_surface) const = 0;
+ virtual AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const = 0;
virtual Vector<PoolVector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const = 0;
- virtual Vector<Rect3> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const = 0;
+ virtual Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const = 0;
virtual void mesh_remove_surface(RID p_mesh, int p_index) = 0;
virtual int mesh_get_surface_count(RID p_mesh) const = 0;
- virtual void mesh_set_custom_aabb(RID p_mesh, const Rect3 &p_aabb) = 0;
- virtual Rect3 mesh_get_custom_aabb(RID p_mesh) const = 0;
+ virtual void mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) = 0;
+ virtual AABB mesh_get_custom_aabb(RID p_mesh) const = 0;
- virtual Rect3 mesh_get_aabb(RID p_mesh, RID p_skeleton) const = 0;
+ virtual AABB mesh_get_aabb(RID p_mesh, RID p_skeleton) const = 0;
virtual void mesh_clear(RID p_mesh) = 0;
/* MULTIMESH API */
@@ -288,7 +290,7 @@ public:
virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible) = 0;
virtual int multimesh_get_visible_instances(RID p_multimesh) const = 0;
- virtual Rect3 multimesh_get_aabb(RID p_multimesh) const = 0;
+ virtual AABB multimesh_get_aabb(RID p_multimesh) const = 0;
/* IMMEDIATE API */
@@ -304,7 +306,7 @@ public:
virtual void immediate_clear(RID p_immediate) = 0;
virtual void immediate_set_material(RID p_immediate, RID p_material) = 0;
virtual RID immediate_get_material(RID p_immediate) const = 0;
- virtual Rect3 immediate_get_aabb(RID p_immediate) const = 0;
+ virtual AABB immediate_get_aabb(RID p_immediate) const = 0;
/* SKELETON API */
@@ -348,7 +350,7 @@ public:
virtual bool light_has_shadow(RID p_light) const = 0;
virtual VS::LightType light_get_type(RID p_light) const = 0;
- virtual Rect3 light_get_aabb(RID p_light) const = 0;
+ virtual AABB light_get_aabb(RID p_light) const = 0;
virtual float light_get_param(RID p_light, VS::LightParam p_param) = 0;
virtual Color light_get_color(RID p_light) = 0;
virtual uint64_t light_get_version(RID p_light) const = 0;
@@ -370,7 +372,7 @@ public:
virtual void reflection_probe_set_enable_shadows(RID p_probe, bool p_enable) = 0;
virtual void reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers) = 0;
- virtual Rect3 reflection_probe_get_aabb(RID p_probe) const = 0;
+ virtual AABB reflection_probe_get_aabb(RID p_probe) const = 0;
virtual VS::ReflectionProbeUpdateMode reflection_probe_get_update_mode(RID p_probe) const = 0;
virtual uint32_t reflection_probe_get_cull_mask(RID p_probe) const = 0;
virtual Vector3 reflection_probe_get_extents(RID p_probe) const = 0;
@@ -388,8 +390,8 @@ public:
virtual RID gi_probe_create() = 0;
- virtual void gi_probe_set_bounds(RID p_probe, const Rect3 &p_bounds) = 0;
- virtual Rect3 gi_probe_get_bounds(RID p_probe) const = 0;
+ virtual void gi_probe_set_bounds(RID p_probe, const AABB &p_bounds) = 0;
+ virtual AABB gi_probe_get_bounds(RID p_probe) const = 0;
virtual void gi_probe_set_cell_size(RID p_probe, float p_range) = 0;
virtual float gi_probe_get_cell_size(RID p_probe) const = 0;
@@ -444,7 +446,7 @@ public:
virtual void particles_set_pre_process_time(RID p_particles, float p_time) = 0;
virtual void particles_set_explosiveness_ratio(RID p_particles, float p_ratio) = 0;
virtual void particles_set_randomness_ratio(RID p_particles, float p_ratio) = 0;
- virtual void particles_set_custom_aabb(RID p_particles, const Rect3 &p_aabb) = 0;
+ virtual void particles_set_custom_aabb(RID p_particles, const AABB &p_aabb) = 0;
virtual void particles_set_speed_scale(RID p_particles, float p_scale) = 0;
virtual void particles_set_use_local_coordinates(RID p_particles, bool p_enable) = 0;
virtual void particles_set_process_material(RID p_particles, RID p_material) = 0;
@@ -458,8 +460,8 @@ public:
virtual void particles_set_draw_pass_mesh(RID p_particles, int p_pass, RID p_mesh) = 0;
virtual void particles_request_process(RID p_particles) = 0;
- virtual Rect3 particles_get_current_aabb(RID p_particles) = 0;
- virtual Rect3 particles_get_aabb(RID p_particles) const = 0;
+ virtual AABB particles_get_current_aabb(RID p_particles) = 0;
+ virtual AABB particles_get_aabb(RID p_particles) const = 0;
virtual void particles_set_emission_transform(RID p_particles, const Transform &p_transform) = 0;
@@ -880,7 +882,7 @@ public:
case Item::Command::TYPE_MESH: {
const Item::CommandMesh *mesh = static_cast<const Item::CommandMesh *>(c);
- Rect3 aabb = RasterizerStorage::base_singleton->mesh_get_aabb(mesh->mesh, mesh->skeleton);
+ AABB aabb = RasterizerStorage::base_singleton->mesh_get_aabb(mesh->mesh, mesh->skeleton);
r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y);
@@ -888,7 +890,7 @@ public:
case Item::Command::TYPE_MULTIMESH: {
const Item::CommandMultiMesh *multimesh = static_cast<const Item::CommandMultiMesh *>(c);
- Rect3 aabb = RasterizerStorage::base_singleton->multimesh_get_aabb(multimesh->multimesh);
+ AABB aabb = RasterizerStorage::base_singleton->multimesh_get_aabb(multimesh->multimesh);
r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y);
@@ -897,7 +899,7 @@ public:
const Item::CommandParticles *particles_cmd = static_cast<const Item::CommandParticles *>(c);
if (particles_cmd->particles.is_valid()) {
- Rect3 aabb = RasterizerStorage::base_singleton->particles_get_aabb(particles_cmd->particles);
+ AABB aabb = RasterizerStorage::base_singleton->particles_get_aabb(particles_cmd->particles);
r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y);
}