summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/animation.cpp12
-rw-r--r--scene/resources/box_shape.cpp2
-rw-r--r--scene/resources/concave_polygon_shape_2d.cpp2
-rw-r--r--scene/resources/convex_polygon_shape_2d.cpp2
-rw-r--r--scene/resources/curve.cpp64
-rw-r--r--scene/resources/curve.h16
-rw-r--r--scene/resources/font.cpp4
-rw-r--r--scene/resources/mesh.cpp26
-rw-r--r--scene/resources/mesh.h16
-rw-r--r--scene/resources/multimesh.cpp6
-rw-r--r--scene/resources/multimesh.h2
-rw-r--r--scene/resources/room.cpp2
-rw-r--r--scene/resources/shape_2d.cpp8
-rw-r--r--scene/resources/shape_2d.h8
-rw-r--r--scene/resources/world.cpp10
-rw-r--r--scene/resources/world.h4
16 files changed, 92 insertions, 92 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index c962e1a671..1fbb149bf3 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1203,14 +1203,14 @@ Variant Animation::_cubic_interpolate( const Variant& p_pre_a,const Variant& p_a
return a.cubic_slerp(b,pa,pb,p_c);
} break;
- case Variant::_AABB: {
+ case Variant::RECT3: {
- AABB a=p_a;
- AABB b=p_b;
- AABB pa=p_pre_a;
- AABB pb=p_post_b;
+ Rect3 a=p_a;
+ Rect3 b=p_b;
+ Rect3 pa=p_pre_a;
+ Rect3 pb=p_post_b;
- return AABB(
+ return Rect3(
a.pos.cubic_interpolate(b.pos,pa.pos,pb.pos,p_c),
a.size.cubic_interpolate(b.size,pa.size,pb.size,p_c)
);
diff --git a/scene/resources/box_shape.cpp b/scene/resources/box_shape.cpp
index fa5b35ca41..87585af862 100644
--- a/scene/resources/box_shape.cpp
+++ b/scene/resources/box_shape.cpp
@@ -34,7 +34,7 @@ Vector<Vector3> BoxShape::_gen_debug_mesh_lines() {
Vector<Vector3> lines;
- AABB aabb;
+ Rect3 aabb;
aabb.pos=-get_extents();
aabb.size=aabb.pos*-2;
diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/concave_polygon_shape_2d.cpp
index e794643132..6866750006 100644
--- a/scene/resources/concave_polygon_shape_2d.cpp
+++ b/scene/resources/concave_polygon_shape_2d.cpp
@@ -85,7 +85,7 @@ void ConcavePolygonShape2D::_bind_methods() {
ClassDB::bind_method(_MD("set_segments","segments"),&ConcavePolygonShape2D::set_segments);
ClassDB::bind_method(_MD("get_segments"),&ConcavePolygonShape2D::get_segments);
- ADD_PROPERTY( PropertyInfo(Variant::VECTOR2_ARRAY,"segments"),_SCS("set_segments"),_SCS("get_segments") );
+ ADD_PROPERTY( PropertyInfo(Variant::POOL_VECTOR2_ARRAY,"segments"),_SCS("set_segments"),_SCS("get_segments") );
}
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp
index cc3b0c063d..0d3ba238f6 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/convex_polygon_shape_2d.cpp
@@ -67,7 +67,7 @@ void ConvexPolygonShape2D::_bind_methods() {
- ADD_PROPERTY( PropertyInfo(Variant::VECTOR2_ARRAY,"points"),_SCS("set_points"),_SCS("get_points") );
+ ADD_PROPERTY( PropertyInfo(Variant::POOL_VECTOR2_ARRAY,"points"),_SCS("set_points"),_SCS("get_points") );
}
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 50c546b855..e201cb16ac 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -610,7 +610,7 @@ void Curve2D::_bake() const {
pointlist.push_back(lastpos);
baked_point_cache.resize(pointlist.size());
- Vector2Array::Write w = baked_point_cache.write();
+ PoolVector2Array::Write w = baked_point_cache.write();
int idx=0;
@@ -645,7 +645,7 @@ Vector2 Curve2D::interpolate_baked(float p_offset,bool p_cubic) const{
return baked_point_cache.get(0);
int bpc=baked_point_cache.size();
- Vector2Array::Read r = baked_point_cache.read();
+ PoolVector2Array::Read r = baked_point_cache.read();
if (p_offset<0)
return r[0];
@@ -674,7 +674,7 @@ Vector2 Curve2D::interpolate_baked(float p_offset,bool p_cubic) const{
}
-Vector2Array Curve2D::get_baked_points() const {
+PoolVector2Array Curve2D::get_baked_points() const {
if (baked_cache_dirty)
_bake();
@@ -700,9 +700,9 @@ Dictionary Curve2D::_get_data() const {
Dictionary dc;
- Vector2Array d;
+ PoolVector2Array d;
d.resize(points.size()*3);
- Vector2Array::Write w = d.write();
+ PoolVector2Array::Write w = d.write();
for(int i=0;i<points.size();i++) {
@@ -713,7 +713,7 @@ Dictionary Curve2D::_get_data() const {
}
- w=Vector2Array::Write();
+ w=PoolVector2Array::Write();
dc["points"]=d;
@@ -724,11 +724,11 @@ void Curve2D::_set_data(const Dictionary& p_data){
ERR_FAIL_COND(!p_data.has("points"));
- Vector2Array rp=p_data["points"];
+ PoolVector2Array rp=p_data["points"];
int pc = rp.size();
ERR_FAIL_COND(pc%3!=0);
points.resize(pc/3);
- Vector2Array::Read r = rp.read();
+ PoolVector2Array::Read r = rp.read();
for(int i=0;i<points.size();i++) {
@@ -742,9 +742,9 @@ void Curve2D::_set_data(const Dictionary& p_data){
}
-Vector2Array Curve2D::tesselate(int p_max_stages,float p_tolerance) const {
+PoolVector2Array Curve2D::tesselate(int p_max_stages,float p_tolerance) const {
- Vector2Array tess;
+ PoolVector2Array tess;
if (points.size()==0) {
@@ -764,7 +764,7 @@ Vector2Array Curve2D::tesselate(int p_max_stages,float p_tolerance) const {
}
tess.resize(pc);
- Vector2Array::Write bpw=tess.write();
+ PoolVector2Array::Write bpw=tess.write();
bpw[0]=points[0].pos;
int pidx=0;
@@ -781,7 +781,7 @@ Vector2Array Curve2D::tesselate(int p_max_stages,float p_tolerance) const {
}
- bpw=Vector2Array::Write ();
+ bpw=PoolVector2Array::Write ();
return tess;
@@ -1090,11 +1090,11 @@ void Curve3D::_bake() const {
pointlist.push_back(Plane(lastpos,lastilt));
baked_point_cache.resize(pointlist.size());
- Vector3Array::Write w = baked_point_cache.write();
+ PoolVector3Array::Write w = baked_point_cache.write();
int idx=0;
baked_tilt_cache.resize(pointlist.size());
- RealArray::Write wt = baked_tilt_cache.write();
+ PoolRealArray::Write wt = baked_tilt_cache.write();
for(List<Plane>::Element *E=pointlist.front();E;E=E->next()) {
@@ -1128,7 +1128,7 @@ Vector3 Curve3D::interpolate_baked(float p_offset,bool p_cubic) const{
return baked_point_cache.get(0);
int bpc=baked_point_cache.size();
- Vector3Array::Read r = baked_point_cache.read();
+ PoolVector3Array::Read r = baked_point_cache.read();
if (p_offset<0)
return r[0];
@@ -1172,7 +1172,7 @@ float Curve3D::interpolate_baked_tilt(float p_offset) const{
return baked_tilt_cache.get(0);
int bpc=baked_tilt_cache.size();
- RealArray::Read r = baked_tilt_cache.read();
+ PoolRealArray::Read r = baked_tilt_cache.read();
if (p_offset<0)
return r[0];
@@ -1196,7 +1196,7 @@ float Curve3D::interpolate_baked_tilt(float p_offset) const{
}
-Vector3Array Curve3D::get_baked_points() const {
+PoolVector3Array Curve3D::get_baked_points() const {
if (baked_cache_dirty)
_bake();
@@ -1205,7 +1205,7 @@ Vector3Array Curve3D::get_baked_points() const {
}
-RealArray Curve3D::get_baked_tilts() const {
+PoolRealArray Curve3D::get_baked_tilts() const {
if (baked_cache_dirty)
_bake();
@@ -1231,12 +1231,12 @@ Dictionary Curve3D::_get_data() const {
Dictionary dc;
- Vector3Array d;
+ PoolVector3Array d;
d.resize(points.size()*3);
- Vector3Array::Write w = d.write();
- RealArray t;
+ PoolVector3Array::Write w = d.write();
+ PoolRealArray t;
t.resize(points.size());
- RealArray::Write wt = t.write();
+ PoolRealArray::Write wt = t.write();
for(int i=0;i<points.size();i++) {
@@ -1247,8 +1247,8 @@ Dictionary Curve3D::_get_data() const {
wt[i]=points[i].tilt;
}
- w=Vector3Array::Write();
- wt=RealArray::Write();
+ w=PoolVector3Array::Write();
+ wt=PoolRealArray::Write();
dc["points"]=d;
dc["tilts"]=t;
@@ -1261,13 +1261,13 @@ void Curve3D::_set_data(const Dictionary& p_data){
ERR_FAIL_COND(!p_data.has("points"));
ERR_FAIL_COND(!p_data.has("tilts"));
- Vector3Array rp=p_data["points"];
+ PoolVector3Array rp=p_data["points"];
int pc = rp.size();
ERR_FAIL_COND(pc%3!=0);
points.resize(pc/3);
- Vector3Array::Read r = rp.read();
- RealArray rtl=p_data["tilts"];
- RealArray::Read rt=rtl.read();
+ PoolVector3Array::Read r = rp.read();
+ PoolRealArray rtl=p_data["tilts"];
+ PoolRealArray::Read rt=rtl.read();
for(int i=0;i<points.size();i++) {
@@ -1282,9 +1282,9 @@ void Curve3D::_set_data(const Dictionary& p_data){
}
-Vector3Array Curve3D::tesselate(int p_max_stages,float p_tolerance) const {
+PoolVector3Array Curve3D::tesselate(int p_max_stages,float p_tolerance) const {
- Vector3Array tess;
+ PoolVector3Array tess;
if (points.size()==0) {
@@ -1304,7 +1304,7 @@ Vector3Array Curve3D::tesselate(int p_max_stages,float p_tolerance) const {
}
tess.resize(pc);
- Vector3Array::Write bpw=tess.write();
+ PoolVector3Array::Write bpw=tess.write();
bpw[0]=points[0].pos;
int pidx=0;
@@ -1321,7 +1321,7 @@ Vector3Array Curve3D::tesselate(int p_max_stages,float p_tolerance) const {
}
- bpw=Vector3Array::Write ();
+ bpw=PoolVector3Array::Write ();
return tess;
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index 670232c9b2..3362109354 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -103,7 +103,7 @@ class Curve2D : public Resource {
};
mutable bool baked_cache_dirty;
- mutable Vector2Array baked_point_cache;
+ mutable PoolVector2Array baked_point_cache;
mutable float baked_max_ofs;
@@ -145,9 +145,9 @@ public:
float get_baked_length() const;
Vector2 interpolate_baked(float p_offset,bool p_cubic=false) const;
- Vector2Array get_baked_points() const; //useful for going thru
+ PoolVector2Array get_baked_points() const; //useful for going thru
- Vector2Array tesselate(int p_max_stages=5,float p_tolerance=4) const; //useful for display
+ PoolVector2Array tesselate(int p_max_stages=5,float p_tolerance=4) const; //useful for display
Curve2D();
@@ -179,8 +179,8 @@ class Curve3D : public Resource {
};
mutable bool baked_cache_dirty;
- mutable Vector3Array baked_point_cache;
- mutable RealArray baked_tilt_cache;
+ mutable PoolVector3Array baked_point_cache;
+ mutable PoolRealArray baked_tilt_cache;
mutable float baked_max_ofs;
@@ -225,10 +225,10 @@ public:
float get_baked_length() const;
Vector3 interpolate_baked(float p_offset,bool p_cubic=false) const;
float interpolate_baked_tilt(float p_offset) const;
- Vector3Array get_baked_points() const; //useful for going thru
- RealArray get_baked_tilts() const; //useful for going thru
+ PoolVector3Array get_baked_points() const; //useful for going thru
+ PoolRealArray get_baked_tilts() const; //useful for going thru
- Vector3Array tesselate(int p_max_stages=5,float p_tolerance=4) const; //useful for display
+ PoolVector3Array tesselate(int p_max_stages=5,float p_tolerance=4) const; //useful for display
Curve3D();
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 0464a64031..3373478336 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -599,8 +599,8 @@ void BitmapFont::_bind_methods() {
ClassDB::bind_method(_MD("get_fallback"),&BitmapFont::get_fallback);
ADD_PROPERTY( PropertyInfo( Variant::ARRAY, "textures", PROPERTY_HINT_NONE,"", PROPERTY_USAGE_NOEDITOR ), _SCS("_set_textures"), _SCS("_get_textures") );
- ADD_PROPERTY( PropertyInfo( Variant::INT_ARRAY, "chars", PROPERTY_HINT_NONE,"", PROPERTY_USAGE_NOEDITOR ), _SCS("_set_chars"), _SCS("_get_chars") );
- ADD_PROPERTY( PropertyInfo( Variant::INT_ARRAY, "kernings", PROPERTY_HINT_NONE,"", PROPERTY_USAGE_NOEDITOR ), _SCS("_set_kernings"), _SCS("_get_kernings") );
+ ADD_PROPERTY( PropertyInfo( Variant::POOL_INT_ARRAY, "chars", PROPERTY_HINT_NONE,"", PROPERTY_USAGE_NOEDITOR ), _SCS("_set_chars"), _SCS("_get_chars") );
+ ADD_PROPERTY( PropertyInfo( Variant::POOL_INT_ARRAY, "kernings", PROPERTY_HINT_NONE,"", PROPERTY_USAGE_NOEDITOR ), _SCS("_set_kernings"), _SCS("_get_kernings") );
ADD_PROPERTY( PropertyInfo( Variant::REAL, "height", PROPERTY_HINT_RANGE,"-1024,1024,1" ), _SCS("set_height"), _SCS("get_height") );
ADD_PROPERTY( PropertyInfo( Variant::REAL, "ascent", PROPERTY_HINT_RANGE,"-1024,1024,1" ), _SCS("set_ascent"), _SCS("get_ascent") );
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index bad87910ff..74f4e8f5f7 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -162,9 +162,9 @@ bool Mesh::_set(const StringName& p_name, const Variant& p_value) {
}
ERR_FAIL_COND_V(!d.has("aabb"),false);
- AABB aabb = d["aabb"];
+ Rect3 aabb = d["aabb"];
- Vector<AABB> bone_aabb;
+ Vector<Rect3> bone_aabb;
if (d.has("bone_aabb")) {
Array baabb = d["bone_aabb"];
bone_aabb.resize(baabb.size());
@@ -244,7 +244,7 @@ bool Mesh::_get(const StringName& p_name,Variant &r_ret) const {
d["format"]=VS::get_singleton()->mesh_surface_get_format(mesh,idx);
d["aabb"]=VS::get_singleton()->mesh_surface_get_aabb(mesh,idx);
- Vector<AABB> skel_aabb = VS::get_singleton()->mesh_surface_get_skeleton_aabb(mesh,idx);
+ Vector<Rect3> skel_aabb = VS::get_singleton()->mesh_surface_get_skeleton_aabb(mesh,idx);
Array arr;
for(int i=0;i<skel_aabb.size();i++) {
arr[i]=skel_aabb[i];
@@ -275,7 +275,7 @@ bool Mesh::_get(const StringName& p_name,Variant &r_ret) const {
void Mesh::_get_property_list( List<PropertyInfo> *p_list) const {
if (morph_targets.size()) {
- p_list->push_back(PropertyInfo(Variant::STRING_ARRAY,"morph_target/names",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR));
+ p_list->push_back(PropertyInfo(Variant::POOL_STRING_ARRAY,"morph_target/names",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::INT,"morph_target/mode",PROPERTY_HINT_ENUM,"Normalized,Relative"));
}
@@ -286,7 +286,7 @@ void Mesh::_get_property_list( List<PropertyInfo> *p_list) const {
p_list->push_back( PropertyInfo( Variant::OBJECT,"surface_"+itos(i+1)+"/material", PROPERTY_HINT_RESOURCE_TYPE,"Material",PROPERTY_USAGE_EDITOR ) );
}
- p_list->push_back( PropertyInfo( Variant::_AABB,"custom_aabb/custom_aabb" ) );
+ p_list->push_back( PropertyInfo( Variant::RECT3,"custom_aabb/custom_aabb" ) );
}
@@ -294,7 +294,7 @@ void Mesh::_get_property_list( List<PropertyInfo> *p_list) const {
void Mesh::_recompute_aabb() {
// regenerate AABB
- aabb=AABB();
+ aabb=Rect3();
for (int i=0;i<surfaces.size();i++) {
@@ -306,7 +306,7 @@ void Mesh::_recompute_aabb() {
}
-void Mesh::add_surface(uint32_t p_format,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,const Vector<AABB>& p_bone_aabbs) {
+void Mesh::add_surface(uint32_t p_format,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,const Vector<Rect3>& p_bone_aabbs) {
Surface s;
s.aabb=p_aabb;
@@ -337,7 +337,7 @@ void Mesh::add_surface_from_arrays(PrimitiveType p_primitive,const Array& p_arra
const Vector3 *vtx=r.ptr();
// check AABB
- AABB aabb;
+ Rect3 aabb;
for (int i=0;i<len;i++) {
if (i==0)
@@ -505,7 +505,7 @@ String Mesh::surface_get_name(int p_idx) const{
}
-void Mesh::surface_set_custom_aabb(int p_idx,const AABB& p_aabb) {
+void Mesh::surface_set_custom_aabb(int p_idx,const Rect3& p_aabb) {
ERR_FAIL_INDEX( p_idx, surfaces.size() );
surfaces[p_idx].aabb=p_aabb;
@@ -522,7 +522,7 @@ Ref<Material> Mesh::surface_get_material(int p_idx) const {
void Mesh::add_surface_from_mesh_data(const Geometry::MeshData& p_mesh_data) {
VisualServer::get_singleton()->mesh_add_surface_from_mesh_data( mesh, p_mesh_data );
- AABB aabb;
+ Rect3 aabb;
for (int i=0;i<p_mesh_data.vertices.size();i++) {
if (i==0)
@@ -551,19 +551,19 @@ RID Mesh::get_rid() const {
return mesh;
}
-AABB Mesh::get_aabb() const {
+Rect3 Mesh::get_aabb() const {
return aabb;
}
-void Mesh::set_custom_aabb(const AABB& p_custom) {
+void Mesh::set_custom_aabb(const Rect3& p_custom) {
custom_aabb=p_custom;
VS::get_singleton()->mesh_set_custom_aabb(mesh,custom_aabb);
}
-AABB Mesh::get_custom_aabb() const {
+Rect3 Mesh::get_custom_aabb() const {
return custom_aabb;
}
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index f92db837ea..8e0b4d4e25 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -114,15 +114,15 @@ public:
private:
struct Surface {
String name;
- AABB aabb;
+ Rect3 aabb;
Ref<Material> material;
};
Vector<Surface> surfaces;
RID mesh;
- AABB aabb;
+ Rect3 aabb;
MorphTargetMode morph_target_mode;
Vector<StringName> morph_targets;
- AABB custom_aabb;
+ Rect3 custom_aabb;
mutable Ref<TriangleMesh> triangle_mesh;
@@ -139,7 +139,7 @@ protected:
public:
void add_surface_from_arrays(PrimitiveType p_primitive, const Array& p_arrays, const Array& p_blend_shapes=Array(), uint32_t p_flags=ARRAY_COMPRESS_DEFAULT);
- void add_surface(uint32_t p_format,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>());
+ void add_surface(uint32_t p_format,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>());
Array surface_get_arrays(int p_surface) const;
virtual Array surface_get_morph_arrays(int p_surface) const;
@@ -155,7 +155,7 @@ public:
int get_surface_count() const;
void surface_remove(int p_idx);
- void surface_set_custom_aabb(int p_surface,const AABB& p_aabb); //only recognized by driver
+ void surface_set_custom_aabb(int p_surface,const Rect3& p_aabb); //only recognized by driver
int surface_get_array_len(int p_idx) const;
@@ -172,10 +172,10 @@ public:
void add_surface_from_mesh_data(const Geometry::MeshData& p_mesh_data);
- void set_custom_aabb(const AABB& p_custom);
- AABB get_custom_aabb() const;
+ void set_custom_aabb(const Rect3& p_custom);
+ Rect3 get_custom_aabb() const;
- AABB get_aabb() const;
+ Rect3 get_aabb() const;
virtual RID get_rid() const;
Ref<Shape> create_trimesh_shape() const;
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index 143870c920..75df4a4e60 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -175,7 +175,7 @@ Color MultiMesh::get_instance_color(int p_instance) const {
}
-AABB MultiMesh::get_aabb() const {
+Rect3 MultiMesh::get_aabb() const {
return VisualServer::get_singleton()->multimesh_get_aabb(multimesh);
@@ -237,8 +237,8 @@ void MultiMesh::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT,"transform_format",PROPERTY_HINT_ENUM,"2D,3D"), _SCS("set_transform_format"), _SCS("get_transform_format"));
ADD_PROPERTY(PropertyInfo(Variant::INT,"instance_count",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_instance_count"), _SCS("get_instance_count"));
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"mesh",PROPERTY_HINT_RESOURCE_TYPE,"Mesh"), _SCS("set_mesh"), _SCS("get_mesh"));
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3_ARRAY,"transform_array",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_transform_array"), _SCS("_get_transform_array"));
- ADD_PROPERTY(PropertyInfo(Variant::COLOR_ARRAY,"color_array",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_color_array"), _SCS("_get_color_array"));
+ ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY,"transform_array",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_transform_array"), _SCS("_get_transform_array"));
+ ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY,"color_array",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_color_array"), _SCS("_get_color_array"));
diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h
index 3ba109a087..c86b33adcf 100644
--- a/scene/resources/multimesh.h
+++ b/scene/resources/multimesh.h
@@ -85,7 +85,7 @@ public:
void set_instance_color(int p_instance, const Color& p_color);
Color get_instance_color(int p_instance) const;
- virtual AABB get_aabb() const;
+ virtual Rect3 get_aabb() const;
virtual RID get_rid() const;
diff --git a/scene/resources/room.cpp b/scene/resources/room.cpp
index 88648272be..069127f291 100644
--- a/scene/resources/room.cpp
+++ b/scene/resources/room.cpp
@@ -56,7 +56,7 @@ void RoomBounds::_bind_methods() {
ClassDB::bind_method(_MD("get_geometry_hint"),&RoomBounds::get_geometry_hint);
//ADD_PROPERTY( PropertyInfo( Variant::DICTIONARY, "bounds"), _SCS("set_bounds"),_SCS("get_bounds") );
- ADD_PROPERTY( PropertyInfo( Variant::VECTOR3_ARRAY, "geometry_hint"),_SCS("set_geometry_hint"),_SCS("get_geometry_hint") );
+ ADD_PROPERTY( PropertyInfo( Variant::POOL_VECTOR3_ARRAY, "geometry_hint"),_SCS("set_geometry_hint"),_SCS("get_geometry_hint") );
}
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp
index 4e2af89c05..b5a886b4b9 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/shape_2d.cpp
@@ -47,14 +47,14 @@ real_t Shape2D::get_custom_solver_bias() const{
}
-bool Shape2D::collide_with_motion(const Matrix32& p_local_xform, const Vector2& p_local_motion, const Ref<Shape2D>& p_shape, const Matrix32& p_shape_xform, const Vector2 &p_shape_motion) {
+bool Shape2D::collide_with_motion(const Transform2D& p_local_xform, const Vector2& p_local_motion, const Ref<Shape2D>& p_shape, const Transform2D& p_shape_xform, const Vector2 &p_shape_motion) {
ERR_FAIL_COND_V(p_shape.is_null(),false);
int r;
return Physics2DServer::get_singleton()->shape_collide(get_rid(),p_local_xform,p_local_motion,p_shape->get_rid(),p_shape_xform,p_shape_motion,NULL,0,r);
}
-bool Shape2D::collide(const Matrix32& p_local_xform, const Ref<Shape2D>& p_shape, const Matrix32& p_shape_xform){
+bool Shape2D::collide(const Transform2D& p_local_xform, const Ref<Shape2D>& p_shape, const Transform2D& p_shape_xform){
ERR_FAIL_COND_V(p_shape.is_null(),false);
int r;
return Physics2DServer::get_singleton()->shape_collide(get_rid(),p_local_xform,Vector2(),p_shape->get_rid(),p_shape_xform,Vector2(),NULL,0,r);
@@ -62,7 +62,7 @@ bool Shape2D::collide(const Matrix32& p_local_xform, const Ref<Shape2D>& p_shap
}
-Variant Shape2D::collide_with_motion_and_get_contacts(const Matrix32& p_local_xform, const Vector2& p_local_motion, const Ref<Shape2D>& p_shape, const Matrix32& p_shape_xform, const Vector2 &p_shape_motion){
+Variant Shape2D::collide_with_motion_and_get_contacts(const Transform2D& p_local_xform, const Vector2& p_local_motion, const Ref<Shape2D>& p_shape, const Transform2D& p_shape_xform, const Vector2 &p_shape_motion){
ERR_FAIL_COND_V(p_shape.is_null(),Variant());
const int max_contacts = 16;
@@ -81,7 +81,7 @@ Variant Shape2D::collide_with_motion_and_get_contacts(const Matrix32& p_local_xf
return results;
}
-Variant Shape2D::collide_and_get_contacts(const Matrix32& p_local_xform, const Ref<Shape2D>& p_shape, const Matrix32& p_shape_xform){
+Variant Shape2D::collide_and_get_contacts(const Transform2D& p_local_xform, const Ref<Shape2D>& p_shape, const Transform2D& p_shape_xform){
ERR_FAIL_COND_V(p_shape.is_null(),Variant());
const int max_contacts = 16;
diff --git a/scene/resources/shape_2d.h b/scene/resources/shape_2d.h
index ea89b31057..6a7ec03a9a 100644
--- a/scene/resources/shape_2d.h
+++ b/scene/resources/shape_2d.h
@@ -47,11 +47,11 @@ public:
void set_custom_solver_bias(real_t p_bias);
real_t get_custom_solver_bias() const;
- bool collide_with_motion(const Matrix32& p_local_xform, const Vector2& p_local_motion, const Ref<Shape2D>& p_shape, const Matrix32& p_shape_xform, const Vector2 &p_p_shape_motion);
- bool collide(const Matrix32& p_local_xform, const Ref<Shape2D>& p_shape, const Matrix32& p_shape_xform);
+ bool collide_with_motion(const Transform2D& p_local_xform, const Vector2& p_local_motion, const Ref<Shape2D>& p_shape, const Transform2D& p_shape_xform, const Vector2 &p_p_shape_motion);
+ bool collide(const Transform2D& p_local_xform, const Ref<Shape2D>& p_shape, const Transform2D& p_shape_xform);
- Variant collide_with_motion_and_get_contacts(const Matrix32& p_local_xform, const Vector2& p_local_motion, const Ref<Shape2D>& p_shape, const Matrix32& p_shape_xform, const Vector2 &p_p_shape_motion);
- Variant collide_and_get_contacts(const Matrix32& p_local_xform, const Ref<Shape2D>& p_shape, const Matrix32& p_shape_xform);
+ Variant collide_with_motion_and_get_contacts(const Transform2D& p_local_xform, const Vector2& p_local_motion, const Ref<Shape2D>& p_shape, const Transform2D& p_shape_xform, const Vector2 &p_p_shape_motion);
+ Variant collide_and_get_contacts(const Transform2D& p_local_xform, const Ref<Shape2D>& p_shape, const Transform2D& p_shape_xform);
virtual void draw(const RID& p_to_rid,const Color& p_color) {}
virtual Rect2 get_rect() const { return Rect2(); }
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp
index 64f3dd8b97..3f7261c312 100644
--- a/scene/resources/world.cpp
+++ b/scene/resources/world.cpp
@@ -41,7 +41,7 @@ struct SpatialIndexer {
struct NotifierData {
- AABB aabb;
+ Rect3 aabb;
OctreeElementID id;
};
@@ -64,7 +64,7 @@ struct SpatialIndexer {
uint64_t pass;
uint64_t last_frame;
- void _notifier_add(VisibilityNotifier* p_notifier,const AABB& p_rect) {
+ void _notifier_add(VisibilityNotifier* p_notifier,const Rect3& p_rect) {
ERR_FAIL_COND(notifiers.has(p_notifier));
notifiers[p_notifier].aabb=p_rect;
@@ -73,7 +73,7 @@ struct SpatialIndexer {
}
- void _notifier_update(VisibilityNotifier* p_notifier,const AABB& p_rect) {
+ void _notifier_update(VisibilityNotifier* p_notifier,const Rect3& p_rect) {
Map<VisibilityNotifier*,NotifierData>::Element *E=notifiers.find(p_notifier);
ERR_FAIL_COND(!E);
@@ -246,14 +246,14 @@ void World::_remove_camera(Camera* p_camera){
-void World::_register_notifier(VisibilityNotifier* p_notifier,const AABB& p_rect){
+void World::_register_notifier(VisibilityNotifier* p_notifier,const Rect3& p_rect){
#ifndef _3D_DISABLED
indexer->_notifier_add(p_notifier,p_rect);
#endif
}
-void World::_update_notifier(VisibilityNotifier* p_notifier,const AABB& p_rect){
+void World::_update_notifier(VisibilityNotifier* p_notifier,const Rect3& p_rect){
#ifndef _3D_DISABLED
indexer->_notifier_update(p_notifier,p_rect);
diff --git a/scene/resources/world.h b/scene/resources/world.h
index 8244261243..bea07882d7 100644
--- a/scene/resources/world.h
+++ b/scene/resources/world.h
@@ -60,8 +60,8 @@ friend class VisibilityNotifier;
void _update_camera(Camera* p_camera);
void _remove_camera(Camera* p_camera);
- void _register_notifier(VisibilityNotifier* p_notifier,const AABB& p_rect);
- void _update_notifier(VisibilityNotifier *p_notifier,const AABB& p_rect);
+ void _register_notifier(VisibilityNotifier* p_notifier,const Rect3& p_rect);
+ void _update_notifier(VisibilityNotifier *p_notifier,const Rect3& p_rect);
void _remove_notifier(VisibilityNotifier* p_notifier);
friend class Viewport;
void _update(uint64_t p_frame);