Browse Source

Travis CI: API documentation update at 2015-09-11 13:17:42 UTC.
[ci package]

Commit: https://github.com/urho3d/Urho3D/commit/7356bdecfbe3ea15822c7f4a3e073eacc6b75776

Message: Add API to Animation / AnimationTrack to create tracks and keyframes and expose it to script. Change AnimationTracks to be stored in a HashMap so that removal and creation is safe without invalidating pointers. Changed the AnimationTriggerPoint API to resemble the AnimationTrack API, and change it to be handled as a value type in AngelScript API. Closes #878.

urho3d-travis-ci 10 years ago
parent
commit
e08883122c
4 changed files with 132 additions and 13 deletions
  1. 35 2
      Docs/AngelScriptAPI.h
  2. 53 7
      Docs/LuaScriptAPI.dox
  3. 43 3
      Docs/ScriptAPI.dox
  4. 1 1
      Source/Urho3D/.soversion

+ 35 - 2
Docs/AngelScriptAPI.h

@@ -271,23 +271,25 @@ uint zoneMask;
 class Animation
 {
 // Methods:
+void AddTrigger(const AnimationTriggerPoint&);
 void AddTrigger(float, bool, const Variant&);
+AnimationTrack CreateTrack(const String&);
 bool Load(File);
 bool Load(VectorBuffer&);
+bool RemoveAllTracks();
 void RemoveAllTriggers();
+bool RemoveTrack(const String&);
 void RemoveTrigger(uint);
 bool Save(File) const;
 bool Save(VectorBuffer&) const;
 void SendEvent(const String&, VariantMap& = VariantMap ( ));
 
 // Properties:
-/* readonly */
 String animationName;
 /* readonly */
 StringHash baseType;
 /* readonly */
 String category;
-/* readonly */
 float length;
 /* readonly */
 uint memoryUse;
@@ -298,6 +300,7 @@ uint numTriggers;
 /* readonly */
 int refs;
 /* readonly */
+Array<AnimationTrack> tracks;
 Array<AnimationTriggerPoint> triggers;
 /* readonly */
 StringHash type;
@@ -401,6 +404,16 @@ String typeName;
 int weakRefs;
 };
 
+class AnimationKeyFrame
+{
+
+// Properties:
+Vector3 position;
+Quaternion rotation;
+Vector3 scale;
+float time;
+};
+
 class AnimationSet2D
 {
 // Methods:
@@ -470,6 +483,23 @@ int weakRefs;
 float weight;
 };
 
+class AnimationTrack
+{
+// Methods:
+void AddKeyFrame(const AnimationKeyFrame&);
+void InsertKeyFrame(uint, const AnimationKeyFrame&);
+void RemoveAllKeyFrames();
+void RemoveKeyFrame(uint);
+
+// Properties:
+uint8 channelMask;
+Array<AnimationKeyFrame> keyFrames;
+String name;
+StringHash nameHash;
+/* readonly */
+uint numKeyFrames;
+};
+
 class AnimationTriggerPoint
 {
 
@@ -13348,6 +13378,9 @@ uint AM_NODEIDVECTOR;
 uint AM_NOEDIT;
 Color BLACK;
 Color BLUE;
+uint8 CHANNEL_POSITION;
+uint8 CHANNEL_ROTATION;
+uint8 CHANNEL_SCALE;
 uint CLEAR_COLOR;
 uint CLEAR_DEPTH;
 uint CLEAR_STENCIL;

+ 53 - 7
Docs/LuaScriptAPI.dox

@@ -25,6 +25,8 @@ namespace Urho3D
 <a href="#Class_AnimationKeyFrame"><b>AnimationKeyFrame</b></a>
 <a href="#Class_AnimationSet2D"><b>AnimationSet2D</b></a>
 <a href="#Class_AnimationState"><b>AnimationState</b></a>
+<a href="#Class_AnimationTrack"><b>AnimationTrack</b></a>
+<a href="#Class_AnimationTriggerPoint"><b>AnimationTriggerPoint</b></a>
 <a href="#Class_Audio"><b>Audio</b></a>
 <a href="#Class_BiasParameters"><b>BiasParameters</b></a>
 <a href="#Class_Billboard"><b>Billboard</b></a>
@@ -306,20 +308,28 @@ Properties:
 
 Methods:
 
+- void SetAnimationName(const String name)
+- void SetLength(float length)
+- AnimationTrack* CreateTrack(const String name)
+- bool RemoveTrack(const String name)
+- void RemoveAllTracks()
+- void SetTrigger(unsigned index, const AnimationTriggerPoint& trigger)
+- void AddTrigger(const AnimationTriggerPoint& trigger)
+- void AddTrigger(float time, bool timeIsNormalized, const Variant& data)
+- void RemoveTrigger(unsigned index)
+- void RemoveAllTriggers()
 - const String GetAnimationName() const
-- StringHash GetAnimationNameHash() const
 - float GetLength() const
 - unsigned GetNumTracks() const
-- const AnimationTrack* GetTrack(const String name) const
-- const AnimationTrack* GetTrack(StringHash nameHash) const
-- const AnimationTrack* GetTrack(unsigned index) const
+- AnimationTrack* GetTrack(const String name)
+- AnimationTrack* GetTrack(StringHash nameHash)
 - unsigned GetNumTriggers() const
+- AnimationTriggerPoint* GetTrigger(unsigned index)
 
 Properties:
 
-- String animationName (readonly)
-- StringHash animationNameHash (readonly)
-- float length (readonly)
+- String animationName
+- float length
 - unsigned numTracks (readonly)
 - unsigned numTriggers (readonly)
 
@@ -455,6 +465,42 @@ Properties:
 - float length (readonly)
 - char layer
 
+<a name="Class_AnimationTrack"></a>
+### AnimationTrack
+
+
+Methods:
+
+- void SetKeyFrame(unsigned index, const AnimationKeyFrame& keyFrame)
+- void AddKeyFrame(const AnimationKeyFrame& keyFrame)
+- void InsertKeyFrame(unsigned index, const AnimationKeyFrame& keyFrame)
+- void RemoveKeyFrame(unsigned index)
+- void RemoveAllKeyFrames()
+- AnimationKeyFrame* GetKeyFrame(unsigned index)
+- unsigned GetNumKeyFrames() const
+
+Properties:
+
+- const String name
+- const StringHash nameHash
+- char channelMask
+- Vector<AnimationKeyFrame> keyFrames
+- unsigned numKeyFrames (readonly)
+
+<a name="Class_AnimationTriggerPoint"></a>
+### AnimationTriggerPoint
+
+
+Methods:
+
+- AnimationTriggerPoint() (GC)
+- AnimationTriggerPoint* new()
+
+Properties:
+
+- float time
+- Variant data
+
 <a name="Class_Audio"></a>
 ### Audio : Object
 

+ 43 - 3
Docs/ScriptAPI.dox

@@ -2200,8 +2200,10 @@ namespace Urho3D
 <a href="#Class_AnimatedSprite2D"><b>AnimatedSprite2D</b></a>
 <a href="#Class_Animation"><b>Animation</b></a>
 <a href="#Class_AnimationController"><b>AnimationController</b></a>
+<a href="#Class_AnimationKeyFrame"><b>AnimationKeyFrame</b></a>
 <a href="#Class_AnimationSet2D"><b>AnimationSet2D</b></a>
 <a href="#Class_AnimationState"><b>AnimationState</b></a>
+<a href="#Class_AnimationTrack"><b>AnimationTrack</b></a>
 <a href="#Class_AnimationTriggerPoint"><b>AnimationTriggerPoint</b></a>
 <a href="#Class_Array"><b>Array</b></a>
 <a href="#Class_AttributeInfo"><b>AttributeInfo</b></a>
@@ -2627,10 +2629,14 @@ Properties:
 
 Methods:
 
+- void AddTrigger(const AnimationTriggerPoint&)
 - void AddTrigger(float, bool, const Variant&)
+- AnimationTrack@ CreateTrack(const String&)
 - bool Load(File@)
 - bool Load(VectorBuffer&)
+- bool RemoveAllTracks()
 - void RemoveAllTriggers()
+- bool RemoveTrack(const String&)
 - void RemoveTrigger(uint)
 - bool Save(File@) const
 - bool Save(VectorBuffer&) const
@@ -2638,16 +2644,17 @@ Methods:
 
 Properties:
 
-- String animationName // readonly
+- String animationName
 - StringHash baseType // readonly
 - String category // readonly
-- float length // readonly
+- float length
 - uint memoryUse // readonly
 - String name
 - uint numTracks // readonly
 - uint numTriggers
 - int refs // readonly
-- AnimationTriggerPoint@[] triggers // readonly
+- AnimationTrack@[] tracks // readonly
+- AnimationTriggerPoint[] triggers
 - StringHash type // readonly
 - String typeName // readonly
 - uint useTimer // readonly
@@ -2736,6 +2743,17 @@ Properties:
 - String typeName // readonly
 - int weakRefs // readonly
 
+<a name="Class_AnimationKeyFrame"></a>
+
+### AnimationKeyFrame
+
+Properties:
+
+- Vector3 position
+- Quaternion rotation
+- Vector3 scale
+- float time
+
 <a name="Class_AnimationSet2D"></a>
 
 ### AnimationSet2D
@@ -2795,6 +2813,25 @@ Properties:
 - int weakRefs // readonly
 - float weight
 
+<a name="Class_AnimationTrack"></a>
+
+### AnimationTrack
+
+Methods:
+
+- void AddKeyFrame(const AnimationKeyFrame&)
+- void InsertKeyFrame(uint, const AnimationKeyFrame&)
+- void RemoveAllKeyFrames()
+- void RemoveKeyFrame(uint)
+
+Properties:
+
+- uint8 channelMask
+- AnimationKeyFrame[] keyFrames
+- String name
+- StringHash nameHash
+- uint numKeyFrames // readonly
+
 <a name="Class_AnimationTriggerPoint"></a>
 
 ### AnimationTriggerPoint
@@ -14002,6 +14039,9 @@ Properties:
 - uint AM_NOEDIT
 - Color BLACK
 - Color BLUE
+- uint8 CHANNEL_POSITION
+- uint8 CHANNEL_ROTATION
+- uint8 CHANNEL_SCALE
 - uint CLEAR_COLOR
 - uint CLEAR_DEPTH
 - uint CLEAR_STENCIL

+ 1 - 1
Source/Urho3D/.soversion

@@ -1 +1 @@
-0.0.147
+0.0.148