/* //- // ========================================================================== // Copyright (C) 1995 - 2005 Alias Systems Corp. and/or its licensors. All // rights reserved. // // The coded instructions, statements, computer programs, and/or related // material (collectively the "Data") in these files are provided by Alias // Systems Corp. ("Alias") and/or its licensors for the exclusive use of the // Customer (as defined in the Alias Software License Agreement that // accompanies this Alias software). Such Customer has the right to use, // modify, and incorporate the Data into other products and to distribute such // products for use by end-users. // // THE DATA IS PROVIDED "AS IS". ALIAS HEREBY DISCLAIMS ALL WARRANTIES // RELATING TO THE DATA, INCLUDING, WITHOUT LIMITATION, ANY AND ALL EXPRESS OR // IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. IN NO EVENT SHALL ALIAS BE LIABLE FOR ANY DAMAGES // WHATSOEVER, WHETHER DIRECT, INDIRECT, SPECIAL, OR PUNITIVE, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, OR IN EQUITY, // ARISING OUT OF ACCESS TO, USE OF, OR RELIANCE UPON THE DATA. // ========================================================================== //+ */ #ifndef _WIN32 #include #else #include #endif #define kScaleStride 3 enum channelInfoOpCode { kInvalid = -999, kFactors = -5, kStartParse = -4, kEndParse = -3, kUnit = -2, kRotOrder = -1, }; enum channelInfoAxis { kInval = -1, kXAxis = 0, kYAxis = 1, kZAxis = 2 }; enum channelScaleOffsetType { kOffset = 0, kMult = 1 }; enum channelUsageType { kPosQuat = -3, kPosRot = -2, kRotation = 0, kPosition = 1, kScale = 2, }; enum channelInfoUnitType { kUnitRot, kUnitPos }; typedef struct { const char *shortName; const char *longName; CapChannelUsage use; union { int dim; int count; } p1; union { int extra; int opCode; } p2; union { int axisOffset; int factorType; } p3; int typeOffset; } channelParseInfo; typedef struct channelParseUnits { const char *shortName; const char *longName; int parm; float value; } channelParseUnits; typedef struct { char *shortName; char *longName; CapRotationOrder value; } channelParseRotOrder; typedef struct channelInfo { CapChannel chan; channelParseInfo *info; int startingCol; float factors[2][3][3]; CapRotationOrder rotOrder; float *data; /* numColumn entries */ char *name; /* string of exactly strlen(name) +1 */ struct channelInfo *next; } channelInfo; void channelInfoSetData(channelInfo *chan, int follow, float *rawData); channelInfo *channelInfoCreate(FILE *configFile, int lookForBegin, channelInfo *head);