Merge pull request #6588 from SuperUserNameMan/expose_geometryinstance_get_aabb_etc

expose GeometryInstance.get_aabb() etc fixes #6587
This commit is contained in:
Rémi Verschelde 2016-09-23 07:42:39 +02:00 committed by GitHub
commit 20c7b65b7e
2 changed files with 5 additions and 0 deletions

View file

@ -72,6 +72,7 @@ void ImmediateGeometry::add_vertex(const Vector3& p_vertex){
if (empty) { if (empty) {
aabb.pos=p_vertex; aabb.pos=p_vertex;
aabb.size=Vector3(); aabb.size=Vector3();
empty=false;
} else { } else {
aabb.expand_to(p_vertex); aabb.expand_to(p_vertex);
} }

View file

@ -128,6 +128,8 @@ void VisualInstance::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"), &VisualInstance::set_layer_mask); ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"), &VisualInstance::set_layer_mask);
ObjectTypeDB::bind_method(_MD("get_layer_mask"), &VisualInstance::get_layer_mask); ObjectTypeDB::bind_method(_MD("get_layer_mask"), &VisualInstance::get_layer_mask);
ObjectTypeDB::bind_method(_MD("get_transformed_aabb"), &VisualInstance::get_transformed_aabb);
ADD_PROPERTY( PropertyInfo( Variant::INT, "layers",PROPERTY_HINT_ALL_FLAGS), _SCS("set_layer_mask"), _SCS("get_layer_mask")); ADD_PROPERTY( PropertyInfo( Variant::INT, "layers",PROPERTY_HINT_ALL_FLAGS), _SCS("set_layer_mask"), _SCS("get_layer_mask"));
@ -376,6 +378,8 @@ void GeometryInstance::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_extra_cull_margin","margin"), &GeometryInstance::set_extra_cull_margin); ObjectTypeDB::bind_method(_MD("set_extra_cull_margin","margin"), &GeometryInstance::set_extra_cull_margin);
ObjectTypeDB::bind_method(_MD("get_extra_cull_margin"), &GeometryInstance::get_extra_cull_margin); ObjectTypeDB::bind_method(_MD("get_extra_cull_margin"), &GeometryInstance::get_extra_cull_margin);
ObjectTypeDB::bind_method(_MD("get_aabb"),&GeometryInstance::get_aabb);
ObjectTypeDB::bind_method(_MD("_baked_light_changed"), &GeometryInstance::_baked_light_changed); ObjectTypeDB::bind_method(_MD("_baked_light_changed"), &GeometryInstance::_baked_light_changed);
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/visible"), _SCS("set_flag"), _SCS("get_flag"),FLAG_VISIBLE); ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/visible"), _SCS("set_flag"), _SCS("get_flag"),FLAG_VISIBLE);