Răsfoiți Sursa

Merge branch 'master' of https://github.com/urho3d/Urho3D

Conflicts:
	Source/Urho3D/Script/ResourceAPI.cpp
aster2013 10 ani în urmă
părinte
comite
cd71104e90

+ 33 - 94
Docs/AngelScriptAPI.h

@@ -5118,14 +5118,14 @@ int y;
 class JSONFile
 {
 // Methods:
-JSONValue CreateRoot(JSONValueType = JSON_ANY);
-JSONValue GetRoot(JSONValueType = JSON_ANY);
+const JSONValue& GetRoot();
 bool Load(File);
 bool Load(VectorBuffer&);
 bool Save(File) const;
 bool Save(File, const String&) const;
 bool Save(VectorBuffer&) const;
 void SendEvent(const String&, VariantMap& = VariantMap ( ));
+void SetRoot(const JSONValue&);
 
 // Properties:
 /* readonly */
@@ -5150,104 +5150,40 @@ int weakRefs;
 class JSONValue
 {
 // Methods:
-void AddBool(bool);
-void AddColor(const Color&);
-void AddDouble(double);
-void AddFloat(float);
-void AddInt(int);
-void AddIntRect(const IntRect&);
-void AddIntVector2(const IntVector2&);
-void AddMatrix3(const Matrix3&);
-void AddMatrix3x4(const Matrix3x4&);
-void AddMatrix4(const Matrix4&);
-void AddQuaternion(const Quaternion&);
-void AddResourceRef(const ResourceRef&);
-void AddResourceRefList(const ResourceRefList&);
-void AddString(const String);
-void AddVariant(const Variant&);
-void AddVariantValue(const Variant&);
-void AddVector2(const Vector2&);
-void AddVector3(const Vector3&);
-void AddVector4(const Vector4&);
-void AddVectorVariant(const Variant&);
-JSONValue CreateChild(JSONValueType = JSON_OBJECT);
-JSONValue CreateChild(const String&, JSONValueType = JSON_OBJECT);
-bool GetBool(const String&) const;
-bool GetBool(uint) const;
-JSONValue GetChild(const String&, JSONValueType = JSON_ANY) const;
-JSONValue GetChild(uint, JSONValueType = JSON_ANY) const;
-Array<String> GetChildNames() const;
-Color GetColor(const String&) const;
-Color GetColor(uint) const;
-double GetDouble(const String&) const;
-double GetDouble(uint) const;
-float GetFloat(const String&) const;
-float GetFloat(uint) const;
-int GetInt(const String&) const;
-int GetInt(uint) const;
-IntRect GetIntRect(const String&) const;
-IntRect GetIntRect(uint) const;
-IntVector2 GetIntVector2(const String&) const;
-IntVector2 GetIntVector2(uint) const;
-Matrix3 GetMatrix3(const String&) const;
-Matrix3 GetMatrix3(uint) const;
-Matrix3x4 GetMatrix3x4(const String&) const;
-Matrix3x4 GetMatrix3x4(uint) const;
-Matrix4 GetMatrix4(const String&) const;
-Matrix4 GetMatrix4(uint) const;
-Quaternion GetQuaternion(const String&) const;
-Quaternion GetQuaternion(uint) const;
-ResourceRef GetResourceRef(const String&) const;
-ResourceRef GetResourceRef(uint) const;
-ResourceRefList GetResourceRefList(const String&) const;
-ResourceRefList GetResourceRefList(uint) const;
-String GetString(const String&) const;
-String GetString(uint) const;
-Array<String> GetValueNames() const;
-Variant GetVariant(const String&) const;
-Variant GetVariant(uint) const;
-Variant GetVariantValue(const String&, VariantType) const;
-Variant GetVariantValue(uint, VariantType) const;
-Vector2 GetVector2(const String&) const;
-Vector2 GetVector2(uint) const;
-Vector3 GetVector3(const String&) const;
-Vector3 GetVector3(uint) const;
-Vector4 GetVector4(const String&) const;
-Vector4 GetVector4(uint) const;
-Variant GetVectorVariant(const String&) const;
-Variant GetVectorVariant(uint) const;
-void SetBool(const String&, bool);
-void SetColor(const String&, const Color&);
-void SetDouble(const String&, double);
-void SetFloat(const String&, float);
-void SetInt(const String&, int);
-void SetIntRect(const String&, const IntRect&);
-void SetIntVector2(const String&, const IntVector2&);
-void SetMatrix3(const String&, const Matrix3&);
-void SetMatrix3x4(const String&, const Matrix3x4&);
-void SetMatrix4(const String&, const Matrix4&);
-void SetQuaternion(const String&, const Quaternion&);
-void SetResourceRef(const String&, const ResourceRef&);
-void SetResourceRefList(const String&, const ResourceRefList&);
-void SetString(const String&, const String);
-void SetVariant(const String&, const Variant&);
-void SetVariantValue(const String&, const Variant&);
-void SetVector2(const String&, const Vector2&);
-void SetVector3(const String&, const Vector3&);
-void SetVector4(const String&, const Vector4&);
-void SetVectorVariant(const String&, const Variant&);
+void Clear();
+bool Contains(const String&) const;
+void Erase(const String&);
+void Erase(uint, uint = 1);
+bool GetBool() const;
+double GetDouble() const;
+float GetFloat() const;
+int GetInt() const;
+uint GetUint() const;
+void Insert(uint, const JSONValue&);
+const JSONValue& Get(const String&) const;
+void Pop();
+void Push(const JSONValue&);
+void Resize(uint);
+void Set(const String&, const JSONValue&);
+const String& GetString() const;
 
 // Properties:
 /* readonly */
 bool isArray;
 /* readonly */
+bool isBool;
+/* readonly */
 bool isNull;
 /* readonly */
+bool isNumber;
+/* readonly */
 bool isObject;
 /* readonly */
-bool notNull;
+bool isString;
 /* readonly */
 uint size;
+/* readonly */
+JSONValueType type;
 };
 
 class JoystickState
@@ -7442,8 +7378,8 @@ bool Load(File, bool = false);
 bool Load(VectorBuffer&, bool = false);
 bool LoadXML(const XMLElement&, bool = false);
 void MarkNetworkUpdate() const;
-Array<PhysicsRaycastResult> Raycast(const Ray&, float = M_INFINITY, uint = 0xffff);
-PhysicsRaycastResult RaycastSingle(const Ray&, float = M_INFINITY, uint = 0xffff);
+Array<PhysicsRaycastResult> Raycast(const Ray&, float, uint = 0xffff);
+PhysicsRaycastResult RaycastSingle(const Ray&, float, uint = 0xffff);
 void Remove();
 void RemoveCachedGeometry(Model);
 void RemoveInstanceDefault();
@@ -7457,7 +7393,7 @@ void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, fl
 void SetAttributeAnimationSpeed(const String&, float);
 void SetAttributeAnimationWrapMode(const String&, WrapMode);
 void SetInterceptNetworkUpdate(const String&, bool);
-PhysicsRaycastResult SphereCast(const Ray&, float, float = M_INFINITY, uint = 0xffff);
+PhysicsRaycastResult SphereCast(const Ray&, float, float, uint = 0xffff);
 void Update(float);
 void UpdateCollisions();
 
@@ -12999,9 +12935,12 @@ INSIDE,
 
 enum JSONValueType
 {
-JSON_ANY,
-JSON_OBJECT,
+JSON_NULL,
+JSON_BOOL,
+JSON_NUMBER,
+JSON_STRING,
 JSON_ARRAY,
+JSON_OBJECT,
 };
 
 enum LayoutMode

+ 63 - 98
Docs/LuaScriptAPI.dox

@@ -2774,8 +2774,8 @@ Methods:
 - JSONFile() (GC)
 - JSONFile* new()
 - void delete()
-- JSONValue CreateRoot(JSONValueType valueType = JSON_OBJECT)
-- JSONValue GetRoot(JSONValueType valueType = JSON_ANY)
+- void SetRoot(const JSONValue& root)
+- const JSONValue& GetRoot() const
 - bool Save(const String fileName, const String indentation = "\t") const
 
 <a name="Class_JSONValue"></a>
@@ -2784,107 +2784,69 @@ Methods:
 
 Methods:
 
+- JSONValue() (GC)
+- JSONValue* new()
+- JSONValue(bool value) (GC)
+- JSONValue* new(bool value)
+- JSONValue(int value) (GC)
+- JSONValue* new(int value)
+- JSONValue(unsigned value) (GC)
+- JSONValue* new(unsigned value)
+- JSONValue(float value) (GC)
+- JSONValue* new(float value)
+- JSONValue(double value) (GC)
+- JSONValue* new(double value)
+- JSONValue(const String value) (GC)
+- JSONValue* new(const String value)
+- JSONValue(const char* value) (GC)
+- JSONValue* new(const char* value)
+- JSONValue(const JSONArray& value) (GC)
+- JSONValue* new(const JSONArray& value)
+- JSONValue(const JSONObject& value) (GC)
+- JSONValue* new(const JSONObject& value)
+- JSONValue(const JSONValue& value) (GC)
+- JSONValue* new(const JSONValue& value)
+- void delete()
+- void SetType(JSONValueType valueType)
+- JSONValueType GetType() const
 - bool IsNull() const
-- bool NotNull() const
-- bool operatorbool() const
-- JSONValue CreateChild(const String name, JSONValueType valueType = JSON_OBJECT)
-- JSONValue GetChild(const String name, JSONValueType valueType = JSON_ANY) const
-- void SetInt(const String name, int value)
-- void SetBool(const String name, bool value)
-- void SetFloat(const String name, float value)
-- void SetDouble(const String name, double value)
-- void SetVector2(const String name, const Vector2& value)
-- void SetVector3(const String name, const Vector3& value)
-- void SetVector4(const String name, const Vector4& value)
-- void SetVectorVariant(const String name, const Variant& value)
-- void SetQuaternion(const String name, const Quaternion& value)
-- void SetColor(const String name, const Color& value)
-- void SetString(const String name, const String value)
-- void SetResourceRef(const String name, const ResourceRef& value)
-- void SetResourceRefList(const String name, const ResourceRefList& value)
-- void SetIntRect(const String name, const IntRect& value)
-- void SetIntVector2(const String name, const IntVector2& value)
-- void SetMatrix3(const String name, const Matrix3& value)
-- void SetMatrix3x4(const String name, const Matrix3x4& value)
-- void SetMatrix4(const String name, const Matrix4& value)
-- void SetVariant(const String name, const Variant& value)
-- void SetVariantValue(const String name, const Variant& value)
-- bool IsObject() const
-- Vector<String> GetChildNames() const
-- Vector<String> GetValueNames() const
-- int GetInt(const String name) const
-- bool GetBool(const String name) const
-- float GetFloat(const String name) const
-- double GetDouble(const String name) const
-- Vector2 GetVector2(const String name) const
-- Vector3 GetVector3(const String name) const
-- Vector4 GetVector4(const String name) const
-- Variant GetVectorVariant(const String name) const
-- Quaternion GetQuaternion(const String name) const
-- Color GetColor(const String name) const
-- String GetString(const String name) const
-- const char* GetCString(const String name) const
-- ResourceRef GetResourceRef(const String name) const
-- ResourceRefList GetResourceRefList(const String name) const
-- IntRect GetIntRect(const String name) const
-- IntVector2 GetIntVector2(const String name) const
-- Matrix3 GetMatrix3(const String name) const
-- Matrix3x4 GetMatrix3x4(const String name) const
-- Matrix4 GetMatrix4(const String name) const
-- Variant GetVariant(const String name) const
-- Variant GetVariantValue(const String name, VariantType type) const
-- JSONValue CreateChild(JSONValueType valueType = JSON_OBJECT)
-- JSONValue GetChild(unsigned index, JSONValueType valueType = JSON_ANY) const
-- void AddInt(int value)
-- void AddBool(bool value)
-- void AddFloat(float value)
-- void AddDouble(double value)
-- void AddVector2(const Vector2& value)
-- void AddVector3(const Vector3& value)
-- void AddVector4(const Vector4& value)
-- void AddVectorVariant(const Variant& value)
-- void AddQuaternion(const Quaternion& value)
-- void AddColor(const Color& value)
-- void AddString(const String value)
-- void AddResourceRef(const ResourceRef& value)
-- void AddResourceRefList(const ResourceRefList& value)
-- void AddIntRect(const IntRect& value)
-- void AddIntVector2(const IntVector2& value)
-- void AddMatrix3(const Matrix3& value)
-- void AddMatrix3x4(const Matrix3x4& value)
-- void AddMatrix4(const Matrix4& value)
-- void AddVariant(const Variant& value)
-- void AddVariantValue(const Variant& value)
+- bool IsBool() const
+- bool IsNumber() const
+- bool IsString() const
 - bool IsArray() const
-- unsigned GetSize() const
-- int GetInt(unsigned index) const
-- bool GetBool(unsigned index) const
-- float GetFloat(unsigned index) const
-- double GetDouble(unsigned index) const
-- Vector2 GetVector2(unsigned index) const
-- Vector3 GetVector3(unsigned index) const
-- Vector4 GetVector4(unsigned index) const
-- Variant GetVectorVariant(unsigned index) const
-- Quaternion GetQuaternion(unsigned index) const
-- Color GetColor(unsigned index) const
-- String GetString(unsigned index) const
-- const char* GetCString(unsigned index) const
-- ResourceRef GetResourceRef(unsigned index) const
-- ResourceRefList GetResourceRefList(unsigned index) const
-- IntRect GetIntRect(unsigned index) const
-- IntVector2 GetIntVector2(unsigned index) const
-- Matrix3 GetMatrix3(unsigned index) const
-- Matrix3x4 GetMatrix3x4(unsigned index) const
-- Matrix4 GetMatrix4(unsigned index) const
-- Variant GetVariant(unsigned index) const
-- Variant GetVariantValue(unsigned index, VariantType type) const
+- bool IsObject() const
+- bool GetBool() const
+- int GetInt() const
+- unsigned GetUint() const
+- float GetFloat() const
+- double GetDouble() const
+- const String GetString() const
+- const char* GetCString() const
+- const JSONArray& GetArray() const
+- const JSONObject& GetObject() const
+- JSONValue operator&[](unsigned index, JSONValue tolua_value)
+- JSONValue operator[](unsigned index)
+- const JSONValue operator[](unsigned index) const
+- JSONValue& At(unsigned index)
+- const JSONValue& At(unsigned index) const
+- void Push(const JSONValue& value)
+- void Pop()
+- void Insert(unsigned pos, const JSONValue& value)
+- void Erase(unsigned pos, unsigned length = 1)
+- void Resize(unsigned newSize)
+- unsigned Size() const
+- void Set(const String key, const JSONValue& value)
+- const JSONValue& Get(const String key) const
+- bool Erase(const String key)
+- bool Contains(const String key) const
+- void Clear()
 
 Properties:
 
 - const JSONValue EMPTY
+- const JSONArray emptyArray
+- const JSONObject emptyObject
 - bool null (readonly)
-- bool object (readonly)
-- bool array (readonly)
 
 <a name="Class_JoystickState"></a>
 ### JoystickState
@@ -7423,9 +7385,12 @@ Properties:
 
 ### JSONValueType
 
-- int JSON_ANY
-- int JSON_OBJECT
+- int JSON_NULL
+- int JSON_BOOL
+- int JSON_NUMBER
+- int JSON_STRING
 - int JSON_ARRAY
+- int JSON_OBJECT
 
 ### LayoutMode
 

+ 30 - 94
Docs/ScriptAPI.dox

@@ -6771,14 +6771,14 @@ Properties:
 
 Methods:
 
-- JSONValue CreateRoot(JSONValueType = JSON_ANY)
-- JSONValue GetRoot(JSONValueType = JSON_ANY)
+- const JSONValue& GetRoot()
 - bool Load(File@)
 - bool Load(VectorBuffer&)
 - bool Save(File@) const
 - bool Save(File@, const String&) const
 - bool Save(VectorBuffer&) const
 - void SendEvent(const String&, VariantMap& = VariantMap ( ))
+- void SetRoot(const JSONValue&)
 
 Properties:
 
@@ -6798,100 +6798,33 @@ Properties:
 
 Methods:
 
-- void AddBool(bool)
-- void AddColor(const Color&)
-- void AddDouble(double)
-- void AddFloat(float)
-- void AddInt(int)
-- void AddIntRect(const IntRect&)
-- void AddIntVector2(const IntVector2&)
-- void AddMatrix3(const Matrix3&)
-- void AddMatrix3x4(const Matrix3x4&)
-- void AddMatrix4(const Matrix4&)
-- void AddQuaternion(const Quaternion&)
-- void AddResourceRef(const ResourceRef&)
-- void AddResourceRefList(const ResourceRefList&)
-- void AddString(const String)
-- void AddVariant(const Variant&)
-- void AddVariantValue(const Variant&)
-- void AddVector2(const Vector2&)
-- void AddVector3(const Vector3&)
-- void AddVector4(const Vector4&)
-- void AddVectorVariant(const Variant&)
-- JSONValue CreateChild(JSONValueType = JSON_OBJECT)
-- JSONValue CreateChild(const String&, JSONValueType = JSON_OBJECT)
-- bool GetBool(const String&) const
-- bool GetBool(uint) const
-- JSONValue GetChild(const String&, JSONValueType = JSON_ANY) const
-- JSONValue GetChild(uint, JSONValueType = JSON_ANY) const
-- String[]@ GetChildNames() const
-- Color GetColor(const String&) const
-- Color GetColor(uint) const
-- double GetDouble(const String&) const
-- double GetDouble(uint) const
-- float GetFloat(const String&) const
-- float GetFloat(uint) const
-- int GetInt(const String&) const
-- int GetInt(uint) const
-- IntRect GetIntRect(const String&) const
-- IntRect GetIntRect(uint) const
-- IntVector2 GetIntVector2(const String&) const
-- IntVector2 GetIntVector2(uint) const
-- Matrix3 GetMatrix3(const String&) const
-- Matrix3 GetMatrix3(uint) const
-- Matrix3x4 GetMatrix3x4(const String&) const
-- Matrix3x4 GetMatrix3x4(uint) const
-- Matrix4 GetMatrix4(const String&) const
-- Matrix4 GetMatrix4(uint) const
-- Quaternion GetQuaternion(const String&) const
-- Quaternion GetQuaternion(uint) const
-- ResourceRef GetResourceRef(const String&) const
-- ResourceRef GetResourceRef(uint) const
-- ResourceRefList GetResourceRefList(const String&) const
-- ResourceRefList GetResourceRefList(uint) const
-- String GetString(const String&) const
-- String GetString(uint) const
-- String[]@ GetValueNames() const
-- Variant GetVariant(const String&) const
-- Variant GetVariant(uint) const
-- Variant GetVariantValue(const String&, VariantType) const
-- Variant GetVariantValue(uint, VariantType) const
-- Vector2 GetVector2(const String&) const
-- Vector2 GetVector2(uint) const
-- Vector3 GetVector3(const String&) const
-- Vector3 GetVector3(uint) const
-- Vector4 GetVector4(const String&) const
-- Vector4 GetVector4(uint) const
-- Variant GetVectorVariant(const String&) const
-- Variant GetVectorVariant(uint) const
-- void SetBool(const String&, bool)
-- void SetColor(const String&, const Color&)
-- void SetDouble(const String&, double)
-- void SetFloat(const String&, float)
-- void SetInt(const String&, int)
-- void SetIntRect(const String&, const IntRect&)
-- void SetIntVector2(const String&, const IntVector2&)
-- void SetMatrix3(const String&, const Matrix3&)
-- void SetMatrix3x4(const String&, const Matrix3x4&)
-- void SetMatrix4(const String&, const Matrix4&)
-- void SetQuaternion(const String&, const Quaternion&)
-- void SetResourceRef(const String&, const ResourceRef&)
-- void SetResourceRefList(const String&, const ResourceRefList&)
-- void SetString(const String&, const String)
-- void SetVariant(const String&, const Variant&)
-- void SetVariantValue(const String&, const Variant&)
-- void SetVector2(const String&, const Vector2&)
-- void SetVector3(const String&, const Vector3&)
-- void SetVector4(const String&, const Vector4&)
-- void SetVectorVariant(const String&, const Variant&)
+- void Clear()
+- bool Contains(const String&) const
+- void Erase(const String&)
+- void Erase(uint, uint = 1)
+- bool GetBool() const
+- double GetDouble() const
+- float GetFloat() const
+- int GetInt() const
+- uint GetUint() const
+- void Insert(uint, const JSONValue&)
+- const JSONValue& Get(const String&) const
+- void Pop()
+- void Push(const JSONValue&)
+- void Resize(uint)
+- void Set(const String&, const JSONValue&)
+- const String& GetString() const
 
 Properties:
 
 - bool isArray // readonly
+- bool isBool // readonly
 - bool isNull // readonly
+- bool isNumber // readonly
 - bool isObject // readonly
-- bool notNull // readonly
+- bool isString // readonly
 - uint size // readonly
+- JSONValueType type // readonly
 
 <a name="Class_JoystickState"></a>
 
@@ -8797,8 +8730,8 @@ Methods:
 - bool Load(VectorBuffer&, bool = false)
 - bool LoadXML(const XMLElement&, bool = false)
 - void MarkNetworkUpdate() const
-- PhysicsRaycastResult[]@ Raycast(const Ray&, float = M_INFINITY, uint = 0xffff)
-- PhysicsRaycastResult RaycastSingle(const Ray&, float = M_INFINITY, uint = 0xffff)
+- PhysicsRaycastResult[]@ Raycast(const Ray&, float, uint = 0xffff)
+- PhysicsRaycastResult RaycastSingle(const Ray&, float, uint = 0xffff)
 - void Remove()
 - void RemoveCachedGeometry(Model@)
 - void RemoveInstanceDefault()
@@ -8812,7 +8745,7 @@ Methods:
 - void SetAttributeAnimationSpeed(const String&, float)
 - void SetAttributeAnimationWrapMode(const String&, WrapMode)
 - void SetInterceptNetworkUpdate(const String&, bool)
-- PhysicsRaycastResult SphereCast(const Ray&, float, float = M_INFINITY, uint = 0xffff)
+- PhysicsRaycastResult SphereCast(const Ray&, float, float, uint = 0xffff)
 - void Update(float)
 - void UpdateCollisions()
 
@@ -13656,9 +13589,12 @@ Properties:
 
 ### JSONValueType
 
-- JSON_ANY
-- JSON_OBJECT
+- JSON_NULL
+- JSON_BOOL
+- JSON_NUMBER
+- JSON_STRING
 - JSON_ARRAY
+- JSON_OBJECT
 
 
 ### LayoutMode

+ 1 - 1
Source/Urho3D/.soversion

@@ -1 +1 @@
-0.0.135
+0.0.136

+ 0 - 1
Source/Urho3D/Resource/JSONFile.cpp

@@ -136,7 +136,6 @@ bool JSONFile::BeginLoad(Deserializer& source)
         return false;
     }
 
-    document.GetAllocator();    
     ToJSONValue(root_, document);
 
     SetMemoryUse(dataSize);

+ 2 - 2
Source/Urho3D/Resource/JSONValue.h

@@ -200,7 +200,7 @@ public:
     void Erase(unsigned pos, unsigned length = 1);
     /// Resize array.
     void Resize(unsigned newSize);
-    /// Return size of array .
+    /// Return size of array.
     unsigned Size() const;
 
     // JSON object functions
@@ -227,7 +227,7 @@ public:
 
     /// Clear array or object.
     void Clear();
-
+    
     /// Empty JSON value.
     static const JSONValue EMPTY;
     /// Empty JSON array.

+ 3 - 3
Source/Urho3D/Script/PhysicsAPI.cpp

@@ -294,9 +294,9 @@ static void RegisterPhysicsWorld(asIScriptEngine* engine)
     RegisterComponent<PhysicsWorld>(engine, "PhysicsWorld");
     engine->RegisterObjectMethod("PhysicsWorld", "void Update(float)", asMETHOD(PhysicsWorld, Update), asCALL_THISCALL);
     engine->RegisterObjectMethod("PhysicsWorld", "void UpdateCollisions()", asMETHOD(PhysicsWorld, UpdateCollisions), asCALL_THISCALL);
-    engine->RegisterObjectMethod("PhysicsWorld", "Array<PhysicsRaycastResult>@ Raycast(const Ray&in, float maxDistance = M_INFINITY, uint collisionMask = 0xffff)", asFUNCTION(PhysicsWorldRaycast), asCALL_CDECL_OBJLAST);
-    engine->RegisterObjectMethod("PhysicsWorld", "PhysicsRaycastResult RaycastSingle(const Ray&in, float maxDistance = M_INFINITY, uint collisionMask = 0xffff)", asFUNCTION(PhysicsWorldRaycastSingle), asCALL_CDECL_OBJLAST);
-    engine->RegisterObjectMethod("PhysicsWorld", "PhysicsRaycastResult SphereCast(const Ray&in, float, float maxDistance = M_INFINITY, uint collisionMask = 0xffff)", asFUNCTION(PhysicsWorldSphereCast), asCALL_CDECL_OBJLAST);
+    engine->RegisterObjectMethod("PhysicsWorld", "Array<PhysicsRaycastResult>@ Raycast(const Ray&in, float, uint collisionMask = 0xffff)", asFUNCTION(PhysicsWorldRaycast), asCALL_CDECL_OBJLAST);
+    engine->RegisterObjectMethod("PhysicsWorld", "PhysicsRaycastResult RaycastSingle(const Ray&in, float, uint collisionMask = 0xffff)", asFUNCTION(PhysicsWorldRaycastSingle), asCALL_CDECL_OBJLAST);
+    engine->RegisterObjectMethod("PhysicsWorld", "PhysicsRaycastResult SphereCast(const Ray&in, float, float, uint collisionMask = 0xffff)", asFUNCTION(PhysicsWorldSphereCast), asCALL_CDECL_OBJLAST);
     // There seems to be a bug in AngelScript resulting in a crash if we use an auto handle with this function.
     // Work around by manually releasing the CollisionShape handle
     engine->RegisterObjectMethod("PhysicsWorld", "PhysicsRaycastResult ConvexCast(CollisionShape@, const Vector3&in, const Quaternion&in, const Vector3&in, const Quaternion&in, uint collisionMask = 0xffff)", asFUNCTION(PhysicsWorldConvexCast), asCALL_CDECL_OBJLAST);