Kigs Framework
Doc version 0.8
Open source multi purpose Rapid Application Development framework
|
#include <AObject.h>
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) | |
CoreModifiable * | GetObject () 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) |
ABaseSystem * | GetSystemByType (unsigned int system_type) |
ABaseSystem * | GetSystembyIndex (IntU32 index) |
AnimationResourceInfo * | GetAnimationByIndex (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. | |
CoreModifiableAttribute * | getAttribute (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... | |
CoreModifiableAttribute * | GenericCreateDynamicAttribute (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 XMLNode * | ExportToXMLNode (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... | |
Class used to call all the animation methods on an object
Add an animation to this object, but don't play it, wait for the start animation
return true if the animation is already added to this object
Fade the first animation to the second one
return a pointer on a AnimationResourceInfo used on the object
return true the animation has loop during the last Animate call
return true if animation has reached its end during the last Animate call
use the local to global data found in the AObject AChannel with the given GroupID
multiply the speed of an animation by the given factor
multiply the weight of an animation by the given factor
delete the animation
restart animation where it was stopped
set the animation time for the given % of animation length
change the speed of an animation
change the weight of an animation
set one of this mode :
Set loop mode
start playing animation
start playing animation n times
stop playing all animations
stop playing animation
Change the speed of animation 2 so that animation 1 reach is local time synchro1 when animation 2 reach is local time synchro2
Stop the link
|
inlinevirtual |
Destructor
void AObject::AddAnimation | ( | const std::string & | info | ) |
Add an animation to this object, but don't play it, wait for the start animation
|
protected |
Add a ASystem in the list of ASystem used by this AObject
void AObject::Animate | ( | ATimeValue | t | ) |
Setup Animation for time t for all the systems used by this AObject
bool AObject::AnimationIsSet | ( | const KigsID & | info1 | ) |
return true if the animation is already added to this object
void AObject::AttachSystem | ( | ABaseSystem * | system | ) |
|
protected |
call the given methods for all streams given in the g_id list
void AObject::FadeAnimationTo | ( | const KigsID & | info1, |
const KigsID & | info2, | ||
ATimeValue | fade_length, | ||
ATimeValue | t | ||
) |
Fade the first animation to the second one
AnimationResourceInfo * AObject::GetAnimationByIndex | ( | IntU32 | index | ) |
return a pointer on a AnimationResourceInfo used on the object
|
inline |
return the engine object linked to this AObject (should be the skinning object)
ABaseSystem * AObject::GetSystembyIndex | ( | IntU32 | index | ) |
return a ASystem used on this object with the given index
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 )
bool AObject::HasAnimationLoop | ( | const KigsID & | info1 | ) |
return true the animation has loop during the last Animate call
bool AObject::HasAnimationReachEnd | ( | const KigsID & | info1 | ) |
return true if animation has reached its end during the last Animate call
|
overridevirtual |
default modifiable init : set all initparams to readonly and set initflag to true
already done ? then return
Reimplemented from CoreModifiable.
|
inlinestaticprotected |
search in groupid array for the given groupid
void AObject::LinkTo | ( | unsigned int | system_type, |
AObject * | other_object, | ||
IntU32 | g_id | ||
) |
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
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
void AObject::RemoveAnimation | ( | const KigsID & | info | ) |
delete the animation
|
protected |
Remove a ASystem from the list of ASystem used by this AObject
void AObject::ResumeAnimation | ( | const KigsID & | info, |
ATimeValue | t, | ||
IntU32 * | g_id = NULL , |
||
IntU32 | g_count = 0 |
||
) |
restart animation where it was stopped
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
void AObject::SetAnimationSpeed | ( | const KigsID & | info, |
Float | speed, | ||
IntU32 * | g_id = NULL , |
||
IntU32 | g_count = 0 |
||
) |
change the speed of an animation
void AObject::SetAnimationWeight | ( | const KigsID & | info, |
Float | weight, | ||
IntU32 * | g_id = NULL , |
||
IntU32 | g_count = 0 |
||
) |
change the weight of an animation
void AObject::SetLocalToGlobalMode | ( | const KigsID & | system_type, |
int | mode | ||
) |
set one of this mode :
void AObject::SetLoop | ( | const KigsID & | info, |
bool | loop, | ||
IntU32 * | g_id = NULL , |
||
IntU32 | g_count = 0 |
||
) |
Set loop mode
|
protected |
void AObject::StartAnimation | ( | const KigsID & | info, |
ATimeValue | t, | ||
IntU32 * | g_id = NULL , |
||
IntU32 | g_count = 0 |
||
) |
start playing animation
void AObject::StartRepeatAnimation | ( | const KigsID & | info, |
ATimeValue | t, | ||
IntU32 | n, | ||
IntU32 * | g_id = NULL , |
||
IntU32 | g_count = 0 |
||
) |
start playing animation n times
void AObject::StopAllAnimations | ( | IntU32 * | g_id = NULL , |
IntU32 | g_count = 0 |
||
) |
stop playing all animations
void AObject::StopAnimation | ( | const KigsID & | info, |
IntU32 * | g_id = NULL , |
||
IntU32 | g_count = 0 |
||
) |
stop playing animation
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
void AObject::UnLink | ( | unsigned int | system_type | ) |
Stop the link