Character Validation

Module description

Contains functions that validate character definitions and character geometry.

Macros

#define HIKNeckBoneCount   9
 
#define HIKRequiredBoneCount   15
 
#define HIKRollBoneCount   8
 
#define HIKSpineBoneCount   9
 

Functions

const int * HIKGetNeckBoneList ()
 
const int * HIKGetRequiredBoneList ()
 
const int * HIKGetRollBoneList ()
 
const int * HIKGetSpineBoneList ()
 
bool HIKValidateArmsXAxis (const HIKCharacter *pCharacter, char *pErrorMsg=0, unsigned int pErrorMsgSize=0)
 
bool HIKValidateBonePosition (const HIKCharacter *pCharacter, char *pErrorMsg=0, unsigned int pErrorMsgSize=0)
 
bool HIKValidateGeometry (const HIKCharacter *pCharacter)
 
bool HIKValidateHierarchy (const HIKCharacterDefinition *pCharacterDefinition)
 
bool HIKValidateHipsXAxis (const HIKCharacter *pCharacter, char *pErrorMsg=0, unsigned int pErrorMsgSize=0)
 
bool HIKValidateNeck (const HIKCharacterDefinition *pCharacterDefinition, char *pErrorMsg=0, unsigned int pErrorMsgSize=0)
 
bool HIKValidateRequiredBone (const HIKCharacterDefinition *pCharacterDefinition, char *pErrorMsg=0, unsigned int pErrorMsgSize=0)
 
bool HIKValidateSpine (const HIKCharacterDefinition *pCharacterDefinition, char *pErrorMsg=0, unsigned int pErrorMsgSize=0)
 
bool HIKValidateSpineYAxis (const HIKCharacter *pCharacter, char *pErrorMsg=0, unsigned int pErrorMsgSize=0)
 

Macro Definition Documentation

#define HIKNeckBoneCount   9

The maximum number of possible Nodes in a character's neck.

#define HIKRequiredBoneCount   15

The number of required Nodes for an HIKCharacter.

#define HIKRollBoneCount   8

The maximum number of possible roll Nodes in a character's arms and legs.

#define HIKSpineBoneCount   9

The maximum number of possible Nodes in a character's spine.

Function Documentation

const int* HIKGetNeckBoneList ( )

Returns a list of integers that identify which Nodes in the HIKNodeId enumeration are part of the neck. The length of the array should always be equal to HIKNeckBoneCount.

const int* HIKGetRequiredBoneList ( )

Returns a list of integers that identify which Nodes in the HIKNodeId enumeration are required. The length of the array should always be equal to HIKRequiredBoneCount.

const int* HIKGetRollBoneList ( )

Returns a list of integers that identify which Nodes in the HIKNodeId enumeration are roll Nodes. The length of the array should always be equal to HIKNeckBoneCount.

const int* HIKGetSpineBoneList ( )

Returns a list of integers that identify which Nodes in the HIKNodeId enumeration are part of the spine. The length of the array should always be equal to HIKSpineBoneCount.

bool HIKValidateArmsXAxis ( const HIKCharacter pCharacter,
char *  pErrorMsg = 0,
unsigned int  pErrorMsgSize = 0 
)

Validates that the arms of the specified HIKCharacter are aligned along the X axis. If the alignment of the arms is too far off, the function returns false and updates the pErrorMsg to indicate the problem.

Parameters
pCharacterThe HIKCharacter to test.
[out]pErrorMsgUpdated to indicate any errors detected with the character geometry.
[out]pErrorMsgSizeUpdated to indicate the number of characters in the pErrorMsg string.
Returns
false if the alignment of the arms is too far off the X axis, or true otherwise.
bool HIKValidateBonePosition ( const HIKCharacter pCharacter,
char *  pErrorMsg = 0,
unsigned int  pErrorMsgSize = 0 
)

Validates that no two Nodes are set at the same position in 3D space. If two Nodes are found at the same position, the function returns false and updates the pErrorMsg to indicate the problem.

Parameters
pCharacterThe HIKCharacter to test.
[out]pErrorMsgUpdated to indicate any errors detected with the character geometry.
[out]pErrorMsgSizeUpdated to indicate the number of characters in the pErrorMsg string.
Returns
false if two or more Nodes are at the same position, or true otherwise.
bool HIKValidateGeometry ( const HIKCharacter pCharacter)

Determines whether or not the T-stance of the specified HIKCharacter is valid. This function validates:

  • That the hips and arms are aligned along the X axis.
  • That the spine is aligned along the Y axis.
  • That no two Nodes are at the same coordinates in 3D space.

    If this method returns true, you should be able to finalize the character geometry by calling HIKCharacterizeGeometry().

    If this method returns false, check the log for errors detected in the validation.

    Available only in verbose builds.

    Parameters
    pCharacterThe HIKCharacter to validate.
bool HIKValidateHierarchy ( const HIKCharacterDefinition pCharacterDefinition)

Determines whether or not the specified HIKCharacterDefinition is valid: i.e. not missing any required Nodes.

If this method returns true, you should be able to create a valid HIKCharacter from the definition.

If this method returns false, check the log for errors detected in the validation.

Available only in verbose builds.

Parameters
pCharacterDefinitionThe HIKCharacterDefinition to validate.
bool HIKValidateHipsXAxis ( const HIKCharacter pCharacter,
char *  pErrorMsg = 0,
unsigned int  pErrorMsgSize = 0 
)

Validates that the hips of the specified HIKCharacter are aligned along the X axis. If the alignment of the hips is too far off, the function returns false and updates the pErrorMsg to indicate the problem.

Parameters
pCharacterThe HIKCharacter to test.
[out]pErrorMsgUpdated to indicate any errors detected with the character geometry.
[out]pErrorMsgSizeUpdated to indicate the number of characters in the pErrorMsg string.
Returns
false if the alignment of the hips is too far off the X axis, or true otherwise.
bool HIKValidateNeck ( const HIKCharacterDefinition pCharacterDefinition,
char *  pErrorMsg = 0,
unsigned int  pErrorMsgSize = 0 
)

Validates that the neck of the specified HIKCharacterDefinition does not have any missing Nodes. For example, a character can not be created with Neck3NodeId unless it also has Neck2NodeId and Neck1NodeId. If one or more Nodes in the nech are missing, the function returns false and updates the pErrorMsg to list the missing Nodes.

Parameters
pCharacterDefinitionThe HIKCharacterDefinition to test.
[out]pErrorMsgUpdated to list all missing neck Nodes not found in the definition.
[out]pErrorMsgSizeUpdated to indicate the number of characters in the pErrorMsg string.
Returns
false if at least one neck Node is missing in the character definition, or true otherwise.
bool HIKValidateRequiredBone ( const HIKCharacterDefinition pCharacterDefinition,
char *  pErrorMsg = 0,
unsigned int  pErrorMsgSize = 0 
)

Validates that the specified HIKCharacterDefinition contains all required Nodes. If one or more Nodes are missing, the function returns false and updates the pErrorMsg to list the missing Nodes.

Parameters
pCharacterDefinitionThe HIKCharacterDefinition to test.
[out]pErrorMsgUpdated to list all missing Nodes not found in the definition.
[out]pErrorMsgSizeUpdated to indicate the number of characters in the pErrorMsg string.
Returns
false if at least one required Node is missing in the character definition, or true otherwise.
bool HIKValidateSpine ( const HIKCharacterDefinition pCharacterDefinition,
char *  pErrorMsg = 0,
unsigned int  pErrorMsgSize = 0 
)

Validates that the spine of the specified HIKCharacterDefinition does not have any missing Nodes. For example, a character can not be created with Spine3NodeId unless it also has Spine2NodeId and Spine1NodeId. If one or more Nodes in the spine are missing, the function returns false and updates the pErrorMsg to list the missing Nodes.

Parameters
pCharacterDefinitionThe HIKCharacterDefinition to test.
[out]pErrorMsgUpdated to list all missing spine Nodes not found in the definition.
[out]pErrorMsgSizeUpdated to indicate the number of characters in the pErrorMsg string.
Returns
false if at least one spine Node is missing in the character definition, or true otherwise.
bool HIKValidateSpineYAxis ( const HIKCharacter pCharacter,
char *  pErrorMsg = 0,
unsigned int  pErrorMsgSize = 0 
)

Validates that the spine of the specified HIKCharacter is aligned along the Y axis. If the alignment of the spine is too far off, the function returns false and updates the pErrorMsg to indicate the problem.

Parameters
pCharacterThe HIKCharacter to test.
[out]pErrorMsgUpdated to indicate any errors detected with the character geometry.
[out]pErrorMsgSizeUpdated to indicate the number of characters in the pErrorMsg string.
Returns
false if the alignment of the spine is too far off the Y axis, or true otherwise.