diff options
Diffstat (limited to 'scene/3d/gi_probe.cpp')
-rw-r--r-- | scene/3d/gi_probe.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 34540525af..918646fd9e 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -47,14 +47,14 @@ void GIProbeData::_set_data(const Dictionary &p_data) { AABB bounds = p_data["bounds"]; Vector3 octree_size = p_data["octree_size"]; - PoolVector<uint8_t> octree_cells = p_data["octree_cells"]; - PoolVector<uint8_t> octree_data = p_data["octree_data"]; + Vector<uint8_t> octree_cells = p_data["octree_cells"]; + Vector<uint8_t> octree_data = p_data["octree_data"]; - PoolVector<uint8_t> octree_df; + Vector<uint8_t> octree_df; if (p_data.has("octree_df")) { octree_df = p_data["octree_df"]; } else if (p_data.has("octree_df_png")) { - PoolVector<uint8_t> octree_df_png = p_data["octree_df_png"]; + Vector<uint8_t> octree_df_png = p_data["octree_df_png"]; Ref<Image> img; img.instance(); Error err = img->load_png_from_buffer(octree_df_png); @@ -62,7 +62,7 @@ void GIProbeData::_set_data(const Dictionary &p_data) { ERR_FAIL_COND(img->get_format() != Image::FORMAT_L8); octree_df = img->get_data(); } - PoolVector<int> octree_levels = p_data["level_counts"]; + Vector<int> octree_levels = p_data["level_counts"]; Transform to_cell_xform = p_data["to_cell_xform"]; allocate(to_cell_xform, bounds, octree_size, octree_cells, octree_data, octree_df, octree_levels); @@ -79,11 +79,11 @@ Dictionary GIProbeData::_get_data() const { Ref<Image> img; img.instance(); img->create(otsize.x * otsize.y, otsize.z, false, Image::FORMAT_L8, get_distance_field()); - PoolVector<uint8_t> df_png = img->save_png_to_buffer(); + Vector<uint8_t> df_png = img->save_png_to_buffer(); ERR_FAIL_COND_V(df_png.size() == 0, Dictionary()); d["octree_df_png"] = df_png; } else { - d["octree_df"] = PoolVector<uint8_t>(); + d["octree_df"] = Vector<uint8_t>(); } d["level_counts"] = get_level_counts(); @@ -91,7 +91,7 @@ Dictionary GIProbeData::_get_data() const { return d; } -void GIProbeData::allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const PoolVector<uint8_t> &p_octree_cells, const PoolVector<uint8_t> &p_data_cells, const PoolVector<uint8_t> &p_distance_field, const PoolVector<int> &p_level_counts) { +void GIProbeData::allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) { VS::get_singleton()->gi_probe_allocate(probe, p_to_cell_xform, p_aabb, p_octree_size, p_octree_cells, p_data_cells, p_distance_field, p_level_counts); bounds = p_aabb; to_cell_xform = p_to_cell_xform; @@ -104,17 +104,17 @@ AABB GIProbeData::get_bounds() const { Vector3 GIProbeData::get_octree_size() const { return octree_size; } -PoolVector<uint8_t> GIProbeData::get_octree_cells() const { +Vector<uint8_t> GIProbeData::get_octree_cells() const { return VS::get_singleton()->gi_probe_get_octree_cells(probe); } -PoolVector<uint8_t> GIProbeData::get_data_cells() const { +Vector<uint8_t> GIProbeData::get_data_cells() const { return VS::get_singleton()->gi_probe_get_data_cells(probe); } -PoolVector<uint8_t> GIProbeData::get_distance_field() const { +Vector<uint8_t> GIProbeData::get_distance_field() const { return VS::get_singleton()->gi_probe_get_distance_field(probe); } -PoolVector<int> GIProbeData::get_level_counts() const { +Vector<int> GIProbeData::get_level_counts() const { return VS::get_singleton()->gi_probe_get_level_counts(probe); } Transform GIProbeData::get_to_cell_xform() const { @@ -492,7 +492,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) { bake_step_function(pmc++, RTR("Generating Distance Field")); } - PoolVector<uint8_t> df = baker.get_sdf_3d_image(); + Vector<uint8_t> df = baker.get_sdf_3d_image(); probe_data->allocate(baker.get_to_cell_space_xform(), AABB(-extents, extents * 2.0), baker.get_giprobe_octree_size(), baker.get_giprobe_octree_cells(), baker.get_giprobe_data_cells(), df, baker.get_giprobe_level_cell_count()); @@ -519,9 +519,9 @@ AABB GIProbe::get_aabb() const { return AABB(-extents, extents * 2); } -PoolVector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const { +Vector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const { - return PoolVector<Face3>(); + return Vector<Face3>(); } String GIProbe::get_configuration_warning() const { |