Interface to Alias Character Network.
Synopsis
#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 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*);
Description
AlCharacter is the interface to the Character Network data of Alias’ Character Network objects.
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.
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 Values
NULL - unable to create new wrapper due to lack of memory
non NULL - new Character Network wrapper
statusCode AlCharacter::deleteObject()
Description
Deletes 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
sInvalidObject - the Character Network was not valid
AlObjectType AlCharacter::type() const
Description
Returns the class identifier kCharacterType.
statusCode AlCharacter::create(const char *characterName)
Description
Does any initialization and allocation of data for an AlCharacter. Allocates room for this AlCharacter and adds this character
to the universe.
Arguments
< characterName - name of the Character Network object
Return Codes
sSuccess - named Character Network object created
sFailure - this wrapper already has a Character Network object, i.e already created
sInsufficientMemory - not enough memory available
const char *AlCharacter::name(void) const
Description
Returns the name of the Character Network.
Return Values
NULL - invalid wrapper
non NULL - Character Network name
statusCode AlCharacter::setName(const char *newCharacterName)
Description
Renames 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
sInvalidObject - the Character Network was not valid
AlCharSnippet* AlCharacter::createSnippet(const char *snippetName)
Description
Creates 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 Values
NULL - invalid wrapper
non NULL - new Character Network Snippet wrapper
AlCharTransition* AlCharacter::createTransition(const char *transitionName)
Description
Creates 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 Values
NULL - invalid wrapper
non NULL - new Character Network Transition wrapper
statusCode AlCharacter::removeSnippet(AlCharSnippet *snippet)
Description
Deletes 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
sInvalidObject - the Character Network Snippet was not valid
statusCode AlCharacter::removeTransition(AlCharTransition *transition)
Description
Deletes 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
sInvalidObject - the Character Network Transition was not valid
AlCharSnippet* AlCharacter::findSnippetByName(const char *snippetName)
Description
Finds the named Character Network Snippet in the Character Network and returns a new wrapper for it.
Arguments
< characterName - name of the object
Return Values
NULL - wrapper not valid, unable locate the named Character Network Snippet or unable to construct the wrapper
non NULL - named Character Network Snippet wrapper
AlCharTransition* AlCharacter::findTransitionByName(const char *transitionName)
Description
Finds the named Character Network Transition in the Character Network and returns a new wrapper for it.
Arguments
< characterName - name of the object
Return Values
NULL - wrapper not valid, unable locate the named Character Network Transition or unable to construct the wrapper
non NULL - named Character Network Transition wrapper
AlCharSnippet* AlCharacter::firstSnippet(void)
Description
Returns a new wrapper to first Character Network Snippet in the Character Network.
Return Values
NULL - wrapper not valid, no Character Network Snippets or unable to construct the wrapper
non NULL - first Character Network Snippet wrapper
AlCharSnippet* AlCharacter::nextSnippet(void)
Description
Returns a new wrapper to next Character Network Snippet in the Character Network.
Return Values
NULL - wrapper not valid, no more Character Network Snippets or unable to construct the wrapper
non NULL - next Character Network Snippet wrapper
AlCharTransition* AlCharacter::firstTransition(void)
Description
Returns a new wrapper to first Character Network Transition in the Character Network.
Return Values
NULL - wrapper not valid, no Character Network Transitions or unable to construct the wrapper
non NULL - first Character Network Transition wrapper
AlCharTransition* AlCharacter::nextTransition(void)
Description
Returns a new wrapper to next Character Network Transition in the Character Network.
Return Values
NULL - wrapper not valid, no more Character Network Transitions or unable to construct the wrapper
non NULL - next Character Network Transition wrapper
statusCode AlCharacter::connectSnippets(AlCharSnippet *sourceSnippet,AlCharTransition *transition,AlCharSnippet *destinationSnippet)
Description
Connects 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
< transition - connect source to destination
< destinationSnippet - destination Snippet for transition
Return Codes
sSuccess - everything okay
sInsufficientMemory - not enough memory available
sFailure - could not complete request
statusCode AlCharacter::convertTransitionToSnippet(AlCharTransition *transition,int transitionIsDeleted,AlCharSnippet **newSnippet,AlCharTransition
**newSourceTransition,AlCharTransition **newDestinationTransition)
Description
Converts 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 follows:
AlCharSnippet *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 - the transition that connects snippet A to B
< transitionIsDeleted - TRUE (1) if transition is to be deleted
> newSnippet - new snippet C
> newSourceTransition - new transition X’
> newDestinationTransition - new transition X"
Return Codes
sSuccess - everything okay
sInsufficientMemory - not enough memory available
sFailure - could not complete request
statusCode AlCharacter::characterStringInfo(AlCharacterStringInfo dataType,const char *& sValue) const
Description
Returns the specified string valued Character data.
Arguments
< dataType - the type of Character data to return
> sValue - the value of the Character data
Return Codes
sSuccess - the Character data was returned in sValue
sInvalidArgument - the Character dataType is not string valued
statusCode AlCharacter::setCharacterStringInfo(AlCharacterStringInfo dataType,const char* sValue)
Description
Sets the specified string valued Character data.
Arguments
< dataType - the type of Character data to return
< sValue - the new value of the Character data
Return Codes
sSuccess - the Character data was updated from sValue
sInvalidArgument - the Character dataType is not string valued