summaryrefslogtreecommitdiffstats
path: root/scene/3d/portal.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-07 18:25:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-07 18:26:38 -0300
commit2ab83e1abbf5ee6d00e16056a9e9394114026f28 (patch)
tree7efbb375cc4d00d8e8589fcf1b6a1303bec5df2d /scene/3d/portal.cpp
parent2a38a5eaa844043b846e03d6655f84caf8a31e74 (diff)
downloadredot-engine-2ab83e1abbf5ee6d00e16056a9e9394114026f28.tar.gz
Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector
Diffstat (limited to 'scene/3d/portal.cpp')
-rw-r--r--scene/3d/portal.cpp12
1 files changed, 6 insertions, 6 deletions
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++) {