diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-11 00:52:51 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-11 00:52:51 -0300 |
commit | bc26f905817945300d397696330d1ab04a1af33c (patch) | |
tree | d06338399c8ea410042f6631fb3db3efcc100b05 /scene/3d/collision_polygon.cpp | |
parent | 710692278d1353aad08bc7bceb655afc1d6c950c (diff) | |
download | redot-engine-bc26f905817945300d397696330d1ab04a1af33c.tar.gz |
Type renames:
Matrix32 -> Transform2D
Matrix3 -> Basis
AABB -> Rect3
RawArray -> PoolByteArray
IntArray -> PoolIntArray
FloatArray -> PoolFloatArray
Vector2Array -> PoolVector2Array
Vector3Array -> PoolVector3Array
ColorArray -> PoolColorArray
Diffstat (limited to 'scene/3d/collision_polygon.cpp')
-rw-r--r-- | scene/3d/collision_polygon.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp index 6cc0291707..d0612986df 100644 --- a/scene/3d/collision_polygon.cpp +++ b/scene/3d/collision_polygon.cpp @@ -200,7 +200,7 @@ void CollisionPolygon::set_polygon(const Vector<Point2>& p_polygon) { Vector3 p1(polygon[i].x,polygon[i].y,depth*0.5); if (i==0) - aabb=AABB(p1,Vector3()); + aabb=Rect3(p1,Vector3()); else aabb.expand_to(p1); @@ -209,9 +209,9 @@ void CollisionPolygon::set_polygon(const Vector<Point2>& p_polygon) { } - if (aabb==AABB()) { + if (aabb==Rect3()) { - aabb=AABB(Vector3(-1,-1,-1),Vector3(2,2,2)); + aabb=Rect3(Vector3(-1,-1,-1),Vector3(2,2,2)); } else { aabb.pos-=aabb.size*0.3; aabb.size+=aabb.size*0.6; @@ -240,7 +240,7 @@ CollisionPolygon::BuildMode CollisionPolygon::get_build_mode() const{ return build_mode; } -AABB CollisionPolygon::get_item_rect() const { +Rect3 CollisionPolygon::get_item_rect() const { return aabb; } @@ -294,7 +294,7 @@ void CollisionPolygon::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::INT,"build_mode",PROPERTY_HINT_ENUM,"Solids,Triangles"),_SCS("set_build_mode"),_SCS("get_build_mode")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"depth"),_SCS("set_depth"),_SCS("get_depth")); - ADD_PROPERTY( PropertyInfo(Variant::VECTOR2_ARRAY,"polygon"),_SCS("set_polygon"),_SCS("get_polygon")); + ADD_PROPERTY( PropertyInfo(Variant::POOL_VECTOR2_ARRAY,"polygon"),_SCS("set_polygon"),_SCS("get_polygon")); ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"shape_range",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_shape_range"),_SCS("_get_shape_range")); } @@ -304,7 +304,7 @@ CollisionPolygon::CollisionPolygon() { shape_to=-1; can_update_body=false; - aabb=AABB(Vector3(-1,-1,-1),Vector3(2,2,2)); + aabb=Rect3(Vector3(-1,-1,-1),Vector3(2,2,2)); build_mode=BUILD_SOLIDS; depth=1.0; |