diff options
Diffstat (limited to 'scene/3d')
32 files changed, 127 insertions, 127 deletions
diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp index b5cc451835..f85dfea80e 100644 --- a/scene/3d/baked_light_instance.cpp +++ b/scene/3d/baked_light_instance.cpp @@ -204,7 +204,7 @@ Vector<Color> BakedLight::_get_bake_texture(Image &p_image,const Color& p_color) p_image.resize(bake_texture_size,bake_texture_size,Image::INTERPOLATE_CUBIC); - DVector<uint8_t>::Read r = p_image.get_data().read(); + PoolVector<uint8_t>::Read r = p_image.get_data().read(); ret.resize(bake_texture_size*bake_texture_size); for(int i=0;i<bake_texture_size*bake_texture_size;i++) { @@ -506,7 +506,7 @@ void BakedLight::_plot_face(int p_idx, int p_level, const Vector3 *p_vtx, const if (bake_cells_used==(1<<bake_cells_alloc)) { //exhausted cells, creating more space bake_cells_alloc++; - bake_cells_write=DVector<BakeCell>::Write(); + bake_cells_write=PoolVector<BakeCell>::Write(); bake_cells.resize(1<<bake_cells_alloc); bake_cells_write=bake_cells.write(); } @@ -670,11 +670,11 @@ void BakedLight::_bake_add_mesh(const Transform& p_xform,Ref<Mesh>& p_mesh) { Array a = p_mesh->surface_get_arrays(i); - DVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX]; - DVector<Vector3>::Read vr=vertices.read(); - DVector<Vector2> uv = a[Mesh::ARRAY_TEX_UV]; - DVector<Vector2>::Read uvr; - DVector<int> index = a[Mesh::ARRAY_INDEX]; + PoolVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX]; + PoolVector<Vector3>::Read vr=vertices.read(); + PoolVector<Vector2> uv = a[Mesh::ARRAY_TEX_UV]; + PoolVector<Vector2>::Read uvr; + PoolVector<int> index = a[Mesh::ARRAY_INDEX]; bool read_uv=false; @@ -687,7 +687,7 @@ void BakedLight::_bake_add_mesh(const Transform& p_xform,Ref<Mesh>& p_mesh) { if (index.size()) { int facecount = index.size()/3; - DVector<int>::Read ir=index.read(); + PoolVector<int>::Read ir=index.read(); for(int j=0;j<facecount;j++) { @@ -747,9 +747,9 @@ void BakedLight::_bake_add_to_aabb(const Transform& p_xform,Ref<Mesh>& p_mesh,bo continue; //only triangles Array a = p_mesh->surface_get_arrays(i); - DVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX]; + PoolVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX]; int vc = vertices.size(); - DVector<Vector3>::Read vr=vertices.read(); + PoolVector<Vector3>::Read vr=vertices.read(); if (first) { bounds.pos=p_xform.xform(vr[0]); @@ -827,7 +827,7 @@ void BakedLight::bake() { _fixup_plot(0, 0,0,0,0); - bake_cells_write=DVector<BakeCell>::Write(); + bake_cells_write=PoolVector<BakeCell>::Write(); bake_cells.resize(bake_cells_used); @@ -1005,7 +1005,7 @@ void BakedLight::bake_lights() { _upscale_light(0,0); - bake_cells_write=DVector<BakeCell>::Write(); + bake_cells_write=PoolVector<BakeCell>::Write(); } @@ -1371,7 +1371,7 @@ void BakedLight::bake_radiance() { _bake_radiance(0,0,0,0,0); - bake_cells_write=DVector<BakeCell>::Write(); + bake_cells_write=PoolVector<BakeCell>::Write(); } int BakedLight::_find_cell(int x,int y, int z) { @@ -1538,9 +1538,9 @@ AABB BakedLight::get_aabb() const { return AABB(Vector3(0,0,0),Vector3(1,1,1)); } -DVector<Face3> BakedLight::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> BakedLight::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } @@ -1621,8 +1621,8 @@ void BakedLight::create_debug_mesh(DebugMode p_mode) { Array arr; arr.resize(Mesh::ARRAY_MAX); - DVector<Vector3> vertices; - DVector<Color> colors; + PoolVector<Vector3> vertices; + PoolVector<Color> colors; int vtx_idx=0; #define ADD_VTX(m_idx);\ diff --git a/scene/3d/baked_light_instance.h b/scene/3d/baked_light_instance.h index d097a9af60..461b3adeff 100644 --- a/scene/3d/baked_light_instance.h +++ b/scene/3d/baked_light_instance.h @@ -107,8 +107,8 @@ private: int bake_cells_used; int zero_alphas; Vector<int> bake_cells_level_used; - DVector<BakeCell> bake_cells; - DVector<BakeCell>::Write bake_cells_write; + PoolVector<BakeCell> bake_cells; + PoolVector<BakeCell>::Write bake_cells_write; @@ -157,7 +157,7 @@ public: void create_debug_mesh(DebugMode p_mode); virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; String get_configuration_warning() const; @@ -192,7 +192,7 @@ protected: public: virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; void set_param(Param p_param,float p_value); float get_param(Param p_param) const; diff --git a/scene/3d/body_shape.cpp b/scene/3d/body_shape.cpp index 0f71933388..ff8b0f15bf 100644 --- a/scene/3d/body_shape.cpp +++ b/scene/3d/body_shape.cpp @@ -83,8 +83,8 @@ void CollisionShape::_update_indicator() { if (shape.is_null()) return; - DVector<Vector3> points; - DVector<Vector3> normals; + PoolVector<Vector3> points; + PoolVector<Vector3> normals; VS::PrimitiveType pt = VS::PRIMITIVE_TRIANGLES; @@ -235,7 +235,7 @@ void CollisionShape::_update_indicator() { CapsuleShape *shapeptr=shape->cast_to<CapsuleShape>(); - DVector<Plane> planes = Geometry::build_capsule_planes(shapeptr->get_radius(), shapeptr->get_height()/2.0, 12, Vector3::AXIS_Z); + PoolVector<Plane> planes = Geometry::build_capsule_planes(shapeptr->get_radius(), shapeptr->get_height()/2.0, 12, Vector3::AXIS_Z); Geometry::MeshData md = Geometry::build_convex_mesh(planes); for(int i=0;i<md.faces.size();i++) { @@ -840,7 +840,7 @@ void CollisionShapeCylinder::update_indicator(RID p_indicator) { vs->poly_clear(p_indicator); Color col(0.4,1.0,1.0,0.5); - DVector<Plane> planes = Geometry::build_cylinder_planes(radius, height, 12, Vector3::AXIS_Z); + PoolVector<Plane> planes = Geometry::build_cylinder_planes(radius, height, 12, Vector3::AXIS_Z); Geometry::MeshData md = Geometry::build_convex_mesh(planes); for(int i=0;i<md.faces.size();i++) { @@ -906,7 +906,7 @@ void CollisionShapeCapsule::update_indicator(RID p_indicator) { vs->poly_clear(p_indicator); Color col(0.4,1.0,1.0,0.5); - DVector<Plane> planes = Geometry::build_capsule_planes(radius, height, 12, 3, Vector3::AXIS_Z); + PoolVector<Plane> planes = Geometry::build_capsule_planes(radius, height, 12, 3, Vector3::AXIS_Z); Geometry::MeshData md = Geometry::build_convex_mesh(planes); for(int i=0;i<md.faces.size();i++) { diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp index 8c34748191..6cc0291707 100644 --- a/scene/3d/collision_polygon.cpp +++ b/scene/3d/collision_polygon.cpp @@ -56,11 +56,11 @@ void CollisionPolygon::_add_to_collision_object(Object *p_obj) { shape_from=co->get_shape_count(); for(int i=0;i<decomp.size();i++) { Ref<ConvexPolygonShape> convex = memnew( ConvexPolygonShape ); - DVector<Vector3> cp; + PoolVector<Vector3> cp; int cs = decomp[i].size(); cp.resize(cs*2); { - DVector<Vector3>::Write w = cp.write(); + PoolVector<Vector3>::Write w = cp.write(); int idx=0; for(int j=0;j<cs;j++) { @@ -84,16 +84,16 @@ void CollisionPolygon::_add_to_collision_object(Object *p_obj) { #if 0 Ref<ConcavePolygonShape> concave = memnew( ConcavePolygonShape ); - DVector<Vector2> segments; + PoolVector<Vector2> segments; segments.resize(polygon.size()*2); - DVector<Vector2>::Write w=segments.write(); + PoolVector<Vector2>::Write w=segments.write(); for(int i=0;i<polygon.size();i++) { w[(i<<1)+0]=polygon[i]; w[(i<<1)+1]=polygon[(i+1)%polygon.size()]; } - w=DVector<Vector2>::Write(); + w=PoolVector<Vector2>::Write(); concave->set_segments(segments); co->add_shape(concave,get_transform()); diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 19c67faa39..5b51273d0e 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -37,12 +37,12 @@ Transform GIProbeData::get_to_cell_xform() const { } -void GIProbeData::set_dynamic_data(const DVector<int>& p_data){ +void GIProbeData::set_dynamic_data(const PoolVector<int>& p_data){ VS::get_singleton()->gi_probe_set_dynamic_data(probe,p_data); } -DVector<int> GIProbeData::get_dynamic_data() const{ +PoolVector<int> GIProbeData::get_dynamic_data() const{ return VS::get_singleton()->gi_probe_get_dynamic_data(probe); } @@ -832,7 +832,7 @@ Vector<Color> GIProbe::_get_bake_texture(Image &p_image,const Color& p_color) { p_image.resize(bake_texture_size,bake_texture_size,Image::INTERPOLATE_CUBIC); - DVector<uint8_t>::Read r = p_image.get_data().read(); + PoolVector<uint8_t>::Read r = p_image.get_data().read(); ret.resize(bake_texture_size*bake_texture_size); for(int i=0;i<bake_texture_size*bake_texture_size;i++) { @@ -919,11 +919,11 @@ void GIProbe::_plot_mesh(const Transform& p_xform, Ref<Mesh>& p_mesh, Baker *p_b Array a = p_mesh->surface_get_arrays(i); - DVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX]; - DVector<Vector3>::Read vr=vertices.read(); - DVector<Vector2> uv = a[Mesh::ARRAY_TEX_UV]; - DVector<Vector2>::Read uvr; - DVector<int> index = a[Mesh::ARRAY_INDEX]; + PoolVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX]; + PoolVector<Vector3>::Read vr=vertices.read(); + PoolVector<Vector2> uv = a[Mesh::ARRAY_TEX_UV]; + PoolVector<Vector2>::Read uvr; + PoolVector<int> index = a[Mesh::ARRAY_INDEX]; bool read_uv=false; @@ -936,7 +936,7 @@ void GIProbe::_plot_mesh(const Transform& p_xform, Ref<Mesh>& p_mesh, Baker *p_b if (index.size()) { int facecount = index.size()/3; - DVector<int>::Read ir=index.read(); + PoolVector<int>::Read ir=index.read(); for(int j=0;j<facecount;j++) { @@ -1090,12 +1090,12 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug){ //create the data for visual server - DVector<int> data; + PoolVector<int> data; data.resize( 16+(8+1+1+1+1)*baker.bake_cells.size() ); //4 for header, rest for rest. { - DVector<int>::Write w = data.write(); + PoolVector<int>::Write w = data.write(); uint32_t * w32 = (uint32_t*)w.ptr(); @@ -1247,8 +1247,8 @@ void GIProbe::_create_debug_mesh(Baker *p_baker) { Array arr; arr.resize(Mesh::ARRAY_MAX); - DVector<Vector3> vertices; - DVector<Color> colors; + PoolVector<Vector3> vertices; + PoolVector<Color> colors; int vtx_idx=0; #define ADD_VTX(m_idx);\ @@ -1333,9 +1333,9 @@ AABB GIProbe::get_aabb() const { return AABB(-extents,extents*2); } -DVector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } void GIProbe::_bind_methods() { diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h index 4b06c13268..55cde2960a 100644 --- a/scene/3d/gi_probe.h +++ b/scene/3d/gi_probe.h @@ -26,8 +26,8 @@ public: void set_to_cell_xform(const Transform& p_xform); Transform get_to_cell_xform() const; - void set_dynamic_data(const DVector<int>& p_data); - DVector<int> get_dynamic_data() const; + void set_dynamic_data(const PoolVector<int>& p_data); + PoolVector<int> get_dynamic_data() const; void set_dynamic_range(int p_range); int get_dynamic_range() const; @@ -179,7 +179,7 @@ public: void bake(Node *p_from_node=NULL,bool p_create_visual_debug=false); virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; GIProbe(); ~GIProbe(); diff --git a/scene/3d/immediate_geometry.cpp b/scene/3d/immediate_geometry.cpp index 4ee2e646e6..ee200cb3ea 100644 --- a/scene/3d/immediate_geometry.cpp +++ b/scene/3d/immediate_geometry.cpp @@ -96,9 +96,9 @@ AABB ImmediateGeometry::get_aabb() const { return aabb; } -DVector<Face3> ImmediateGeometry::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> ImmediateGeometry::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } diff --git a/scene/3d/immediate_geometry.h b/scene/3d/immediate_geometry.h index 3c8a76fbc7..bf624e67fd 100644 --- a/scene/3d/immediate_geometry.h +++ b/scene/3d/immediate_geometry.h @@ -67,7 +67,7 @@ public: virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; ImmediateGeometry(); ~ImmediateGeometry(); diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index 84a6fecf5e..ba3c63c403 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -135,9 +135,9 @@ AABB Light::get_aabb() const { return AABB(); } -DVector<Face3> Light::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> Light::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } diff --git a/scene/3d/light.h b/scene/3d/light.h index d3585b5cf2..3481d0229c 100644 --- a/scene/3d/light.h +++ b/scene/3d/light.h @@ -118,7 +118,7 @@ public: virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; Light(); ~Light(); diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index ef633ac301..5b12f80d5c 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -177,13 +177,13 @@ AABB MeshInstance::get_aabb() const { return AABB(); } -DVector<Face3> MeshInstance::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> MeshInstance::get_faces(uint32_t p_usage_flags) const { if (!(p_usage_flags&(FACES_SOLID|FACES_ENCLOSING))) - return DVector<Face3>(); + return PoolVector<Face3>(); if (mesh.is_null()) - return DVector<Face3>(); + return PoolVector<Face3>(); return mesh->get_faces(); } diff --git a/scene/3d/mesh_instance.h b/scene/3d/mesh_instance.h index 92f181c24e..1291d6b12f 100644 --- a/scene/3d/mesh_instance.h +++ b/scene/3d/mesh_instance.h @@ -81,7 +81,7 @@ public: void create_convex_collision(); virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; MeshInstance(); ~MeshInstance(); diff --git a/scene/3d/multimesh_instance.cpp b/scene/3d/multimesh_instance.cpp index 44cd7485ca..a9d1de1cfa 100644 --- a/scene/3d/multimesh_instance.cpp +++ b/scene/3d/multimesh_instance.cpp @@ -58,9 +58,9 @@ Ref<MultiMesh> MultiMeshInstance::get_multimesh() const { -DVector<Face3> MultiMeshInstance::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> MultiMeshInstance::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } AABB MultiMeshInstance::get_aabb() const { diff --git a/scene/3d/multimesh_instance.h b/scene/3d/multimesh_instance.h index 503f5e75fc..ef2403a44a 100644 --- a/scene/3d/multimesh_instance.h +++ b/scene/3d/multimesh_instance.h @@ -49,7 +49,7 @@ protected: public: - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; void set_multimesh(const Ref<MultiMesh>& p_multimesh); Ref<MultiMesh> get_multimesh() const; diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index 598a935e4b..40666a60dc 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -36,12 +36,12 @@ void Navigation::_navmesh_link(int p_id) { print_line("LINK"); - DVector<Vector3> vertices=nm.navmesh->get_vertices(); + PoolVector<Vector3> vertices=nm.navmesh->get_vertices(); int len = vertices.size(); if (len==0) return; - DVector<Vector3>::Read r=vertices.read(); + PoolVector<Vector3>::Read r=vertices.read(); for(int i=0;i<nm.navmesh->get_polygon_count();i++) { diff --git a/scene/3d/navigation_mesh.cpp b/scene/3d/navigation_mesh.cpp index 9ed3b4147a..7ec9085e30 100644 --- a/scene/3d/navigation_mesh.cpp +++ b/scene/3d/navigation_mesh.cpp @@ -33,7 +33,7 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh>& p_mesh) { - vertices=DVector<Vector3>(); + vertices=PoolVector<Vector3>(); clear_polygons(); for(int i=0;i<p_mesh->get_surface_count();i++) { @@ -41,15 +41,15 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh>& p_mesh) { if (p_mesh->surface_get_primitive_type(i)!=Mesh::PRIMITIVE_TRIANGLES) continue; Array arr = p_mesh->surface_get_arrays(i); - DVector<Vector3> varr = arr[Mesh::ARRAY_VERTEX]; - DVector<int> iarr = arr[Mesh::ARRAY_INDEX]; + PoolVector<Vector3> varr = arr[Mesh::ARRAY_VERTEX]; + PoolVector<int> iarr = arr[Mesh::ARRAY_INDEX]; if (varr.size()==0 || iarr.size()==0) continue; int from = vertices.size(); vertices.append_array(varr); int rlen = iarr.size(); - DVector<int>::Read r = iarr.read(); + PoolVector<int>::Read r = iarr.read(); for(int j=0;j<rlen;j+=3) { Vector<int> vi; @@ -63,12 +63,12 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh>& p_mesh) { } } -void NavigationMesh::set_vertices(const DVector<Vector3>& p_vertices) { +void NavigationMesh::set_vertices(const PoolVector<Vector3>& p_vertices) { vertices=p_vertices; } -DVector<Vector3> NavigationMesh::get_vertices() const{ +PoolVector<Vector3> NavigationMesh::get_vertices() const{ return vertices; } @@ -122,8 +122,8 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { - DVector<Vector3> vertices = get_vertices(); - DVector<Vector3>::Read vr=vertices.read(); + PoolVector<Vector3> vertices = get_vertices(); + PoolVector<Vector3>::Read vr=vertices.read(); List<Face3> faces; for(int i=0;i<get_polygon_count();i++) { Vector<int> p = get_polygon(i); @@ -140,11 +140,11 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { Map<_EdgeKey,bool> edge_map; - DVector<Vector3> tmeshfaces; + PoolVector<Vector3> tmeshfaces; tmeshfaces.resize(faces.size()*3); { - DVector<Vector3>::Write tw=tmeshfaces.write(); + PoolVector<Vector3>::Write tw=tmeshfaces.write(); int tidx=0; @@ -185,10 +185,10 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { } } - DVector<Vector3> varr; + PoolVector<Vector3> varr; varr.resize(lines.size()); { - DVector<Vector3>::Write w = varr.write(); + PoolVector<Vector3>::Write w = varr.write(); int idx=0; for(List<Vector3>::Element *E=lines.front();E;E=E->next()) { w[idx++]=E->get(); diff --git a/scene/3d/navigation_mesh.h b/scene/3d/navigation_mesh.h index a0bdc5a516..e025b7ce8b 100644 --- a/scene/3d/navigation_mesh.h +++ b/scene/3d/navigation_mesh.h @@ -38,7 +38,7 @@ class NavigationMesh : public Resource { GDCLASS( NavigationMesh, Resource ); - DVector<Vector3> vertices; + PoolVector<Vector3> vertices; struct Polygon { Vector<int> indices; }; @@ -65,8 +65,8 @@ public: void create_from_mesh(const Ref<Mesh>& p_mesh); - void set_vertices(const DVector<Vector3>& p_vertices); - DVector<Vector3> get_vertices() const; + void set_vertices(const PoolVector<Vector3>& p_vertices); + PoolVector<Vector3> get_vertices() const; void add_polygon(const Vector<int>& p_polygon); int get_polygon_count() const; diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index 09be49d7d6..9e37658cd9 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -88,9 +88,9 @@ AABB Particles::get_aabb() const { return AABB( Vector3(-1,-1,-1), Vector3(2, 2, 2 ) ); } -DVector<Face3> Particles::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> Particles::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } @@ -130,16 +130,16 @@ AABB Particles::get_visibility_aabb() const { } -void Particles::set_emission_points(const DVector<Vector3>& p_points) { +void Particles::set_emission_points(const PoolVector<Vector3>& p_points) { using_points = p_points.size(); VisualServer::get_singleton()->particles_set_emission_points(particles,p_points); } -DVector<Vector3> Particles::get_emission_points() const { +PoolVector<Vector3> Particles::get_emission_points() const { if (!using_points) - return DVector<Vector3>(); + return PoolVector<Vector3>(); return VisualServer::get_singleton()->particles_get_emission_points(particles); diff --git a/scene/3d/particles.h b/scene/3d/particles.h index 95cf44a033..b96bd4e69e 100644 --- a/scene/3d/particles.h +++ b/scene/3d/particles.h @@ -103,7 +103,7 @@ public: AABB get_aabb() const; - DVector<Face3> get_faces(uint32_t p_usage_flags) const; + PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; void set_amount(int p_amount); int get_amount() const; @@ -120,8 +120,8 @@ public: void set_emission_base_velocity(const Vector3& p_base_velocity); Vector3 get_emission_base_velocity() const; - void set_emission_points(const DVector<Vector3>& p_points); - DVector<Vector3> get_emission_points() const; + void set_emission_points(const PoolVector<Vector3>& p_points); + PoolVector<Vector3> get_emission_points() const; void set_gravity_normal(const Vector3& p_normal); Vector3 get_gravity_normal() const; diff --git a/scene/3d/portal.cpp b/scene/3d/portal.cpp index 1de9188e82..e4c03a78ee 100644 --- a/scene/3d/portal.cpp +++ b/scene/3d/portal.cpp @@ -34,7 +34,7 @@ bool Portal::_set(const StringName& p_name, const Variant& p_value) { if (p_name=="shape") { - DVector<float> src_coords=p_value; + PoolVector<float> src_coords=p_value; Vector<Point2> points; int src_coords_size = src_coords.size(); ERR_FAIL_COND_V(src_coords_size%2,false); @@ -63,7 +63,7 @@ bool Portal::_get(const StringName& p_name,Variant &r_ret) const { if (p_name=="shape") { Vector<Point2> points=get_shape(); - DVector<float> dst_coords; + PoolVector<float> dst_coords; dst_coords.resize(points.size()*2); for (int i=0;i<points.size();i++) { @@ -102,14 +102,14 @@ AABB Portal::get_aabb() const { return aabb; } -DVector<Face3> Portal::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> Portal::get_faces(uint32_t p_usage_flags) const { if (!(p_usage_flags&FACES_ENCLOSING)) - return DVector<Face3>(); + return PoolVector<Face3>(); Vector<Point2> shape = get_shape(); if (shape.size()==0) - return DVector<Face3>(); + return PoolVector<Face3>(); Vector2 center; for (int i=0;i<shape.size();i++) { @@ -118,7 +118,7 @@ DVector<Face3> Portal::get_faces(uint32_t p_usage_flags) const { } - DVector<Face3> ret; + PoolVector<Face3> ret; center/=shape.size(); for (int i=0;i<shape.size();i++) { diff --git a/scene/3d/portal.h b/scene/3d/portal.h index d154c18b3d..8464a628f9 100644 --- a/scene/3d/portal.h +++ b/scene/3d/portal.h @@ -68,7 +68,7 @@ protected: public: virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; void set_enabled(bool p_enabled); bool is_enabled() const; diff --git a/scene/3d/quad.cpp b/scene/3d/quad.cpp index 4ba828f927..f1c59860af 100644 --- a/scene/3d/quad.cpp +++ b/scene/3d/quad.cpp @@ -44,9 +44,9 @@ void Quad::_update() { - DVector<Vector3> points; + PoolVector<Vector3> points; points.resize(4); - DVector<Vector3>::Write pointsw = points.write(); + PoolVector<Vector3>::Write pointsw = points.write(); Vector2 s2 = size*0.5; Vector2 o = offset; @@ -70,34 +70,34 @@ void Quad::_update() { for(int i=1;i<4;i++) aabb.expand_to(pointsw[i]); - pointsw = DVector<Vector3>::Write(); + pointsw = PoolVector<Vector3>::Write(); - DVector<Vector3> normals; + PoolVector<Vector3> normals; normals.resize(4); - DVector<Vector3>::Write normalsw = normals.write(); + PoolVector<Vector3>::Write normalsw = normals.write(); for(int i=0;i<4;i++) normalsw[i]=normal; - normalsw=DVector<Vector3>::Write(); + normalsw=PoolVector<Vector3>::Write(); - DVector<Vector2> uvs; + PoolVector<Vector2> uvs; uvs.resize(4); - DVector<Vector2>::Write uvsw = uvs.write(); + PoolVector<Vector2>::Write uvsw = uvs.write(); uvsw[0]=Vector2(0,0); uvsw[1]=Vector2(1,0); uvsw[2]=Vector2(1,1); uvsw[3]=Vector2(0,1); - uvsw = DVector<Vector2>::Write(); + uvsw = PoolVector<Vector2>::Write(); - DVector<int> indices; + PoolVector<int> indices; indices.resize(6); - DVector<int>::Write indicesw = indices.write(); + PoolVector<int>::Write indicesw = indices.write(); indicesw[0]=0; indicesw[1]=1; indicesw[2]=2; @@ -105,7 +105,7 @@ void Quad::_update() { indicesw[4]=3; indicesw[5]=0; - indicesw=DVector<int>::Write(); + indicesw=PoolVector<int>::Write(); Array arr; arr.resize(VS::ARRAY_MAX); @@ -187,9 +187,9 @@ void Quad::_notification(int p_what) { } } -DVector<Face3> Quad::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> Quad::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } AABB Quad::get_aabb() const { diff --git a/scene/3d/quad.h b/scene/3d/quad.h index bdb2cb3088..94b438c548 100644 --- a/scene/3d/quad.h +++ b/scene/3d/quad.h @@ -67,7 +67,7 @@ public: void set_centered(bool p_enabled); bool is_centered() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; virtual AABB get_aabb() const; Quad(); diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp index 63855b7e98..0235a063ea 100644 --- a/scene/3d/reflection_probe.cpp +++ b/scene/3d/reflection_probe.cpp @@ -169,9 +169,9 @@ AABB ReflectionProbe::get_aabb() const { aabb.size=origin_offset+extents; return aabb; } -DVector<Face3> ReflectionProbe::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> ReflectionProbe::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } void ReflectionProbe::_validate_property(PropertyInfo& property) const { diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h index 2de02ebbfa..789e5837b0 100644 --- a/scene/3d/reflection_probe.h +++ b/scene/3d/reflection_probe.h @@ -78,7 +78,7 @@ public: UpdateMode get_update_mode() const; virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; diff --git a/scene/3d/room_instance.cpp b/scene/3d/room_instance.cpp index 1423f56786..137a16490d 100644 --- a/scene/3d/room_instance.cpp +++ b/scene/3d/room_instance.cpp @@ -86,9 +86,9 @@ AABB Room::get_aabb() const { return AABB(); } -DVector<Face3> Room::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> Room::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } @@ -119,21 +119,21 @@ Ref<RoomBounds> Room::get_room() const { return room; } -void Room::_parse_node_faces(DVector<Face3> &all_faces,const Node *p_node) const { +void Room::_parse_node_faces(PoolVector<Face3> &all_faces,const Node *p_node) const { const VisualInstance *vi=p_node->cast_to<VisualInstance>(); if (vi) { - DVector<Face3> faces=vi->get_faces(FACES_ENCLOSING); + PoolVector<Face3> faces=vi->get_faces(FACES_ENCLOSING); if (faces.size()) { int old_len=all_faces.size(); all_faces.resize( all_faces.size() + faces.size() ); int new_len=all_faces.size(); - DVector<Face3>::Write all_facesw=all_faces.write(); + PoolVector<Face3>::Write all_facesw=all_faces.write(); Face3 * all_facesptr=all_facesw.ptr(); - DVector<Face3>::Read facesr=faces.read(); + PoolVector<Face3>::Read facesr=faces.read(); const Face3 * facesptr=facesr.ptr(); Transform tr=vi->get_relative_transform(this); diff --git a/scene/3d/room_instance.h b/scene/3d/room_instance.h index 8c2bb76a38..8cdc908ceb 100644 --- a/scene/3d/room_instance.h +++ b/scene/3d/room_instance.h @@ -63,7 +63,7 @@ private: bool sound_enabled; int level; - void _parse_node_faces(DVector<Face3> &all_faces,const Node *p_node) const; + void _parse_node_faces(PoolVector<Face3> &all_faces,const Node *p_node) const; void _bounds_changed(); @@ -83,7 +83,7 @@ public: }; virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; void set_room( const Ref<RoomBounds>& p_room ); Ref<RoomBounds> get_room() const; diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 576f085120..5d686e8715 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -211,9 +211,9 @@ AABB SpriteBase3D::get_aabb() const { return aabb; } -DVector<Face3> SpriteBase3D::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> SpriteBase3D::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h index 58d70fa2f7..f82a391038 100644 --- a/scene/3d/sprite_3d.h +++ b/scene/3d/sprite_3d.h @@ -135,7 +135,7 @@ public: virtual Rect2 get_item_rect() const=0; virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; SpriteBase3D(); ~SpriteBase3D(); diff --git a/scene/3d/test_cube.cpp b/scene/3d/test_cube.cpp index bd99de417e..c2ebe63e21 100644 --- a/scene/3d/test_cube.cpp +++ b/scene/3d/test_cube.cpp @@ -35,9 +35,9 @@ AABB TestCube::get_aabb() const { return AABB( Vector3(-1,-1,-1), Vector3(2, 2, 2 ) ); } -DVector<Face3> TestCube::get_faces(uint32_t p_usage_flags) const { +PoolVector<Face3> TestCube::get_faces(uint32_t p_usage_flags) const { - return DVector<Face3>(); + return PoolVector<Face3>(); } diff --git a/scene/3d/test_cube.h b/scene/3d/test_cube.h index cbd9918b13..c62999c34b 100644 --- a/scene/3d/test_cube.h +++ b/scene/3d/test_cube.h @@ -47,7 +47,7 @@ class TestCube : public GeometryInstance { public: virtual AABB get_aabb() const; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; TestCube(); ~TestCube(); diff --git a/scene/3d/visual_instance.h b/scene/3d/visual_instance.h index 7b76cd299e..f59ec3a7e6 100644 --- a/scene/3d/visual_instance.h +++ b/scene/3d/visual_instance.h @@ -66,7 +66,7 @@ public: RID get_instance() const; virtual AABB get_aabb() const=0; - virtual DVector<Face3> get_faces(uint32_t p_usage_flags) const=0; + virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const=0; virtual AABB get_transformed_aabb() const; // helper |