aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/collision_object_bullet.cpp6
-rw-r--r--modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml2
-rw-r--r--modules/bullet/doc_classes/BulletPhysicsServer.xml2
-rw-r--r--modules/bullet/rigid_body_bullet.cpp2
-rw-r--r--modules/bullet/shape_bullet.cpp1
-rw-r--r--modules/bullet/space_bullet.cpp43
-rw-r--r--modules/bullet/space_bullet.h12
-rw-r--r--modules/enet/doc_classes/NetworkedMultiplayerENet.xml12
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp2
-rw-r--r--modules/etc/image_etc.cpp14
-rw-r--r--modules/gdnative/SCsub28
-rw-r--r--modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/GDNative.xml16
-rw-r--r--modules/gdnative/doc_classes/GDNativeLibrary.xml50
-rw-r--r--modules/gdnative/doc_classes/NativeScript.xml30
-rw-r--r--modules/gdnative/doc_classes/PluginScript.xml2
-rw-r--r--modules/gdnative/gdnative.cpp54
-rw-r--r--modules/gdnative/gdnative.h10
-rw-r--r--modules/gdnative/gdnative/array.cpp11
-rw-r--r--modules/gdnative/gdnative/gdnative.cpp4
-rw-r--r--modules/gdnative/gdnative/node_path.cpp4
-rw-r--r--modules/gdnative/gdnative_api.json30
-rw-r--r--modules/gdnative/include/gdnative/array.h4
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h5
-rw-r--r--modules/gdnative/include/gdnative/node_path.h2
-rw-r--r--modules/gdnative/register_types.cpp87
-rw-r--r--modules/gdscript/doc_classes/GDScript.xml2
-rw-r--r--modules/gdscript/doc_classes/GDScriptFunctionState.xml2
-rw-r--r--modules/gdscript/doc_classes/GDScriptNativeClass.xml2
-rw-r--r--modules/gdscript/gdscript.cpp21
-rw-r--r--modules/gdscript/gdscript.h8
-rw-r--r--modules/gdscript/gdscript_compiler.cpp25
-rw-r--r--modules/gdscript/gdscript_editor.cpp60
-rw-r--r--modules/gdscript/gdscript_functions.cpp30
-rw-r--r--modules/gdscript/gdscript_functions.h2
-rw-r--r--modules/gdscript/gdscript_parser.cpp35
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml4
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp10
-rw-r--r--modules/mobile_vr/doc_classes/MobileVRInterface.xml98
-rw-r--r--modules/mono/doc_classes/@C#.xml2
-rw-r--r--modules/mono/doc_classes/CSharpScript.xml2
-rw-r--r--modules/mono/doc_classes/GodotSharp.xml2
-rw-r--r--modules/mono/editor/bindings_generator.cpp4
-rw-r--r--modules/mono/glue/cs_files/AABB.cs42
-rw-r--r--modules/mono/glue/cs_files/Basis.cs92
-rw-r--r--modules/mono/glue/cs_files/Color.cs44
-rw-r--r--modules/mono/glue/cs_files/GD.cs56
-rw-r--r--modules/mono/glue/cs_files/Mathf.cs90
-rw-r--r--modules/mono/glue/cs_files/Plane.cs58
-rw-r--r--modules/mono/glue/cs_files/Quat.cs60
-rw-r--r--modules/mono/glue/cs_files/Rect2.cs44
-rw-r--r--modules/mono/glue/cs_files/StringExtensions.cs174
-rw-r--r--modules/mono/glue/cs_files/Transform.cs58
-rw-r--r--modules/mono/glue/cs_files/Transform2D.cs82
-rw-r--r--modules/mono/glue/cs_files/Vector2.cs82
-rw-r--r--modules/mono/glue/cs_files/Vector3.cs86
-rw-r--r--modules/regex/doc_classes/RegEx.xml2
-rw-r--r--modules/regex/doc_classes/RegExMatch.xml2
-rw-r--r--modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml44
-rw-r--r--modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml2
-rw-r--r--modules/theora/doc_classes/ResourceImporterTheora.xml2
-rw-r--r--modules/theora/doc_classes/VideoStreamTheora.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml30
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml146
-rw-r--r--modules/visual_script/doc_classes/VisualScriptClassConstant.xml30
-rw-r--r--modules/visual_script/doc_classes/VisualScriptComment.xml44
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCondition.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstant.xml30
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstructor.xml30
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCustomNode.xml18
-rw-r--r--modules/visual_script/doc_classes/VisualScriptDeconstruct.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEditor.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEmitSignal.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptExpression.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunction.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionCall.xml162
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionState.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptInputAction.xml38
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIterator.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVar.xml30
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml30
-rw-r--r--modules/visual_script/doc_classes/VisualScriptMathConstant.xml34
-rw-r--r--modules/visual_script/doc_classes/VisualScriptNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptOperator.xml30
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPreload.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertyGet.xml106
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertySet.xml144
-rw-r--r--modules/visual_script/doc_classes/VisualScriptResourcePath.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptReturn.xml30
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneNode.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneTree.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelect.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelf.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSequence.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSubCall.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSwitch.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptTypeCast.xml30
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableGet.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableSet.xml16
-rw-r--r--modules/visual_script/doc_classes/VisualScriptWhile.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYield.xml36
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYieldSignal.xml64
-rw-r--r--modules/visual_script/visual_script.cpp10
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp38
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.h2
-rw-r--r--modules/visual_script/visual_script_editor.cpp8
-rw-r--r--modules/visual_script/visual_script_expression.cpp6
-rw-r--r--modules/webm/config.py2
-rw-r--r--modules/webm/doc_classes/ResourceImporterWebm.xml2
-rw-r--r--modules/webm/doc_classes/VideoStreamWebm.xml16
115 files changed, 1094 insertions, 2038 deletions
diff --git a/modules/bullet/collision_object_bullet.cpp b/modules/bullet/collision_object_bullet.cpp
index 91a049b1f..5e878b0ee 100644
--- a/modules/bullet/collision_object_bullet.cpp
+++ b/modules/bullet/collision_object_bullet.cpp
@@ -285,10 +285,10 @@ void RigidCollisionObjectBullet::on_shapes_changed() {
const int size = shapes.size();
for (i = 0; i < size; ++i) {
shpWrapper = &shapes[i];
- if (!shpWrapper->bt_shape) {
- shpWrapper->bt_shape = shpWrapper->shape->create_bt_shape();
- }
if (shpWrapper->active) {
+ if (!shpWrapper->bt_shape) {
+ shpWrapper->bt_shape = shpWrapper->shape->create_bt_shape();
+ }
compoundShape->addChildShape(shpWrapper->transform, shpWrapper->bt_shape);
} else {
compoundShape->addChildShape(shpWrapper->transform, BulletPhysicsServer::get_empty_shape());
diff --git a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
index 831b34694..941a79e8e 100644
--- a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
+++ b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BulletPhysicsDirectBodyState" inherits="PhysicsDirectBodyState" category="Core" version="3.0-alpha">
+<class name="BulletPhysicsDirectBodyState" inherits="PhysicsDirectBodyState" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/bullet/doc_classes/BulletPhysicsServer.xml b/modules/bullet/doc_classes/BulletPhysicsServer.xml
index 4b5c2e6d8..515f0e292 100644
--- a/modules/bullet/doc_classes/BulletPhysicsServer.xml
+++ b/modules/bullet/doc_classes/BulletPhysicsServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BulletPhysicsServer" inherits="PhysicsServer" category="Core" version="3.0-alpha">
+<class name="BulletPhysicsServer" inherits="PhysicsServer" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 98ae82bc5..f5ab8221e 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -511,12 +511,14 @@ void RigidBodyBullet::set_mode(PhysicsServer::BodyMode p_mode) {
mode = PhysicsServer::BODY_MODE_RIGID;
set_axis_lock(axis_lock); // Reload axis lock
_internal_set_mass(0 == mass ? 1 : mass);
+ scratch_space_override_modificator();
break;
}
case PhysicsServer::BODY_MODE_CHARACTER: {
mode = PhysicsServer::BODY_MODE_CHARACTER;
set_axis_lock(axis_lock); // Reload axis lock
_internal_set_mass(0 == mass ? 1 : mass);
+ scratch_space_override_modificator();
break;
}
}
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index 49150484d..f51af93a3 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/modules/bullet/shape_bullet.cpp
@@ -45,6 +45,7 @@ ShapeBullet::~ShapeBullet() {}
btCollisionShape *ShapeBullet::prepare(btCollisionShape *p_btShape) const {
p_btShape->setUserPointer(const_cast<ShapeBullet *>(this));
+ p_btShape->setMargin(0.);
return p_btShape;
}
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index e4d049b00..d8c8cab17 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -53,7 +53,7 @@
BulletPhysicsDirectSpaceState::BulletPhysicsDirectSpaceState(SpaceBullet *p_space)
: PhysicsDirectSpaceState(), space(p_space) {}
-int BulletPhysicsDirectSpaceState::intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_layer, uint32_t p_object_type_mask) {
+int BulletPhysicsDirectSpaceState::intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_mask) {
if (p_result_max <= 0)
return 0;
@@ -68,15 +68,15 @@ int BulletPhysicsDirectSpaceState::intersect_point(const Vector3 &p_point, Shape
// Setup query
GodotAllContactResultCallback btResult(&collision_object_point, r_results, p_result_max, &p_exclude);
- btResult.m_collisionFilterGroup = p_collision_layer;
- btResult.m_collisionFilterMask = p_object_type_mask;
+ btResult.m_collisionFilterGroup = 0;
+ btResult.m_collisionFilterMask = p_collision_mask;
space->dynamicsWorld->contactTest(&collision_object_point, btResult);
// The results is already populated by GodotAllConvexResultCallback
return btResult.m_count;
}
-bool BulletPhysicsDirectSpaceState::intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude, uint32_t p_collision_layer, uint32_t p_object_type_mask, bool p_pick_ray) {
+bool BulletPhysicsDirectSpaceState::intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_pick_ray) {
btVector3 btVec_from;
btVector3 btVec_to;
@@ -86,8 +86,8 @@ bool BulletPhysicsDirectSpaceState::intersect_ray(const Vector3 &p_from, const V
// setup query
GodotClosestRayResultCallback btResult(btVec_from, btVec_to, &p_exclude);
- btResult.m_collisionFilterGroup = p_collision_layer;
- btResult.m_collisionFilterMask = p_object_type_mask;
+ btResult.m_collisionFilterGroup = 0;
+ btResult.m_collisionFilterMask = p_collision_mask;
btResult.m_pickRay = p_pick_ray;
space->dynamicsWorld->rayTest(btVec_from, btVec_to, btResult);
@@ -109,7 +109,7 @@ bool BulletPhysicsDirectSpaceState::intersect_ray(const Vector3 &p_from, const V
}
}
-int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *p_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_layer, uint32_t p_object_type_mask) {
+int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *p_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_mask) {
if (p_result_max <= 0)
return 0;
@@ -135,8 +135,8 @@ int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Tra
collision_object.setWorldTransform(bt_xform);
GodotAllContactResultCallback btQuery(&collision_object, p_results, p_result_max, &p_exclude);
- btQuery.m_collisionFilterGroup = p_collision_layer;
- btQuery.m_collisionFilterMask = p_object_type_mask;
+ btQuery.m_collisionFilterGroup = 0;
+ btQuery.m_collisionFilterMask = p_collision_mask;
btQuery.m_closestDistanceThreshold = p_margin;
space->dynamicsWorld->contactTest(&collision_object, btQuery);
@@ -145,7 +145,7 @@ int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Tra
return btQuery.m_count;
}
-bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, float p_margin, float &p_closest_safe, float &p_closest_unsafe, const Set<RID> &p_exclude, uint32_t p_collision_layer, uint32_t p_object_type_mask, ShapeRestInfo *r_info) {
+bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, float p_margin, float &p_closest_safe, float &p_closest_unsafe, const Set<RID> &p_exclude, uint32_t p_collision_mask, ShapeRestInfo *r_info) {
ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->get(p_shape);
btCollisionShape *btShape = shape->create_bt_shape();
@@ -170,18 +170,18 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
bt_xform_to.getOrigin() += bt_motion;
GodotClosestConvexResultCallback btResult(bt_xform_from.getOrigin(), bt_xform_to.getOrigin(), &p_exclude);
- btResult.m_collisionFilterGroup = p_collision_layer;
- btResult.m_collisionFilterMask = p_object_type_mask;
+ btResult.m_collisionFilterGroup = 0;
+ btResult.m_collisionFilterMask = p_collision_mask;
space->dynamicsWorld->convexSweepTest(bt_convex_shape, bt_xform_from, bt_xform_to, btResult, 0.002);
- if (r_info) {
- if (btResult.hasHit()) {
+ if (btResult.hasHit()) {
+ p_closest_safe = p_closest_unsafe = btResult.m_closestHitFraction;
+ if (r_info) {
if (btCollisionObject::CO_RIGID_BODY == btResult.m_hitCollisionObject->getInternalType()) {
B_TO_G(static_cast<const btRigidBody *>(btResult.m_hitCollisionObject)->getVelocityInLocalPoint(btResult.m_hitPointWorld), r_info->linear_velocity);
}
CollisionObjectBullet *collision_object = static_cast<CollisionObjectBullet *>(btResult.m_hitCollisionObject->getUserPointer());
- p_closest_safe = p_closest_unsafe = btResult.m_closestHitFraction;
B_TO_G(btResult.m_hitPointWorld, r_info->point);
B_TO_G(btResult.m_hitNormalWorld, r_info->normal);
r_info->rid = collision_object->get_self();
@@ -195,7 +195,7 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
}
/// Returns the list of contacts pairs in this order: Local contact, other body contact
-bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &p_shape_xform, float p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude, uint32_t p_collision_layer, uint32_t p_object_type_mask) {
+bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &p_shape_xform, float p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude, uint32_t p_collision_mask) {
if (p_result_max <= 0)
return 0;
@@ -221,8 +221,8 @@ bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &
collision_object.setWorldTransform(bt_xform);
GodotContactPairContactResultCallback btQuery(&collision_object, r_results, p_result_max, &p_exclude);
- btQuery.m_collisionFilterGroup = p_collision_layer;
- btQuery.m_collisionFilterMask = p_object_type_mask;
+ btQuery.m_collisionFilterGroup = 0;
+ btQuery.m_collisionFilterMask = p_collision_mask;
btQuery.m_closestDistanceThreshold = p_margin;
space->dynamicsWorld->contactTest(&collision_object, btQuery);
@@ -232,7 +232,7 @@ bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &
return btQuery.m_count;
}
-bool BulletPhysicsDirectSpaceState::rest_info(RID p_shape, const Transform &p_shape_xform, float p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude, uint32_t p_collision_layer, uint32_t p_object_type_mask) {
+bool BulletPhysicsDirectSpaceState::rest_info(RID p_shape, const Transform &p_shape_xform, float p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude, uint32_t p_collision_mask) {
ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->get(p_shape);
@@ -256,8 +256,8 @@ bool BulletPhysicsDirectSpaceState::rest_info(RID p_shape, const Transform &p_sh
collision_object.setWorldTransform(bt_xform);
GodotRestInfoContactResultCallback btQuery(&collision_object, r_info, &p_exclude);
- btQuery.m_collisionFilterGroup = p_collision_layer;
- btQuery.m_collisionFilterMask = p_object_type_mask;
+ btQuery.m_collisionFilterGroup = 0;
+ btQuery.m_collisionFilterMask = p_collision_mask;
btQuery.m_closestDistanceThreshold = p_margin;
space->dynamicsWorld->contactTest(&collision_object, btQuery);
@@ -467,6 +467,7 @@ void SpaceBullet::add_rigid_body(RigidBodyBullet *p_body) {
dynamicsWorld->addCollisionObject(p_body->get_bt_rigid_body(), p_body->get_collision_layer(), p_body->get_collision_mask());
} else {
dynamicsWorld->addRigidBody(p_body->get_bt_rigid_body(), p_body->get_collision_layer(), p_body->get_collision_mask());
+ p_body->scratch_space_override_modificator();
}
}
diff --git a/modules/bullet/space_bullet.h b/modules/bullet/space_bullet.h
index 9acac9a7d..99bcfb856 100644
--- a/modules/bullet/space_bullet.h
+++ b/modules/bullet/space_bullet.h
@@ -69,13 +69,13 @@ private:
public:
BulletPhysicsDirectSpaceState(SpaceBullet *p_space);
- virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, uint32_t p_object_type_mask = TYPE_MASK_COLLISION);
- virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, uint32_t p_object_type_mask = TYPE_MASK_COLLISION, bool p_pick_ray = false);
- virtual int intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, uint32_t p_object_type_mask = TYPE_MASK_COLLISION);
- virtual bool cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, float p_margin, float &p_closest_safe, float &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, uint32_t p_object_type_mask = TYPE_MASK_COLLISION, ShapeRestInfo *r_info = NULL);
+ virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF);
+ virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_pick_ray = false);
+ virtual int intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF);
+ virtual bool cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, float p_margin, float &p_closest_safe, float &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, ShapeRestInfo *r_info = NULL);
/// Returns the list of contacts pairs in this order: Local contact, other body contact
- virtual bool collide_shape(RID p_shape, const Transform &p_shape_xform, float p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, uint32_t p_object_type_mask = TYPE_MASK_COLLISION);
- virtual bool rest_info(RID p_shape, const Transform &p_shape_xform, float p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, uint32_t p_object_type_mask = TYPE_MASK_COLLISION);
+ virtual bool collide_shape(RID p_shape, const Transform &p_shape_xform, float p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF);
+ virtual bool rest_info(RID p_shape, const Transform &p_shape_xform, float p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF);
virtual Vector3 get_closest_point_to_object_volume(RID p_object, const Vector3 p_point) const;
};
diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
index 70ef6aef2..25d17542e 100644
--- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
+++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.0-alpha">
+<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.0-beta">
<brief_description>
PacketPeer implementation using the ENet library.
</brief_description>
@@ -71,15 +71,15 @@
</method>
</methods>
<constants>
- <constant name="COMPRESS_NONE" value="0">
+ <constant name="COMPRESS_NONE" value="0" enum="CompressionMode">
</constant>
- <constant name="COMPRESS_RANGE_CODER" value="1">
+ <constant name="COMPRESS_RANGE_CODER" value="1" enum="CompressionMode">
</constant>
- <constant name="COMPRESS_FASTLZ" value="2">
+ <constant name="COMPRESS_FASTLZ" value="2" enum="CompressionMode">
</constant>
- <constant name="COMPRESS_ZLIB" value="3">
+ <constant name="COMPRESS_ZLIB" value="3" enum="CompressionMode">
</constant>
- <constant name="COMPRESS_ZSTD" value="4">
+ <constant name="COMPRESS_ZSTD" value="4" enum="CompressionMode">
</constant>
</constants>
</class>
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index 1e18ec0d1..ce485956b 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -585,7 +585,7 @@ size_t NetworkedMultiplayerENet::enet_compress(void *context, const ENetBuffer *
if (enet->dst_compressor_mem.size() < req_size) {
enet->dst_compressor_mem.resize(req_size);
}
- int ret = Compression::compress(enet->dst_compressor_mem.ptr(), enet->src_compressor_mem.ptr(), ofs, mode);
+ int ret = Compression::compress(enet->dst_compressor_mem.ptrw(), enet->src_compressor_mem.ptr(), ofs, mode);
if (ret < 0)
return 0;
diff --git a/modules/etc/image_etc.cpp b/modules/etc/image_etc.cpp
index dc7d23bbd..941df4169 100644
--- a/modules/etc/image_etc.cpp
+++ b/modules/etc/image_etc.cpp
@@ -129,7 +129,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
PoolVector<uint8_t>::Read r = img->get_data().read();
int target_size = Image::get_image_data_size(imgw, imgh, etc_format, p_img->has_mipmaps() ? -1 : 0);
- int mmc = p_img->has_mipmaps() ? Image::get_image_required_mipmaps(imgw, imgh, etc_format) : 0;
+ int mmc = 1 + (p_img->has_mipmaps() ? Image::get_image_required_mipmaps(imgw, imgh, etc_format) : 0);
PoolVector<uint8_t> dst_data;
dst_data.resize(target_size);
@@ -155,7 +155,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
print_line("begin encoding, format: " + Image::get_format_name(etc_format));
uint64_t t = OS::get_singleton()->get_ticks_msec();
- for (int i = 0; i < mmc + 1; i++) {
+ for (int i = 0; i < mmc; i++) {
// convert source image to internal etc2comp format (which is equivalent to Image::FORMAT_RGBAF)
// NOTE: We can alternatively add a case to Image::convert to handle Image::FORMAT_RGBAF conversion.
int mipmap_ofs = 0, mipmap_size = 0, mipmap_w = 0, mipmap_h = 0;
@@ -163,9 +163,9 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
const uint8_t *src = &r[mipmap_ofs];
Etc::ColorFloatRGBA *src_rgba_f = new Etc::ColorFloatRGBA[mipmap_w * mipmap_h];
- for (int i = 0; i < mipmap_w * mipmap_h; i++) {
- int si = i * 4; // RGBA8
- src_rgba_f[i] = Etc::ColorFloatRGBA::ConvertFromRGBA8(src[si], src[si + 1], src[si + 2], src[si + 3]);
+ for (int j = 0; j < mipmap_w * mipmap_h; j++) {
+ int si = j * 4; // RGBA8
+ src_rgba_f[j] = Etc::ColorFloatRGBA::ConvertFromRGBA8(src[si], src[si + 1], src[si + 2], src[si + 3]);
}
unsigned char *etc_data = NULL;
@@ -173,15 +173,17 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
unsigned int extended_width = 0, extended_height = 0;
Etc::Encode((float *)src_rgba_f, mipmap_w, mipmap_h, etc2comp_etc_format, error_metric, effort, num_cpus, num_cpus, &etc_data, &etc_data_len, &extended_width, &extended_height, &encoding_time);
+ CRASH_COND(wofs + etc_data_len > target_size);
memcpy(&w[wofs], etc_data, etc_data_len);
wofs += etc_data_len;
delete[] etc_data;
delete[] src_rgba_f;
}
+
print_line("time encoding: " + rtos(OS::get_singleton()->get_ticks_msec() - t));
- p_img->create(imgw, imgh, mmc > 1 ? true : false, etc_format, dst_data);
+ p_img->create(imgw, imgh, p_img->has_mipmaps(), etc_format, dst_data);
}
static void _compress_etc1(Image *p_img, float p_lossy_quality) {
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index 485bf4b9d..54d0672a5 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -19,19 +19,27 @@ def _spaced(e):
return e if e[-1] == '*' else e + ' '
def _build_gdnative_api_struct_header(api):
- ext_wrappers = ''
+ gdnative_api_init_macro = [
+ '\textern const godot_gdnative_core_api_struct *_gdnative_wrapper_api_struct;'
+ ]
for name in api['extensions']:
- ext_wrappers += ' extern const godot_gdnative_ext_' + name + '_api_struct *_gdnative_wrapper_' + name + '_api_struct;'
+ gdnative_api_init_macro.append(
+ '\textern const godot_gdnative_ext_{0}_api_struct *_gdnative_wrapper_{0}_api_struct;'.format(name))
- ext_init = 'for (int i = 0; i < _gdnative_wrapper_api_struct->num_extensions; i++) { '
- ext_init += 'switch (_gdnative_wrapper_api_struct->extensions[i]->type) {'
+ gdnative_api_init_macro.append('\t_gdnative_wrapper_api_struct = options->api_struct;')
+ gdnative_api_init_macro.append('\tfor (int i = 0; i < _gdnative_wrapper_api_struct->num_extensions; i++) { ')
+ gdnative_api_init_macro.append('\t\tswitch (_gdnative_wrapper_api_struct->extensions[i]->type) {')
for name in api['extensions']:
- ext_init += 'case GDNATIVE_EXT_' + api['extensions'][name]['type'] + ': '
- ext_init += '_gdnative_wrapper_' + name + '_api_struct = (' + 'godot_gdnative_ext_' + name + '_api_struct *) _gdnative_wrapper_api_struct->extensions[i]; break;'
-
- ext_init += '}'
+ gdnative_api_init_macro.append(
+ '\t\t\tcase GDNATIVE_EXT_%s:' % api['extensions'][name]['type'])
+ gdnative_api_init_macro.append(
+ '\t\t\t\t_gdnative_wrapper_{0}_api_struct = (godot_gdnative_ext_{0}_api_struct *)'
+ ' _gdnative_wrapper_api_struct->extensions[i];'.format(name))
+ gdnative_api_init_macro.append('\t\t\t\tbreak;')
+ gdnative_api_init_macro.append('\t\t}')
+ gdnative_api_init_macro.append('\t}')
out = [
'/* THIS FILE IS GENERATED DO NOT EDIT */',
@@ -43,7 +51,7 @@ def _build_gdnative_api_struct_header(api):
'#include <nativescript/godot_nativescript.h>',
'#include <pluginscript/godot_pluginscript.h>',
'',
- '#define GDNATIVE_API_INIT(options) do { extern const godot_gdnative_api_struct *_gdnative_wrapper_api_struct;' + ext_wrappers + ' _gdnative_wrapper_api_struct = options->api_struct; ' + ext_init + ' } while (0)',
+ '#define GDNATIVE_API_INIT(options) do { \\\n' + ' \\\n'.join(gdnative_api_init_macro) + ' \\\n } while (0)',
'',
'#ifdef __cplusplus',
'extern "C" {',
@@ -179,7 +187,7 @@ def _build_gdnative_wrapper_code(api):
]
for name in api['extensions']:
- out.append('godot_gdnative_ext_' + name + '_api_struct *_gdnative_wrapper_' + name + '_api_struct;')
+ out.append('godot_gdnative_ext_' + name + '_api_struct *_gdnative_wrapper_' + name + '_api_struct = 0;')
out += ['']
diff --git a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
index 10957a339..e4ffa76d3 100644
--- a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
+++ b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRInterfaceGDNative" inherits="ARVRInterface" category="Core" version="3.0-alpha">
+<class name="ARVRInterfaceGDNative" inherits="ARVRInterface" category="Core" version="3.0-beta">
<brief_description>
GDNative wrapper for an ARVR interface
</brief_description>
diff --git a/modules/gdnative/doc_classes/GDNative.xml b/modules/gdnative/doc_classes/GDNative.xml
index 7a36d09ae..83953cef4 100644
--- a/modules/gdnative/doc_classes/GDNative.xml
+++ b/modules/gdnative/doc_classes/GDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNative" inherits="Reference" category="Core" version="3.0-alpha">
+<class name="GDNative" inherits="Reference" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -21,26 +21,12 @@
<description>
</description>
</method>
- <method name="get_library">
- <return type="GDNativeLibrary">
- </return>
- <description>
- </description>
- </method>
<method name="initialize">
<return type="bool">
</return>
<description>
</description>
</method>
- <method name="set_library">
- <return type="void">
- </return>
- <argument index="0" name="library" type="GDNativeLibrary">
- </argument>
- <description>
- </description>
- </method>
<method name="terminate">
<return type="bool">
</return>
diff --git a/modules/gdnative/doc_classes/GDNativeLibrary.xml b/modules/gdnative/doc_classes/GDNativeLibrary.xml
index e271665fd..647d27929 100644
--- a/modules/gdnative/doc_classes/GDNativeLibrary.xml
+++ b/modules/gdnative/doc_classes/GDNativeLibrary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNativeLibrary" inherits="Resource" category="Core" version="3.0-alpha">
+<class name="GDNativeLibrary" inherits="Resource" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -27,54 +27,6 @@
<description>
</description>
</method>
- <method name="get_symbol_prefix" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="is_current_library_statically_linked" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_singleton" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_load_once">
- <return type="void">
- </return>
- <argument index="0" name="load_once" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_singleton">
- <return type="void">
- </return>
- <argument index="0" name="singleton" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_symbol_prefix">
- <return type="void">
- </return>
- <argument index="0" name="symbol_prefix" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="should_load_once" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="load_once" type="bool" setter="set_load_once" getter="should_load_once">
diff --git a/modules/gdnative/doc_classes/NativeScript.xml b/modules/gdnative/doc_classes/NativeScript.xml
index eb4e13f74..3f6025d02 100644
--- a/modules/gdnative/doc_classes/NativeScript.xml
+++ b/modules/gdnative/doc_classes/NativeScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NativeScript" inherits="Script" category="Core" version="3.0-alpha">
+<class name="NativeScript" inherits="Script" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,40 +9,12 @@
<demos>
</demos>
<methods>
- <method name="get_class_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_library" qualifiers="const">
- <return type="GDNativeLibrary">
- </return>
- <description>
- </description>
- </method>
<method name="new" qualifiers="vararg">
<return type="Object">
</return>
<description>
</description>
</method>
- <method name="set_class_name">
- <return type="void">
- </return>
- <argument index="0" name="class_name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_library">
- <return type="void">
- </return>
- <argument index="0" name="library" type="GDNativeLibrary">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="class_name" type="String" setter="set_class_name" getter="get_class_name">
diff --git a/modules/gdnative/doc_classes/PluginScript.xml b/modules/gdnative/doc_classes/PluginScript.xml
index a5ab422d3..1a2141247 100644
--- a/modules/gdnative/doc_classes/PluginScript.xml
+++ b/modules/gdnative/doc_classes/PluginScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PluginScript" inherits="Script" category="Core" version="3.0-alpha">
+<class name="PluginScript" inherits="Script" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index 7949ca182..0132ef3c5 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -64,7 +64,6 @@ void GDNativeLibrary::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_current_library_path"), &GDNativeLibrary::get_current_library_path);
ClassDB::bind_method(D_METHOD("get_current_dependencies"), &GDNativeLibrary::get_current_dependencies);
- ClassDB::bind_method(D_METHOD("is_current_library_statically_linked"), &GDNativeLibrary::is_current_library_statically_linked);
ClassDB::bind_method(D_METHOD("should_load_once"), &GDNativeLibrary::should_load_once);
ClassDB::bind_method(D_METHOD("is_singleton"), &GDNativeLibrary::is_singleton);
@@ -119,12 +118,18 @@ bool GDNative::initialize() {
}
String lib_path = library->get_current_library_path();
- if (lib_path.empty() && !library->is_current_library_statically_linked()) {
+ if (lib_path.empty()) {
ERR_PRINT("No library set for this platform");
return false;
}
#ifdef IPHONE_ENABLED
- String path = lib_path.replace("res://", "dylibs/");
+ // on iOS we use static linking
+ String path = "";
+#elif defined(ANDROID_ENABLED)
+ // On Android dynamic libraries are located separately from resource assets,
+ // we should pass library name to dlopen(). The library name is flattened
+ // during export.
+ String path = lib_path.get_file();
#else
String path = ProjectSettings::get_singleton()->globalize_path(lib_path);
#endif
@@ -140,7 +145,7 @@ bool GDNative::initialize() {
}
Error err = OS::get_singleton()->open_dynamic_library(path, native_handle);
- if (err != OK && !library->is_current_library_statically_linked()) {
+ if (err != OK) {
return false;
}
@@ -149,13 +154,12 @@ bool GDNative::initialize() {
// we cheat here a little bit. you saw nothing
initialized = true;
- err = get_symbol(library->get_symbol_prefix() + init_symbol, library_init);
+ err = get_symbol(library->get_symbol_prefix() + init_symbol, library_init, false);
initialized = false;
if (err || !library_init) {
- if (!library->is_current_library_statically_linked())
- OS::get_singleton()->close_dynamic_library(native_handle);
+ OS::get_singleton()->close_dynamic_library(native_handle);
native_handle = NULL;
ERR_PRINT("Failed to obtain godot_gdnative_init symbol");
return false;
@@ -282,7 +286,7 @@ Variant GDNative::call_native(StringName p_native_call_type, StringName p_proced
return *(Variant *)&result;
}
-Error GDNative::get_symbol(StringName p_procedure_name, void *&r_handle) {
+Error GDNative::get_symbol(StringName p_procedure_name, void *&r_handle, bool p_optional) {
if (!initialized) {
ERR_PRINT("No valid library handle, can't get symbol from GDNative object");
@@ -293,7 +297,7 @@ Error GDNative::get_symbol(StringName p_procedure_name, void *&r_handle) {
native_handle,
p_procedure_name,
r_handle,
- true);
+ p_optional);
return result;
}
@@ -374,40 +378,8 @@ RES GDNativeLibraryResourceLoader::load(const String &p_path, const String &p_or
}
}
- bool is_statically_linked = false;
- {
-
- List<String> static_linking_keys;
- config->get_section_keys("static_linking", &static_linking_keys);
-
- for (List<String>::Element *E = static_linking_keys.front(); E; E = E->next()) {
- String key = E->get();
-
- Vector<String> tags = key.split(".");
-
- bool skip = false;
-
- for (int i = 0; i < tags.size(); i++) {
- bool has_feature = OS::get_singleton()->has_feature(tags[i]);
-
- if (!has_feature) {
- skip = true;
- break;
- }
- }
-
- if (skip) {
- continue;
- }
-
- is_statically_linked = config->get_value("static_linking", key);
- break;
- }
- }
-
lib->current_library_path = entry_lib_path;
lib->current_dependencies = dependency_paths;
- lib->current_library_statically_linked = is_statically_linked;
return lib;
}
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index 061dff926..bb260bdd1 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -55,7 +55,6 @@ class GDNativeLibrary : public Resource {
String current_library_path;
Vector<String> current_dependencies;
- bool current_library_statically_linked;
bool singleton;
bool load_once;
@@ -75,9 +74,6 @@ public:
_FORCE_INLINE_ Vector<String> get_current_dependencies() const {
return current_dependencies;
}
- _FORCE_INLINE_ bool is_current_library_statically_linked() const {
- return current_library_statically_linked;
- }
// things that are a property of the library itself, not platform specific
_FORCE_INLINE_ bool should_load_once() const {
@@ -103,12 +99,10 @@ public:
static void _bind_methods();
};
-typedef godot_variant (*native_call_cb)(void *, godot_array *);
-
struct GDNativeCallRegistry {
static GDNativeCallRegistry *singleton;
- inline GDNativeCallRegistry *get_singleton() {
+ inline static GDNativeCallRegistry *get_singleton() {
return singleton;
}
@@ -147,7 +141,7 @@ public:
Variant call_native(StringName p_native_call_type, StringName p_procedure_name, Array p_arguments = Array());
- Error get_symbol(StringName p_procedure_name, void *&r_handle);
+ Error get_symbol(StringName p_procedure_name, void *&r_handle, bool p_optional = true);
};
class GDNativeLibraryResourceLoader : public ResourceFormatLoader {
diff --git a/modules/gdnative/gdnative/array.cpp b/modules/gdnative/gdnative/array.cpp
index e0d951498..8351c4357 100644
--- a/modules/gdnative/gdnative/array.cpp
+++ b/modules/gdnative/gdnative/array.cpp
@@ -302,6 +302,17 @@ void GDAPI godot_array_sort_custom(godot_array *p_self, godot_object *p_obj, con
self->sort_custom((Object *)p_obj, *func);
}
+godot_int GDAPI godot_array_bsearch(godot_array *p_self, const godot_variant *p_value, const godot_bool p_before) {
+ Array *self = (Array *)p_self;
+ return self->bsearch((const Variant *)p_value, p_before);
+}
+
+godot_int GDAPI godot_array_bsearch_custom(godot_array *p_self, const godot_variant *p_value, godot_object *p_obj, const godot_string *p_func, const godot_bool p_before) {
+ Array *self = (Array *)p_self;
+ const String *func = (const String *)p_func;
+ return self->bsearch_custom((const Variant *)p_value, (Object *)p_obj, *func, p_before);
+}
+
void GDAPI godot_array_destroy(godot_array *p_self) {
((Array *)p_self)->~Array();
}
diff --git a/modules/gdnative/gdnative/gdnative.cpp b/modules/gdnative/gdnative/gdnative.cpp
index 34b73558d..92a88e354 100644
--- a/modules/gdnative/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative/gdnative.cpp
@@ -115,6 +115,10 @@ godot_dictionary GDAPI godot_get_global_constants() {
}
// System functions
+void GDAPI godot_register_native_call_type(const char *p_call_type, native_call_cb p_callback) {
+ GDNativeCallRegistry::get_singleton()->register_native_call_type(StringName(p_call_type), p_callback);
+}
+
void GDAPI *godot_alloc(int p_bytes) {
return memalloc(p_bytes);
}
diff --git a/modules/gdnative/gdnative/node_path.cpp b/modules/gdnative/gdnative/node_path.cpp
index 2bd278e05..8dfe151f9 100644
--- a/modules/gdnative/gdnative/node_path.cpp
+++ b/modules/gdnative/gdnative/node_path.cpp
@@ -91,10 +91,10 @@ godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, co
return dest;
}
-godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_self) {
+godot_string GDAPI godot_node_path_get_concatenated_subnames(const godot_node_path *p_self) {
godot_string dest;
const NodePath *self = (const NodePath *)p_self;
- memnew_placement(&dest, String(self->get_property()));
+ memnew_placement(&dest, String(self->get_concatenated_subnames()));
return dest;
}
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 0a1c5095d..488ed9320 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -2680,6 +2680,26 @@
]
},
{
+ "name": "godot_array_bsearch",
+ "return_type": "godot_int",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_variant *", "p_value"],
+ ["const godot_bool", "p_before"]
+ ]
+ },
+ {
+ "name": "godot_array_bsearch_custom",
+ "return_type": "godot_int",
+ "arguments": [
+ ["godot_array *", "p_self"],
+ ["const godot_variant *", "p_value"],
+ ["godot_object *", "p_obj"],
+ ["const godot_string *", "p_func"],
+ ["const godot_bool", "p_before"]
+ ]
+ },
+ {
"name": "godot_array_destroy",
"return_type": "void",
"arguments": [
@@ -2898,7 +2918,7 @@
]
},
{
- "name": "godot_node_path_get_property",
+ "name": "godot_node_path_get_concatenated_subnames",
"return_type": "godot_string",
"arguments": [
["const godot_node_path *", "p_self"]
@@ -5549,6 +5569,14 @@
]
},
{
+ "name": "godot_register_native_call_type",
+ "return_type": "void",
+ "arguments": [
+ ["const char *", "call_type"],
+ ["native_call_cb", "p_callback"]
+ ]
+ },
+ {
"name": "godot_alloc",
"return_type": "void *",
"arguments": [
diff --git a/modules/gdnative/include/gdnative/array.h b/modules/gdnative/include/gdnative/array.h
index 01ae61e28..484ffd10b 100644
--- a/modules/gdnative/include/gdnative/array.h
+++ b/modules/gdnative/include/gdnative/array.h
@@ -124,6 +124,10 @@ void GDAPI godot_array_sort(godot_array *p_self);
void GDAPI godot_array_sort_custom(godot_array *p_self, godot_object *p_obj, const godot_string *p_func);
+godot_int GDAPI godot_array_bsearch(godot_array *p_self, const godot_variant *p_value, const godot_bool p_before);
+
+godot_int GDAPI godot_array_bsearch_custom(godot_array *p_self, const godot_variant *p_value, godot_object *p_obj, const godot_string *p_func, const godot_bool p_before);
+
void GDAPI godot_array_destroy(godot_array *p_self);
#ifdef __cplusplus
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index e8d509508..6e69d4346 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -53,7 +53,7 @@ extern "C" {
// This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!!
#ifdef _WIN32
-#define GDN_EXPORT
+#define GDN_EXPORT __declspec(dllexport)
#else
#define GDN_EXPORT
#endif
@@ -274,6 +274,9 @@ typedef godot_variant (*godot_gdnative_procedure_fn)(godot_array *);
////// System Functions
+typedef godot_variant (*native_call_cb)(void *, godot_array *);
+void GDAPI godot_register_native_call_type(const char *p_call_type, native_call_cb p_callback);
+
//using these will help Godot track how much memory is in use in debug mode
void GDAPI *godot_alloc(int p_bytes);
void GDAPI *godot_realloc(void *p_ptr, int p_bytes);
diff --git a/modules/gdnative/include/gdnative/node_path.h b/modules/gdnative/include/gdnative/node_path.h
index 42446175d..b5a59fd32 100644
--- a/modules/gdnative/include/gdnative/node_path.h
+++ b/modules/gdnative/include/gdnative/node_path.h
@@ -73,7 +73,7 @@ godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_self)
godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, const godot_int p_idx);
-godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_self);
+godot_string GDAPI godot_node_path_get_concatenated_subnames(const godot_node_path *p_self);
godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_self);
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index 8af643df5..34099bf52 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -123,6 +123,11 @@ protected:
virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features);
};
+struct LibrarySymbol {
+ char *name;
+ bool is_required;
+};
+
void GDNativeExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) {
if (p_type != "GDNativeLibrary") {
return;
@@ -136,7 +141,6 @@ void GDNativeExportPlugin::_export_file(const String &p_path, const String &p_ty
Ref<ConfigFile> config = lib->get_config_file();
- String entry_lib_path;
{
List<String> entry_keys;
@@ -161,14 +165,12 @@ void GDNativeExportPlugin::_export_file(const String &p_path, const String &p_ty
continue;
}
- entry_lib_path = config->get_value("entry", key);
- break;
+ String entry_lib_path = config->get_value("entry", key);
+ add_shared_object(entry_lib_path, tags);
}
}
- Vector<String> dependency_paths;
{
-
List<String> dependency_keys;
config->get_section_keys("dependencies", &dependency_keys);
@@ -191,47 +193,54 @@ void GDNativeExportPlugin::_export_file(const String &p_path, const String &p_ty
continue;
}
- dependency_paths = config->get_value("dependencies", key);
- break;
+ Vector<String> dependency_paths = config->get_value("dependencies", key);
+ for (int i = 0; i < dependency_paths.size(); i++) {
+ add_shared_object(dependency_paths[i], tags);
+ }
}
}
- bool is_statically_linked = false;
- {
-
- List<String> static_linking_keys;
- config->get_section_keys("static_linking", &static_linking_keys);
-
- for (List<String>::Element *E = static_linking_keys.front(); E; E = E->next()) {
- String key = E->get();
-
- Vector<String> tags = key.split(".");
-
- bool skip = false;
-
- for (int i = 0; i < tags.size(); i++) {
- bool has_feature = p_features.has(tags[i]);
+ if (p_features.has("iOS")) {
+ // Register symbols in the "fake" dynamic lookup table, because dlsym does not work well on iOS.
+ LibrarySymbol expected_symbols[] = {
+ { "gdnative_init", true },
+ { "gdnative_terminate", false },
+ { "nativescript_init", false },
+ { "nativescript_frame", false },
+ { "nativescript_thread_enter", false },
+ { "nativescript_thread_exit", false },
+ { "gdnative_singleton", false }
+ };
+ String declare_pattern = "extern \"C\" void $name(void)$weak;\n";
+ String additional_code = "extern void register_dynamic_symbol(char *name, void *address);\n"
+ "extern void add_ios_init_callback(void (*cb)());\n";
+ String linker_flags = "";
+ for (int i = 0; i < sizeof(expected_symbols) / sizeof(expected_symbols[0]); ++i) {
+ String full_name = lib->get_symbol_prefix() + expected_symbols[i].name;
+ String code = declare_pattern.replace("$name", full_name);
+ code = code.replace("$weak", expected_symbols[i].is_required ? "" : " __attribute__((weak))");
+ additional_code += code;
- if (!has_feature) {
- skip = true;
- break;
+ if (!expected_symbols[i].is_required) {
+ if (linker_flags.length() > 0) {
+ linker_flags += " ";
}
+ linker_flags += "-Wl,-U,_" + full_name;
}
-
- if (skip) {
- continue;
- }
-
- is_statically_linked = config->get_value("static_linking", key);
- break;
}
- }
- if (!is_statically_linked)
- add_shared_object(entry_lib_path);
+ additional_code += String("void $prefixinit() {\n").replace("$prefix", lib->get_symbol_prefix());
+ String register_pattern = " if (&$name) register_dynamic_symbol((char *)\"$name\", (void *)$name);\n";
+ for (int i = 0; i < sizeof(expected_symbols) / sizeof(expected_symbols[0]); ++i) {
+ String full_name = lib->get_symbol_prefix() + expected_symbols[i].name;
+ additional_code += register_pattern.replace("$name", full_name);
+ }
+ additional_code += "}\n";
+ additional_code += String("struct $prefixstruct {$prefixstruct() {add_ios_init_callback($prefixinit);}};\n").replace("$prefix", lib->get_symbol_prefix());
+ additional_code += String("$prefixstruct $prefixstruct_instance;\n").replace("$prefix", lib->get_symbol_prefix());
- for (int i = 0; i < dependency_paths.size(); i++) {
- add_shared_object(dependency_paths[i]);
+ add_ios_cpp_code(additional_code);
+ add_ios_linker_flags(linker_flags);
}
}
@@ -271,9 +280,7 @@ void register_gdnative_types() {
#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
- EditorNode::add_init_callback(editor_init_callback);
- }
+ EditorNode::add_init_callback(editor_init_callback);
#endif
ClassDB::register_class<GDNativeLibrary>();
diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml
index 13d45aa52..cc617c5c6 100644
--- a/modules/gdscript/doc_classes/GDScript.xml
+++ b/modules/gdscript/doc_classes/GDScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScript" inherits="Script" category="Core" version="3.0-alpha">
+<class name="GDScript" inherits="Script" category="Core" version="3.0-beta">
<brief_description>
A script implemented in the GDScript programming language.
</brief_description>
diff --git a/modules/gdscript/doc_classes/GDScriptFunctionState.xml b/modules/gdscript/doc_classes/GDScriptFunctionState.xml
index 2df4e7c21..465a4f438 100644
--- a/modules/gdscript/doc_classes/GDScriptFunctionState.xml
+++ b/modules/gdscript/doc_classes/GDScriptFunctionState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScriptFunctionState" inherits="Reference" category="Core" version="3.0-alpha">
+<class name="GDScriptFunctionState" inherits="Reference" category="Core" version="3.0-beta">
<brief_description>
State of a function call after yielding.
</brief_description>
diff --git a/modules/gdscript/doc_classes/GDScriptNativeClass.xml b/modules/gdscript/doc_classes/GDScriptNativeClass.xml
index 4514a7846..948254e0a 100644
--- a/modules/gdscript/doc_classes/GDScriptNativeClass.xml
+++ b/modules/gdscript/doc_classes/GDScriptNativeClass.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScriptNativeClass" inherits="Reference" category="Core" version="3.0-alpha">
+<class name="GDScriptNativeClass" inherits="Reference" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 55ea8a5f2..9496d0b31 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -615,6 +615,23 @@ ScriptLanguage *GDScript::get_language() const {
return GDScriptLanguage::get_singleton();
}
+void GDScript::get_constants(Map<StringName, Variant> *p_constants) {
+
+ if (p_constants) {
+ for (Map<StringName, Variant>::Element *E = constants.front(); E; E = E->next()) {
+ (*p_constants)[E->key()] = E->value();
+ }
+ }
+}
+
+void GDScript::get_members(Set<StringName> *p_members) {
+ if (p_members) {
+ for (Set<StringName>::Element *E = members.front(); E; E = E->next()) {
+ p_members->insert(E->get());
+ }
+ }
+}
+
Variant GDScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
GDScript *top = this;
@@ -721,7 +738,7 @@ Error GDScript::load_byte_code(const String &p_path) {
Error err = fae->open_and_parse(fa, key, FileAccessEncrypted::MODE_READ);
ERR_FAIL_COND_V(err, err);
bytecode.resize(fae->get_len());
- fae->get_buffer(bytecode.ptr(), bytecode.size());
+ fae->get_buffer(bytecode.ptrw(), bytecode.size());
memdelete(fae);
} else {
@@ -1307,7 +1324,7 @@ void GDScriptLanguage::_add_global(const StringName &p_name, const Variant &p_va
}
globals[p_name] = global_array.size();
global_array.push_back(p_value);
- _global_array = global_array.ptr();
+ _global_array = global_array.ptrw();
}
void GDScriptLanguage::add_global_constant(const StringName &p_variable, const Variant &p_value) {
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index 3f6f43193..6e5d59ad0 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -198,6 +198,9 @@ public:
return -1;
}
+ virtual void get_constants(Map<StringName, Variant> *p_constants);
+ virtual void get_members(Set<StringName> *p_members);
+
GDScript();
~GDScript();
};
@@ -219,7 +222,7 @@ class GDScriptInstance : public ScriptInstance {
void _ml_call_reversed(GDScript *sptr, const StringName &p_method, const Variant **p_args, int p_argcount);
public:
- _FORCE_INLINE_ Object *get_owner() { return owner; }
+ virtual Object *get_owner() { return owner; }
virtual bool set(const StringName &p_name, const Variant &p_value);
virtual bool get(const StringName &p_name, Variant &r_ret) const;
@@ -407,7 +410,8 @@ public:
virtual String debug_get_stack_level_source(int p_level) const;
virtual void debug_get_stack_level_locals(int p_level, List<String> *p_locals, List<Variant> *p_values, int p_max_subitems = -1, int p_max_depth = -1);
virtual void debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems = -1, int p_max_depth = -1);
- virtual void debug_get_globals(List<String> *p_locals, List<Variant> *p_values, int p_max_subitems = -1, int p_max_depth = -1);
+ virtual ScriptInstance *debug_get_stack_level_instance(int p_level);
+ virtual void debug_get_globals(List<String> *p_globals, List<Variant> *p_values, int p_max_subitems = -1, int p_max_depth = -1);
virtual String debug_parse_stack_level_expression(int p_level, const String &p_expression, int p_max_subitems = -1, int p_max_depth = -1);
virtual void reload_all_scripts();
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 3121a6143..4cd6472b7 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -1686,21 +1686,44 @@ Error GDScriptCompiler::_parse_class(GDScript *p_script, GDScript *p_owner, cons
base_class = p->subclasses[base];
break;
}
+
+ if (p->constants.has(base)) {
+
+ base_class = p->constants[base];
+ if (base_class.is_null()) {
+ _set_error("Constant is not a class: " + base, p_class);
+ return ERR_SCRIPT_FAILED;
+ }
+ break;
+ }
+
p = p->_owner;
}
if (base_class.is_valid()) {
+ String ident = base;
+
for (int i = 1; i < p_class->extends_class.size(); i++) {
String subclass = p_class->extends_class[i];
+ ident += ("." + subclass);
+
if (base_class->subclasses.has(subclass)) {
base_class = base_class->subclasses[subclass];
+ } else if (base_class->constants.has(subclass)) {
+
+ Ref<GDScript> new_base_class = base_class->constants[subclass];
+ if (new_base_class.is_null()) {
+ _set_error("Constant is not a class: " + ident, p_class);
+ return ERR_SCRIPT_FAILED;
+ }
+ base_class = new_base_class;
} else {
- _set_error("Could not find subclass: " + subclass, p_class);
+ _set_error("Could not find subclass: " + ident, p_class);
return ERR_FILE_NOT_FOUND;
}
}
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index a74b8a848..e7100d835 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -29,11 +29,11 @@
/*************************************************************************/
#include "gdscript.h"
+#include "core/engine.h"
#include "editor/editor_settings.h"
#include "gdscript_compiler.h"
#include "global_constants.h"
#include "os/file_access.h"
-#include "project_settings.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_file_system.h"
@@ -280,10 +280,62 @@ void GDScriptLanguage::debug_get_stack_level_members(int p_level, List<String> *
p_values->push_back(instance->debug_get_member_by_index(E->get().index));
}
}
-void GDScriptLanguage::debug_get_globals(List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
- //no globals are really reachable in gdscript
+ScriptInstance *GDScriptLanguage::debug_get_stack_level_instance(int p_level) {
+
+ ERR_FAIL_COND_V(_debug_parse_err_line >= 0, NULL);
+ ERR_FAIL_INDEX_V(p_level, _debug_call_stack_pos, NULL);
+
+ int l = _debug_call_stack_pos - p_level - 1;
+ ScriptInstance *instance = _call_stack[l].instance;
+
+ return instance;
}
+
+void GDScriptLanguage::debug_get_globals(List<String> *p_globals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
+
+ const Map<StringName, int> &name_idx = GDScriptLanguage::get_singleton()->get_global_map();
+ const Variant *globals = GDScriptLanguage::get_singleton()->get_global_array();
+
+ List<Pair<String, Variant> > cinfo;
+ get_public_constants(&cinfo);
+
+ for (const Map<StringName, int>::Element *E = name_idx.front(); E; E = E->next()) {
+
+ if (ClassDB::class_exists(E->key()) || Engine::get_singleton()->has_singleton(E->key()))
+ continue;
+
+ bool is_script_constant = false;
+ for (List<Pair<String, Variant> >::Element *CE = cinfo.front(); CE; CE = CE->next()) {
+ if (CE->get().first == E->key()) {
+ is_script_constant = true;
+ break;
+ }
+ }
+ if (is_script_constant)
+ continue;
+
+ const Variant &var = globals[E->value()];
+ if (Object *obj = var) {
+ if (Object::cast_to<GDScriptNativeClass>(obj))
+ continue;
+ }
+
+ bool skip = false;
+ for (int i = 0; i < GlobalConstants::get_global_constant_count(); i++) {
+ if (E->key() == GlobalConstants::get_global_constant_name(i)) {
+ skip = true;
+ break;
+ }
+ }
+ if (skip)
+ continue;
+
+ p_globals->push_back(E->key());
+ p_values->push_back(var);
+ }
+}
+
String GDScriptLanguage::debug_parse_stack_level_expression(int p_level, const String &p_expression, int p_max_subitems, int p_max_depth) {
if (_debug_parse_err_line >= 0)
@@ -739,7 +791,7 @@ static bool _guess_expression_type(GDScriptCompletionContext &context, const GDS
}
Variant::CallError ce;
- Variant ret = mb->call(baseptr, argptr.ptr(), argptr.size(), ce);
+ Variant ret = mb->call(baseptr, (const Variant **)argptr.ptr(), argptr.size(), ce);
if (ce.error == Variant::CallError::CALL_OK && ret.get_type() != Variant::NIL) {
diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp
index c6066ceef..ca0a9582a 100644
--- a/modules/gdscript/gdscript_functions.cpp
+++ b/modules/gdscript/gdscript_functions.cpp
@@ -84,6 +84,8 @@ const char *GDScriptFunctions::get_func_name(Function p_func) {
"rad2deg",
"linear2db",
"db2linear",
+ "polar2cartesian",
+ "cartesian2polar",
"wrapi",
"wrapf",
"max",
@@ -408,6 +410,22 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
VALIDATE_ARG_NUM(0);
r_ret = Math::db2linear((double)*p_args[0]);
} break;
+ case MATH_POLAR2CARTESIAN: {
+ VALIDATE_ARG_COUNT(2);
+ VALIDATE_ARG_NUM(0);
+ VALIDATE_ARG_NUM(1);
+ double r = *p_args[0];
+ double th = *p_args[1];
+ r_ret = Vector2(r * Math::cos(th), r * Math::sin(th));
+ } break;
+ case MATH_CARTESIAN2POLAR: {
+ VALIDATE_ARG_COUNT(2);
+ VALIDATE_ARG_NUM(0);
+ VALIDATE_ARG_NUM(1);
+ double x = *p_args[0];
+ double y = *p_args[1];
+ r_ret = Vector2(Math::sqrt(x * x + y * y), Math::atan2(y, x));
+ } break;
case MATH_WRAP: {
VALIDATE_ARG_COUNT(3);
r_ret = Math::wrapi((int64_t)*p_args[0], (int64_t)*p_args[1], (int64_t)*p_args[2]);
@@ -1296,6 +1314,8 @@ bool GDScriptFunctions::is_deterministic(Function p_func) {
case MATH_RAD2DEG:
case MATH_LINEAR2DB:
case MATH_DB2LINEAR:
+ case MATH_POLAR2CARTESIAN:
+ case MATH_CARTESIAN2POLAR:
case MATH_WRAP:
case MATH_WRAPF:
case LOGIC_MAX:
@@ -1526,6 +1546,16 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
mi.return_val.type = Variant::REAL;
return mi;
} break;
+ case MATH_POLAR2CARTESIAN: {
+ MethodInfo mi("polar2cartesian", PropertyInfo(Variant::REAL, "r"), PropertyInfo(Variant::REAL, "th"));
+ mi.return_val.type = Variant::VECTOR2;
+ return mi;
+ } break;
+ case MATH_CARTESIAN2POLAR: {
+ MethodInfo mi("cartesian2polar", PropertyInfo(Variant::REAL, "x"), PropertyInfo(Variant::REAL, "y"));
+ mi.return_val.type = Variant::VECTOR2;
+ return mi;
+ } break;
case MATH_WRAP: {
MethodInfo mi("wrapi", PropertyInfo(Variant::INT, "value"), PropertyInfo(Variant::INT, "min"), PropertyInfo(Variant::INT, "max"));
mi.return_val.type = Variant::INT;
diff --git a/modules/gdscript/gdscript_functions.h b/modules/gdscript/gdscript_functions.h
index ecbede83a..d1c5815ce 100644
--- a/modules/gdscript/gdscript_functions.h
+++ b/modules/gdscript/gdscript_functions.h
@@ -75,6 +75,8 @@ public:
MATH_RAD2DEG,
MATH_LINEAR2DB,
MATH_DB2LINEAR,
+ MATH_POLAR2CARTESIAN,
+ MATH_CARTESIAN2POLAR,
MATH_WRAP,
MATH_WRAPF,
LOGIC_MAX,
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 1e677f11c..bee9ef199 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -2971,18 +2971,37 @@ void GDScriptParser::_parse_extends(ClassNode *p_class) {
}
while (true) {
- if (tokenizer->get_token() != GDScriptTokenizer::TK_IDENTIFIER) {
- _set_error("Invalid 'extends' syntax, expected string constant (path) and/or identifier (parent class).");
- return;
- }
+ switch (tokenizer->get_token()) {
+
+ case GDScriptTokenizer::TK_IDENTIFIER: {
+
+ StringName identifier = tokenizer->get_token_identifier();
+ p_class->extends_class.push_back(identifier);
+ }
+ break;
+
+ case GDScriptTokenizer::TK_PERIOD:
+ break;
+
+ default: {
- StringName identifier = tokenizer->get_token_identifier();
- p_class->extends_class.push_back(identifier);
+ _set_error("Invalid 'extends' syntax, expected string constant (path) and/or identifier (parent class).");
+ return;
+ }
+ }
tokenizer->advance(1);
- if (tokenizer->get_token() != GDScriptTokenizer::TK_PERIOD)
- return;
+
+ switch (tokenizer->get_token()) {
+
+ case GDScriptTokenizer::TK_IDENTIFIER:
+ case GDScriptTokenizer::TK_PERIOD:
+ continue;
+
+ default:
+ return;
+ }
}
}
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index ee8ecfff6..8c862b52e 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GridMap" inherits="Spatial" category="Core" version="3.0-alpha">
+<class name="GridMap" inherits="Spatial" category="Core" version="3.0-beta">
<brief_description>
Node for 3D tile-based maps.
</brief_description>
@@ -220,7 +220,7 @@
</method>
</methods>
<constants>
- <constant name="INVALID_CELL_ITEM" value="-1" enum="">
+ <constant name="INVALID_CELL_ITEM" value="-1">
Invalid cell item that can be used in [method set_cell_item] to clear cells (or represent an empty cell in [method get_cell_item]).
</constant>
</constants>
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 491adb31e..3a5d0fd3f 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -623,6 +623,16 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
return do_input_action(p_camera, mm->get_position(), false);
}
+ Ref<InputEventPanGesture> pan_gesture = p_event;
+ if (pan_gesture.is_valid()) {
+
+ if (pan_gesture->get_command() || pan_gesture->get_shift()) {
+ const real_t delta = pan_gesture->get_delta().y;
+ floor->set_value(floor->get_value() + SGN(delta));
+ return true;
+ }
+ }
+
return false;
}
diff --git a/modules/mobile_vr/doc_classes/MobileVRInterface.xml b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
index c99934aea..5d3da0672 100644
--- a/modules/mobile_vr/doc_classes/MobileVRInterface.xml
+++ b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MobileVRInterface" inherits="ARVRInterface" category="Core" version="3.0-alpha">
+<class name="MobileVRInterface" inherits="ARVRInterface" category="Core" version="3.0-beta">
<brief_description>
Generic mobile VR implementation
</brief_description>
@@ -12,102 +12,6 @@
<demos>
</demos>
<methods>
- <method name="get_display_to_lens" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the distance between the display and the lens.
- </description>
- </method>
- <method name="get_display_width" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the width of the LCD screen of the device.
- </description>
- </method>
- <method name="get_iod" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the interocular distance.
- </description>
- </method>
- <method name="get_k1" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the k1 lens constant.
- </description>
- </method>
- <method name="get_k2" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Retuns the k2 lens constant
- </description>
- </method>
- <method name="get_oversample" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the oversampling setting.
- </description>
- </method>
- <method name="set_display_to_lens">
- <return type="void">
- </return>
- <argument index="0" name="display_to_lens" type="float">
- </argument>
- <description>
- Sets the distance between display and the lens.
- </description>
- </method>
- <method name="set_display_width">
- <return type="void">
- </return>
- <argument index="0" name="display_width" type="float">
- </argument>
- <description>
- Sets the width of the LCD screen of the device.
- </description>
- </method>
- <method name="set_iod">
- <return type="void">
- </return>
- <argument index="0" name="iod" type="float">
- </argument>
- <description>
- Sets the interocular distance.
- </description>
- </method>
- <method name="set_k1">
- <return type="void">
- </return>
- <argument index="0" name="k" type="float">
- </argument>
- <description>
- Sets the k1 lens constant.
- </description>
- </method>
- <method name="set_k2">
- <return type="void">
- </return>
- <argument index="0" name="k" type="float">
- </argument>
- <description>
- Sets the k2 lens constant.
- </description>
- </method>
- <method name="set_oversample">
- <return type="void">
- </return>
- <argument index="0" name="oversample" type="float">
- </argument>
- <description>
- Sets the oversampling setting.
- </description>
- </method>
</methods>
<members>
<member name="display_to_lens" type="float" setter="set_display_to_lens" getter="get_display_to_lens">
diff --git a/modules/mono/doc_classes/@C#.xml b/modules/mono/doc_classes/@C#.xml
index 5d27b3220..5fcbf36a2 100644
--- a/modules/mono/doc_classes/@C#.xml
+++ b/modules/mono/doc_classes/@C#.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@C#" category="Core" version="3.0-alpha">
+<class name="@C#" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/doc_classes/CSharpScript.xml b/modules/mono/doc_classes/CSharpScript.xml
index ccc24b832..853ef2873 100644
--- a/modules/mono/doc_classes/CSharpScript.xml
+++ b/modules/mono/doc_classes/CSharpScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSharpScript" inherits="Script" category="Core" version="3.0-alpha">
+<class name="CSharpScript" inherits="Script" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/doc_classes/GodotSharp.xml b/modules/mono/doc_classes/GodotSharp.xml
index 9edbd18fc..2696a0bb4 100644
--- a/modules/mono/doc_classes/GodotSharp.xml
+++ b/modules/mono/doc_classes/GodotSharp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GodotSharp" inherits="Object" category="Core" version="3.0-alpha">
+<class name="GodotSharp" inherits="Object" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 59a2b73db..fbb9b2ed1 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -370,7 +370,7 @@ Error BindingsGenerator::generate_cs_core_project(const String &p_output_dir, bo
Vector<uint8_t> data;
data.resize(file_data.uncompressed_size);
- Compression::decompress(data.ptr(), file_data.uncompressed_size, file_data.data, file_data.compressed_size, Compression::MODE_DEFLATE);
+ Compression::decompress(data.ptrw(), file_data.uncompressed_size, file_data.data, file_data.compressed_size, Compression::MODE_DEFLATE);
if (file_name.get_basename() == BINDINGS_GLOBAL_SCOPE_CLASS) {
// GD.cs must be formatted to include the generated global constants
@@ -382,7 +382,7 @@ Error BindingsGenerator::generate_cs_core_project(const String &p_output_dir, bo
CharString data_utf8 = data_str.utf8();
data.resize(data_utf8.length());
- copymem(data.ptr(), reinterpret_cast<const uint8_t *>(data_utf8.get_data()), data_utf8.length());
+ copymem(data.ptrw(), reinterpret_cast<const uint8_t *>(data_utf8.get_data()), data_utf8.length());
}
FileAccessRef file = FileAccess::open(output_file, FileAccess::WRITE);
diff --git a/modules/mono/glue/cs_files/AABB.cs b/modules/mono/glue/cs_files/AABB.cs
index 6ee3bbe53..e6e12f7ba 100644
--- a/modules/mono/glue/cs_files/AABB.cs
+++ b/modules/mono/glue/cs_files/AABB.cs
@@ -38,7 +38,7 @@ namespace Godot
}
}
- public bool encloses(AABB with)
+ public bool Encloses(AABB with)
{
Vector3 src_min = position;
Vector3 src_max = position + size;
@@ -53,7 +53,7 @@ namespace Godot
(src_max.z > dst_max.z));
}
- public AABB expand(Vector3 to_point)
+ public AABB Expand(Vector3 to_point)
{
Vector3 begin = position;
Vector3 end = position + size;
@@ -75,12 +75,12 @@ namespace Godot
return new AABB(begin, end - begin);
}
- public float get_area()
+ public float GetArea()
{
return size.x * size.y * size.z;
}
- public Vector3 get_endpoint(int idx)
+ public Vector3 GetEndpoint(int idx)
{
switch (idx)
{
@@ -105,7 +105,7 @@ namespace Godot
}
}
- public Vector3 get_longest_axis()
+ public Vector3 GetLongestAxis()
{
Vector3 axis = new Vector3(1f, 0f, 0f);
float max_size = size.x;
@@ -125,7 +125,7 @@ namespace Godot
return axis;
}
- public Vector3.Axis get_longest_axis_index()
+ public Vector3.Axis GetLongestAxisIndex()
{
Vector3.Axis axis = Vector3.Axis.X;
float max_size = size.x;
@@ -145,7 +145,7 @@ namespace Godot
return axis;
}
- public float get_longest_axis_size()
+ public float GetLongestAxisSize()
{
float max_size = size.x;
@@ -158,7 +158,7 @@ namespace Godot
return max_size;
}
- public Vector3 get_shortest_axis()
+ public Vector3 GetShortestAxis()
{
Vector3 axis = new Vector3(1f, 0f, 0f);
float max_size = size.x;
@@ -178,7 +178,7 @@ namespace Godot
return axis;
}
- public Vector3.Axis get_shortest_axis_index()
+ public Vector3.Axis GetShortestAxisIndex()
{
Vector3.Axis axis = Vector3.Axis.X;
float max_size = size.x;
@@ -198,7 +198,7 @@ namespace Godot
return axis;
}
- public float get_shortest_axis_size()
+ public float GetShortestAxisSize()
{
float max_size = size.x;
@@ -211,7 +211,7 @@ namespace Godot
return max_size;
}
- public Vector3 get_support(Vector3 dir)
+ public Vector3 GetSupport(Vector3 dir)
{
Vector3 half_extents = size * 0.5f;
Vector3 ofs = position + half_extents;
@@ -222,7 +222,7 @@ namespace Godot
(dir.z > 0f) ? -half_extents.z : half_extents.z);
}
- public AABB grow(float by)
+ public AABB Grow(float by)
{
AABB res = this;
@@ -236,17 +236,17 @@ namespace Godot
return res;
}
- public bool has_no_area()
+ public bool HasNoArea()
{
return size.x <= 0f || size.y <= 0f || size.z <= 0f;
}
- public bool has_no_surface()
+ public bool HasNoSurface()
{
return size.x <= 0f && size.y <= 0f && size.z <= 0f;
}
- public bool has_point(Vector3 point)
+ public bool HasPoint(Vector3 point)
{
if (point.x < position.x)
return false;
@@ -264,7 +264,7 @@ namespace Godot
return true;
}
- public AABB intersection(AABB with)
+ public AABB Intersection(AABB with)
{
Vector3 src_min = position;
Vector3 src_max = position + size;
@@ -306,7 +306,7 @@ namespace Godot
return new AABB(min, max - min);
}
- public bool intersects(AABB with)
+ public bool Intersects(AABB with)
{
if (position.x >= (with.position.x + with.size.x))
return false;
@@ -324,7 +324,7 @@ namespace Godot
return true;
}
- public bool intersects_plane(Plane plane)
+ public bool IntersectsPlane(Plane plane)
{
Vector3[] points =
{
@@ -343,7 +343,7 @@ namespace Godot
for (int i = 0; i < 8; i++)
{
- if (plane.distance_to(points[i]) > 0)
+ if (plane.DistanceTo(points[i]) > 0)
over = true;
else
under = true;
@@ -352,7 +352,7 @@ namespace Godot
return under && over;
}
- public bool intersects_segment(Vector3 from, Vector3 to)
+ public bool IntersectsSegment(Vector3 from, Vector3 to)
{
float min = 0f;
float max = 1f;
@@ -398,7 +398,7 @@ namespace Godot
return true;
}
- public AABB merge(AABB with)
+ public AABB Merge(AABB with)
{
Vector3 beg_1 = position;
Vector3 beg_2 = with.position;
diff --git a/modules/mono/glue/cs_files/Basis.cs b/modules/mono/glue/cs_files/Basis.cs
index c50e78334..ea92b1641 100644
--- a/modules/mono/glue/cs_files/Basis.cs
+++ b/modules/mono/glue/cs_files/Basis.cs
@@ -56,9 +56,9 @@ namespace Godot
{
return new Vector3
(
- new Vector3(this[0, 0], this[1, 0], this[2, 0]).length(),
- new Vector3(this[0, 1], this[1, 1], this[2, 1]).length(),
- new Vector3(this[0, 2], this[1, 2], this[2, 2]).length()
+ new Vector3(this[0, 0], this[1, 0], this[2, 0]).Length(),
+ new Vector3(this[0, 1], this[1, 1], this[2, 1]).Length(),
+ new Vector3(this[0, 2], this[1, 2], this[2, 2]).Length()
);
}
}
@@ -133,7 +133,7 @@ namespace Godot
}
}
- internal static Basis create_from_axes(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis)
+ internal static Basis CreateFromAxes(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis)
{
return new Basis
(
@@ -143,21 +143,21 @@ namespace Godot
);
}
- public float determinant()
+ public float Determinant()
{
return this[0, 0] * (this[1, 1] * this[2, 2] - this[2, 1] * this[1, 2]) -
this[1, 0] * (this[0, 1] * this[2, 2] - this[2, 1] * this[0, 2]) +
this[2, 0] * (this[0, 1] * this[1, 2] - this[1, 1] * this[0, 2]);
}
- public Vector3 get_axis(int axis)
+ public Vector3 GetAxis(int axis)
{
return new Vector3(this[0, axis], this[1, axis], this[2, axis]);
}
- public Vector3 get_euler()
+ public Vector3 GetEuler()
{
- Basis m = this.orthonormalized();
+ Basis m = this.Orthonormalized();
Vector3 euler;
euler.z = 0.0f;
@@ -169,26 +169,26 @@ namespace Godot
{
if (mxy > -1.0f)
{
- euler.x = Mathf.asin(-mxy);
- euler.y = Mathf.atan2(m.x[2], m.z[2]);
- euler.z = Mathf.atan2(m.y[0], m.y[1]);
+ euler.x = Mathf.Asin(-mxy);
+ euler.y = Mathf.Atan2(m.x[2], m.z[2]);
+ euler.z = Mathf.Atan2(m.y[0], m.y[1]);
}
else
{
euler.x = Mathf.PI * 0.5f;
- euler.y = -Mathf.atan2(-m.x[1], m.x[0]);
+ euler.y = -Mathf.Atan2(-m.x[1], m.x[0]);
}
}
else
{
euler.x = -Mathf.PI * 0.5f;
- euler.y = -Mathf.atan2(m.x[1], m.x[0]);
+ euler.y = -Mathf.Atan2(m.x[1], m.x[0]);
}
return euler;
}
- public int get_orthogonal_index()
+ public int GetOrthogonalIndex()
{
Basis orth = this;
@@ -218,7 +218,7 @@ namespace Godot
return 0;
}
- public Basis inverse()
+ public Basis Inverse()
{
Basis inv = this;
@@ -259,27 +259,27 @@ namespace Godot
return inv;
}
- public Basis orthonormalized()
+ public Basis Orthonormalized()
{
- Vector3 xAxis = get_axis(0);
- Vector3 yAxis = get_axis(1);
- Vector3 zAxis = get_axis(2);
+ Vector3 xAxis = GetAxis(0);
+ Vector3 yAxis = GetAxis(1);
+ Vector3 zAxis = GetAxis(2);
- xAxis.normalize();
- yAxis = (yAxis - xAxis * (xAxis.dot(yAxis)));
- yAxis.normalize();
- zAxis = (zAxis - xAxis * (xAxis.dot(zAxis)) - yAxis * (yAxis.dot(zAxis)));
- zAxis.normalize();
+ xAxis.Normalize();
+ yAxis = (yAxis - xAxis * (xAxis.Dot(yAxis)));
+ yAxis.Normalize();
+ zAxis = (zAxis - xAxis * (xAxis.Dot(zAxis)) - yAxis * (yAxis.Dot(zAxis)));
+ zAxis.Normalize();
- return Basis.create_from_axes(xAxis, yAxis, zAxis);
+ return Basis.CreateFromAxes(xAxis, yAxis, zAxis);
}
- public Basis rotated(Vector3 axis, float phi)
+ public Basis Rotated(Vector3 axis, float phi)
{
return new Basis(axis, phi) * this;
}
- public Basis scaled(Vector3 scale)
+ public Basis Scaled(Vector3 scale)
{
Basis m = this;
@@ -296,22 +296,22 @@ namespace Godot
return m;
}
- public float tdotx(Vector3 with)
+ public float Tdotx(Vector3 with)
{
return this[0, 0] * with[0] + this[1, 0] * with[1] + this[2, 0] * with[2];
}
- public float tdoty(Vector3 with)
+ public float Tdoty(Vector3 with)
{
return this[0, 1] * with[0] + this[1, 1] * with[1] + this[2, 1] * with[2];
}
- public float tdotz(Vector3 with)
+ public float Tdotz(Vector3 with)
{
return this[0, 2] * with[0] + this[1, 2] * with[1] + this[2, 2] * with[2];
}
- public Basis transposed()
+ public Basis Transposed()
{
Basis tr = this;
@@ -330,17 +330,17 @@ namespace Godot
return tr;
}
- public Vector3 xform(Vector3 v)
+ public Vector3 Xform(Vector3 v)
{
return new Vector3
(
- this[0].dot(v),
- this[1].dot(v),
- this[2].dot(v)
+ this[0].Dot(v),
+ this[1].Dot(v),
+ this[2].Dot(v)
);
}
- public Vector3 xform_inv(Vector3 v)
+ public Vector3 XformInv(Vector3 v)
{
return new Vector3
(
@@ -354,7 +354,7 @@ namespace Godot
float trace = x[0] + y[1] + z[2];
if (trace > 0.0f) {
- float s = Mathf.sqrt(trace + 1.0f) * 2f;
+ float s = Mathf.Sqrt(trace + 1.0f) * 2f;
float inv_s = 1f / s;
return new Quat(
(z[1] - y[2]) * inv_s,
@@ -363,7 +363,7 @@ namespace Godot
s * 0.25f
);
} else if (x[0] > y[1] && x[0] > z[2]) {
- float s = Mathf.sqrt(x[0] - y[1] - z[2] + 1.0f) * 2f;
+ float s = Mathf.Sqrt(x[0] - y[1] - z[2] + 1.0f) * 2f;
float inv_s = 1f / s;
return new Quat(
s * 0.25f,
@@ -372,7 +372,7 @@ namespace Godot
(z[1] - y[2]) * inv_s
);
} else if (y[1] > z[2]) {
- float s = Mathf.sqrt(-x[0] + y[1] - z[2] + 1.0f) * 2f;
+ float s = Mathf.Sqrt(-x[0] + y[1] - z[2] + 1.0f) * 2f;
float inv_s = 1f / s;
return new Quat(
(x[1] + y[0]) * inv_s,
@@ -381,7 +381,7 @@ namespace Godot
(x[2] - z[0]) * inv_s
);
} else {
- float s = Mathf.sqrt(-x[0] - y[1] + z[2] + 1.0f) * 2f;
+ float s = Mathf.Sqrt(-x[0] - y[1] + z[2] + 1.0f) * 2f;
float inv_s = 1f / s;
return new Quat(
(x[2] + z[0]) * inv_s,
@@ -394,7 +394,7 @@ namespace Godot
public Basis(Quat quat)
{
- float s = 2.0f / quat.length_squared();
+ float s = 2.0f / quat.LengthSquared();
float xs = quat.x * s;
float ys = quat.y * s;
@@ -418,8 +418,8 @@ namespace Godot
{
Vector3 axis_sq = new Vector3(axis.x * axis.x, axis.y * axis.y, axis.z * axis.z);
- float cosine = Mathf.cos(phi);
- float sine = Mathf.sin(phi);
+ float cosine = Mathf.Cos(phi);
+ float sine = Mathf.Sin(phi);
this.x = new Vector3
(
@@ -461,9 +461,9 @@ namespace Godot
{
return new Basis
(
- right.tdotx(left[0]), right.tdoty(left[0]), right.tdotz(left[0]),
- right.tdotx(left[1]), right.tdoty(left[1]), right.tdotz(left[1]),
- right.tdotx(left[2]), right.tdoty(left[2]), right.tdotz(left[2])
+ right.Tdotx(left[0]), right.Tdoty(left[0]), right.Tdotz(left[0]),
+ right.Tdotx(left[1]), right.Tdoty(left[1]), right.Tdotz(left[1]),
+ right.Tdotx(left[2]), right.Tdoty(left[2]), right.Tdotz(left[2])
);
}
diff --git a/modules/mono/glue/cs_files/Color.cs b/modules/mono/glue/cs_files/Color.cs
index 0a00f83d4..db0e1fb74 100644
--- a/modules/mono/glue/cs_files/Color.cs
+++ b/modules/mono/glue/cs_files/Color.cs
@@ -45,8 +45,8 @@ namespace Godot
{
get
{
- float max = Mathf.max(r, Mathf.max(g, b));
- float min = Mathf.min(r, Mathf.min(g, b));
+ float max = Mathf.Max(r, Mathf.Max(g, b));
+ float min = Mathf.Min(r, Mathf.Min(g, b));
float delta = max - min;
@@ -71,7 +71,7 @@ namespace Godot
}
set
{
- this = from_hsv(value, s, v);
+ this = FromHsv(value, s, v);
}
}
@@ -79,8 +79,8 @@ namespace Godot
{
get
{
- float max = Mathf.max(r, Mathf.max(g, b));
- float min = Mathf.min(r, Mathf.min(g, b));
+ float max = Mathf.Max(r, Mathf.Max(g, b));
+ float min = Mathf.Min(r, Mathf.Min(g, b));
float delta = max - min;
@@ -88,7 +88,7 @@ namespace Godot
}
set
{
- this = from_hsv(h, value, v);
+ this = FromHsv(h, value, v);
}
}
@@ -96,11 +96,11 @@ namespace Godot
{
get
{
- return Mathf.max(r, Mathf.max(g, b));
+ return Mathf.Max(r, Mathf.Max(g, b));
}
set
{
- this = from_hsv(h, s, value);
+ this = FromHsv(h, s, value);
}
}
@@ -154,10 +154,10 @@ namespace Godot
}
}
- public static void to_hsv(Color color, out float hue, out float saturation, out float value)
+ public static void ToHsv(Color color, out float hue, out float saturation, out float value)
{
- int max = Mathf.max(color.r8, Mathf.max(color.g8, color.b8));
- int min = Mathf.min(color.r8, Mathf.min(color.g8, color.b8));
+ int max = Mathf.Max(color.r8, Mathf.Max(color.g8, color.b8));
+ int min = Mathf.Min(color.r8, Mathf.Min(color.g8, color.b8));
float delta = max - min;
@@ -184,7 +184,7 @@ namespace Godot
value = max / 255f;
}
- public static Color from_hsv(float hue, float saturation, float value, float alpha = 1.0f)
+ public static Color FromHsv(float hue, float saturation, float value, float alpha = 1.0f)
{
if (saturation == 0)
{
@@ -221,7 +221,7 @@ namespace Godot
}
}
- public Color blend(Color over)
+ public Color Blend(Color over)
{
Color res;
@@ -242,7 +242,7 @@ namespace Godot
return res;
}
- public Color contrasted()
+ public Color Contrasted()
{
return new Color(
(r + 0.5f) % 1.0f,
@@ -251,12 +251,12 @@ namespace Godot
);
}
- public float gray()
+ public float Gray()
{
return (r + g + b) / 3.0f;
}
- public Color inverted()
+ public Color Inverted()
{
return new Color(
1.0f - r,
@@ -265,7 +265,7 @@ namespace Godot
);
}
- public Color linear_interpolate(Color b, float t)
+ public Color LinearInterpolate(Color b, float t)
{
Color res = this;
@@ -277,7 +277,7 @@ namespace Godot
return res;
}
- public int to_32()
+ public int To32()
{
int c = (byte)(a * 255);
c <<= 8;
@@ -290,7 +290,7 @@ namespace Godot
return c;
}
- public int to_ARGB32()
+ public int ToArgb32()
{
int c = (byte)(a * 255);
c <<= 8;
@@ -303,7 +303,7 @@ namespace Godot
return c;
}
- public string to_html(bool include_alpha = true)
+ public string ToHtml(bool include_alpha = true)
{
String txt = string.Empty;
@@ -375,7 +375,7 @@ namespace Godot
private String _to_hex(float val)
{
- int v = (int)Mathf.clamp(val * 255.0f, 0, 255);
+ int v = (int)Mathf.Clamp(val * 255.0f, 0, 255);
string ret = string.Empty;
@@ -396,7 +396,7 @@ namespace Godot
return ret;
}
- internal static bool html_is_valid(string color)
+ internal static bool HtmlIsValid(string color)
{
if (color.Length == 0)
return false;
diff --git a/modules/mono/glue/cs_files/GD.cs b/modules/mono/glue/cs_files/GD.cs
index 40a42d23b..99fc28916 100644
--- a/modules/mono/glue/cs_files/GD.cs
+++ b/modules/mono/glue/cs_files/GD.cs
@@ -6,32 +6,32 @@ namespace Godot
{
/*{GodotGlobalConstants}*/
- public static object bytes2var(byte[] bytes)
+ public static object Bytes2Var(byte[] bytes)
{
return NativeCalls.godot_icall_Godot_bytes2var(bytes);
}
- public static object convert(object what, int type)
+ public static object Convert(object what, int type)
{
return NativeCalls.godot_icall_Godot_convert(what, type);
}
- public static float db2linear(float db)
+ public static float Db2Linear(float db)
{
return (float)Math.Exp(db * 0.11512925464970228420089957273422);
}
- public static float dectime(float value, float amount, float step)
+ public static float Dectime(float value, float amount, float step)
{
float sgn = value < 0 ? -1.0f : 1.0f;
- float val = Mathf.abs(value);
+ float val = Mathf.Abs(value);
val -= amount * step;
if (val < 0.0f)
val = 0.0f;
return val * sgn;
}
- public static FuncRef funcref(Object instance, string funcname)
+ public static FuncRef Funcref(Object instance, string funcname)
{
var ret = new FuncRef();
ret.SetInstance(instance);
@@ -39,57 +39,57 @@ namespace Godot
return ret;
}
- public static int hash(object var)
+ public static int Hash(object var)
{
return NativeCalls.godot_icall_Godot_hash(var);
}
- public static Object instance_from_id(int instance_id)
+ public static Object InstanceFromId(int instanceId)
{
- return NativeCalls.godot_icall_Godot_instance_from_id(instance_id);
+ return NativeCalls.godot_icall_Godot_instance_from_id(instanceId);
}
- public static double linear2db(double linear)
+ public static double Linear2Db(double linear)
{
return Math.Log(linear) * 8.6858896380650365530225783783321;
}
- public static Resource load(string path)
+ public static Resource Load(string path)
{
return ResourceLoader.Load(path);
}
- public static void print(params object[] what)
+ public static void Print(params object[] what)
{
NativeCalls.godot_icall_Godot_print(what);
}
- public static void print_stack()
+ public static void PrintStack()
{
- print(System.Environment.StackTrace);
+ Print(System.Environment.StackTrace);
}
- public static void printerr(params object[] what)
+ public static void Printerr(params object[] what)
{
NativeCalls.godot_icall_Godot_printerr(what);
}
- public static void printraw(params object[] what)
+ public static void Printraw(params object[] what)
{
NativeCalls.godot_icall_Godot_printraw(what);
}
- public static void prints(params object[] what)
+ public static void Prints(params object[] what)
{
NativeCalls.godot_icall_Godot_prints(what);
}
- public static void printt(params object[] what)
+ public static void Printt(params object[] what)
{
NativeCalls.godot_icall_Godot_printt(what);
}
- public static int[] range(int length)
+ public static int[] Range(int length)
{
int[] ret = new int[length];
@@ -101,7 +101,7 @@ namespace Godot
return ret;
}
- public static int[] range(int from, int to)
+ public static int[] Range(int from, int to)
{
if (to < from)
return new int[0];
@@ -116,7 +116,7 @@ namespace Godot
return ret;
}
- public static int[] range(int from, int to, int increment)
+ public static int[] Range(int from, int to, int increment)
{
if (to < from && increment > 0)
return new int[0];
@@ -153,37 +153,37 @@ namespace Godot
return ret;
}
- public static void seed(int seed)
+ public static void Seed(int seed)
{
NativeCalls.godot_icall_Godot_seed(seed);
}
- public static string str(params object[] what)
+ public static string Str(params object[] what)
{
return NativeCalls.godot_icall_Godot_str(what);
}
- public static object str2var(string str)
+ public static object Str2Var(string str)
{
return NativeCalls.godot_icall_Godot_str2var(str);
}
- public static bool type_exists(string type)
+ public static bool TypeExists(string type)
{
return NativeCalls.godot_icall_Godot_type_exists(type);
}
- public static byte[] var2bytes(object var)
+ public static byte[] Var2Bytes(object var)
{
return NativeCalls.godot_icall_Godot_var2bytes(var);
}
- public static string var2str(object var)
+ public static string Var2Str(object var)
{
return NativeCalls.godot_icall_Godot_var2str(var);
}
- public static WeakRef weakref(Object obj)
+ public static WeakRef Weakref(Object obj)
{
return NativeCalls.godot_icall_Godot_weakref(Object.GetPtr(obj));
}
diff --git a/modules/mono/glue/cs_files/Mathf.cs b/modules/mono/glue/cs_files/Mathf.cs
index cb0eb1acd..6951ace4f 100644
--- a/modules/mono/glue/cs_files/Mathf.cs
+++ b/modules/mono/glue/cs_files/Mathf.cs
@@ -10,37 +10,42 @@ namespace Godot
private const float Deg2RadConst = 0.0174532924f;
private const float Rad2DegConst = 57.29578f;
- public static float abs(float s)
+ public static float Abs(float s)
{
return Math.Abs(s);
}
- public static float acos(float s)
+ public static float Acos(float s)
{
return (float)Math.Acos(s);
}
- public static float asin(float s)
+ public static float Asin(float s)
{
return (float)Math.Asin(s);
}
- public static float atan(float s)
+ public static float Atan(float s)
{
return (float)Math.Atan(s);
}
- public static float atan2(float x, float y)
+ public static float Atan2(float x, float y)
{
return (float)Math.Atan2(x, y);
}
- public static float ceil(float s)
+ public static Vector2 Cartesian2Polar(float x, float y)
+ {
+ return new Vector2(Sqrt(x * x + y * y), Atan2(y, x));
+ }
+
+ public static float Ceil(float s)
{
return (float)Math.Ceiling(s);
}
- public static float clamp(float val, float min, float max)
+ public static float Clamp(float val, float min, float max)
{
if (val < min)
{
@@ -54,32 +59,32 @@ namespace Godot
return val;
}
- public static float cos(float s)
+ public static float Cos(float s)
{
return (float)Math.Cos(s);
}
- public static float cosh(float s)
+ public static float Cosh(float s)
{
return (float)Math.Cosh(s);
}
- public static int decimals(float step)
+ public static int Decimals(float step)
{
- return decimals(step);
+ return Decimals(step);
}
- public static int decimals(decimal step)
+ public static int Decimals(decimal step)
{
return BitConverter.GetBytes(decimal.GetBits(step)[3])[2];
}
- public static float deg2rad(float deg)
+ public static float Deg2Rad(float deg)
{
return deg * Deg2RadConst;
}
- public static float ease(float s, float curve)
+ public static float Ease(float s, float curve)
{
if (s < 0f)
{
@@ -94,35 +99,35 @@ namespace Godot
{
if (curve < 1.0f)
{
- return 1.0f - pow(1.0f - s, 1.0f / curve);
+ return 1.0f - Pow(1.0f - s, 1.0f / curve);
}
- return pow(s, curve);
+ return Pow(s, curve);
}
else if (curve < 0f)
{
if (s < 0.5f)
{
- return pow(s * 2.0f, -curve) * 0.5f;
+ return Pow(s * 2.0f, -curve) * 0.5f;
}
- return (1.0f - pow(1.0f - (s - 0.5f) * 2.0f, -curve)) * 0.5f + 0.5f;
+ return (1.0f - Pow(1.0f - (s - 0.5f) * 2.0f, -curve)) * 0.5f + 0.5f;
}
return 0f;
}
- public static float exp(float s)
+ public static float Exp(float s)
{
return (float)Math.Exp(s);
}
- public static float floor(float s)
+ public static float Floor(float s)
{
return (float)Math.Floor(s);
}
- public static float fposmod(float x, float y)
+ public static float Fposmod(float x, float y)
{
if (x >= 0f)
{
@@ -134,37 +139,37 @@ namespace Godot
}
}
- public static float lerp(float from, float to, float weight)
+ public static float Lerp(float from, float to, float weight)
{
- return from + (to - from) * clamp(weight, 0f, 1f);
+ return from + (to - from) * Clamp(weight, 0f, 1f);
}
- public static float log(float s)
+ public static float Log(float s)
{
return (float)Math.Log(s);
}
- public static int max(int a, int b)
+ public static int Max(int a, int b)
{
return (a > b) ? a : b;
}
- public static float max(float a, float b)
+ public static float Max(float a, float b)
{
return (a > b) ? a : b;
}
- public static int min(int a, int b)
+ public static int Min(int a, int b)
{
return (a < b) ? a : b;
}
- public static float min(float a, float b)
+ public static float Min(float a, float b)
{
return (a < b) ? a : b;
}
- public static int nearest_po2(int val)
+ public static int NearestPo2(int val)
{
val--;
val |= val >> 1;
@@ -176,57 +181,62 @@ namespace Godot
return val;
}
- public static float pow(float x, float y)
+ public static Vector2 Polar2Cartesian(float r, float th)
+ {
+ return new Vector2(r * Cos(th), r * Sin(th));
+ }
+
+ public static float Pow(float x, float y)
{
return (float)Math.Pow(x, y);
}
- public static float rad2deg(float rad)
+ public static float Rad2Deg(float rad)
{
return rad * Rad2DegConst;
}
- public static float round(float s)
+ public static float Round(float s)
{
return (float)Math.Round(s);
}
- public static float sign(float s)
+ public static float Sign(float s)
{
return (s < 0f) ? -1f : 1f;
}
- public static float sin(float s)
+ public static float Sin(float s)
{
return (float)Math.Sin(s);
}
- public static float sinh(float s)
+ public static float Sinh(float s)
{
return (float)Math.Sinh(s);
}
- public static float sqrt(float s)
+ public static float Sqrt(float s)
{
return (float)Math.Sqrt(s);
}
- public static float stepify(float s, float step)
+ public static float Stepify(float s, float step)
{
if (step != 0f)
{
- s = floor(s / step + 0.5f) * step;
+ s = Floor(s / step + 0.5f) * step;
}
return s;
}
- public static float tan(float s)
+ public static float Tan(float s)
{
return (float)Math.Tan(s);
}
- public static float tanh(float s)
+ public static float Tanh(float s)
{
return (float)Math.Tanh(s);
}
diff --git a/modules/mono/glue/cs_files/Plane.cs b/modules/mono/glue/cs_files/Plane.cs
index 37f70aca1..6365e7182 100644
--- a/modules/mono/glue/cs_files/Plane.cs
+++ b/modules/mono/glue/cs_files/Plane.cs
@@ -52,44 +52,44 @@ namespace Godot
}
}
- public float distance_to(Vector3 point)
+ public float DistanceTo(Vector3 point)
{
- return normal.dot(point) - d;
+ return normal.Dot(point) - d;
}
- public Vector3 get_any_point()
+ public Vector3 GetAnyPoint()
{
return normal * d;
}
- public bool has_point(Vector3 point, float epsilon = Mathf.Epsilon)
+ public bool HasPoint(Vector3 point, float epsilon = Mathf.Epsilon)
{
- float dist = normal.dot(point) - d;
- return Mathf.abs(dist) <= epsilon;
+ float dist = normal.Dot(point) - d;
+ return Mathf.Abs(dist) <= epsilon;
}
- public Vector3 intersect_3(Plane b, Plane c)
+ public Vector3 Intersect3(Plane b, Plane c)
{
- float denom = normal.cross(b.normal).dot(c.normal);
+ float denom = normal.Cross(b.normal).Dot(c.normal);
- if (Mathf.abs(denom) <= Mathf.Epsilon)
+ if (Mathf.Abs(denom) <= Mathf.Epsilon)
return new Vector3();
- Vector3 result = (b.normal.cross(c.normal) * this.d) +
- (c.normal.cross(normal) * b.d) +
- (normal.cross(b.normal) * c.d);
+ Vector3 result = (b.normal.Cross(c.normal) * this.d) +
+ (c.normal.Cross(normal) * b.d) +
+ (normal.Cross(b.normal) * c.d);
return result / denom;
}
- public Vector3 intersect_ray(Vector3 from, Vector3 dir)
+ public Vector3 IntersectRay(Vector3 from, Vector3 dir)
{
- float den = normal.dot(dir);
+ float den = normal.Dot(dir);
- if (Mathf.abs(den) <= Mathf.Epsilon)
+ if (Mathf.Abs(den) <= Mathf.Epsilon)
return new Vector3();
- float dist = (normal.dot(from) - d) / den;
+ float dist = (normal.Dot(from) - d) / den;
// This is a ray, before the emiting pos (from) does not exist
if (dist > Mathf.Epsilon)
@@ -98,15 +98,15 @@ namespace Godot
return from + dir * -dist;
}
- public Vector3 intersect_segment(Vector3 begin, Vector3 end)
+ public Vector3 IntersectSegment(Vector3 begin, Vector3 end)
{
Vector3 segment = begin - end;
- float den = normal.dot(segment);
+ float den = normal.Dot(segment);
- if (Mathf.abs(den) <= Mathf.Epsilon)
+ if (Mathf.Abs(den) <= Mathf.Epsilon)
return new Vector3();
- float dist = (normal.dot(begin) - d) / den;
+ float dist = (normal.Dot(begin) - d) / den;
if (dist < -Mathf.Epsilon || dist > (1.0f + Mathf.Epsilon))
return new Vector3();
@@ -114,14 +114,14 @@ namespace Godot
return begin + segment * -dist;
}
- public bool is_point_over(Vector3 point)
+ public bool IsPointOver(Vector3 point)
{
- return normal.dot(point) > d;
+ return normal.Dot(point) > d;
}
- public Plane normalized()
+ public Plane Normalized()
{
- float len = normal.length();
+ float len = normal.Length();
if (len == 0)
return new Plane(0, 0, 0, 0);
@@ -129,9 +129,9 @@ namespace Godot
return new Plane(normal / len, d / len);
}
- public Vector3 project(Vector3 point)
+ public Vector3 Project(Vector3 point)
{
- return point - normal * distance_to(point);
+ return point - normal * DistanceTo(point);
}
public Plane(float a, float b, float c, float d)
@@ -148,9 +148,9 @@ namespace Godot
public Plane(Vector3 v1, Vector3 v2, Vector3 v3)
{
- normal = (v1 - v3).cross(v1 - v2);
- normal.normalize();
- d = normal.dot(v1);
+ normal = (v1 - v3).Cross(v1 - v2);
+ normal.Normalize();
+ d = normal.Dot(v1);
}
public static Plane operator -(Plane plane)
diff --git a/modules/mono/glue/cs_files/Quat.cs b/modules/mono/glue/cs_files/Quat.cs
index 9b4b7fb29..c0ac41c5d 100644
--- a/modules/mono/glue/cs_files/Quat.cs
+++ b/modules/mono/glue/cs_files/Quat.cs
@@ -58,40 +58,40 @@ namespace Godot
}
}
- public Quat cubic_slerp(Quat b, Quat preA, Quat postB, float t)
+ public Quat CubicSlerp(Quat b, Quat preA, Quat postB, float t)
{
float t2 = (1.0f - t) * t * 2f;
- Quat sp = slerp(b, t);
- Quat sq = preA.slerpni(postB, t);
- return sp.slerpni(sq, t2);
+ Quat sp = Slerp(b, t);
+ Quat sq = preA.Slerpni(postB, t);
+ return sp.Slerpni(sq, t2);
}
- public float dot(Quat b)
+ public float Dot(Quat b)
{
return x * b.x + y * b.y + z * b.z + w * b.w;
}
- public Quat inverse()
+ public Quat Inverse()
{
return new Quat(-x, -y, -z, w);
}
- public float length()
+ public float Length()
{
- return Mathf.sqrt(length_squared());
+ return Mathf.Sqrt(LengthSquared());
}
- public float length_squared()
+ public float LengthSquared()
{
- return dot(this);
+ return Dot(this);
}
- public Quat normalized()
+ public Quat Normalized()
{
- return this / length();
+ return this / Length();
}
- public void set(float x, float y, float z, float w)
+ public void Set(float x, float y, float z, float w)
{
this.x = x;
this.y = y;
@@ -99,7 +99,7 @@ namespace Godot
this.w = w;
}
- public Quat slerp(Quat b, float t)
+ public Quat Slerp(Quat b, float t)
{
// Calculate cosine
float cosom = x * b.x + y * b.y + z * b.z + w * b.w;
@@ -128,10 +128,10 @@ namespace Godot
if ((1.0 - cosom) > Mathf.Epsilon)
{
// Standard case (Slerp)
- float omega = Mathf.acos(cosom);
- sinom = Mathf.sin(omega);
- scale0 = Mathf.sin((1.0f - t) * omega) / sinom;
- scale1 = Mathf.sin(t * omega) / sinom;
+ float omega = Mathf.Acos(cosom);
+ sinom = Mathf.Sin(omega);
+ scale0 = Mathf.Sin((1.0f - t) * omega) / sinom;
+ scale1 = Mathf.Sin(t * omega) / sinom;
}
else
{
@@ -150,19 +150,19 @@ namespace Godot
);
}
- public Quat slerpni(Quat b, float t)
+ public Quat Slerpni(Quat b, float t)
{
- float dot = this.dot(b);
+ float dot = this.Dot(b);
- if (Mathf.abs(dot) > 0.9999f)
+ if (Mathf.Abs(dot) > 0.9999f)
{
return this;
}
- float theta = Mathf.acos(dot);
- float sinT = 1.0f / Mathf.sin(theta);
- float newFactor = Mathf.sin(t * theta) * sinT;
- float invFactor = Mathf.sin((1.0f - t) * theta) * sinT;
+ float theta = Mathf.Acos(dot);
+ float sinT = 1.0f / Mathf.Sin(theta);
+ float newFactor = Mathf.Sin(t * theta) * sinT;
+ float invFactor = Mathf.Sin((1.0f - t) * theta) * sinT;
return new Quat
(
@@ -173,10 +173,10 @@ namespace Godot
);
}
- public Vector3 xform(Vector3 v)
+ public Vector3 Xform(Vector3 v)
{
Quat q = this * v;
- q *= this.inverse();
+ q *= this.Inverse();
return new Vector3(q.x, q.y, q.z);
}
@@ -190,7 +190,7 @@ namespace Godot
public Quat(Vector3 axis, float angle)
{
- float d = axis.length();
+ float d = axis.Length();
if (d == 0f)
{
@@ -201,12 +201,12 @@ namespace Godot
}
else
{
- float s = Mathf.sin(angle * 0.5f) / d;
+ float s = Mathf.Sin(angle * 0.5f) / d;
x = axis.x * s;
y = axis.y * s;
z = axis.z * s;
- w = Mathf.cos(angle * 0.5f);
+ w = Mathf.Cos(angle * 0.5f);
}
}
diff --git a/modules/mono/glue/cs_files/Rect2.cs b/modules/mono/glue/cs_files/Rect2.cs
index 019342134..f2718d7b7 100644
--- a/modules/mono/glue/cs_files/Rect2.cs
+++ b/modules/mono/glue/cs_files/Rect2.cs
@@ -28,36 +28,36 @@ namespace Godot
public float Area
{
- get { return get_area(); }
+ get { return GetArea(); }
}
- public Rect2 clip(Rect2 b)
+ public Rect2 Clip(Rect2 b)
{
Rect2 newRect = b;
- if (!intersects(newRect))
+ if (!Intersects(newRect))
return new Rect2();
- newRect.position.x = Mathf.max(b.position.x, position.x);
- newRect.position.y = Mathf.max(b.position.y, position.y);
+ newRect.position.x = Mathf.Max(b.position.x, position.x);
+ newRect.position.y = Mathf.Max(b.position.y, position.y);
Vector2 bEnd = b.position + b.size;
Vector2 end = position + size;
- newRect.size.x = Mathf.min(bEnd.x, end.x) - newRect.position.x;
- newRect.size.y = Mathf.min(bEnd.y, end.y) - newRect.position.y;
+ newRect.size.x = Mathf.Min(bEnd.x, end.x) - newRect.position.x;
+ newRect.size.y = Mathf.Min(bEnd.y, end.y) - newRect.position.y;
return newRect;
}
- public bool encloses(Rect2 b)
+ public bool Encloses(Rect2 b)
{
return (b.position.x >= position.x) && (b.position.y >= position.y) &&
((b.position.x + b.size.x) < (position.x + size.x)) &&
((b.position.y + b.size.y) < (position.y + size.y));
}
- public Rect2 expand(Vector2 to)
+ public Rect2 Expand(Vector2 to)
{
Rect2 expanded = this;
@@ -80,12 +80,12 @@ namespace Godot
return expanded;
}
- public float get_area()
+ public float GetArea()
{
return size.x * size.y;
}
- public Rect2 grow(float by)
+ public Rect2 Grow(float by)
{
Rect2 g = this;
@@ -97,7 +97,7 @@ namespace Godot
return g;
}
- public Rect2 grow_individual(float left, float top, float right, float bottom)
+ public Rect2 GrowIndividual(float left, float top, float right, float bottom)
{
Rect2 g = this;
@@ -109,11 +109,11 @@ namespace Godot
return g;
}
- public Rect2 grow_margin(int margin, float by)
+ public Rect2 GrowMargin(int margin, float by)
{
Rect2 g = this;
- g.grow_individual((GD.MARGIN_LEFT == margin) ? by : 0,
+ g.GrowIndividual((GD.MARGIN_LEFT == margin) ? by : 0,
(GD.MARGIN_TOP == margin) ? by : 0,
(GD.MARGIN_RIGHT == margin) ? by : 0,
(GD.MARGIN_BOTTOM == margin) ? by : 0);
@@ -121,12 +121,12 @@ namespace Godot
return g;
}
- public bool has_no_area()
+ public bool HasNoArea()
{
return size.x <= 0 || size.y <= 0;
}
- public bool has_point(Vector2 point)
+ public bool HasPoint(Vector2 point)
{
if (point.x < position.x)
return false;
@@ -141,7 +141,7 @@ namespace Godot
return true;
}
- public bool intersects(Rect2 b)
+ public bool Intersects(Rect2 b)
{
if (position.x > (b.position.x + b.size.x))
return false;
@@ -155,15 +155,15 @@ namespace Godot
return true;
}
- public Rect2 merge(Rect2 b)
+ public Rect2 Merge(Rect2 b)
{
Rect2 newRect;
- newRect.position.x = Mathf.min(b.position.x, position.x);
- newRect.position.y = Mathf.min(b.position.y, position.y);
+ newRect.position.x = Mathf.Min(b.position.x, position.x);
+ newRect.position.y = Mathf.Min(b.position.y, position.y);
- newRect.size.x = Mathf.max(b.position.x + b.size.x, position.x + size.x);
- newRect.size.y = Mathf.max(b.position.y + b.size.y, position.y + size.y);
+ newRect.size.x = Mathf.Max(b.position.x + b.size.x, position.x + size.x);
+ newRect.size.y = Mathf.Max(b.position.y + b.size.y, position.y + size.y);
newRect.size = newRect.size - newRect.position; // Make relative again
diff --git a/modules/mono/glue/cs_files/StringExtensions.cs b/modules/mono/glue/cs_files/StringExtensions.cs
index 96041827a..5c3ceff97 100644
--- a/modules/mono/glue/cs_files/StringExtensions.cs
+++ b/modules/mono/glue/cs_files/StringExtensions.cs
@@ -10,15 +10,15 @@ namespace Godot
{
public static class StringExtensions
{
- private static int get_slice_count(this string instance, string splitter)
+ private static int GetSliceCount(this string instance, string splitter)
{
- if (instance.empty() || splitter.empty())
+ if (instance.Empty() || splitter.Empty())
return 0;
int pos = 0;
int slices = 1;
- while ((pos = instance.find(splitter, pos)) >= 0)
+ while ((pos = instance.Find(splitter, pos)) >= 0)
{
slices++;
pos += splitter.Length;
@@ -27,9 +27,9 @@ namespace Godot
return slices;
}
- private static string get_slicec(this string instance, char splitter, int slice)
+ private static string GetSlicec(this string instance, char splitter, int slice)
{
- if (!instance.empty() && slice >= 0)
+ if (!instance.Empty() && slice >= 0)
{
int i = 0;
int prev = 0;
@@ -60,7 +60,7 @@ namespace Godot
// <summary>
// If the string is a path to a file, return the path to the file without the extension.
// </summary>
- public static string basename(this string instance)
+ public static string Basename(this string instance)
{
int index = instance.LastIndexOf('.');
@@ -73,7 +73,7 @@ namespace Godot
// <summary>
// Return true if the strings begins with the given string.
// </summary>
- public static bool begins_with(this string instance, string text)
+ public static bool BeginsWith(this string instance, string text)
{
return instance.StartsWith(text);
}
@@ -81,7 +81,7 @@ namespace Godot
// <summary>
// Return the bigrams (pairs of consecutive letters) of this string.
// </summary>
- public static string[] bigrams(this string instance)
+ public static string[] Bigrams(this string instance)
{
string[] b = new string[instance.Length - 1];
@@ -96,7 +96,7 @@ namespace Godot
// <summary>
// Return a copy of the string with special characters escaped using the C language standard.
// </summary>
- public static string c_escape(this string instance)
+ public static string CEscape(this string instance)
{
StringBuilder sb = new StringBuilder(string.Copy(instance));
@@ -118,7 +118,7 @@ namespace Godot
// <summary>
// Return a copy of the string with escaped characters replaced by their meanings according to the C language standard.
// </summary>
- public static string c_unescape(this string instance)
+ public static string CUnescape(this string instance)
{
StringBuilder sb = new StringBuilder(string.Copy(instance));
@@ -140,14 +140,14 @@ namespace Godot
// <summary>
// Change the case of some letters. Replace underscores with spaces, convert all letters to lowercase then capitalize first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code].
// </summary>
- public static string capitalize(this string instance)
+ public static string Capitalize(this string instance)
{
string aux = instance.Replace("_", " ").ToLower();
string cap = string.Empty;
- for (int i = 0; i < aux.get_slice_count(" "); i++)
+ for (int i = 0; i < aux.GetSliceCount(" "); i++)
{
- string slice = aux.get_slicec(' ', i);
+ string slice = aux.GetSlicec(' ', i);
if (slice.Length > 0)
{
slice = char.ToUpper(slice[0]) + slice.Substring(1);
@@ -163,12 +163,12 @@ namespace Godot
// <summary>
// Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
// </summary>
- public static int casecmp_to(this string instance, string to)
+ public static int CasecmpTo(this string instance, string to)
{
- if (instance.empty())
- return to.empty() ? 0 : -1;
+ if (instance.Empty())
+ return to.Empty() ? 0 : -1;
- if (to.empty())
+ if (to.Empty())
return 1;
int instance_idx = 0;
@@ -195,7 +195,7 @@ namespace Godot
// <summary>
// Return true if the string is empty.
// </summary>
- public static bool empty(this string instance)
+ public static bool Empty(this string instance)
{
return string.IsNullOrEmpty(instance);
}
@@ -203,7 +203,7 @@ namespace Godot
// <summary>
// Return true if the strings ends with the given string.
// </summary>
- public static bool ends_with(this string instance, string text)
+ public static bool EndsWith(this string instance, string text)
{
return instance.EndsWith(text);
}
@@ -211,7 +211,7 @@ namespace Godot
// <summary>
// Erase [code]chars[/code] characters from the string starting from [code]pos[/code].
// </summary>
- public static void erase(this StringBuilder instance, int pos, int chars)
+ public static void Erase(this StringBuilder instance, int pos, int chars)
{
instance.Remove(pos, chars);
}
@@ -219,9 +219,9 @@ namespace Godot
// <summary>
// If the string is a path to a file, return the extension.
// </summary>
- public static string extension(this string instance)
+ public static string Extension(this string instance)
{
- int pos = instance.find_last(".");
+ int pos = instance.FindLast(".");
if (pos < 0)
return instance;
@@ -232,7 +232,7 @@ namespace Godot
// <summary>
// Find the first occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
// </summary>
- public static int find(this string instance, string what, int from = 0)
+ public static int Find(this string instance, string what, int from = 0)
{
return instance.IndexOf(what, StringComparison.OrdinalIgnoreCase);
}
@@ -240,7 +240,7 @@ namespace Godot
// <summary>
// Find the last occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
// </summary>
- public static int find_last(this string instance, string what)
+ public static int FindLast(this string instance, string what)
{
return instance.LastIndexOf(what, StringComparison.OrdinalIgnoreCase);
}
@@ -248,7 +248,7 @@ namespace Godot
// <summary>
// Find the first occurrence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
// </summary>
- public static int findn(this string instance, string what, int from = 0)
+ public static int FindN(this string instance, string what, int from = 0)
{
return instance.IndexOf(what, StringComparison.Ordinal);
}
@@ -256,9 +256,9 @@ namespace Godot
// <summary>
// If the string is a path to a file, return the base directory.
// </summary>
- public static string get_base_dir(this string instance)
+ public static string GetBaseDir(this string instance)
{
- int basepos = instance.find("://");
+ int basepos = instance.Find("://");
string rs = string.Empty;
string @base = string.Empty;
@@ -271,7 +271,7 @@ namespace Godot
}
else
{
- if (instance.begins_with("/"))
+ if (instance.BeginsWith("/"))
{
rs = instance.Substring(1, instance.Length);
@base = "/";
@@ -282,7 +282,7 @@ namespace Godot
}
}
- int sep = Mathf.max(rs.find_last("/"), rs.find_last("\\"));
+ int sep = Mathf.Max(rs.FindLast("/"), rs.FindLast("\\"));
if (sep == -1)
return @base;
@@ -293,9 +293,9 @@ namespace Godot
// <summary>
// If the string is a path to a file, return the file and ignore the base directory.
// </summary>
- public static string get_file(this string instance)
+ public static string GetFile(this string instance)
{
- int sep = Mathf.max(instance.find_last("/"), instance.find_last("\\"));
+ int sep = Mathf.Max(instance.FindLast("/"), instance.FindLast("\\"));
if (sep == -1)
return instance;
@@ -306,7 +306,7 @@ namespace Godot
// <summary>
// Hash the string and return a 32 bits integer.
// </summary>
- public static int hash(this string instance)
+ public static int Hash(this string instance)
{
int index = 0;
int hashv = 5381;
@@ -321,7 +321,7 @@ namespace Godot
// <summary>
// Convert a string containing an hexadecimal number into an int.
// </summary>
- public static int hex_to_int(this string instance)
+ public static int HexToInt(this string instance)
{
int sign = 1;
@@ -340,7 +340,7 @@ namespace Godot
// <summary>
// Insert a substring at a given position.
// </summary>
- public static string insert(this string instance, int pos, string what)
+ public static string Insert(this string instance, int pos, string what)
{
return instance.Insert(pos, what);
}
@@ -348,7 +348,7 @@ namespace Godot
// <summary>
// If the string is a path to a file or directory, return true if the path is absolute.
// </summary>
- public static bool is_abs_path(this string instance)
+ public static bool IsAbsPath(this string instance)
{
return System.IO.Path.IsPathRooted(instance);
}
@@ -356,7 +356,7 @@ namespace Godot
// <summary>
// If the string is a path to a file or directory, return true if the path is relative.
// </summary>
- public static bool is_rel_path(this string instance)
+ public static bool IsRelPath(this string instance)
{
return !System.IO.Path.IsPathRooted(instance);
}
@@ -364,7 +364,7 @@ namespace Godot
// <summary>
// Check whether this string is a subsequence of the given string.
// </summary>
- public static bool is_subsequence_of(this string instance, string text, bool case_insensitive)
+ public static bool IsSubsequenceOf(this string instance, string text, bool case_insensitive)
{
int len = instance.Length;
@@ -407,23 +407,23 @@ namespace Godot
// <summary>
// Check whether this string is a subsequence of the given string, considering case.
// </summary>
- public static bool is_subsequence_of(this string instance, string text)
+ public static bool IsSubsequenceOf(this string instance, string text)
{
- return instance.is_subsequence_of(text, false);
+ return instance.IsSubsequenceOf(text, false);
}
// <summary>
// Check whether this string is a subsequence of the given string, without considering case.
// </summary>
- public static bool is_subsequence_ofi(this string instance, string text)
+ public static bool IsSubsequenceOfI(this string instance, string text)
{
- return instance.is_subsequence_of(text, true);
+ return instance.IsSubsequenceOf(text, true);
}
// <summary>
// Check whether the string contains a valid float.
// </summary>
- public static bool is_valid_float(this string instance)
+ public static bool IsValidFloat(this string instance)
{
float f;
return float.TryParse(instance, out f);
@@ -432,15 +432,15 @@ namespace Godot
// <summary>
// Check whether the string contains a valid color in HTML notation.
// </summary>
- public static bool is_valid_html_color(this string instance)
+ public static bool IsValidHtmlColor(this string instance)
{
- return Color.html_is_valid(instance);
+ return Color.HtmlIsValid(instance);
}
// <summary>
// Check whether the string is a valid identifier. As is common in programming languages, a valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit.
// </summary>
- public static bool is_valid_identifier(this string instance)
+ public static bool IsValidIdentifier(this string instance)
{
int len = instance.Length;
@@ -467,7 +467,7 @@ namespace Godot
// <summary>
// Check whether the string contains a valid integer.
// </summary>
- public static bool is_valid_integer(this string instance)
+ public static bool IsValidInteger(this string instance)
{
int f;
return int.TryParse(instance, out f);
@@ -476,7 +476,7 @@ namespace Godot
// <summary>
// Check whether the string contains a valid IP address.
// </summary>
- public static bool is_valid_ip_address(this string instance)
+ public static bool IsValidIpAddress(this string instance)
{
string[] ip = instance.split(".");
@@ -486,7 +486,7 @@ namespace Godot
for (int i = 0; i < ip.Length; i++)
{
string n = ip[i];
- if (!n.is_valid_integer())
+ if (!n.IsValidInteger())
return false;
int val = n.to_int();
@@ -500,7 +500,7 @@ namespace Godot
// <summary>
// Return a copy of the string with special characters escaped using the JSON standard.
// </summary>
- public static string json_escape(this string instance)
+ public static string JsonEscape(this string instance)
{
StringBuilder sb = new StringBuilder(string.Copy(instance));
@@ -519,7 +519,7 @@ namespace Godot
// <summary>
// Return an amount of characters from the left of the string.
// </summary>
- public static string left(this string instance, int pos)
+ public static string Left(this string instance, int pos)
{
if (pos <= 0)
return string.Empty;
@@ -533,7 +533,7 @@ namespace Godot
/// <summary>
/// Return the length of the string in characters.
/// </summary>
- public static int length(this string instance)
+ public static int Length(this string instance)
{
return instance.Length;
}
@@ -541,7 +541,7 @@ namespace Godot
// <summary>
// Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'.
// </summary>
- public static bool expr_match(this string instance, string expr, bool case_sensitive)
+ public static bool ExprMatch(this string instance, string expr, bool caseSensitive)
{
if (expr.Length == 0 || instance.Length == 0)
return false;
@@ -551,21 +551,21 @@ namespace Godot
case '\0':
return instance[0] == 0;
case '*':
- return expr_match(expr + 1, instance, case_sensitive) || (instance[0] != 0 && expr_match(expr, instance + 1, case_sensitive));
+ return ExprMatch(expr + 1, instance, caseSensitive) || (instance[0] != 0 && ExprMatch(expr, instance + 1, caseSensitive));
case '?':
- return instance[0] != 0 && instance[0] != '.' && expr_match(expr + 1, instance + 1, case_sensitive);
+ return instance[0] != 0 && instance[0] != '.' && ExprMatch(expr + 1, instance + 1, caseSensitive);
default:
- return (case_sensitive ? instance[0] == expr[0] : char.ToUpper(instance[0]) == char.ToUpper(expr[0])) &&
- expr_match(expr + 1, instance + 1, case_sensitive);
+ return (caseSensitive ? instance[0] == expr[0] : char.ToUpper(instance[0]) == char.ToUpper(expr[0])) &&
+ ExprMatch(expr + 1, instance + 1, caseSensitive);
}
}
// <summary>
// Do a simple case sensitive expression match, using ? and * wildcards (see [method expr_match]).
// </summary>
- public static bool match(this string instance, string expr)
+ public static bool Match(this string instance, string expr)
{
- return instance.expr_match(expr, true);
+ return instance.ExprMatch(expr, true);
}
// <summary>
@@ -573,13 +573,13 @@ namespace Godot
// </summary>
public static bool matchn(this string instance, string expr)
{
- return instance.expr_match(expr, false);
+ return instance.ExprMatch(expr, false);
}
// <summary>
// Return the MD5 hash of the string as an array of bytes.
// </summary>
- public static byte[] md5_buffer(this string instance)
+ public static byte[] Md5Buffer(this string instance)
{
return NativeCalls.godot_icall_String_md5_buffer(instance);
}
@@ -587,7 +587,7 @@ namespace Godot
// <summary>
// Return the MD5 hash of the string as a string.
// </summary>
- public static string md5_text(this string instance)
+ public static string Md5Text(this string instance)
{
return NativeCalls.godot_icall_String_md5_text(instance);
}
@@ -595,12 +595,12 @@ namespace Godot
// <summary>
// Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
// </summary>
- public static int nocasecmp_to(this string instance, string to)
+ public static int NocasecmpTo(this string instance, string to)
{
- if (instance.empty())
- return to.empty() ? 0 : -1;
+ if (instance.Empty())
+ return to.Empty() ? 0 : -1;
- if (to.empty())
+ if (to.Empty())
return 1;
int instance_idx = 0;
@@ -627,7 +627,7 @@ namespace Godot
// <summary>
// Return the character code at position [code]at[/code].
// </summary>
- public static int ord_at(this string instance, int at)
+ public static int OrdAt(this string instance, int at)
{
return instance[at];
}
@@ -635,9 +635,9 @@ namespace Godot
// <summary>
// Format a number to have an exact number of [code]digits[/code] after the decimal point.
// </summary>
- public static string pad_decimals(this string instance, int digits)
+ public static string PadDecimals(this string instance, int digits)
{
- int c = instance.find(".");
+ int c = instance.Find(".");
if (c == -1)
{
@@ -671,10 +671,10 @@ namespace Godot
// <summary>
// Format a number to have an exact number of [code]digits[/code] before the decimal point.
// </summary>
- public static string pad_zeros(this string instance, int digits)
+ public static string PadZeros(this string instance, int digits)
{
string s = instance;
- int end = s.find(".");
+ int end = s.Find(".");
if (end == -1)
end = s.Length;
@@ -704,7 +704,7 @@ namespace Godot
// <summary>
// Decode a percent-encoded string. See [method percent_encode].
// </summary>
- public static string percent_decode(this string instance)
+ public static string PercentDecode(this string instance)
{
return Uri.UnescapeDataString(instance);
}
@@ -712,7 +712,7 @@ namespace Godot
// <summary>
// Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request.
// </summary>
- public static string percent_encode(this string instance)
+ public static string PercentEncode(this string instance)
{
return Uri.EscapeDataString(instance);
}
@@ -720,7 +720,7 @@ namespace Godot
// <summary>
// If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code].
// </summary>
- public static string plus_file(this string instance, string file)
+ public static string PlusFile(this string instance, string file)
{
if (instance.Length > 0 && instance[instance.Length - 1] == '/')
return instance + file;
@@ -731,7 +731,7 @@ namespace Godot
// <summary>
// Replace occurrences of a substring for different ones inside the string.
// </summary>
- public static string replace(this string instance, string what, string forwhat)
+ public static string Replace(this string instance, string what, string forwhat)
{
return instance.Replace(what, forwhat);
}
@@ -739,7 +739,7 @@ namespace Godot
// <summary>
// Replace occurrences of a substring for different ones inside the string, but search case-insensitive.
// </summary>
- public static string replacen(this string instance, string what, string forwhat)
+ public static string Replacen(this string instance, string what, string forwhat)
{
return Regex.Replace(instance, what, forwhat, RegexOptions.IgnoreCase);
}
@@ -747,7 +747,7 @@ namespace Godot
// <summary>
// Perform a search for a substring, but start from the end of the string instead of the beginning.
// </summary>
- public static int rfind(this string instance, string what, int from = -1)
+ public static int Rfind(this string instance, string what, int from = -1)
{
return NativeCalls.godot_icall_String_rfind(instance, what, from);
}
@@ -755,7 +755,7 @@ namespace Godot
// <summary>
// Perform a search for a substring, but start from the end of the string instead of the beginning. Also search case-insensitive.
// </summary>
- public static int rfindn(this string instance, string what, int from = -1)
+ public static int Rfindn(this string instance, string what, int from = -1)
{
return NativeCalls.godot_icall_String_rfindn(instance, what, from);
}
@@ -763,7 +763,7 @@ namespace Godot
// <summary>
// Return the right side of the string from a given position.
// </summary>
- public static string right(this string instance, int pos)
+ public static string Right(this string instance, int pos)
{
if (pos >= instance.Length)
return instance;
@@ -774,7 +774,7 @@ namespace Godot
return instance.Substring(pos, (instance.Length - pos));
}
- public static byte[] sha256_buffer(this string instance)
+ public static byte[] Sha256Buffer(this string instance)
{
return NativeCalls.godot_icall_String_sha256_buffer(instance);
}
@@ -782,7 +782,7 @@ namespace Godot
// <summary>
// Return the SHA-256 hash of the string as a string.
// </summary>
- public static string sha256_text(this string instance)
+ public static string Sha256Text(this string instance)
{
return NativeCalls.godot_icall_String_sha256_text(instance);
}
@@ -790,7 +790,7 @@ namespace Godot
// <summary>
// Return the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
// </summary>
- public static float similarity(this string instance, string text)
+ public static float Similarity(this string instance, string text)
{
if (instance == text)
{
@@ -803,11 +803,11 @@ namespace Godot
return 0.0f;
}
- string[] src_bigrams = instance.bigrams();
- string[] tgt_bigrams = text.bigrams();
+ string[] srcBigrams = instance.Bigrams();
+ string[] tgtBigrams = text.Bigrams();
- int src_size = src_bigrams.Length;
- int tgt_size = tgt_bigrams.Length;
+ int src_size = srcBigrams.Length;
+ int tgt_size = tgtBigrams.Length;
float sum = src_size + tgt_size;
float inter = 0;
@@ -816,7 +816,7 @@ namespace Godot
{
for (int j = 0; j < tgt_size; j++)
{
- if (src_bigrams[i] == tgt_bigrams[j])
+ if (srcBigrams[i] == tgtBigrams[j])
{
inter++;
break;
@@ -846,7 +846,7 @@ namespace Godot
while (true)
{
- int end = instance.find(divisor, from);
+ int end = instance.Find(divisor, from);
if (end < 0)
end = len;
if (allow_empty || (end > from))
diff --git a/modules/mono/glue/cs_files/Transform.cs b/modules/mono/glue/cs_files/Transform.cs
index 74271e758..5214100d3 100644
--- a/modules/mono/glue/cs_files/Transform.cs
+++ b/modules/mono/glue/cs_files/Transform.cs
@@ -9,38 +9,38 @@ namespace Godot
public Basis basis;
public Vector3 origin;
- public Transform affine_inverse()
+ public Transform AffineInverse()
{
- Basis basisInv = basis.inverse();
- return new Transform(basisInv, basisInv.xform(-origin));
+ Basis basisInv = basis.Inverse();
+ return new Transform(basisInv, basisInv.Xform(-origin));
}
- public Transform inverse()
+ public Transform Inverse()
{
- Basis basisTr = basis.transposed();
- return new Transform(basisTr, basisTr.xform(-origin));
+ Basis basisTr = basis.Transposed();
+ return new Transform(basisTr, basisTr.Xform(-origin));
}
- public Transform looking_at(Vector3 target, Vector3 up)
+ public Transform LookingAt(Vector3 target, Vector3 up)
{
Transform t = this;
t.set_look_at(origin, target, up);
return t;
}
- public Transform orthonormalized()
+ public Transform Orthonormalized()
{
- return new Transform(basis.orthonormalized(), origin);
+ return new Transform(basis.Orthonormalized(), origin);
}
- public Transform rotated(Vector3 axis, float phi)
+ public Transform Rotated(Vector3 axis, float phi)
{
return new Transform(new Basis(axis, phi), new Vector3()) * this;
}
- public Transform scaled(Vector3 scale)
+ public Transform Scaled(Vector3 scale)
{
- return new Transform(basis.scaled(scale), origin * scale);
+ return new Transform(basis.Scaled(scale), origin * scale);
}
public void set_look_at(Vector3 eye, Vector3 target, Vector3 up)
@@ -49,44 +49,44 @@ namespace Godot
// Z vector
Vector3 zAxis = eye - target;
- zAxis.normalize();
+ zAxis.Normalize();
Vector3 yAxis = up;
- Vector3 xAxis = yAxis.cross(zAxis);
+ Vector3 xAxis = yAxis.Cross(zAxis);
// Recompute Y = Z cross X
- yAxis = zAxis.cross(xAxis);
+ yAxis = zAxis.Cross(xAxis);
- xAxis.normalize();
- yAxis.normalize();
+ xAxis.Normalize();
+ yAxis.Normalize();
- basis = Basis.create_from_axes(xAxis, yAxis, zAxis);
+ basis = Basis.CreateFromAxes(xAxis, yAxis, zAxis);
origin = eye;
}
- public Transform translated(Vector3 ofs)
+ public Transform Translated(Vector3 ofs)
{
return new Transform(basis, new Vector3
(
- origin[0] += basis[0].dot(ofs),
- origin[1] += basis[1].dot(ofs),
- origin[2] += basis[2].dot(ofs)
+ origin[0] += basis[0].Dot(ofs),
+ origin[1] += basis[1].Dot(ofs),
+ origin[2] += basis[2].Dot(ofs)
));
}
- public Vector3 xform(Vector3 v)
+ public Vector3 Xform(Vector3 v)
{
return new Vector3
(
- basis[0].dot(v) + origin.x,
- basis[1].dot(v) + origin.y,
- basis[2].dot(v) + origin.z
+ basis[0].Dot(v) + origin.x,
+ basis[1].Dot(v) + origin.y,
+ basis[2].Dot(v) + origin.z
);
}
- public Vector3 xform_inv(Vector3 v)
+ public Vector3 XformInv(Vector3 v)
{
Vector3 vInv = v - origin;
@@ -100,7 +100,7 @@ namespace Godot
public Transform(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis, Vector3 origin)
{
- this.basis = Basis.create_from_axes(xAxis, yAxis, zAxis);
+ this.basis = Basis.CreateFromAxes(xAxis, yAxis, zAxis);
this.origin = origin;
}
@@ -118,7 +118,7 @@ namespace Godot
public static Transform operator *(Transform left, Transform right)
{
- left.origin = left.xform(right.origin);
+ left.origin = left.Xform(right.origin);
left.basis *= right.basis;
return left;
}
diff --git a/modules/mono/glue/cs_files/Transform2D.cs b/modules/mono/glue/cs_files/Transform2D.cs
index 526dc767c..fe7c5b570 100644
--- a/modules/mono/glue/cs_files/Transform2D.cs
+++ b/modules/mono/glue/cs_files/Transform2D.cs
@@ -29,12 +29,12 @@ namespace Godot
public float Rotation
{
- get { return Mathf.atan2(y.x, o.y); }
+ get { return Mathf.Atan2(y.x, o.y); }
}
public Vector2 Scale
{
- get { return new Vector2(x.length(), y.length()); }
+ get { return new Vector2(x.Length(), y.Length()); }
}
public Vector2 this[int index]
@@ -103,7 +103,7 @@ namespace Godot
}
}
- public Transform2D affine_inverse()
+ public Transform2D AffineInverse()
{
Transform2D inv = this;
@@ -128,22 +128,22 @@ namespace Godot
this[0] *= new Vector2(idet, -idet);
this[1] *= new Vector2(-idet, idet);
- this[2] = basis_xform(-this[2]);
+ this[2] = BasisXform(-this[2]);
return inv;
}
- public Vector2 basis_xform(Vector2 v)
+ public Vector2 BasisXform(Vector2 v)
{
- return new Vector2(tdotx(v), tdoty(v));
+ return new Vector2(Tdotx(v), Tdoty(v));
}
- public Vector2 basis_xform_inv(Vector2 v)
+ public Vector2 BasisXformInv(Vector2 v)
{
- return new Vector2(x.dot(v), y.dot(v));
+ return new Vector2(x.Dot(v), y.Dot(v));
}
- public Transform2D interpolate_with(Transform2D m, float c)
+ public Transform2D InterpolateWith(Transform2D m, float c)
{
float r1 = Rotation;
float r2 = m.Rotation;
@@ -152,10 +152,10 @@ namespace Godot
Vector2 s2 = m.Scale;
// Slerp rotation
- Vector2 v1 = new Vector2(Mathf.cos(r1), Mathf.sin(r1));
- Vector2 v2 = new Vector2(Mathf.cos(r2), Mathf.sin(r2));
+ Vector2 v1 = new Vector2(Mathf.Cos(r1), Mathf.Sin(r1));
+ Vector2 v2 = new Vector2(Mathf.Cos(r2), Mathf.Sin(r2));
- float dot = v1.dot(v2);
+ float dot = v1.Dot(v2);
// Clamp dot to [-1, 1]
dot = (dot < -1.0f) ? -1.0f : ((dot > 1.0f) ? 1.0f : dot);
@@ -165,13 +165,13 @@ namespace Godot
if (dot > 0.9995f)
{
// Linearly interpolate to avoid numerical precision issues
- v = v1.linear_interpolate(v2, c).normalized();
+ v = v1.LinearInterpolate(v2, c).Normalized();
}
else
{
- float angle = c * Mathf.acos(dot);
- Vector2 v3 = (v2 - v1 * dot).normalized();
- v = v1 * Mathf.cos(angle) + v3 * Mathf.sin(angle);
+ float angle = c * Mathf.Acos(dot);
+ Vector2 v3 = (v2 - v1 * dot).Normalized();
+ v = v1 * Mathf.Cos(angle) + v3 * Mathf.Sin(angle);
}
// Extract parameters
@@ -179,15 +179,15 @@ namespace Godot
Vector2 p2 = m.Origin;
// Construct matrix
- Transform2D res = new Transform2D(Mathf.atan2(v.y, v.x), p1.linear_interpolate(p2, c));
- Vector2 scale = s1.linear_interpolate(s2, c);
+ Transform2D res = new Transform2D(Mathf.Atan2(v.y, v.x), p1.LinearInterpolate(p2, c));
+ Vector2 scale = s1.LinearInterpolate(s2, c);
res.x *= scale;
res.y *= scale;
return res;
}
- public Transform2D inverse()
+ public Transform2D Inverse()
{
Transform2D inv = this;
@@ -196,21 +196,21 @@ namespace Godot
inv.x.y = inv.y.x;
inv.y.x = temp;
- inv.o = inv.basis_xform(-inv.o);
+ inv.o = inv.BasisXform(-inv.o);
return inv;
}
- public Transform2D orthonormalized()
+ public Transform2D Orthonormalized()
{
Transform2D on = this;
Vector2 onX = on.x;
Vector2 onY = on.y;
- onX.normalize();
- onY = onY - onX * (onX.dot(onY));
- onY.normalize();
+ onX.Normalize();
+ onY = onY - onX * (onX.Dot(onY));
+ onY.Normalize();
on.x = onX;
on.y = onY;
@@ -218,12 +218,12 @@ namespace Godot
return on;
}
- public Transform2D rotated(float phi)
+ public Transform2D Rotated(float phi)
{
return this * new Transform2D(phi, new Vector2());
}
- public Transform2D scaled(Vector2 scale)
+ public Transform2D Scaled(Vector2 scale)
{
Transform2D copy = this;
copy.x *= scale;
@@ -232,32 +232,32 @@ namespace Godot
return copy;
}
- private float tdotx(Vector2 with)
+ private float Tdotx(Vector2 with)
{
return this[0, 0] * with[0] + this[1, 0] * with[1];
}
- private float tdoty(Vector2 with)
+ private float Tdoty(Vector2 with)
{
return this[0, 1] * with[0] + this[1, 1] * with[1];
}
- public Transform2D translated(Vector2 offset)
+ public Transform2D Translated(Vector2 offset)
{
Transform2D copy = this;
- copy.o += copy.basis_xform(offset);
+ copy.o += copy.BasisXform(offset);
return copy;
}
- public Vector2 xform(Vector2 v)
+ public Vector2 Xform(Vector2 v)
{
- return new Vector2(tdotx(v), tdoty(v)) + o;
+ return new Vector2(Tdotx(v), Tdoty(v)) + o;
}
- public Vector2 xform_inv(Vector2 v)
+ public Vector2 XformInv(Vector2 v)
{
Vector2 vInv = v - o;
- return new Vector2(x.dot(vInv), y.dot(vInv));
+ return new Vector2(x.Dot(vInv), y.Dot(vInv));
}
public Transform2D(Vector2 xAxis, Vector2 yAxis, Vector2 origin)
@@ -275,8 +275,8 @@ namespace Godot
public Transform2D(float rot, Vector2 pos)
{
- float cr = Mathf.cos(rot);
- float sr = Mathf.sin(rot);
+ float cr = Mathf.Cos(rot);
+ float sr = Mathf.Sin(rot);
x.x = cr;
y.y = cr;
x.y = -sr;
@@ -286,14 +286,14 @@ namespace Godot
public static Transform2D operator *(Transform2D left, Transform2D right)
{
- left.o = left.xform(right.o);
+ left.o = left.Xform(right.o);
float x0, x1, y0, y1;
- x0 = left.tdotx(right.x);
- x1 = left.tdoty(right.x);
- y0 = left.tdotx(right.y);
- y1 = left.tdoty(right.y);
+ x0 = left.Tdotx(right.x);
+ x1 = left.Tdoty(right.x);
+ y0 = left.Tdotx(right.y);
+ y1 = left.Tdoty(right.y);
left.x.x = x0;
left.x.y = x1;
diff --git a/modules/mono/glue/cs_files/Vector2.cs b/modules/mono/glue/cs_files/Vector2.cs
index 28fedc365..238775bda 100644
--- a/modules/mono/glue/cs_files/Vector2.cs
+++ b/modules/mono/glue/cs_files/Vector2.cs
@@ -46,57 +46,57 @@ namespace Godot
}
}
- internal void normalize()
+ internal void Normalize()
{
float length = x * x + y * y;
if (length != 0f)
{
- length = Mathf.sqrt(length);
+ length = Mathf.Sqrt(length);
x /= length;
y /= length;
}
}
- private float cross(Vector2 b)
+ private float Cross(Vector2 b)
{
return x * b.y - y * b.x;
}
- public Vector2 abs()
+ public Vector2 Abs()
{
- return new Vector2(Mathf.abs(x), Mathf.abs(y));
+ return new Vector2(Mathf.Abs(x), Mathf.Abs(y));
}
- public float angle()
+ public float Angle()
{
- return Mathf.atan2(y, x);
+ return Mathf.Atan2(y, x);
}
- public float angle_to(Vector2 to)
+ public float AngleTo(Vector2 to)
{
- return Mathf.atan2(cross(to), dot(to));
+ return Mathf.Atan2(Cross(to), Dot(to));
}
- public float angle_to_point(Vector2 to)
+ public float AngleToPoint(Vector2 to)
{
- return Mathf.atan2(x - to.x, y - to.y);
+ return Mathf.Atan2(x - to.x, y - to.y);
}
- public float aspect()
+ public float Aspect()
{
return x / y;
}
- public Vector2 bounce(Vector2 n)
+ public Vector2 Bounce(Vector2 n)
{
- return -reflect(n);
+ return -Reflect(n);
}
- public Vector2 clamped(float length)
+ public Vector2 Clamped(float length)
{
Vector2 v = this;
- float l = this.length();
+ float l = this.Length();
if (l > 0 && length < l)
{
@@ -107,7 +107,7 @@ namespace Godot
return v;
}
- public Vector2 cubic_interpolate(Vector2 b, Vector2 preA, Vector2 postB, float t)
+ public Vector2 CubicInterpolate(Vector2 b, Vector2 preA, Vector2 postB, float t)
{
Vector2 p0 = preA;
Vector2 p1 = this;
@@ -123,42 +123,42 @@ namespace Godot
(-p0 + 3.0f * p1 - 3.0f * p2 + p3) * t3);
}
- public float distance_squared_to(Vector2 to)
+ public float DistanceSquaredTo(Vector2 to)
{
return (x - to.x) * (x - to.x) + (y - to.y) * (y - to.y);
}
- public float distance_to(Vector2 to)
+ public float DistanceTo(Vector2 to)
{
- return Mathf.sqrt((x - to.x) * (x - to.x) + (y - to.y) * (y - to.y));
+ return Mathf.Sqrt((x - to.x) * (x - to.x) + (y - to.y) * (y - to.y));
}
- public float dot(Vector2 with)
+ public float Dot(Vector2 with)
{
return x * with.x + y * with.y;
}
- public Vector2 floor()
+ public Vector2 Floor()
{
- return new Vector2(Mathf.floor(x), Mathf.floor(y));
+ return new Vector2(Mathf.Floor(x), Mathf.Floor(y));
}
- public bool is_normalized()
+ public bool IsNormalized()
{
- return Mathf.abs(length_squared() - 1.0f) < Mathf.Epsilon;
+ return Mathf.Abs(LengthSquared() - 1.0f) < Mathf.Epsilon;
}
- public float length()
+ public float Length()
{
- return Mathf.sqrt(x * x + y * y);
+ return Mathf.Sqrt(x * x + y * y);
}
- public float length_squared()
+ public float LengthSquared()
{
return x * x + y * y;
}
- public Vector2 linear_interpolate(Vector2 b, float t)
+ public Vector2 LinearInterpolate(Vector2 b, float t)
{
Vector2 res = this;
@@ -168,35 +168,35 @@ namespace Godot
return res;
}
- public Vector2 normalized()
+ public Vector2 Normalized()
{
Vector2 result = this;
- result.normalize();
+ result.Normalize();
return result;
}
- public Vector2 reflect(Vector2 n)
+ public Vector2 Reflect(Vector2 n)
{
- return 2.0f * n * dot(n) - this;
+ return 2.0f * n * Dot(n) - this;
}
- public Vector2 rotated(float phi)
+ public Vector2 Rotated(float phi)
{
- float rads = angle() + phi;
- return new Vector2(Mathf.cos(rads), Mathf.sin(rads)) * length();
+ float rads = Angle() + phi;
+ return new Vector2(Mathf.Cos(rads), Mathf.Sin(rads)) * Length();
}
- public Vector2 slide(Vector2 n)
+ public Vector2 Slide(Vector2 n)
{
- return this - n * dot(n);
+ return this - n * Dot(n);
}
- public Vector2 snapped(Vector2 by)
+ public Vector2 Snapped(Vector2 by)
{
- return new Vector2(Mathf.stepify(x, by.x), Mathf.stepify(y, by.y));
+ return new Vector2(Mathf.Stepify(x, by.x), Mathf.Stepify(y, by.y));
}
- public Vector2 tangent()
+ public Vector2 Tangent()
{
return new Vector2(y, -x);
}
diff --git a/modules/mono/glue/cs_files/Vector3.cs b/modules/mono/glue/cs_files/Vector3.cs
index c023cd83c..190caa4b5 100644
--- a/modules/mono/glue/cs_files/Vector3.cs
+++ b/modules/mono/glue/cs_files/Vector3.cs
@@ -59,9 +59,9 @@ namespace Godot
}
}
- internal void normalize()
+ internal void Normalize()
{
- float length = this.length();
+ float length = this.Length();
if (length == 0f)
{
@@ -75,27 +75,27 @@ namespace Godot
}
}
- public Vector3 abs()
+ public Vector3 Abs()
{
- return new Vector3(Mathf.abs(x), Mathf.abs(y), Mathf.abs(z));
+ return new Vector3(Mathf.Abs(x), Mathf.Abs(y), Mathf.Abs(z));
}
- public float angle_to(Vector3 to)
+ public float AngleTo(Vector3 to)
{
- return Mathf.atan2(cross(to).length(), dot(to));
+ return Mathf.Atan2(Cross(to).Length(), Dot(to));
}
- public Vector3 bounce(Vector3 n)
+ public Vector3 Bounce(Vector3 n)
{
- return -reflect(n);
+ return -Reflect(n);
}
- public Vector3 ceil()
+ public Vector3 Ceil()
{
- return new Vector3(Mathf.ceil(x), Mathf.ceil(y), Mathf.ceil(z));
+ return new Vector3(Mathf.Ceil(x), Mathf.Ceil(y), Mathf.Ceil(z));
}
- public Vector3 cross(Vector3 b)
+ public Vector3 Cross(Vector3 b)
{
return new Vector3
(
@@ -105,7 +105,7 @@ namespace Godot
);
}
- public Vector3 cubic_interpolate(Vector3 b, Vector3 preA, Vector3 postB, float t)
+ public Vector3 CubicInterpolate(Vector3 b, Vector3 preA, Vector3 postB, float t)
{
Vector3 p0 = preA;
Vector3 p1 = this;
@@ -122,46 +122,46 @@ namespace Godot
);
}
- public float distance_squared_to(Vector3 b)
+ public float DistanceSquaredTo(Vector3 b)
{
- return (b - this).length_squared();
+ return (b - this).LengthSquared();
}
- public float distance_to(Vector3 b)
+ public float DistanceTo(Vector3 b)
{
- return (b - this).length();
+ return (b - this).Length();
}
- public float dot(Vector3 b)
+ public float Dot(Vector3 b)
{
return x * b.x + y * b.y + z * b.z;
}
- public Vector3 floor()
+ public Vector3 Floor()
{
- return new Vector3(Mathf.floor(x), Mathf.floor(y), Mathf.floor(z));
+ return new Vector3(Mathf.Floor(x), Mathf.Floor(y), Mathf.Floor(z));
}
- public Vector3 inverse()
+ public Vector3 Inverse()
{
return new Vector3(1.0f / x, 1.0f / y, 1.0f / z);
}
- public bool is_normalized()
+ public bool IsNormalized()
{
- return Mathf.abs(length_squared() - 1.0f) < Mathf.Epsilon;
+ return Mathf.Abs(LengthSquared() - 1.0f) < Mathf.Epsilon;
}
- public float length()
+ public float Length()
{
float x2 = x * x;
float y2 = y * y;
float z2 = z * z;
- return Mathf.sqrt(x2 + y2 + z2);
+ return Mathf.Sqrt(x2 + y2 + z2);
}
- public float length_squared()
+ public float LengthSquared()
{
float x2 = x * x;
float y2 = y * y;
@@ -170,7 +170,7 @@ namespace Godot
return x2 + y2 + z2;
}
- public Vector3 linear_interpolate(Vector3 b, float t)
+ public Vector3 LinearInterpolate(Vector3 b, float t)
{
return new Vector3
(
@@ -180,24 +180,24 @@ namespace Godot
);
}
- public Axis max_axis()
+ public Axis MaxAxis()
{
return x < y ? (y < z ? Axis.Z : Axis.Y) : (x < z ? Axis.Z : Axis.X);
}
- public Axis min_axis()
+ public Axis MinAxis()
{
return x < y ? (x < z ? Axis.X : Axis.Z) : (y < z ? Axis.Y : Axis.Z);
}
- public Vector3 normalized()
+ public Vector3 Normalized()
{
Vector3 v = this;
- v.normalize();
+ v.Normalize();
return v;
}
- public Basis outer(Vector3 b)
+ public Basis Outer(Vector3 b)
{
return new Basis(
new Vector3(x * b.x, x * b.y, x * b.z),
@@ -206,36 +206,36 @@ namespace Godot
);
}
- public Vector3 reflect(Vector3 n)
+ public Vector3 Reflect(Vector3 n)
{
#if DEBUG
- if (!n.is_normalized())
+ if (!n.IsNormalized())
throw new ArgumentException(String.Format("{0} is not normalized", n), nameof(n));
#endif
- return 2.0f * n * dot(n) - this;
+ return 2.0f * n * Dot(n) - this;
}
- public Vector3 rotated(Vector3 axis, float phi)
+ public Vector3 Rotated(Vector3 axis, float phi)
{
- return new Basis(axis, phi).xform(this);
+ return new Basis(axis, phi).Xform(this);
}
- public Vector3 slide(Vector3 n)
+ public Vector3 Slide(Vector3 n)
{
- return this - n * dot(n);
+ return this - n * Dot(n);
}
- public Vector3 snapped(Vector3 by)
+ public Vector3 Snapped(Vector3 by)
{
return new Vector3
(
- Mathf.stepify(x, by.x),
- Mathf.stepify(y, by.y),
- Mathf.stepify(z, by.z)
+ Mathf.Stepify(x, by.x),
+ Mathf.Stepify(y, by.y),
+ Mathf.Stepify(z, by.z)
);
}
- public Basis to_diagonal_matrix()
+ public Basis ToDiagonalMatrix()
{
return new Basis(
x, 0f, 0f,
diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml
index 4cf272fe8..8cd163b0c 100644
--- a/modules/regex/doc_classes/RegEx.xml
+++ b/modules/regex/doc_classes/RegEx.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegEx" inherits="Reference" category="Core" version="3.0-alpha">
+<class name="RegEx" inherits="Reference" category="Core" version="3.0-beta">
<brief_description>
Class for searching text for patterns using regular expressions.
</brief_description>
diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml
index 8c6951fea..0217099ce 100644
--- a/modules/regex/doc_classes/RegExMatch.xml
+++ b/modules/regex/doc_classes/RegExMatch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegExMatch" inherits="Reference" category="Core" version="3.0-alpha">
+<class name="RegExMatch" inherits="Reference" category="Core" version="3.0-beta">
<brief_description>
Contains the results of a regex search.
</brief_description>
diff --git a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
index ee6c28c36..c0f8c6b9c 100644
--- a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
+++ b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core" version="3.0-alpha">
+<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core" version="3.0-beta">
<brief_description>
OGG Vorbis audio stream driver.
</brief_description>
@@ -11,48 +11,6 @@
<demos>
</demos>
<methods>
- <method name="get_data" qualifiers="const">
- <return type="PoolByteArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_loop_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="has_loop" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_data">
- <return type="void">
- </return>
- <argument index="0" name="data" type="PoolByteArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_loop">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_loop_offset">
- <return type="void">
- </return>
- <argument index="0" name="seconds" type="float">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="data" type="PoolByteArray" setter="set_data" getter="get_data">
diff --git a/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml b/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
index ce16632d6..9d541cda5 100644
--- a/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
+++ b/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterOGGVorbis" inherits="ResourceImporter" category="Core" version="3.0-alpha">
+<class name="ResourceImporterOGGVorbis" inherits="ResourceImporter" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/theora/doc_classes/ResourceImporterTheora.xml b/modules/theora/doc_classes/ResourceImporterTheora.xml
index 497c93882..85c7c6bf8 100644
--- a/modules/theora/doc_classes/ResourceImporterTheora.xml
+++ b/modules/theora/doc_classes/ResourceImporterTheora.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterTheora" inherits="ResourceImporter" category="Core" version="3.0-alpha">
+<class name="ResourceImporterTheora" inherits="ResourceImporter" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/theora/doc_classes/VideoStreamTheora.xml b/modules/theora/doc_classes/VideoStreamTheora.xml
index 8f155b786..61884f47f 100644
--- a/modules/theora/doc_classes/VideoStreamTheora.xml
+++ b/modules/theora/doc_classes/VideoStreamTheora.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamTheora" inherits="VideoStream" category="Core" version="3.0-alpha">
+<class name="VideoStreamTheora" inherits="VideoStream" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,20 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_file">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_file">
- <return type="void">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="file" type="String" setter="set_file" getter="get_file">
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index 80b1ed86d..cc55b72ec 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScript" inherits="Script" category="Core" version="3.0-alpha">
+<class name="VisualScript" inherits="Script" category="Core" version="3.0-beta">
<brief_description>
A script implemented in the Visual Script programming environment.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
index 6c028e5f2..e602214a6 100644
--- a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
A Visual Script node representing a constant from the base types.
</brief_description>
@@ -11,34 +11,6 @@
<demos>
</demos>
<methods>
- <method name="get_basic_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_basic_type_constant" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_basic_type">
- <return type="void">
- </return>
- <argument index="0" name="name" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_basic_type_constant">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index 27231574d..9f7d38e95 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
A Visual Script node used to call built-in functions.
</brief_description>
@@ -12,20 +12,6 @@
<demos>
</demos>
<methods>
- <method name="get_func">
- <return type="int" enum="VisualScriptBuiltinFunc.BuiltinFunc">
- </return>
- <description>
- </description>
- </method>
- <method name="set_func">
- <return type="void">
- </return>
- <argument index="0" name="which" type="int" enum="VisualScriptBuiltinFunc.BuiltinFunc">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="function" type="int" setter="set_func" getter="get_func" enum="VisualScriptBuiltinFunc.BuiltinFunc">
@@ -33,186 +19,192 @@
</member>
</members>
<constants>
- <constant name="MATH_SIN" value="0">
+ <constant name="MATH_SIN" value="0" enum="BuiltinFunc">
Return the sine of the input.
</constant>
- <constant name="MATH_COS" value="1">
+ <constant name="MATH_COS" value="1" enum="BuiltinFunc">
Return the cosine of the input.
</constant>
- <constant name="MATH_TAN" value="2">
+ <constant name="MATH_TAN" value="2" enum="BuiltinFunc">
Return the tangent of the input.
</constant>
- <constant name="MATH_SINH" value="3">
+ <constant name="MATH_SINH" value="3" enum="BuiltinFunc">
Return the hyperbolic sine of the input.
</constant>
- <constant name="MATH_COSH" value="4">
+ <constant name="MATH_COSH" value="4" enum="BuiltinFunc">
Return the hyperbolic cosine of the input.
</constant>
- <constant name="MATH_TANH" value="5">
+ <constant name="MATH_TANH" value="5" enum="BuiltinFunc">
Return the hyperbolic tangent of the input.
</constant>
- <constant name="MATH_ASIN" value="6">
+ <constant name="MATH_ASIN" value="6" enum="BuiltinFunc">
Return the arc sine of the input.
</constant>
- <constant name="MATH_ACOS" value="7">
+ <constant name="MATH_ACOS" value="7" enum="BuiltinFunc">
Return the arc cosine of the input.
</constant>
- <constant name="MATH_ATAN" value="8">
+ <constant name="MATH_ATAN" value="8" enum="BuiltinFunc">
Return the arc tangent of the input.
</constant>
- <constant name="MATH_ATAN2" value="9">
+ <constant name="MATH_ATAN2" value="9" enum="BuiltinFunc">
Return the arc tangent of the input, using the signs of both parameters to determine the exact angle.
</constant>
- <constant name="MATH_SQRT" value="10">
+ <constant name="MATH_SQRT" value="10" enum="BuiltinFunc">
Return the square root of the input.
</constant>
- <constant name="MATH_FMOD" value="11">
+ <constant name="MATH_FMOD" value="11" enum="BuiltinFunc">
Return the remainder of one input divided by the other, using floating-point numbers.
</constant>
- <constant name="MATH_FPOSMOD" value="12">
+ <constant name="MATH_FPOSMOD" value="12" enum="BuiltinFunc">
Return the positive remainder of one input divided by the other, using floating-point numbers.
</constant>
- <constant name="MATH_FLOOR" value="13">
+ <constant name="MATH_FLOOR" value="13" enum="BuiltinFunc">
Return the input rounded down.
</constant>
- <constant name="MATH_CEIL" value="14">
+ <constant name="MATH_CEIL" value="14" enum="BuiltinFunc">
Return the input rounded up.
</constant>
- <constant name="MATH_ROUND" value="15">
+ <constant name="MATH_ROUND" value="15" enum="BuiltinFunc">
Return the input rounded to the nearest integer.
</constant>
- <constant name="MATH_ABS" value="16">
+ <constant name="MATH_ABS" value="16" enum="BuiltinFunc">
Return the absolute value of the input.
</constant>
- <constant name="MATH_SIGN" value="17">
+ <constant name="MATH_SIGN" value="17" enum="BuiltinFunc">
Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative.
</constant>
- <constant name="MATH_POW" value="18">
+ <constant name="MATH_POW" value="18" enum="BuiltinFunc">
Return the input raised to a given power.
</constant>
- <constant name="MATH_LOG" value="19">
+ <constant name="MATH_LOG" value="19" enum="BuiltinFunc">
Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use.
</constant>
- <constant name="MATH_EXP" value="20">
+ <constant name="MATH_EXP" value="20" enum="BuiltinFunc">
Return [b]e[/b] raised to the power of the input. [b]e[/b] sometimes called "Euler's number" is a mathematical constant whose value is approximately 2.71828.
</constant>
- <constant name="MATH_ISNAN" value="21">
+ <constant name="MATH_ISNAN" value="21" enum="BuiltinFunc">
Return whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist.
</constant>
- <constant name="MATH_ISINF" value="22">
+ <constant name="MATH_ISINF" value="22" enum="BuiltinFunc">
Return whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist.
</constant>
- <constant name="MATH_EASE" value="23">
+ <constant name="MATH_EASE" value="23" enum="BuiltinFunc">
Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
</constant>
- <constant name="MATH_DECIMALS" value="24">
+ <constant name="MATH_DECIMALS" value="24" enum="BuiltinFunc">
Return the number of digit places after the decimal that the first non-zero digit occurs.
</constant>
- <constant name="MATH_STEPIFY" value="25">
+ <constant name="MATH_STEPIFY" value="25" enum="BuiltinFunc">
Return the input snapped to a given step.
</constant>
- <constant name="MATH_LERP" value="26">
+ <constant name="MATH_LERP" value="26" enum="BuiltinFunc">
Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula [code]a + (a - b) * t[/code].
</constant>
- <constant name="MATH_INVERSE_LERP" value="27">
+ <constant name="MATH_INVERSE_LERP" value="27" enum="BuiltinFunc">
</constant>
- <constant name="MATH_RANGE_LERP" value="28">
+ <constant name="MATH_RANGE_LERP" value="28" enum="BuiltinFunc">
</constant>
- <constant name="MATH_DECTIME" value="29">
+ <constant name="MATH_DECTIME" value="29" enum="BuiltinFunc">
Return the result of 'value' decreased by 'step' * 'amount'.
</constant>
- <constant name="MATH_RANDOMIZE" value="30">
+ <constant name="MATH_RANDOMIZE" value="30" enum="BuiltinFunc">
Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
</constant>
- <constant name="MATH_RAND" value="31">
+ <constant name="MATH_RAND" value="31" enum="BuiltinFunc">
Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function.
</constant>
- <constant name="MATH_RANDF" value="32">
+ <constant name="MATH_RANDF" value="32" enum="BuiltinFunc">
Return a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication.
</constant>
- <constant name="MATH_RANDOM" value="33">
+ <constant name="MATH_RANDOM" value="33" enum="BuiltinFunc">
Return a random floating-point value between the two inputs.
</constant>
- <constant name="MATH_SEED" value="34">
+ <constant name="MATH_SEED" value="34" enum="BuiltinFunc">
Set the seed for the random number generator.
</constant>
- <constant name="MATH_RANDSEED" value="35">
+ <constant name="MATH_RANDSEED" value="35" enum="BuiltinFunc">
Return a random value from the given seed, along with the new seed.
</constant>
- <constant name="MATH_DEG2RAD" value="36">
+ <constant name="MATH_DEG2RAD" value="36" enum="BuiltinFunc">
Convert the input from degrees to radians.
</constant>
- <constant name="MATH_RAD2DEG" value="37">
+ <constant name="MATH_RAD2DEG" value="37" enum="BuiltinFunc">
Convert the input from radians to degrees.
</constant>
- <constant name="MATH_LINEAR2DB" value="38">
+ <constant name="MATH_LINEAR2DB" value="38" enum="BuiltinFunc">
Convert the input from linear volume to decibel volume.
</constant>
- <constant name="MATH_DB2LINEAR" value="39">
+ <constant name="MATH_DB2LINEAR" value="39" enum="BuiltinFunc">
Convert the input from decibel volume to linear volume.
</constant>
- <constant name="MATH_WRAP" value="40">
+ <constant name="MATH_POLAR2CARTESIAN" value="40" enum="BuiltinFunc">
+ Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (x and y axis).
</constant>
- <constant name="MATH_WRAPF" value="41">
+ <constant name="MATH_CARTESIAN2POLAR" value="41" enum="BuiltinFunc">
+ Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle).
</constant>
- <constant name="LOGIC_MAX" value="42">
+ <constant name="MATH_WRAP" value="42" enum="BuiltinFunc">
+ </constant>
+ <constant name="MATH_WRAPF" value="43" enum="BuiltinFunc">
+ </constant>
+ <constant name="LOGIC_MAX" value="44" enum="BuiltinFunc">
Return the greater of the two numbers, also known as their maximum.
</constant>
- <constant name="LOGIC_MIN" value="43">
+ <constant name="LOGIC_MIN" value="45" enum="BuiltinFunc">
Return the lesser of the two numbers, also known as their minimum.
</constant>
- <constant name="LOGIC_CLAMP" value="44">
+ <constant name="LOGIC_CLAMP" value="46" enum="BuiltinFunc">
Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to `min(max(input, range_low), range_high)`
</constant>
- <constant name="LOGIC_NEAREST_PO2" value="45">
+ <constant name="LOGIC_NEAREST_PO2" value="47" enum="BuiltinFunc">
Return the nearest power of 2 to the input.
</constant>
- <constant name="OBJ_WEAKREF" value="46">
+ <constant name="OBJ_WEAKREF" value="48" enum="BuiltinFunc">
Create a [WeakRef] from the input.
</constant>
- <constant name="FUNC_FUNCREF" value="47">
+ <constant name="FUNC_FUNCREF" value="49" enum="BuiltinFunc">
Create a [FuncRef] from the input.
</constant>
- <constant name="TYPE_CONVERT" value="48">
+ <constant name="TYPE_CONVERT" value="50" enum="BuiltinFunc">
Convert between types.
</constant>
- <constant name="TYPE_OF" value="49">
+ <constant name="TYPE_OF" value="51" enum="BuiltinFunc">
Return the type of the input as an integer. Check [enum Variant.Type] for the integers that might be returned.
</constant>
- <constant name="TYPE_EXISTS" value="50">
+ <constant name="TYPE_EXISTS" value="52" enum="BuiltinFunc">
Checks if a type is registered in the [ClassDB].
</constant>
- <constant name="TEXT_CHAR" value="51">
+ <constant name="TEXT_CHAR" value="53" enum="BuiltinFunc">
Return a character with the given ascii value.
</constant>
- <constant name="TEXT_STR" value="52">
+ <constant name="TEXT_STR" value="54" enum="BuiltinFunc">
Convert the input to a string.
</constant>
- <constant name="TEXT_PRINT" value="53">
+ <constant name="TEXT_PRINT" value="55" enum="BuiltinFunc">
Print the given string to the output window.
</constant>
- <constant name="TEXT_PRINTERR" value="54">
+ <constant name="TEXT_PRINTERR" value="56" enum="BuiltinFunc">
Print the given string to the standard error output.
</constant>
- <constant name="TEXT_PRINTRAW" value="55">
+ <constant name="TEXT_PRINTRAW" value="57" enum="BuiltinFunc">
Print the given string to the standard output, without adding a newline.
</constant>
- <constant name="VAR_TO_STR" value="56">
+ <constant name="VAR_TO_STR" value="58" enum="BuiltinFunc">
Serialize a [Variant] to a string.
</constant>
- <constant name="STR_TO_VAR" value="57">
+ <constant name="STR_TO_VAR" value="59" enum="BuiltinFunc">
Deserialize a [Variant] from a string serialized using [VAR_TO_STR].
</constant>
- <constant name="VAR_TO_BYTES" value="58">
+ <constant name="VAR_TO_BYTES" value="60" enum="BuiltinFunc">
Serialize a [Variant] to a [PoolByteArray].
</constant>
- <constant name="BYTES_TO_VAR" value="59">
+ <constant name="BYTES_TO_VAR" value="61" enum="BuiltinFunc">
Deserialize a [Variant] from a [PoolByteArray] serialized using [VAR_TO_BYTES].
</constant>
- <constant name="COLORN" value="60">
+ <constant name="COLORN" value="62" enum="BuiltinFunc">
Return the [Color] with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc.
</constant>
- <constant name="FUNC_MAX" value="61">
+ <constant name="FUNC_MAX" value="63" enum="BuiltinFunc">
The maximum value the [member function] property can have.
</constant>
</constants>
diff --git a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
index e6498e92a..78757843c 100644
--- a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Gets a constant from a given class.
</brief_description>
@@ -15,34 +15,6 @@
<demos>
</demos>
<methods>
- <method name="get_base_type">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_class_constant">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_class_constant">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
diff --git a/modules/visual_script/doc_classes/VisualScriptComment.xml b/modules/visual_script/doc_classes/VisualScriptComment.xml
index ea4545f8e..c21a08236 100644
--- a/modules/visual_script/doc_classes/VisualScriptComment.xml
+++ b/modules/visual_script/doc_classes/VisualScriptComment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
A Visual Script node used to annotate the script.
</brief_description>
@@ -12,48 +12,6 @@
<demos>
</demos>
<methods>
- <method name="get_description" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_title" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_description">
- <return type="void">
- </return>
- <argument index="0" name="description" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_size">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_title">
- <return type="void">
- </return>
- <argument index="0" name="title" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="description" type="String" setter="set_description" getter="get_description">
diff --git a/modules/visual_script/doc_classes/VisualScriptCondition.xml b/modules/visual_script/doc_classes/VisualScriptCondition.xml
index 2a30c604a..f1f87c010 100644
--- a/modules/visual_script/doc_classes/VisualScriptCondition.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCondition.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
A Visual Script node which branches the flow.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptConstant.xml b/modules/visual_script/doc_classes/VisualScriptConstant.xml
index 51c6d1923..39a1e5eba 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Gets a contant's value.
</brief_description>
@@ -15,34 +15,6 @@
<demos>
</demos>
<methods>
- <method name="get_constant_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_constant_value" qualifiers="const">
- <return type="Variant">
- </return>
- <description>
- </description>
- </method>
- <method name="set_constant_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_constant_value">
- <return type="void">
- </return>
- <argument index="0" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="type" type="int" setter="set_constant_type" getter="get_constant_type" enum="Variant.Type">
diff --git a/modules/visual_script/doc_classes/VisualScriptConstructor.xml b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
index 91df52e89..f3c6b6a30 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstructor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
A Visual Script node which calls a base type constructor.
</brief_description>
@@ -11,34 +11,6 @@
<demos>
</demos>
<methods>
- <method name="get_constructor" qualifiers="const">
- <return type="Dictionary">
- </return>
- <description>
- </description>
- </method>
- <method name="get_constructor_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_constructor">
- <return type="void">
- </return>
- <argument index="0" name="constructor" type="Dictionary">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_constructor_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="constructor" type="Dictionary" setter="set_constructor" getter="get_constructor">
diff --git a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
index 38c325cfb..c321c616a 100644
--- a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
A scripted Visual Script node.
</brief_description>
@@ -136,28 +136,28 @@
</method>
</methods>
<constants>
- <constant name="START_MODE_BEGIN_SEQUENCE" value="0">
+ <constant name="START_MODE_BEGIN_SEQUENCE" value="0" enum="StartMode">
The start mode used the first time when [method _step] is called.
</constant>
- <constant name="START_MODE_CONTINUE_SEQUENCE" value="1">
+ <constant name="START_MODE_CONTINUE_SEQUENCE" value="1" enum="StartMode">
The start mode used when [method _step] is called after coming back from a STEP_PUSH_STACK_BIT.
</constant>
- <constant name="START_MODE_RESUME_YIELD" value="2">
+ <constant name="START_MODE_RESUME_YIELD" value="2" enum="StartMode">
The start mode used when [method _step] is called after resuming from STEP_YIELD_BIT.
</constant>
- <constant name="STEP_PUSH_STACK_BIT" value="16777216" enum="">
+ <constant name="STEP_PUSH_STACK_BIT" value="16777216">
Hint used by [method _step] to tell that control should return to it when there is no other node left to execute.
This is used by [VisualScriptCondition] to redirect the sequence to the "Done" port after the true/false branch has finished execution.
</constant>
- <constant name="STEP_GO_BACK_BIT" value="33554432" enum="">
+ <constant name="STEP_GO_BACK_BIT" value="33554432">
Hint used by [method _step] to tell that control should return back, either hitting a previous STEP_PUSH_STACK_BIT or exiting the function.
</constant>
- <constant name="STEP_NO_ADVANCE_BIT" value="67108864" enum="">
+ <constant name="STEP_NO_ADVANCE_BIT" value="67108864">
</constant>
- <constant name="STEP_EXIT_FUNCTION_BIT" value="134217728" enum="">
+ <constant name="STEP_EXIT_FUNCTION_BIT" value="134217728">
Hint used by [method _step] to tell that control should stop and exit the function.
</constant>
- <constant name="STEP_YIELD_BIT" value="268435456" enum="">
+ <constant name="STEP_YIELD_BIT" value="268435456">
Hint used by [method _step] to tell that the function should be yielded.
Using this requires you to have at least one working memory slot, which is used for the [VisualScriptFunctionState].
</constant>
diff --git a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
index cbed3ba22..86cf4410a 100644
--- a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
+++ b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
A Visual Script node which deconstructs a base type instance into its parts.
</brief_description>
@@ -11,20 +11,6 @@
<demos>
</demos>
<methods>
- <method name="get_deconstruct_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_deconstruct_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="elem_cache" type="Array" setter="_set_elem_cache" getter="_get_elem_cache">
diff --git a/modules/visual_script/doc_classes/VisualScriptEditor.xml b/modules/visual_script/doc_classes/VisualScriptEditor.xml
index 70d52b2bd..b433f132c 100644
--- a/modules/visual_script/doc_classes/VisualScriptEditor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEditor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEditor" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+<class name="VisualScriptEditor" inherits="Object" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
index 669276f0d..71e8c7d93 100644
--- a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Emits a specified signal.
</brief_description>
@@ -15,20 +15,6 @@
<demos>
</demos>
<methods>
- <method name="get_signal" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_signal">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="signal" type="String" setter="set_signal" getter="get_signal">
diff --git a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
index 6703ff4ed..b9f356412 100644
--- a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
A Visual Script node returning a singleton from [@GlobalScope]
</brief_description>
@@ -11,20 +11,6 @@
<demos>
</demos>
<methods>
- <method name="get_singleton">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_singleton">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="constant" type="String" setter="set_singleton" getter="get_singleton">
diff --git a/modules/visual_script/doc_classes/VisualScriptExpression.xml b/modules/visual_script/doc_classes/VisualScriptExpression.xml
index fb3b6ef19..91c107e06 100644
--- a/modules/visual_script/doc_classes/VisualScriptExpression.xml
+++ b/modules/visual_script/doc_classes/VisualScriptExpression.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptExpression" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptExpression" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunction.xml b/modules/visual_script/doc_classes/VisualScriptFunction.xml
index d77169679..2c63b98b2 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunction" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptFunction" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
index 7a0a7c9f5..cc2360fc2 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,146 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_base_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_script" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_basic_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptFunctionCall.CallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_function" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rpc_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptFunctionCall.RPCCallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_singleton" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_use_default_args" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_validate" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_path">
- <return type="void">
- </return>
- <argument index="0" name="base_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_script">
- <return type="void">
- </return>
- <argument index="0" name="base_script" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="base_type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_basic_type">
- <return type="void">
- </return>
- <argument index="0" name="basic_type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptFunctionCall.CallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_function">
- <return type="void">
- </return>
- <argument index="0" name="function" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rpc_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptFunctionCall.RPCCallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_singleton">
- <return type="void">
- </return>
- <argument index="0" name="singleton" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_use_default_args">
- <return type="void">
- </return>
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_validate">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="argument_cache" type="Dictionary" setter="_set_argument_cache" getter="_get_argument_cache">
@@ -175,25 +35,25 @@
</member>
</members>
<constants>
- <constant name="CALL_MODE_SELF" value="0">
+ <constant name="CALL_MODE_SELF" value="0" enum="CallMode">
</constant>
- <constant name="CALL_MODE_NODE_PATH" value="1">
+ <constant name="CALL_MODE_NODE_PATH" value="1" enum="CallMode">
</constant>
- <constant name="CALL_MODE_INSTANCE" value="2">
+ <constant name="CALL_MODE_INSTANCE" value="2" enum="CallMode">
</constant>
- <constant name="CALL_MODE_BASIC_TYPE" value="3">
+ <constant name="CALL_MODE_BASIC_TYPE" value="3" enum="CallMode">
</constant>
- <constant name="CALL_MODE_SINGLETON" value="4">
+ <constant name="CALL_MODE_SINGLETON" value="4" enum="CallMode">
</constant>
- <constant name="RPC_DISABLED" value="0">
+ <constant name="RPC_DISABLED" value="0" enum="RPCCallMode">
</constant>
- <constant name="RPC_RELIABLE" value="1">
+ <constant name="RPC_RELIABLE" value="1" enum="RPCCallMode">
</constant>
- <constant name="RPC_UNRELIABLE" value="2">
+ <constant name="RPC_UNRELIABLE" value="2" enum="RPCCallMode">
</constant>
- <constant name="RPC_RELIABLE_TO_ID" value="3">
+ <constant name="RPC_RELIABLE_TO_ID" value="3" enum="RPCCallMode">
</constant>
- <constant name="RPC_UNRELIABLE_TO_ID" value="4">
+ <constant name="RPC_UNRELIABLE_TO_ID" value="4" enum="RPCCallMode">
</constant>
</constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
index 9b30f6223..90ec85e4f 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunctionState" inherits="Reference" category="Core" version="3.0-alpha">
+<class name="VisualScriptFunctionState" inherits="Reference" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
index 961244fe8..4417c8a53 100644
--- a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,20 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_global_constant">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_global_constant">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="constant" type="int" setter="set_global_constant" getter="get_global_constant">
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
index c5229f767..c0a83f186 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIndexGet" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptIndexGet" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
index 27646b4a5..866134191 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIndexSet" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptIndexSet" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptInputAction.xml b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
index 7f6d13264..afe72ba56 100644
--- a/modules/visual_script/doc_classes/VisualScriptInputAction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptInputAction" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptInputAction" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,34 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_action_mode" qualifiers="const">
- <return type="int" enum="VisualScriptInputAction.Mode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_action_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_action_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptInputAction.Mode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_action_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="action" type="String" setter="set_action_name" getter="get_action_name">
@@ -45,13 +17,13 @@
</member>
</members>
<constants>
- <constant name="MODE_PRESSED" value="0">
+ <constant name="MODE_PRESSED" value="0" enum="Mode">
</constant>
- <constant name="MODE_RELEASED" value="1">
+ <constant name="MODE_RELEASED" value="1" enum="Mode">
</constant>
- <constant name="MODE_JUST_PRESSED" value="2">
+ <constant name="MODE_JUST_PRESSED" value="2" enum="Mode">
</constant>
- <constant name="MODE_JUST_RELEASED" value="3">
+ <constant name="MODE_JUST_RELEASED" value="3" enum="Mode">
</constant>
</constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptIterator.xml b/modules/visual_script/doc_classes/VisualScriptIterator.xml
index fc905d6c3..08dfad5ac 100644
--- a/modules/visual_script/doc_classes/VisualScriptIterator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIterator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Steps through items in a given input.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
index ff77dfac0..a4293adaa 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Gets a local variable's value.
</brief_description>
@@ -15,34 +15,6 @@
<demos>
</demos>
<methods>
- <method name="get_var_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_var_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_var_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_var_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type">
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
index 07b01d457..c1a279bdb 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Changes a local variable's value.
</brief_description>
@@ -17,34 +17,6 @@
<demos>
</demos>
<methods>
- <method name="get_var_name" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_var_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_var_name">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_var_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type">
diff --git a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
index 817bcb5ce..2cb053ee5 100644
--- a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Commonly used mathematical constants.
</brief_description>
@@ -15,20 +15,6 @@
<demos>
</demos>
<methods>
- <method name="get_math_constant">
- <return type="int" enum="VisualScriptMathConstant.MathConstant">
- </return>
- <description>
- </description>
- </method>
- <method name="set_math_constant">
- <return type="void">
- </return>
- <argument index="0" name="which" type="int" enum="VisualScriptMathConstant.MathConstant">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="constant" type="int" setter="set_math_constant" getter="get_math_constant" enum="VisualScriptMathConstant.MathConstant">
@@ -36,31 +22,31 @@
</member>
</members>
<constants>
- <constant name="MATH_CONSTANT_ONE" value="0">
+ <constant name="MATH_CONSTANT_ONE" value="0" enum="MathConstant">
Unity: [code]1[/code]
</constant>
- <constant name="MATH_CONSTANT_PI" value="1">
+ <constant name="MATH_CONSTANT_PI" value="1" enum="MathConstant">
Pi: [code]3.141593[/code]
</constant>
- <constant name="MATH_CONSTANT_HALF_PI" value="2">
+ <constant name="MATH_CONSTANT_HALF_PI" value="2" enum="MathConstant">
Pi divided by two: [code]1.570796[/code]
</constant>
- <constant name="MATH_CONSTANT_TAU" value="3">
+ <constant name="MATH_CONSTANT_TAU" value="3" enum="MathConstant">
Tau: [code]6.283185[/code]
</constant>
- <constant name="MATH_CONSTANT_E" value="4">
+ <constant name="MATH_CONSTANT_E" value="4" enum="MathConstant">
Natural log: [code]2.718282[/code]
</constant>
- <constant name="MATH_CONSTANT_SQRT2" value="5">
+ <constant name="MATH_CONSTANT_SQRT2" value="5" enum="MathConstant">
Square root of two: [code]1.414214[/code]
</constant>
- <constant name="MATH_CONSTANT_INF" value="6">
+ <constant name="MATH_CONSTANT_INF" value="6" enum="MathConstant">
Infinity: [code]inf[/code]
</constant>
- <constant name="MATH_CONSTANT_NAN" value="7">
+ <constant name="MATH_CONSTANT_NAN" value="7" enum="MathConstant">
Not a number: [code]nan[/code]
</constant>
- <constant name="MATH_CONSTANT_MAX" value="8">
+ <constant name="MATH_CONSTANT_MAX" value="8" enum="MathConstant">
</constant>
</constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptNode.xml b/modules/visual_script/doc_classes/VisualScriptNode.xml
index f6f286717..94fed4495 100644
--- a/modules/visual_script/doc_classes/VisualScriptNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptNode" inherits="Resource" category="Core" version="3.0-alpha">
+<class name="VisualScriptNode" inherits="Resource" category="Core" version="3.0-beta">
<brief_description>
A node which is part of a [VisualScript].
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptOperator.xml b/modules/visual_script/doc_classes/VisualScriptOperator.xml
index bf4032c09..b7819592d 100644
--- a/modules/visual_script/doc_classes/VisualScriptOperator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptOperator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptOperator" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptOperator" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -14,34 +14,6 @@
<demos>
</demos>
<methods>
- <method name="get_operator" qualifiers="const">
- <return type="int" enum="Variant.Operator">
- </return>
- <description>
- </description>
- </method>
- <method name="get_typed" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_operator">
- <return type="void">
- </return>
- <argument index="0" name="op" type="int" enum="Variant.Operator">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_typed">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="Variant.Operator">
diff --git a/modules/visual_script/doc_classes/VisualScriptPreload.xml b/modules/visual_script/doc_classes/VisualScriptPreload.xml
index 4a71e2380..712ec99fd 100644
--- a/modules/visual_script/doc_classes/VisualScriptPreload.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPreload.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPreload" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptPreload" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Creates a new [Resource] or loads one from the filesystem.
</brief_description>
@@ -15,20 +15,6 @@
<demos>
</demos>
<methods>
- <method name="get_preload" qualifiers="const">
- <return type="Resource">
- </return>
- <description>
- </description>
- </method>
- <method name="set_preload">
- <return type="void">
- </return>
- <argument index="0" name="resource" type="Resource">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="resource" type="Resource" setter="set_preload" getter="get_preload">
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
index eb5c52f4b..f68f0edee 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,104 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_base_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_script" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_basic_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptPropertyGet.CallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_index" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_property" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_path">
- <return type="void">
- </return>
- <argument index="0" name="base_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_script">
- <return type="void">
- </return>
- <argument index="0" name="base_script" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="base_type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_basic_type">
- <return type="void">
- </return>
- <argument index="0" name="basic_type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptPropertyGet.CallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_index">
- <return type="void">
- </return>
- <argument index="0" name="index" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_property">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
@@ -127,11 +29,11 @@
</member>
</members>
<constants>
- <constant name="CALL_MODE_SELF" value="0">
+ <constant name="CALL_MODE_SELF" value="0" enum="CallMode">
</constant>
- <constant name="CALL_MODE_NODE_PATH" value="1">
+ <constant name="CALL_MODE_NODE_PATH" value="1" enum="CallMode">
</constant>
- <constant name="CALL_MODE_INSTANCE" value="2">
+ <constant name="CALL_MODE_INSTANCE" value="2" enum="CallMode">
</constant>
</constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
index 794caa251..d4305af57 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPropertySet" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptPropertySet" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,118 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_assign_op" qualifiers="const">
- <return type="int" enum="VisualScriptPropertySet.AssignOp">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_script" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_basic_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="get_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptPropertySet.CallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_index" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_property" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_assign_op">
- <return type="void">
- </return>
- <argument index="0" name="assign_op" type="int" enum="VisualScriptPropertySet.AssignOp">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_path">
- <return type="void">
- </return>
- <argument index="0" name="base_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_script">
- <return type="void">
- </return>
- <argument index="0" name="base_script" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="base_type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_basic_type">
- <return type="void">
- </return>
- <argument index="0" name="basic_type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptPropertySet.CallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_index">
- <return type="void">
- </return>
- <argument index="0" name="index" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_property">
- <return type="void">
- </return>
- <argument index="0" name="property" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="assign_op" type="int" setter="set_assign_op" getter="get_assign_op" enum="VisualScriptPropertySet.AssignOp">
@@ -143,35 +31,35 @@
</member>
</members>
<constants>
- <constant name="CALL_MODE_SELF" value="0">
+ <constant name="CALL_MODE_SELF" value="0" enum="CallMode">
</constant>
- <constant name="CALL_MODE_NODE_PATH" value="1">
+ <constant name="CALL_MODE_NODE_PATH" value="1" enum="CallMode">
</constant>
- <constant name="CALL_MODE_INSTANCE" value="2">
+ <constant name="CALL_MODE_INSTANCE" value="2" enum="CallMode">
</constant>
- <constant name="CALL_MODE_BASIC_TYPE" value="3">
+ <constant name="CALL_MODE_BASIC_TYPE" value="3" enum="CallMode">
</constant>
- <constant name="ASSIGN_OP_NONE" value="0">
+ <constant name="ASSIGN_OP_NONE" value="0" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_ADD" value="1">
+ <constant name="ASSIGN_OP_ADD" value="1" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_SUB" value="2">
+ <constant name="ASSIGN_OP_SUB" value="2" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_MUL" value="3">
+ <constant name="ASSIGN_OP_MUL" value="3" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_DIV" value="4">
+ <constant name="ASSIGN_OP_DIV" value="4" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_MOD" value="5">
+ <constant name="ASSIGN_OP_MOD" value="5" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_SHIFT_LEFT" value="6">
+ <constant name="ASSIGN_OP_SHIFT_LEFT" value="6" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_SHIFT_RIGHT" value="7">
+ <constant name="ASSIGN_OP_SHIFT_RIGHT" value="7" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_BIT_AND" value="8">
+ <constant name="ASSIGN_OP_BIT_AND" value="8" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_BIT_OR" value="9">
+ <constant name="ASSIGN_OP_BIT_OR" value="9" enum="AssignOp">
</constant>
- <constant name="ASSIGN_OP_BIT_XOR" value="10">
+ <constant name="ASSIGN_OP_BIT_XOR" value="10" enum="AssignOp">
</constant>
</constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
index 274a852c3..36bcf2a46 100644
--- a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
+++ b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptResourcePath" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptResourcePath" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,20 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_resource_path">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_resource_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="path" type="String" setter="set_resource_path" getter="get_resource_path">
diff --git a/modules/visual_script/doc_classes/VisualScriptReturn.xml b/modules/visual_script/doc_classes/VisualScriptReturn.xml
index 4ac586a02..a05c1076a 100644
--- a/modules/visual_script/doc_classes/VisualScriptReturn.xml
+++ b/modules/visual_script/doc_classes/VisualScriptReturn.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Exits a function and returns an optional value.
</brief_description>
@@ -16,34 +16,6 @@
<demos>
</demos>
<methods>
- <method name="get_return_type" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="is_return_value_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_enable_return_value">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_return_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="return_enabled" type="bool" setter="set_enable_return_value" getter="is_return_value_enabled">
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
index e8fdb69c6..1a73faaf6 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Node reference.
</brief_description>
@@ -15,20 +15,6 @@
<demos>
</demos>
<methods>
- <method name="get_node_path">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="set_node_path">
- <return type="void">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="node_path" type="NodePath" setter="set_node_path" getter="get_node_path">
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
index e74c33062..25ae9c26a 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSceneTree" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptSceneTree" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSelect.xml b/modules/visual_script/doc_classes/VisualScriptSelect.xml
index 6a62e364f..45ac50511 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelect.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSelect" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptSelect" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Chooses between two input values.
</brief_description>
@@ -17,20 +17,6 @@
<demos>
</demos>
<methods>
- <method name="get_typed" qualifiers="const">
- <return type="int" enum="Variant.Type">
- </return>
- <description>
- </description>
- </method>
- <method name="set_typed">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int" enum="Variant.Type">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="type" type="int" setter="set_typed" getter="get_typed" enum="Variant.Type">
diff --git a/modules/visual_script/doc_classes/VisualScriptSelf.xml b/modules/visual_script/doc_classes/VisualScriptSelf.xml
index f39a02bf8..2b0c46a4b 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelf.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelf.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Outputs a reference to the current instance.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSequence.xml b/modules/visual_script/doc_classes/VisualScriptSequence.xml
index 51238070d..624663b0d 100644
--- a/modules/visual_script/doc_classes/VisualScriptSequence.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSequence.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Executes a series of Sequence ports.
</brief_description>
@@ -17,20 +17,6 @@
<demos>
</demos>
<methods>
- <method name="get_steps" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_steps">
- <return type="void">
- </return>
- <argument index="0" name="steps" type="int">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="steps" type="int" setter="set_steps" getter="get_steps">
diff --git a/modules/visual_script/doc_classes/VisualScriptSubCall.xml b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
index 381095f49..b7dc5ad65 100644
--- a/modules/visual_script/doc_classes/VisualScriptSubCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSubCall" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptSubCall" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSwitch.xml b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
index 3c8a79f68..a34754b59 100644
--- a/modules/visual_script/doc_classes/VisualScriptSwitch.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Branches program flow based on a given input's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
index 417c0a515..e61e81c39 100644
--- a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
+++ b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptTypeCast" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptTypeCast" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,34 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_base_script" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_script">
- <return type="void">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
index 1cad4480a..7122d2d3f 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptVariableGet" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptVariableGet" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Gets a variable's value.
</brief_description>
@@ -15,20 +15,6 @@
<demos>
</demos>
<methods>
- <method name="get_variable" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_variable">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="var_name" type="String" setter="set_variable" getter="get_variable">
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
index fa3befa21..3c39da0a8 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptVariableSet" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptVariableSet" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Changes a variable's value.
</brief_description>
@@ -16,20 +16,6 @@
<demos>
</demos>
<methods>
- <method name="get_variable" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_variable">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="var_name" type="String" setter="set_variable" getter="get_variable">
diff --git a/modules/visual_script/doc_classes/VisualScriptWhile.xml b/modules/visual_script/doc_classes/VisualScriptWhile.xml
index f94866099..d8e59a757 100644
--- a/modules/visual_script/doc_classes/VisualScriptWhile.xml
+++ b/modules/visual_script/doc_classes/VisualScriptWhile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptWhile" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptWhile" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
Conditional loop.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptYield.xml b/modules/visual_script/doc_classes/VisualScriptYield.xml
index 5474ee8b7..b42fc027c 100644
--- a/modules/visual_script/doc_classes/VisualScriptYield.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYield.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptYield" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptYield" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,34 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_wait_time">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_yield_mode">
- <return type="int" enum="VisualScriptYield.YieldMode">
- </return>
- <description>
- </description>
- </method>
- <method name="set_wait_time">
- <return type="void">
- </return>
- <argument index="0" name="sec" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_yield_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptYield.YieldMode">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="mode" type="int" setter="set_yield_mode" getter="get_yield_mode" enum="VisualScriptYield.YieldMode">
@@ -45,11 +17,11 @@
</member>
</members>
<constants>
- <constant name="YIELD_FRAME" value="1">
+ <constant name="YIELD_FRAME" value="1" enum="YieldMode">
</constant>
- <constant name="YIELD_PHYSICS_FRAME" value="2">
+ <constant name="YIELD_PHYSICS_FRAME" value="2" enum="YieldMode">
</constant>
- <constant name="YIELD_WAIT" value="3">
+ <constant name="YIELD_WAIT" value="3" enum="YieldMode">
</constant>
</constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
index a3b698207..f69043a68 100644
--- a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" category="Core" version="3.0-alpha">
+<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,62 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_base_path" qualifiers="const">
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="get_base_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_call_mode" qualifiers="const">
- <return type="int" enum="VisualScriptYieldSignal.CallMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_signal" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_path">
- <return type="void">
- </return>
- <argument index="0" name="base_path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_base_type">
- <return type="void">
- </return>
- <argument index="0" name="base_type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_call_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="VisualScriptYieldSignal.CallMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_signal">
- <return type="void">
- </return>
- <argument index="0" name="signal" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
@@ -77,11 +21,11 @@
</member>
</members>
<constants>
- <constant name="CALL_MODE_SELF" value="0">
+ <constant name="CALL_MODE_SELF" value="0" enum="CallMode">
</constant>
- <constant name="CALL_MODE_NODE_PATH" value="1">
+ <constant name="CALL_MODE_NODE_PATH" value="1" enum="CallMode">
</constant>
- <constant name="CALL_MODE_INSTANCE" value="2">
+ <constant name="CALL_MODE_INSTANCE" value="2" enum="CallMode">
</constant>
</constants>
</class>
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 0834bc81d..26f2d687d 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -1434,7 +1434,7 @@ void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int
if (!node->dependencies.empty()) {
int dc = node->dependencies.size();
- VisualScriptNodeInstance **deps = node->dependencies.ptr();
+ VisualScriptNodeInstance **deps = node->dependencies.ptrw();
for (int i = 0; i < dc; i++) {
@@ -1526,7 +1526,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
if (!node->dependencies.empty()) {
int dc = node->dependencies.size();
- VisualScriptNodeInstance **deps = node->dependencies.ptr();
+ VisualScriptNodeInstance **deps = node->dependencies.ptrw();
for (int i = 0; i < dc; i++) {
@@ -1626,7 +1626,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
state->flow_stack_pos = flow_stack_pos;
state->stack.resize(p_stack_size);
state->pass = p_pass;
- copymem(state->stack.ptr(), p_stack, p_stack_size);
+ copymem(state->stack.ptrw(), p_stack, p_stack_size);
//step 2, run away, return directly
r_error.error = Variant::CallError::CALL_OK;
@@ -2277,7 +2277,7 @@ Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int
*working_mem = args; //arguments go to working mem.
- Variant ret = instance->_call_internal(function, stack.ptr(), stack.size(), node, flow_stack_pos, pass, true, r_error);
+ Variant ret = instance->_call_internal(function, stack.ptrw(), stack.size(), node, flow_stack_pos, pass, true, r_error);
function = StringName(); //invalidate
return ret;
}
@@ -2319,7 +2319,7 @@ Variant VisualScriptFunctionState::resume(Array p_args) {
*working_mem = p_args; //arguments go to working mem.
- Variant ret = instance->_call_internal(function, stack.ptr(), stack.size(), node, flow_stack_pos, pass, true, r_error);
+ Variant ret = instance->_call_internal(function, stack.ptrw(), stack.size(), node, flow_stack_pos, pass, true, r_error);
function = StringName(); //invalidate
return ret;
}
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index 8f7fe58be..32f751912 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -78,6 +78,8 @@ const char *VisualScriptBuiltinFunc::func_name[VisualScriptBuiltinFunc::FUNC_MAX
"rad2deg",
"linear2db",
"db2linear",
+ "polar2cartesian",
+ "cartesian2polar",
"wrapi",
"wrapf",
"max",
@@ -191,6 +193,8 @@ int VisualScriptBuiltinFunc::get_func_argument_count(BuiltinFunc p_func) {
case MATH_EASE:
case MATH_STEPIFY:
case MATH_RANDOM:
+ case MATH_POLAR2CARTESIAN:
+ case MATH_CARTESIAN2POLAR:
case LOGIC_MAX:
case LOGIC_MIN:
case FUNC_FUNCREF:
@@ -368,6 +372,18 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case MATH_DB2LINEAR: {
return PropertyInfo(Variant::REAL, "db");
} break;
+ case MATH_POLAR2CARTESIAN: {
+ if (p_idx == 0)
+ return PropertyInfo(Variant::REAL, "r");
+ else
+ return PropertyInfo(Variant::REAL, "th");
+ } break;
+ case MATH_CARTESIAN2POLAR: {
+ if (p_idx == 0)
+ return PropertyInfo(Variant::REAL, "x");
+ else
+ return PropertyInfo(Variant::REAL, "y");
+ } break;
case MATH_WRAP: {
if (p_idx == 0)
return PropertyInfo(Variant::INT, "value");
@@ -573,6 +589,10 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_DB2LINEAR: {
t = Variant::REAL;
} break;
+ case MATH_POLAR2CARTESIAN:
+ case MATH_CARTESIAN2POLAR: {
+ t = Variant::VECTOR2;
+ } break;
case MATH_WRAP: {
t = Variant::INT;
} break;
@@ -922,6 +942,20 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
VALIDATE_ARG_NUM(0);
*r_return = Math::db2linear((double)*p_inputs[0]);
} break;
+ case VisualScriptBuiltinFunc::MATH_POLAR2CARTESIAN: {
+ VALIDATE_ARG_NUM(0);
+ VALIDATE_ARG_NUM(1);
+ double r = *p_inputs[0];
+ double th = *p_inputs[1];
+ *r_return = Vector2(r * Math::cos(th), r * Math::sin(th));
+ } break;
+ case VisualScriptBuiltinFunc::MATH_CARTESIAN2POLAR: {
+ VALIDATE_ARG_NUM(0);
+ VALIDATE_ARG_NUM(1);
+ double x = *p_inputs[0];
+ double y = *p_inputs[1];
+ *r_return = Vector2(Math::sqrt(x * x + y * y), Math::atan2(y, x));
+ } break;
case VisualScriptBuiltinFunc::MATH_WRAP: {
VALIDATE_ARG_NUM(0);
VALIDATE_ARG_NUM(1);
@@ -1294,6 +1328,8 @@ void VisualScriptBuiltinFunc::_bind_methods() {
BIND_ENUM_CONSTANT(MATH_RAD2DEG);
BIND_ENUM_CONSTANT(MATH_LINEAR2DB);
BIND_ENUM_CONSTANT(MATH_DB2LINEAR);
+ BIND_ENUM_CONSTANT(MATH_POLAR2CARTESIAN);
+ BIND_ENUM_CONSTANT(MATH_CARTESIAN2POLAR);
BIND_ENUM_CONSTANT(MATH_WRAP);
BIND_ENUM_CONSTANT(MATH_WRAPF);
BIND_ENUM_CONSTANT(LOGIC_MAX);
@@ -1381,6 +1417,8 @@ void register_visual_script_builtin_func_node() {
VisualScriptLanguage::singleton->add_register_func("functions/built_in/rad2deg", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_RAD2DEG>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/linear2db", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_LINEAR2DB>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/db2linear", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_DB2LINEAR>);
+ VisualScriptLanguage::singleton->add_register_func("functions/built_in/polar2cartesian", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_POLAR2CARTESIAN>);
+ VisualScriptLanguage::singleton->add_register_func("functions/built_in/cartesian2polar", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_CARTESIAN2POLAR>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/wrapi", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_WRAP>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/wrapf", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_WRAPF>);
diff --git a/modules/visual_script/visual_script_builtin_funcs.h b/modules/visual_script/visual_script_builtin_funcs.h
index 34a282593..54dc997b3 100644
--- a/modules/visual_script/visual_script_builtin_funcs.h
+++ b/modules/visual_script/visual_script_builtin_funcs.h
@@ -77,6 +77,8 @@ public:
MATH_RAD2DEG,
MATH_LINEAR2DB,
MATH_DB2LINEAR,
+ MATH_POLAR2CARTESIAN,
+ MATH_CARTESIAN2POLAR,
MATH_WRAP,
MATH_WRAPF,
LOGIC_MAX,
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 83b8d8da2..6c58de8a5 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -1389,7 +1389,7 @@ bool VisualScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
if (String(d["type"]) == "obj_property") {
#ifdef OSX_ENABLED
- const_cast<VisualScriptEditor *>(this)->_show_hint(TTR("Hold Meta to drop a Getter. Hold Shift to drop a generic signature."));
+ const_cast<VisualScriptEditor *>(this)->_show_hint(vformat(TTR("Hold %s to drop a Getter. Hold Shift to drop a generic signature."), find_keycode_name(KEY_META)));
#else
const_cast<VisualScriptEditor *>(this)->_show_hint(TTR("Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."));
#endif
@@ -1398,7 +1398,7 @@ bool VisualScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
if (String(d["type"]) == "nodes") {
#ifdef OSX_ENABLED
- const_cast<VisualScriptEditor *>(this)->_show_hint(TTR("Hold Meta to drop a simple reference to the node."));
+ const_cast<VisualScriptEditor *>(this)->_show_hint(vformat(TTR("Hold %s to drop a simple reference to the node."), find_keycode_name(KEY_META)));
#else
const_cast<VisualScriptEditor *>(this)->_show_hint(TTR("Hold Ctrl to drop a simple reference to the node."));
#endif
@@ -1407,7 +1407,7 @@ bool VisualScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
if (String(d["type"]) == "visual_script_variable_drag") {
#ifdef OSX_ENABLED
- const_cast<VisualScriptEditor *>(this)->_show_hint(TTR("Hold Meta to drop a Variable Setter."));
+ const_cast<VisualScriptEditor *>(this)->_show_hint(vformat(TTR("Hold %s to drop a Variable Setter."), find_keycode_name(KEY_META)));
#else
const_cast<VisualScriptEditor *>(this)->_show_hint(TTR("Hold Ctrl to drop a Variable Setter."));
#endif
@@ -2466,7 +2466,7 @@ VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_port_ac
in_guesses.push_back(g);
}
- return node->guess_output_type(in_guesses.ptr(), p_port_action_output);
+ return node->guess_output_type(in_guesses.ptrw(), p_port_action_output);
}
void VisualScriptEditor::_port_action_menu(int p_option) {
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index 07dca4b90..ba58a8e1c 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -1378,7 +1378,7 @@ public:
argp[i] = &arr[i];
}
- r_ret = Variant::construct(constructor->data_type, argp.ptr(), argp.size(), ce);
+ r_ret = Variant::construct(constructor->data_type, (const Variant **)argp.ptr(), argp.size(), ce);
if (ce.error != Variant::CallError::CALL_OK) {
r_error_str = "Invalid arguments to construct '" + Variant::get_type_name(constructor->data_type) + "'.";
@@ -1405,7 +1405,7 @@ public:
argp[i] = &arr[i];
}
- VisualScriptBuiltinFunc::exec_func(bifunc->func, argp.ptr(), &r_ret, ce, r_error_str);
+ VisualScriptBuiltinFunc::exec_func(bifunc->func, (const Variant **)argp.ptr(), &r_ret, ce, r_error_str);
if (ce.error != Variant::CallError::CALL_OK) {
r_error_str = "Builtin Call Failed. " + r_error_str;
@@ -1437,7 +1437,7 @@ public:
argp[i] = &arr[i];
}
- r_ret = base.call(call->method, argp.ptr(), argp.size(), ce);
+ r_ret = base.call(call->method, (const Variant **)argp.ptr(), argp.size(), ce);
if (ce.error != Variant::CallError::CALL_OK) {
r_error_str = "On call to '" + String(call->method) + "':";
diff --git a/modules/webm/config.py b/modules/webm/config.py
index 0374bb36f..dcae4447d 100644
--- a/modules/webm/config.py
+++ b/modules/webm/config.py
@@ -1,5 +1,5 @@
def can_build(platform):
- return True
+ return platform != 'iphone'
def configure(env):
pass
diff --git a/modules/webm/doc_classes/ResourceImporterWebm.xml b/modules/webm/doc_classes/ResourceImporterWebm.xml
index dcba351e3..5dadb83b0 100644
--- a/modules/webm/doc_classes/ResourceImporterWebm.xml
+++ b/modules/webm/doc_classes/ResourceImporterWebm.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterWebm" inherits="ResourceImporter" category="Core" version="3.0-alpha">
+<class name="ResourceImporterWebm" inherits="ResourceImporter" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
diff --git a/modules/webm/doc_classes/VideoStreamWebm.xml b/modules/webm/doc_classes/VideoStreamWebm.xml
index 9a430f6b0..8b6696cfe 100644
--- a/modules/webm/doc_classes/VideoStreamWebm.xml
+++ b/modules/webm/doc_classes/VideoStreamWebm.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamWebm" inherits="VideoStream" category="Core" version="3.0-alpha">
+<class name="VideoStreamWebm" inherits="VideoStream" category="Core" version="3.0-beta">
<brief_description>
</brief_description>
<description>
@@ -9,20 +9,6 @@
<demos>
</demos>
<methods>
- <method name="get_file">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_file">
- <return type="void">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="file" type="String" setter="set_file" getter="get_file">