Pārlūkot izejas kodu

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

aster 11 gadi atpakaļ
vecāks
revīzija
0bea9e68cc
4 mainītis faili ar 613 papildinājumiem un 4 dzēšanām
  1. 264 1
      Docs/AngelScriptAPI.h
  2. 128 1
      Docs/LuaScriptAPI.dox
  3. 220 1
      Docs/ScriptAPI.dox
  4. 1 1
      Source/Engine/.soversion

+ 264 - 1
Docs/AngelScriptAPI.h

@@ -6629,7 +6629,7 @@ WrapMode GetAttributeAnimationWrapMode(const String&) const;
 Variant GetAttributeDefault(const String&) const;
 Array<RigidBody2D> GetRigidBodies(const Rect&, uint = 0xffff);
 RigidBody2D GetRigidBody(const Vector2&, uint = 0xffff);
-RigidBody2D GetRigidBody(int, int, uint = 0xffff, Camera = 0);
+RigidBody2D GetRigidBody(int, int, uint = 0xffff);
 bool Load(File, bool = false);
 bool Load(VectorBuffer&, bool = false);
 bool LoadXML(const XMLElement&, bool = false);
@@ -6741,6 +6741,19 @@ Array<Array<Vector3>> face;
 uint numFaces;
 };
 
+class PropertySet2D
+{
+// Methods:
+bool HasProperty(const String&) const;
+const String& GetProperty(const String&) const;
+
+// Properties:
+/* readonly */
+int refs;
+/* readonly */
+int weakRefs;
+};
+
 class Quaternion
 {
 // Methods:
@@ -10058,6 +10071,200 @@ float time;
 Rect uv;
 };
 
+class Tile2D
+{
+// Methods:
+bool HasProperty(const String&) const;
+const String& GetProperty(const String&) const;
+
+// Properties:
+/* readonly */
+int gid;
+/* readonly */
+int refs;
+/* readonly */
+Sprite2D sprite;
+/* readonly */
+int weakRefs;
+};
+
+class TileMap2D
+{
+// Methods:
+void ApplyAttributes();
+void DrawDebugGeometry(DebugRenderer, bool);
+Variant GetAttribute(const String&) const;
+ValueAnimation GetAttributeAnimation(const String&) const;
+float GetAttributeAnimationSpeed(const String&) const;
+WrapMode GetAttributeAnimationWrapMode(const String&) const;
+Variant GetAttributeDefault(const String&) const;
+TileMapLayer2D GetLayer(uint) const;
+bool Load(File, bool = false);
+bool Load(VectorBuffer&, bool = false);
+bool LoadXML(const XMLElement&, bool = false);
+void MarkNetworkUpdate() const;
+void Remove();
+void RemoveInstanceDefault();
+void ResetToDefault();
+bool Save(File) const;
+bool Save(VectorBuffer&) const;
+bool SaveXML(XMLElement&) const;
+void SendEvent(const String&, VariantMap& = VariantMap ( ));
+bool SetAttribute(const String&, const Variant&);
+void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
+void SetAttributeAnimationSpeed(const String&, float);
+void SetAttributeAnimationWrapMode(const String&, WrapMode);
+
+// Properties:
+bool animationEnabled;
+/* readonly */
+Array<Variant> attributeDefaults;
+/* readonly */
+Array<AttributeInfo> attributeInfos;
+Array<Variant> attributes;
+/* readonly */
+StringHash baseType;
+/* readonly */
+String category;
+bool enabled;
+/* readonly */
+bool enabledEffective;
+/* readonly */
+int height;
+/* readonly */
+uint id;
+/* readonly */
+Node node;
+/* readonly */
+uint numAttributes;
+/* readonly */
+uint numLayers;
+ObjectAnimation objectAnimation;
+/* readonly */
+Orientation2D orientation;
+/* readonly */
+int refs;
+bool temporary;
+/* readonly */
+float tileHeight;
+/* readonly */
+float tileWidth;
+TmxFile2D tmxFile;
+/* readonly */
+StringHash type;
+/* readonly */
+String typeName;
+/* readonly */
+int weakRefs;
+/* readonly */
+int width;
+};
+
+class TileMapLayer2D
+{
+// Methods:
+void ApplyAttributes();
+void DrawDebugGeometry(DebugRenderer, bool);
+Variant GetAttribute(const String&) const;
+ValueAnimation GetAttributeAnimation(const String&) const;
+float GetAttributeAnimationSpeed(const String&) const;
+WrapMode GetAttributeAnimationWrapMode(const String&) const;
+Variant GetAttributeDefault(const String&) const;
+TileObject2D GetObject(uint) const;
+Node GetObjectNode(uint) const;
+Tile2D GetTile(int, int) const;
+Node GetTileNode(int, int) const;
+bool HasProperty(const String&) const;
+bool Load(File, bool = false);
+bool Load(VectorBuffer&, bool = false);
+bool LoadXML(const XMLElement&, bool = false);
+void MarkNetworkUpdate() const;
+void Remove();
+void RemoveInstanceDefault();
+void ResetToDefault();
+bool Save(File) const;
+bool Save(VectorBuffer&) const;
+bool SaveXML(XMLElement&) const;
+void SendEvent(const String&, VariantMap& = VariantMap ( ));
+bool SetAttribute(const String&, const Variant&);
+void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
+void SetAttributeAnimationSpeed(const String&, float);
+void SetAttributeAnimationWrapMode(const String&, WrapMode);
+const String& GetProperty(const String&) const;
+
+// Properties:
+bool animationEnabled;
+/* readonly */
+Array<Variant> attributeDefaults;
+/* readonly */
+Array<AttributeInfo> attributeInfos;
+Array<Variant> attributes;
+/* readonly */
+StringHash baseType;
+/* readonly */
+String category;
+/* writeonly */
+int drawOrder;
+bool enabled;
+/* readonly */
+bool enabledEffective;
+/* readonly */
+int height;
+/* readonly */
+uint id;
+/* readonly */
+Node imageNode;
+/* readonly */
+TileMapLayerType2D layerType;
+/* readonly */
+Node node;
+/* readonly */
+uint numAttributes;
+/* readonly */
+uint numObjects;
+ObjectAnimation objectAnimation;
+/* readonly */
+int refs;
+/* readonly */
+int rrawOrder;
+bool temporary;
+/* readonly */
+StringHash type;
+/* readonly */
+String typeName;
+bool visible;
+/* readonly */
+int weakRefs;
+/* readonly */
+int width;
+};
+
+class TileObject2D
+{
+// Methods:
+bool HasProperty(const String&) const;
+const String& GetProperty(const String&) const;
+const Vector2& GetPoint(uint) const;
+
+// Properties:
+/* readonly */
+uint numPoints;
+/* readonly */
+Vector2 position;
+/* readonly */
+int refs;
+/* readonly */
+Vector2 size;
+/* readonly */
+int tileGid;
+/* readonly */
+Sprite2D tileSprite;
+/* readonly */
+TileObjectType2D type;
+/* readonly */
+int weakRefs;
+};
+
 class Time
 {
 // Methods:
@@ -10095,6 +10302,35 @@ uint GetMSec(bool);
 void Reset();
 };
 
+class TmxFile2D
+{
+// Methods:
+bool Load(File);
+bool Load(VectorBuffer&);
+bool Save(File) const;
+bool Save(VectorBuffer&) const;
+void SendEvent(const String&, VariantMap& = VariantMap ( ));
+
+// Properties:
+/* readonly */
+StringHash baseType;
+/* readonly */
+String category;
+/* readonly */
+uint memoryUse;
+String name;
+/* readonly */
+int refs;
+/* readonly */
+StringHash type;
+/* readonly */
+String typeName;
+/* readonly */
+uint useTimer;
+/* readonly */
+int weakRefs;
+};
+
 class ToolTip
 {
 // Methods:
@@ -10924,8 +11160,11 @@ int width;
 class Viewport
 {
 // Methods:
+Ray GetScreenRay(int, int) const;
+Vector3 ScreenToWorldPoint(int, int, float) const;
 void SendEvent(const String&, VariantMap& = VariantMap ( ));
 void SetRenderPath(XMLFile);
+Vector2 WorldToScreenPoint(const Vector3&) const;
 
 // Properties:
 /* readonly */
@@ -11594,6 +11833,12 @@ O_HORIZONTAL,
 O_VERTICAL,
 };
 
+enum Orientation2D
+{
+O_ORTHOGONAL,
+O_ISOMETRIC,
+};
+
 enum PassLightingMode
 {
 LIGHTING_UNLIT,
@@ -11731,6 +11976,24 @@ TEXTURE_RENDERTARGET,
 TEXTURE_DEPTHSTENCIL,
 };
 
+enum TileMapLayerType2D
+{
+LT_TILE_LAYER,
+LT_OBJECT_GROUP,
+LT_IMAGE_LAYER,
+LT_INVALID,
+};
+
+enum TileObjectType2D
+{
+OT_RECTANGLE,
+OT_ELLIPSE,
+OT_POLYGON,
+OT_POLYLINE,
+OT_TILE,
+OT_INVALID,
+};
+
 enum TransformSpace
 {
 TS_LOCAL,

+ 128 - 1
Docs/LuaScriptAPI.dox

@@ -3544,7 +3544,7 @@ Methods:
 - const PODVector<PhysicsRaycastResult2D>& Raycast(const Vector2& startPoint, const Vector2& endPoint, unsigned collisionMask = M_MAX_UNSIGNED)
 - PhysicsRaycastResult2D RaycastSingle(const Vector2& startPoint, const Vector2& endPoint, unsigned collisionMask = M_MAX_UNSIGNED)
 - RigidBody2D* GetRigidBody(const Vector2& point, unsigned collisionMask = M_MAX_UNSIGNED)
-- RigidBody2D* GetRigidBody(int screenX, int screenY, unsigned collisionMask = M_MAX_UNSIGNED, Camera* camera = 0)
+- RigidBody2D* GetRigidBody(int screenX, int screenY, unsigned collisionMask = M_MAX_UNSIGNED)
 - const PODVector<RigidBody2D*>& GetRigidBodies(const Rect& aabb, unsigned collisionMask = M_MAX_UNSIGNED)
 - bool GetDrawShape() const
 - bool GetDrawJoint() const
@@ -3646,6 +3646,14 @@ Properties:
 
 - bool empty (readonly)
 
+### PropertySet2D
+
+
+Methods:
+
+- bool HasProperty(const String name) const
+- const String GetProperty(const String name) const
+
 ### Quaternion
 
 
@@ -5144,6 +5152,99 @@ Properties:
 - Rect uv
 - float time
 
+### Tile2D
+
+
+Methods:
+
+- int GetGid() const
+- Sprite2D* GetSprite() const
+- bool HasProperty(const String name) const
+- const String GetProperty(const String name) const
+
+Properties:
+
+- int gid (readonly)
+- Sprite2D* sprite (readonly)
+
+### TileMap2D : Component
+
+Methods:
+
+- void SetTmxFile(TmxFile2D* tmxFile)
+- TmxFile2D* GetTmxFile() const
+- Orientation2D GetOrientation() const
+- int GetWidth() const
+- int GetHeight() const
+- float GetTileWidth() const
+- float GetTileHeight() const
+- unsigned GetNumLayers() const
+- TileMapLayer2D* GetLayer(unsigned index) const
+
+Properties:
+
+- TmxFile2D* tmxFile
+- Orientation2D orientation (readonly)
+- int width (readonly)
+- int height (readonly)
+- float tileWidth (readonly)
+- float tileHeight (readonly)
+- unsigned numLayers (readonly)
+
+### TileMapLayer2D : Component
+
+Methods:
+
+- void SetDrawOrder(int drawOrder)
+- void SetVisible(bool visible)
+- int GetDrawOrder() const
+- bool IsVisible() const
+- bool HasProperty(const String name) const
+- const String GetProperty(const String name) const
+- TileMapLayerType2D GetLayerType() const
+- int GetWidth() const
+- int GetHeight() const
+- Node* GetTileNode(int x, int y) const
+- Tile2D* GetTile(int x, int y) const
+- unsigned GetNumObjects() const
+- TileObject2D* GetObject(unsigned index) const
+- Node* GetObjectNode(unsigned index) const
+- Node* GetImageNode() const
+
+Properties:
+
+- int drawOrder (readonly)
+- bool visible (readonly)
+- TileMapLayerType2D layerType (readonly)
+- int width (readonly)
+- int height (readonly)
+- unsigned numObjects (readonly)
+- Node* imageNode (readonly)
+
+### TileObject2D
+
+
+Methods:
+
+- TileObjectType2D GetType() const
+- const Vector2& GetPosition() const
+- const Vector2& GetSize() const
+- unsigned GetNumPoints() const
+- const Vector2& GetPoint(unsigned index) const
+- int GetTileGid() const
+- Sprite2D* GetTileSprite() const
+- bool HasProperty(const String name) const
+- const String GetProperty(const String name) const
+
+Properties:
+
+- TileObjectType2D type (readonly)
+- Vector2 position (readonly)
+- Vector2 size (readonly)
+- unsigned numPoints (readonly)
+- int tileGid (readonly)
+- Sprite2D* tileSprite (readonly)
+
 ### Time : Object
 
 Methods:
@@ -5163,6 +5264,8 @@ Properties:
 - unsigned timerPeriod (readonly)
 - float elapsedTime (readonly)
 
+### TmxFile2D : Resource
+
 ### ToolTip : UIElement
 
 Methods:
@@ -5950,6 +6053,9 @@ Methods:
 - Camera* GetCamera() const
 - const IntRect& GetRect() const
 - RenderPath* GetRenderPath() const
+- Ray GetScreenRay(int x, int y) const
+- IntVector2 WorldToScreenPoint(const Vector3& worldPos) const
+- Vector3 ScreenToWorldPoint(int x, int y, float depth) const
 
 Properties:
 
@@ -6373,6 +6479,11 @@ Properties:
 - int O_HORIZONTAL
 - int O_VERTICAL
 
+### Orientation2D
+
+- int O_ORTHOGONAL
+- int O_ISOMETRIC
+
 ### PassLightingMode
 
 - int LIGHTING_UNLIT
@@ -6504,6 +6615,22 @@ Properties:
 - int TEXTURE_RENDERTARGET
 - int TEXTURE_DEPTHSTENCIL
 
+### TileMapLayerType2D
+
+- int LT_TILE_LAYER
+- int LT_OBJECT_GROUP
+- int LT_IMAGE_LAYER
+- int LT_INVALID
+
+### TileObjectType2D
+
+- int OT_RECTANGLE
+- int OT_ELLIPSE
+- int OT_POLYGON
+- int OT_POLYLINE
+- int OT_TILE
+- int OT_INVALID
+
 ### TransformSpace
 
 - int TS_LOCAL

+ 220 - 1
Docs/ScriptAPI.dox

@@ -1772,6 +1772,9 @@ namespace Urho3D
 - %Effect %Color : Color
 - %Effect %Depth %Bias : float
 
+### TileMap2D
+- %Tmx %File : ResourceRef
+
 ### ToolTip
 - %Name : String
 - %Position : IntVector2
@@ -7567,7 +7570,7 @@ Methods:
 - Variant GetAttributeDefault(const String&) const
 - RigidBody2D@[]@ GetRigidBodies(const Rect&, uint = 0xffff)
 - RigidBody2D@ GetRigidBody(const Vector2&, uint = 0xffff)
-- RigidBody2D@ GetRigidBody(int, int, uint = 0xffff, Camera@ = 0)
+- RigidBody2D@ GetRigidBody(int, int, uint = 0xffff)
 - bool Load(File@, bool = false)
 - bool Load(VectorBuffer&, bool = false)
 - bool LoadXML(const XMLElement&, bool = false)
@@ -7669,6 +7672,19 @@ Properties:
 - uint numFaces // readonly
 
 
+### PropertySet2D
+
+Methods:
+
+- bool HasProperty(const String&) const
+- const String& GetProperty(const String&) const
+
+Properties:
+
+- int refs // readonly
+- int weakRefs // readonly
+
+
 ### Quaternion
 
 Methods:
@@ -10477,6 +10493,159 @@ Properties:
 - Rect uv
 
 
+### Tile2D
+
+Methods:
+
+- bool HasProperty(const String&) const
+- const String& GetProperty(const String&) const
+
+Properties:
+
+- int gid // readonly
+- int refs // readonly
+- Sprite2D@ sprite // readonly
+- int weakRefs // readonly
+
+
+### TileMap2D
+
+Methods:
+
+- void ApplyAttributes()
+- void DrawDebugGeometry(DebugRenderer@, bool)
+- Variant GetAttribute(const String&) const
+- ValueAnimation@ GetAttributeAnimation(const String&) const
+- float GetAttributeAnimationSpeed(const String&) const
+- WrapMode GetAttributeAnimationWrapMode(const String&) const
+- Variant GetAttributeDefault(const String&) const
+- TileMapLayer2D@ GetLayer(uint) const
+- bool Load(File@, bool = false)
+- bool Load(VectorBuffer&, bool = false)
+- bool LoadXML(const XMLElement&, bool = false)
+- void MarkNetworkUpdate() const
+- void Remove()
+- void RemoveInstanceDefault()
+- void ResetToDefault()
+- bool Save(File@) const
+- bool Save(VectorBuffer&) const
+- bool SaveXML(XMLElement&) const
+- void SendEvent(const String&, VariantMap& = VariantMap ( ))
+- bool SetAttribute(const String&, const Variant&)
+- void SetAttributeAnimation(const String&, ValueAnimation@, WrapMode = WM_LOOP, float = 1.0f)
+- void SetAttributeAnimationSpeed(const String&, float)
+- void SetAttributeAnimationWrapMode(const String&, WrapMode)
+
+Properties:
+
+- bool animationEnabled
+- Variant[] attributeDefaults // readonly
+- AttributeInfo[] attributeInfos // readonly
+- Variant[] attributes
+- StringHash baseType // readonly
+- String category // readonly
+- bool enabled
+- bool enabledEffective // readonly
+- int height // readonly
+- uint id // readonly
+- Node@ node // readonly
+- uint numAttributes // readonly
+- uint numLayers // readonly
+- ObjectAnimation@ objectAnimation
+- Orientation2D orientation // readonly
+- int refs // readonly
+- bool temporary
+- float tileHeight // readonly
+- float tileWidth // readonly
+- TmxFile2D@ tmxFile
+- StringHash type // readonly
+- String typeName // readonly
+- int weakRefs // readonly
+- int width // readonly
+
+
+### TileMapLayer2D
+
+Methods:
+
+- void ApplyAttributes()
+- void DrawDebugGeometry(DebugRenderer@, bool)
+- Variant GetAttribute(const String&) const
+- ValueAnimation@ GetAttributeAnimation(const String&) const
+- float GetAttributeAnimationSpeed(const String&) const
+- WrapMode GetAttributeAnimationWrapMode(const String&) const
+- Variant GetAttributeDefault(const String&) const
+- TileObject2D@ GetObject(uint) const
+- Node@ GetObjectNode(uint) const
+- Tile2D@ GetTile(int, int) const
+- Node@ GetTileNode(int, int) const
+- bool HasProperty(const String&) const
+- bool Load(File@, bool = false)
+- bool Load(VectorBuffer&, bool = false)
+- bool LoadXML(const XMLElement&, bool = false)
+- void MarkNetworkUpdate() const
+- void Remove()
+- void RemoveInstanceDefault()
+- void ResetToDefault()
+- bool Save(File@) const
+- bool Save(VectorBuffer&) const
+- bool SaveXML(XMLElement&) const
+- void SendEvent(const String&, VariantMap& = VariantMap ( ))
+- bool SetAttribute(const String&, const Variant&)
+- void SetAttributeAnimation(const String&, ValueAnimation@, WrapMode = WM_LOOP, float = 1.0f)
+- void SetAttributeAnimationSpeed(const String&, float)
+- void SetAttributeAnimationWrapMode(const String&, WrapMode)
+- const String& GetProperty(const String&) const
+
+Properties:
+
+- bool animationEnabled
+- Variant[] attributeDefaults // readonly
+- AttributeInfo[] attributeInfos // readonly
+- Variant[] attributes
+- StringHash baseType // readonly
+- String category // readonly
+- int drawOrder // writeonly
+- bool enabled
+- bool enabledEffective // readonly
+- int height // readonly
+- uint id // readonly
+- Node@ imageNode // readonly
+- TileMapLayerType2D layerType // readonly
+- Node@ node // readonly
+- uint numAttributes // readonly
+- uint numObjects // readonly
+- ObjectAnimation@ objectAnimation
+- int refs // readonly
+- int rrawOrder // readonly
+- bool temporary
+- StringHash type // readonly
+- String typeName // readonly
+- bool visible
+- int weakRefs // readonly
+- int width // readonly
+
+
+### TileObject2D
+
+Methods:
+
+- bool HasProperty(const String&) const
+- const String& GetProperty(const String&) const
+- const Vector2& GetPoint(uint) const
+
+Properties:
+
+- uint numPoints // readonly
+- Vector2 position // readonly
+- int refs // readonly
+- Vector2 size // readonly
+- int tileGid // readonly
+- Sprite2D@ tileSprite // readonly
+- TileObjectType2D type // readonly
+- int weakRefs // readonly
+
+
 ### Time
 
 Methods:
@@ -10506,6 +10675,29 @@ Methods:
 - void Reset()
 
 
+### TmxFile2D
+
+Methods:
+
+- bool Load(File@)
+- bool Load(VectorBuffer&)
+- bool Save(File@) const
+- bool Save(VectorBuffer&) const
+- void SendEvent(const String&, VariantMap& = VariantMap ( ))
+
+Properties:
+
+- StringHash baseType // readonly
+- String category // readonly
+- uint memoryUse // readonly
+- String name
+- int refs // readonly
+- StringHash type // readonly
+- String typeName // readonly
+- uint useTimer // readonly
+- int weakRefs // readonly
+
+
 ### ToolTip
 
 Methods:
@@ -11240,8 +11432,11 @@ Properties:
 
 Methods:
 
+- Ray GetScreenRay(int, int) const
+- Vector3 ScreenToWorldPoint(int, int, float) const
 - void SendEvent(const String&, VariantMap& = VariantMap ( ))
 - void SetRenderPath(XMLFile@)
+- Vector2 WorldToScreenPoint(const Vector3&) const
 
 Properties:
 
@@ -11852,6 +12047,12 @@ Properties:
 - O_VERTICAL
 
 
+### Orientation2D
+
+- O_ORTHOGONAL
+- O_ISOMETRIC
+
+
 ### PassLightingMode
 
 - LIGHTING_UNLIT
@@ -11989,6 +12190,24 @@ Properties:
 - TEXTURE_DEPTHSTENCIL
 
 
+### TileMapLayerType2D
+
+- LT_TILE_LAYER
+- LT_OBJECT_GROUP
+- LT_IMAGE_LAYER
+- LT_INVALID
+
+
+### TileObjectType2D
+
+- OT_RECTANGLE
+- OT_ELLIPSE
+- OT_POLYGON
+- OT_POLYLINE
+- OT_TILE
+- OT_INVALID
+
+
 ### TransformSpace
 
 - TS_LOCAL

+ 1 - 1
Source/Engine/.soversion

@@ -1 +1 @@
-0.0.3
+0.0.4