HIK2016/humanik/hikvalidation.h Source File

hikvalidation.h
Go to the documentation of this file.
1 
5 /**************************************************************************************
6 
7 Copyright (C) 2009 Autodesk, Inc.
8 All Rights Reserved.
9 
10 The coded instructions, statements, computer programs, and/or related material (collectively "Data")
11 in these files contain unpublished information proprietary to Autodesk, Inc., ("Autodesk") which is
12 protected by Canada and United States of America federal copyright law and by international treaties.
13 
14 The Data may not be disclosed or distributed to third parties, in whole or in part, without the prior
15 written consent of Autodesk.
16 
17 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED.
18 AUTODESK MAKES NO WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING BY CUSTOM
19 OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR
20 FITNESS FOR A PARTICULAR PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT
21 THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE.
22 
23 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS OR SUPPLIERS ("AUTODESK GROUP")
24 BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR
25 MULTIPLE DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
26 OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS
27 OF THE THEORY OF LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO,
28 NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
29 WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
30 
31 **************************************************************************************/
32 
33 #ifndef HIKVALIDATION_H
34 #define HIKVALIDATION_H
35 
36 #include "humanik.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
47 #define HIKRequiredBoneCount 15
48 
50 #define HIKSpineBoneCount 9
51 
53 #define HIKNeckBoneCount 9
54 
56 #define HIKRollBoneCount 8
57 
60  const int* HIKGetRequiredBoneList();
61 
65  const int* HIKGetSpineBoneList();
66 
70  const int* HIKGetNeckBoneList();
71 
75  const int* HIKGetRollBoneList();
76 
86  bool HIKValidateRequiredBone(const HIKCharacterDefinition *pCharacterDefinition, char* pErrorMsg = 0, unsigned int pErrorMsgSize = 0);
87 
98  bool HIKValidateSpine(const HIKCharacterDefinition *pCharacterDefinition, char* pErrorMsg = 0, unsigned int pErrorMsgSize = 0);
99 
110  bool HIKValidateNeck(const HIKCharacterDefinition *pCharacterDefinition, char* pErrorMsg = 0, unsigned int pErrorMsgSize = 0);
111 
120  bool HIKValidateHipsXAxis(const HIKCharacter *pCharacter, char* pErrorMsg = 0, unsigned int pErrorMsgSize = 0);
121 
130  bool HIKValidateArmsXAxis(const HIKCharacter *pCharacter, char* pErrorMsg = 0, unsigned int pErrorMsgSize = 0);
131 
140  bool HIKValidateSpineYAxis(const HIKCharacter *pCharacter, char* pErrorMsg = 0, unsigned int pErrorMsgSize = 0);
141 
150  bool HIKValidateBonePosition(const HIKCharacter *pCharacter, char* pErrorMsg = 0, unsigned int pErrorMsgSize = 0);
151 
153  bool HIKIsRollBone(int id);
154 
155 #ifdef __cplusplus
156 }
157 #endif
158 
159 #endif
bool HIKValidateRequiredBone(const HIKCharacterDefinition *pCharacterDefinition, char *pErrorMsg=0, unsigned int pErrorMsgSize=0)
Validates that the specified HIKCharacterDefinition contains all required Nodes.
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.
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...
const int * HIKGetRollBoneList()
Returns a list of integers that identify which Nodes in the HIKNodeId enumeration are roll Nodes...
const int * HIKGetRequiredBoneList()
Returns a list of integers that identify which Nodes in the HIKNodeId enumeration are required...
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.
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.
const int * HIKGetSpineBoneList()
Returns a list of integers that identify which Nodes in the HIKNodeId enumeration are part of the spi...
bool HIKIsRollBone(int id)
Returns true if the specified Node index corresponds to a roll bone in an arm or leg.
const int * HIKGetNeckBoneList()
Returns a list of integers that identify which Nodes in the HIKNodeId enumeration are part of the nec...
Defines which Nodes are to be used by an HIKCharacter.
Defines a character to be used with HumanIK.
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.
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...