Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
AObject Class Reference

#include <AObject.h>

Inheritance diagram for AObject:
CoreModifiable GenericRefCountedBaseClass

Public Member Functions

bool addItem (const CMSP &item, ItemPosition pos=Last DECLARE_DEFAULT_LINK_NAME) override
 add item at first or last position
 
void addUser (CoreModifiable *user) override
 overloaded to be notified when added to or removed from an animated object
 
void removeUser (CoreModifiable *user) override
 remove user (parent)
 
CoreModifiableGetObject () const
 
void Animate (ATimeValue t)
 
void AddAnimation (const std::string &info)
 
void RemoveAnimation (const KigsID &info)
 
void StartAnimation (const KigsID &info, ATimeValue t, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void SetAnimationPos (const KigsID &info, Float percent, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void StartRepeatAnimation (const KigsID &info, ATimeValue t, IntU32 n, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void StopAnimation (const KigsID &info, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void StopAllAnimations (IntU32 *g_id=NULL, IntU32 g_count=0)
 
void ResumeAnimation (const KigsID &info, ATimeValue t, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void SetAnimationWeight (const KigsID &info, Float weight, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void SetAnimationSpeed (const KigsID &info, Float speed, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void MulAnimationWeight (const KigsID &info, Float weight, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void MulAnimationSpeed (const KigsID &info, Float speed, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void SetLoop (const KigsID &info, bool loop, IntU32 *g_id=NULL, IntU32 g_count=0)
 
void FadeAnimationTo (const KigsID &info1, const KigsID &info2, ATimeValue fade_length, ATimeValue t)
 
void SynchroniseAnimations (const KigsID &info1, const KigsID &info2, ATimeValue synchro1, ATimeValue synchro2)
 
bool HasAnimationLoop (const KigsID &info1)
 
bool AnimationIsSet (const KigsID &info1)
 
bool HasAnimationReachEnd (const KigsID &info1)
 
void SetLocalToGlobalMode (const KigsID &system_type, int mode)
 
void LinkTo (unsigned int system_type, AObject *other_object, IntU32 g_id)
 
void UnLink (unsigned int system_type)
 
ABaseSystemGetSystemByType (unsigned int system_type)
 
ABaseSystemGetSystembyIndex (IntU32 index)
 
AnimationResourceInfoGetAnimationByIndex (IntU32 index)
 
virtual ~AObject ()
 
void InitModifiable () override
 default modifiable init : set all initparams to readonly and set initflag to true More...
 
void AttachSystem (ABaseSystem *system)
 
- Public Member Functions inherited from CoreModifiable
void Init ()
 Modifiable managmenent.
 
void EmptyItemList ()
 remove all items (sons)
 
CMSP GetInstanceByPath (const std::string &path)
 return the instance corresponding to the given path in sons tree
 
std::string GetRuntimeID () const
 ID.
 
CoreModifiableAttributegetAttribute (KigsID labelid) const
 Attribute management.
 
u32 getNbArrayElements (KigsID attributeLabel) const
 return element count for an array type attribute
 
template<typename attribute_type , typename value_type >
attribute_type * AddDynamicAttribute (KigsID ID, const value_type &value)
 Dynamic attribute management.
 
const kigs::unordered_map< KigsID, ModifiableMethodStruct > * GetMethods ()
 Method management.
 
bool aggregateWith (CMSP &item, ItemPosition pos=Last)
 Aggregate management.
 
void flagAsNotificationCenterRegistered ()
 Flags.
 
void InitParametersFromList (const std::vector< CoreModifiableAttribute * > *params)
 Utility. More...
 
virtual void UninitModifiable ()
 called when InitModifiable has failled : reset read/write flag on all init params More...
 
virtual void ProtectedDestroy ()
 Destroy method decrement refcounter and delete instance if no more used. More...
 
virtual bool removeItem (const CMSP &item)
 remove item (son)
 

Protected Member Functions

void AddSystem (ABaseSystem *system)
 
void RemoveSystem (ABaseSystem *system)
 
void DoForEachStream (ALinks *info, IntU32 *g_id, IntU32 g_count, void *params, void(AObject::*func)(ABaseStream *stream, void *param))
 
void SetLoopFor (ABaseStream *stream, void *param)
 
- Protected Member Functions inherited from CoreModifiable
void UpdateAggregates (const Timer &timer, void *addParam)
 Internals.
 
void Export (std::vector< CoreModifiable * > &savedList, XMLNode *currentNode, bool recursive, ExportSettings *settings)
 Export. More...
 
CoreModifiableAttributeGenericCreateDynamicAttribute (CoreModifiable::ATTRIBUTE_TYPE type, KigsID ID)
 create and add dynamic attribute except arrays
 

Static Protected Member Functions

static bool IsInGroupIDList (IntU32 id, IntU32 *list, IntU32 count)
 
- Static Protected Member Functions inherited from CoreModifiable
template<typename StringType >
static CMSP Import (XMLNodeTemplate< StringType > *currentNode, CoreModifiable *currentModifiable, ImportState &importState)
 recusrive method to add sons and attributes found in the XML file
 

Additional Inherited Members

- Static Public Member Functions inherited from CoreModifiable
static std::vector< CMSP > GetRootInstances (const KigsID &cid, bool exactTypeOnly=false)
 static method : return the set of all root instances of the given type
 
static void Append (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (const std::string &filename, CoreModifiable *toexport, bool recursive=false, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static XMLNodeExportToXMLNode (CoreModifiable *toexport, XML *owner_xml_file, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML Node. if recursive flag is set to true, export also all sons tree More...
 
static std::string ExportToXMLString (CoreModifiable *toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static void Export (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr)
 static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More...
 
static CMSP Import (const std::string &filename, bool noInit=false, bool keepImportFileName=false, ImportState *state=nullptr, const std::string &override_name="")
 return an new CoreModifiable instance using the description found in XML file given by name
 
static CMSP GetInstanceByGlobalPath (const std::string &path)
 static method : return the instance corresponding to the given path, and given search start
 
static void debugPrintfFullTree (int maxindent=3)
 Editor. More...
 

Detailed Description

Class used to call all the animation methods on an object

Methods

Key : AddAnimation

Add an animation to this object, but don't play it, wait for the start animation

Key : AnimationIsSet

return true if the animation is already added to this object

Key : FadeAnimationTo

Fade the first animation to the second one

Key : GetAnimationByIndex

return a pointer on a AnimationResourceInfo used on the object

Key : HasAnimationLoop

return true the animation has loop during the last Animate call

Key : HasAnimationReachEnd

return true if animation has reached its end during the last Animate call

Key : LinkTo

use the local to global data found in the AObject AChannel with the given GroupID

Key : MulAnimationSpeed

multiply the speed of an animation by the given factor

Key : MulAnimationWeight

multiply the weight of an animation by the given factor

Key : RemoveAnimation

delete the animation

Key : ResumeAnimation

restart animation where it was stopped

Key : SetAnimationPos

set the animation time for the given % of animation length

Key : SetAnimationSpeed

change the speed of an animation

Key : SetAnimationWeight

change the weight of an animation

Key : SetLocalToGlobalMode

set one of this mode :

Key : SetLoop

Set loop mode

Key : StartAnimation

start playing animation

Key : StartRepeatAnimation

start playing animation n times

Key : StopAllAnimations

stop playing all animations

Key : StopAnimation

stop playing animation

Key : SynchroniseAnimations

Change the speed of animation 2 so that animation 1 reach is local time synchro1 when animation 2 reach is local time synchro2

Key : UnLink

Stop the link

Constructor & Destructor Documentation

◆ ~AObject()

virtual AObject::~AObject ( )
inlinevirtual

Destructor

Member Function Documentation

◆ AddAnimation()

void AObject::AddAnimation ( const std::string &  info)

Add an animation to this object, but don't play it, wait for the start animation

◆ AddSystem()

void AObject::AddSystem ( ABaseSystem system)
protected

Add a ASystem in the list of ASystem used by this AObject

◆ Animate()

void AObject::Animate ( ATimeValue  t)

Setup Animation for time t for all the systems used by this AObject

◆ AnimationIsSet()

bool AObject::AnimationIsSet ( const KigsID &  info1)

return true if the animation is already added to this object

◆ AttachSystem()

void AObject::AttachSystem ( ABaseSystem system)

search the corresponding LtoG system and create hierarchy from it


AttachSystem

  • search the corresponding system and create hierarchy from it

◆ DoForEachStream()

void AObject::DoForEachStream ( ALinks info,
IntU32 *  g_id,
IntU32  g_count,
void *  params,
void(AObject::*)(ABaseStream *stream, void *param)  func 
)
protected

call the given methods for all streams given in the g_id list

◆ FadeAnimationTo()

void AObject::FadeAnimationTo ( const KigsID &  info1,
const KigsID &  info2,
ATimeValue  fade_length,
ATimeValue  t 
)

Fade the first animation to the second one

◆ GetAnimationByIndex()

AnimationResourceInfo * AObject::GetAnimationByIndex ( IntU32  index)

return a pointer on a AnimationResourceInfo used on the object

◆ GetObject()

CoreModifiable* AObject::GetObject ( ) const
inline

return the engine object linked to this AObject (should be the skinning object)

◆ GetSystembyIndex()

ABaseSystem * AObject::GetSystembyIndex ( IntU32  index)

return a ASystem used on this object with the given index

◆ GetSystemByType()

ABaseSystem * AObject::GetSystemByType ( unsigned int  system_type)

return a ASystem used on this object with the given super class id ( or NULL if no found )

◆ HasAnimationLoop()

bool AObject::HasAnimationLoop ( const KigsID &  info1)

return true the animation has loop during the last Animate call

◆ HasAnimationReachEnd()

bool AObject::HasAnimationReachEnd ( const KigsID &  info1)

return true if animation has reached its end during the last Animate call

◆ InitModifiable()

void AObject::InitModifiable ( )
overridevirtual

default modifiable init : set all initparams to readonly and set initflag to true

already done ? then return

Reimplemented from CoreModifiable.

◆ IsInGroupIDList()

static bool AObject::IsInGroupIDList ( IntU32  id,
IntU32 *  list,
IntU32  count 
)
inlinestaticprotected

search in groupid array for the given groupid

◆ LinkTo()

void AObject::LinkTo ( unsigned int  system_type,
AObject other_object,
IntU32  g_id 
)

use the local to global data found in the AObject AChannel with the given GroupID

◆ MulAnimationSpeed()

void AObject::MulAnimationSpeed ( const KigsID &  info,
Float  speed,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

multiply the speed of an animation by the given factor

◆ MulAnimationWeight()

void AObject::MulAnimationWeight ( const KigsID &  info,
Float  weight,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

multiply the weight of an animation by the given factor

◆ RemoveAnimation()

void AObject::RemoveAnimation ( const KigsID &  info)

delete the animation

◆ RemoveSystem()

void AObject::RemoveSystem ( ABaseSystem system)
protected

Remove a ASystem from the list of ASystem used by this AObject

◆ ResumeAnimation()

void AObject::ResumeAnimation ( const KigsID &  info,
ATimeValue  t,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

restart animation where it was stopped

◆ SetAnimationPos()

void AObject::SetAnimationPos ( const KigsID &  info,
Float  percent,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

set the animation time for the given % of animation length

◆ SetAnimationSpeed()

void AObject::SetAnimationSpeed ( const KigsID &  info,
Float  speed,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

change the speed of an animation

◆ SetAnimationWeight()

void AObject::SetAnimationWeight ( const KigsID &  info,
Float  weight,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

change the weight of an animation

◆ SetLocalToGlobalMode()

void AObject::SetLocalToGlobalMode ( const KigsID &  system_type,
int  mode 
)

set one of this mode :

  • FromAnimation : the local to global data is only given by the animation itself ( from the root channel ), the module ask for a starting local to global data
  • FromAnimationWithLoop : the local to global data is given by the animation, but the starting local to global data is updated when animation loop
  • FromEngine : the animation local to global data is not used, the data is asked to the engine.

◆ SetLoop()

void AObject::SetLoop ( const KigsID &  info,
bool  loop,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

Set loop mode

◆ SetLoopFor()

void AObject::SetLoopFor ( ABaseStream *  stream,
void *  param 
)
protected

SetLoop

  • method called by DoForEachStream

◆ StartAnimation()

void AObject::StartAnimation ( const KigsID &  info,
ATimeValue  t,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

start playing animation

◆ StartRepeatAnimation()

void AObject::StartRepeatAnimation ( const KigsID &  info,
ATimeValue  t,
IntU32  n,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

start playing animation n times

◆ StopAllAnimations()

void AObject::StopAllAnimations ( IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

stop playing all animations

◆ StopAnimation()

void AObject::StopAnimation ( const KigsID &  info,
IntU32 *  g_id = NULL,
IntU32  g_count = 0 
)

stop playing animation

◆ SynchroniseAnimations()

void AObject::SynchroniseAnimations ( const KigsID &  info1,
const KigsID &  info2,
ATimeValue  synchro1,
ATimeValue  synchro2 
)

Change the speed of animation 2 so that animation 1 reach is local time synchro1 when animation 2 reach is local time synchro2

◆ UnLink()

void AObject::UnLink ( unsigned int  system_type)

Stop the link


The documentation for this class was generated from the following files: