#include <AlCharacter.h>
class AlCharacter : public AlObject
enum AlCharacterStringInfo
{
kBlindData1,
kBlindData2,
kBlindData3,
kBlindData4
};
AlCharacter();
virtual ~AlCharacter();
virtual AlObject* copyWrapper() const;
statusCode create(const char *);
virtual statusCode deleteObject();
virtual AlObjectType type() const;
virtual AlCharacter* asCharacterPtr();
// Character network methods.
virtual const char* name() const;
virtual statusCode setName(const char *);
AlCharSnippet* createSnippet(const char *);
AlCharTransition* createTransition(const char *);
statusCode removeSnippet(AlCharSnippet *);
statusCode removeTransition(AlCharTransition *);
AlCharSnippet* findSnippetByName(const char *);
AlCharTransition* findTransitionByName(const char *);
AlCharSnippet* firstSnippet(void);
AlCharSnippet* nextSnippet(void);
AlCharTransition* firstTransition(void);
AlCharTransition* nextTransition(void);
statusCode connectSnippets(AlCharSnippet *, AlCharTransition *,
AlCharSnippet *);
statusCode convertTransitionToSnippet(AlCharTransition *, int,
AlCharSnippet **, AlCharTransition **, AlCharTransition
**);
statusCode characterStringInfo(AlCharacterStringInfo, const char *&)
const;
statusCode setCharacterStringInfo(AlCharacterStringInfo, const char*);
A Character Network is a topology whose nodes are sequences (short linear pieces of animation) referred to as snippets and whose arcs are transitions between nodes.
See the AlCharSnippet class for more information snippets. See the AlCharTransition class for more information transitions.
Summary
AlCharacter::AlCharacter()
Description
Default constructor for AlCharacter Wrapper object. Use the create() method to initialize an AlCharacter object. AlCharacter::~AlCharacter()
Description
Deletes an AlCharacter wrapper object. AlObject* AlCharacter::copyWrapper() const
Description
Makes an exact copy of the AlCharacter wrapper Return codes
NULL - unable to create new wrapper due to lack of memory Description
Delete the Alias Character Network object. This method deletes the Character Network object data. Upon return there will be no Character Network corresponding to this wrapper or any other wrapper that references the same Character Network. Return codes
sSuccess - the Character Networks has been deleted Description
Returns the class identifier kCharacterType. AlCharacter* AlCharacter::asCharacterPtr()
Description
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class. statusCode AlCharacter::create(const char *characterName)
Description
Does any initialization and allocation of data for an AlCharater. Allocates room for this AlCharacter and adds this character to the universe. Arguments
< characterName - name of the Character Network object Return codes
sSuccess - if named Character Network object created const char *AlCharacter::name(void) const
Description
Return the name of the Character Network.. Return codes
NULL - invalid wrapper statusCode AlCharacter::setName(const char *newCharacterName)
Description
Rename a Character Network object. If the new name is already in use then a unique name will be generated. Use the name() method to determine the actual name of the Character Network object. Arguments
< newCharacterName - the new name of the Character Network object Return codes
sSuccess - the Character Network object has been renamed AlCharSnippet* AlCharacter::createSnippet(const char *snippetName)
Description
Create the named Snippet for the Character. If the new name is already in use then a unique name will be generated. Use the AlSnippet::name() method to determine the actual name of the Character Network Snippet object. See the AlCharSnippet class for more information on Character Network Snippets.
Arguments
< snippetName - the name of the new Character Network Snippet Return codes
NULL - invalid wrapper AlCharTransition* AlCharacter::createTransition(const char *transitionName)
Description
Create the named Transition for the Character. If the new name is already in use then a unique name will be generated. Use the AlTransition::name() method to determine the actual name of the Character Network Transition object. See the AlCharTransition class for more information on Character Network Transitions.
Arguments
< transitionName - the name of the new Character Network Transition Return codes
NULL - invalid wrapper statusCode AlCharacter::removeSnippet(AlCharSnippet *snippet)
Description
Delete the Character Network Snippet from the Character Network. See the AlCharSnippet class for more information on Character Networks Snippets.
Arguments
< snippet - the AlCharSnippet wrapper of the Character Network Snippet Return codes
sSuccess - the Character Network Snippet has been deleted. statusCode AlCharacter::removeTransition(AlCharTransition *transition)
Description
Delete the Character Network Transition from the Character Network. See the AlCharTransition class for more information on Character Networks Transitions.
Arguments
< snippet - the AlCharTransition wrapper of the Character Network Transition Return codes
sSuccess - the Character Network Transition has been deleted. AlCharSnippet* AlCharacter::findSnippetByName(const char *snippetName)
Description
Find the named Character Network Snippet in the Character Network and return a new wrapper for it. Arguments
< characterName - name of the object Return codes
NULL - wrapper not valid, unable locate the named Character Network Snippet or unable to construct the wrapper AlCharTransition* AlCharacter::findTransitionByName(const char *transitionName)
Description
Find the named Character Network Transition in the Character Network and return a new wrapper for it. Arguments
< characterName - name of the object Return codes
NULL - wrapper not valid, unable locate the named Character Network Transition or unable to construct the wrapper AlCharSnippet* AlCharacter::firstSnippet(void)
Description
Return a new wrapper to first Character Network Snippet in the Character Network. Return codes
NULL - wrapper not valid, no Character Network Snippets or unable to construct the wrapper AlCharSnippet* AlCharacter::nextSnippet(void)
Description
Return a new wrapper to next Character Network Snippet in the Character Network. Return codes
NULL - wrapper not valid, no more Character Network Snippets or unable to construct the wrapper AlCharTransition* AlCharacter::firstTransition(void)
Description
Return a new wrapper to first Character Network Transition in the Character Network. Return codes
NULL - wrapper not valid, no Character Network Transitions or unable to construct the wrapper AlCharTransition* AlCharacter::nextTransition(void)
Description
Return a new wrapper to next Character Network Transition in the Character Network. Return codes
NULL - wrapper not valid, no more Character Network Transitions or unable to construct the wrapper statusCode AlCharacter::connectSnippets(AlCharSnippet *sourceSnippet,AlCharTransition *transition,AlCharSnippet *destinationSnippet)
Description
Connect the sourceSnippet to the destinationSnippet via the transition. The snippets and the transition must have been previously created via createSnippet() and createTransition(). Arguments
< sourceSnippet - source Snippet for transition Return codes
sSuccess - if everything okay statusCode AlCharacter::convertTransitionToSnippet(AlCharTransition *transition,int transitionIsDeleted,AlCharSnippet **newSnippet,AlCharTransition **newSourceTransition,AlCharTransition **newDestinationTransition)
Description
Convert a transition from snippet A to snippet B into a transition X' from A to new snippet C, and a transition X" from C to B. Note that snippets A and B are implied by the transition. newSnippet, newSourceTransition and newDestinationTransition are declared by the caller and passed to the method as followsAlCharSnippet *newSnippet;
AlCharTransition *newSourceTransition;
AlCharTransition *newDestinationTransition;
status = character->convertTransitionToSnippet(
transition,
TRUE,
&newSnippet,
&newSourceTransition,
&newDestinationTransition
)
The create() method for the new Snippet and Transitions are invoked by the method so valid wrappers for each object are passed back to the caller. Arguments
< transition - transition that connects snippet A to B. Return codes
sSuccess - if everything okay statusCode AlCharacter::characterStringInfo(AlCharacterStringInfo dataType,const char *& sValue) const
Description
Return the specified string valued Character data. Arguments
< dataType - the type of Character data to return Return codes
sSuccess - the Character data was returned in sValue statusCode AlCharacter::setCharacterStringInfo(AlCharacterStringInfo dataType,const char* sValue)
Description
Set the specified string valued Character data. Arguments
< dataType - the type of Character data to return Return codes
sSuccess - the Character data was updated from sValue