home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / extras / Direct3D / Tools / Maya40 / MDt.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-08  |  22.0 KB  |  579 lines

  1. // Copyright (C) 1998-2001 Alias | Wavefront, a division of Silicon Graphics Limited.//
  2. // The information in this file is provided for the exclusive use of the
  3. // licensees of Alias | Wavefront.  Such users have the right to use, modify,
  4. // and incorporate this code into other products for purposes authorized
  5. // by the Alias | Wavefront license agreement, without fee.
  6. //
  7. // ALIAS | WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  8. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  9. // EVENT SHALL ALIAS | WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  10. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  11. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  12. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. // 
  15. // $Author: kpicott $
  16. // $Revision: /main/15 $
  17. // $Date: 2000/05/11 16:04:26 $
  18. //
  19. // Original Author:    XCW
  20. //
  21.  
  22. #ifndef __MDt_h__
  23. #define __MDt_h__
  24.  
  25. #ifdef WIN32
  26. #include <windows.h>
  27. #else
  28. #include <Xm/Xm.h>
  29. #endif
  30.  
  31. #include <maya/MObject.h>
  32. #include <maya/MIntArray.h>
  33.  
  34.  
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39.  
  40. // End of face/line set delimiter:
  41. //
  42. #define DtEND_OF_FACE -1
  43.  
  44. // File types:
  45. //
  46. #define DtInvalid     -1
  47. #define DtStatic       0
  48. #define DtAnimation    1
  49. #define DtKinematic    2
  50.  
  51. #define DT_INVALID      DtInvalid
  52. #define DT_STATIC       DtStatic
  53. #define DT_ANIMATION    DtAnimation
  54. #define DT_KINEMATIC    DtKinematic
  55.  
  56.  
  57. // Table structure for DSO labels and entry functions:
  58. //
  59. typedef struct 
  60. {
  61.  char*    label;
  62.  int    (*DtEntryFunc)(void);
  63.  int    (*DtCmdFunc)(int argc,char** argv);
  64.  int    (*DtExitFunc)(void);
  65.  char*  defaultExtension;
  66.  char*  magicString;
  67. } DtEntryTable;
  68.  
  69. // General data types: 
  70. //
  71. typedef struct { float    vec[3]; } DtVec3f;
  72. typedef struct { float    vec[2]; } DtVec2f;
  73. typedef struct { unsigned char r,g,b,a; } DtRGBA;
  74. typedef struct { float  r,g,b,a; } DtFltRGBA;
  75.  
  76. // Data types for DtPrintf
  77. typedef enum {
  78.       dStdout,
  79.       dStderr,
  80.       dPrompt,
  81.       dErrlog,
  82.       dPromptNoHistory
  83. } DtOutputType;
  84.  
  85. // Data types for Character Network support:
  86. //
  87. typedef int DtStateTableEntry;
  88.  
  89. typedef struct
  90. {
  91.     int    storage;
  92.     int    length;
  93.     int    nextNode;
  94.     int    entryFrame;
  95.     char*    data1;
  96.     char*    data2;
  97.     char*    data3;
  98.     char*    data4;
  99. } DtTransition;
  100.  
  101. typedef struct
  102. {
  103.     int    flags;
  104.     int    storage;
  105.     int    length;
  106.     char*    data1;
  107.     char*    data2;
  108.     char*    data3;
  109.     char*    data4;
  110. } DtSnippet;
  111.  
  112. typedef struct
  113. {
  114.     int            nodes;
  115.     int            arcs;
  116.     DtStateTableEntry*    adjacency;
  117.     DtTransition*        arcData;
  118.     DtSnippet*        nodeData;
  119.     char*            data1;
  120.     char*            data2;
  121.     char*            data3;
  122.     char*            data4;
  123. } DtStateTable;
  124.  
  125. #define DT_ERROR                        (-1)
  126. #define DT_CANCEL                       0
  127. #define DT_SUCCESS                      1
  128.  
  129. // Bit mask values to use with DtIsValid(): 
  130. //
  131. #define DT_ENV_AMBIENT_INTENSITY    0x01000001
  132. #define DT_ENV_AMBIENT_CLR        0x01000002
  133. #define DT_ENV_FOG_TYPE            0x01000004
  134. #define DT_ENV_FOG_CLR            0x01000008
  135. #define DT_ENV_FOG_VISIBILITY        0x01000010
  136.  
  137. #define DT_CAMERA            0x02000001    /* DtCameraIsValid()    all camera functions        */
  138. #define DT_CAMERA_POSITION        0x02000002    /* DtCameraIsValid()    DtCameraGetPosition()        */
  139. #define DT_CAMERA_ORIENTATION        0x02000004    /* DtCameraIsValid()    DtCameraGetOrientation()    */
  140. #define DT_CAMERA_MATRIX        0x02000006    /* DtCameraIsValid()    DtCameraGetMatrix()        */
  141. #define DT_CAMERA_ASPECT        0x02000010    /* DtCameraIsValid()    DtCameraGetAspect()        */
  142. #define DT_CAMERA_NEAR_CLIP        0x02000020    /* DtCameraIsValid()    DtCameraGetNearClip()        */
  143. #define DT_CAMERA_FAR_CLIP        0x02000040    /* DtCameraIsValid()    DtCameraGetFarClip()        */
  144. #define DT_CAMERA_FOCAL_DISTANCE    0x02000080    /* DtCameraIsValid()    DtCameraGetFocalDistance()    */
  145. #define DT_CAMERA_HEIGHT_ANGLE        0x02000100    /* DtCameraIsValid()    DtCameraGetHeightAngle()    */
  146. #define DT_CAMERA_HEIGHT        0x02000200    /* DtCameraIsValid()    DtCameraGetHeight()        */
  147.  
  148. #define DT_LIGHT            0x04000001    /* DtLightIsValid()     all light functions        */
  149. #define DT_LIGHT_ON            0x04000002    /* DtLightIsValid()    DtLightGetOn()            */
  150. #define DT_LIGHT_INTENSITY        0x04000004    /* DtLightIsValid()    DtLightGetIntensity()        */
  151. #define DT_LIGHT_COLOR            0x04000008    /* DtLightIsValid()    DtLightGetColor()        */
  152. #define DT_LIGHT_POSITION        0x04000010    /* DtLightIsValid()    DtLightGetPosition()        */
  153. #define DT_LIGHT_DIRECTION        0x04000020    /* DtLightIsValid()    DtLightGetDirection()        */
  154. #define DT_LIGHT_DROP_OFF_RATE        0x04000040    /* DtLightIsValid()    DtLightGetDropOffRate()        */
  155. #define DT_LIGHT_CUT_OFF_ANGLE        0x04000080    /* DtLightIsValid()    DtLightGetCutOffAngle()        */
  156.  
  157. #define DT_SHAPE            0x08000001    /* DtShapeIsValid()    all shape functions        */
  158. #define DT_SHAPE_MATRIX            0x08000002    /* DtShapeIsValid()    DtShapeGetMatrix()        */
  159. #define DT_SHAPE_VISIBLE        0x08000004
  160. #define DT_SHAPE_VERTICIES        0x08000008    /* DtShapeIsValid()    DtShapeGetVertices()        */
  161. #define DT_SHAPE_NORMALS        0x08000010    /* DtShapeIsValid()    DtShapeGetNormals()        */
  162. #define DT_SHAPE_TEXTURE_VERTICIES    0x08000020    /* DtShapeIsValid()    DtShapeGetTextureVertices()    */
  163.  
  164. #define DT_FACE                0x08000040    /* DtGroupIsValid()    the next three face functions    */
  165. #define DT_FACE_VERTEX_INDEX        0x08000080    /* DtGroupIsValid()    DtFaceGetIndex()         */
  166. #define DT_FACE_NORMAL_INDEX        0x08000100    /* DtGroupIsValid()    DtFaceGetNormalIndex()        */
  167. #define DT_FACE_TEXTURE_INDEX        0x08000200    /* DtGroupIsValid()    DtFaceGetTextureIndex()        */
  168.  
  169. #define DT_LINE                0x08000400    /* DtGroupIsValid()    the next three line functions    */
  170. #define DT_LINE_VERTEX_INDEX        0x08000800    /* DtGroupIsValid()    DtLineGetIndex()        */
  171. #define DT_LINE_NORMAL_INDEX        0x08001000    /* DtGroupIsValid()    DtLineGetNormalIndex()        */
  172. #define DT_LINE_TEXTURE_INDEX        0x08002000    /* DtGroupIsValid()    DtLineGetTextureIndex()        */
  173.  
  174. #define DT_POINT            0x08004000    /* DtGroupIsValid()    the next three point functions    */
  175. #define DT_POINT_VERTEX_INDEX        0x08008000    /* DtGroupIsValid()    DtPointGetIndex()        */
  176. #define DT_POINT_NORMAL_INDEX        0x08010000    /* DtGroupIsValid()    DtPointGetNormalIndex()     */
  177. #define DT_POINT_TEXTURE_INDEX        0x08020000    /* DtGroupIsValid()    DtPointGetTextureIndex()    */
  178.  
  179. #define DT_GROUP_MATRIX                0x08040000    /* DtGroupIsValid()    DtGroupGetMatrix()        */
  180.  
  181. #define DT_MATERIAL            0x10000001
  182. #define DT_MTL_AMBIENT_CLR        0x10000002    /* DtMtlIsValid()    DtMtlGetAmbientClr()        */
  183. #define DT_MTL_DIFFUSE_CLR        0x10000004    /* DtMtlIsValid()    DtMtlGetDiffuseClr()        */
  184. #define DT_MTL_SPECULAR_CLR        0x10000008    /* DtMtlIsValid()    DtMtlGetSpecularClr()        */
  185. #define DT_MTL_EMISSIVE_CLR        0x10000010    /* DtMtlIsValid()    DtMtlGetEmissiveClr()        */
  186. #define DT_MTL_SHININESS        0x10000020    /* DtMtlIsValid()    DtMtlGetShininess()        */
  187. #define DT_MTL_TRANSPARENCY        0x10000040
  188.  
  189. #define DT_TEXTURE            0x10000080    /* DtTextureIsValid()    all texture functions        */
  190. #define DT_TEXTURE_BLEND_CLR        0x10000100    /* DtTextureIsValid()    DtTextureGetBlendClr()        */
  191. #define DT_TEXTURE_TRANSLATION        0x10000200    /* DtTextureIsValid()    DtTextureGetTranslation()    */
  192. #define DT_TEXTURE_ROTATION        0x10000400    /* DtTextureIsValid()    DtTextureGetRotation()        */
  193. #define DT_TEXTURE_SCALE        0x10000800    /* DtTextureIsValid()    DtTextureGetScale()        */
  194. #define DT_TEXTURE_CENTER        0x10001000    /* DtTextureIsValid()    DtTextureGetCenter()        */
  195.  
  196.  
  197. // Camera types, returned by DtCameraGetType(): 
  198. //
  199. #define DT_PERSPECTIVE_CAMERA    1
  200. #define DT_ORTHOGRAPHIC_CAMERA    2
  201.  
  202. // Light types, returned by DtLightGetType():
  203. //
  204. #define DT_POINT_LIGHT        1
  205. #define DT_DIRECTIONAL_LIGHT    2
  206. #define DT_SPOT_LIGHT        3
  207. #define DT_AMBIENT_LIGHT    4
  208.  
  209. // Texture defines:
  210. //
  211. #define DT_REPEAT    1
  212. #define DT_CLAMP    2
  213. #define DT_MODULATE    1
  214. #define DT_DECAL    2
  215. #define DT_BLEND    3
  216.  
  217.  
  218. // GENERAL DT FUNCTIONS: 
  219. //
  220.  
  221. int    DtOpenModel                (void);
  222. int    DtGetFilename            (char** basename);
  223. int    DtGetDirectory            (char** directory);
  224.  
  225. void DtPrintf                 (DtOutputType, const char*, ...);
  226.  
  227. #ifdef WIN32
  228. int    DtGetParent                (int *widget);
  229. #else
  230. int    DtGetParent                (Widget* widget);
  231. #endif
  232.  
  233. int     DtSetFilename           (char *name);
  234. int     DtSetDirectory          (char *name);
  235.  
  236. void    DtSetUpdateShaders(int);
  237. int        DtGetUpdateShaders();
  238.  
  239. int    DtMatrixGetTranslation    (float* matrix,float* xTrans,float* yTrans,float* zTrans);
  240. int    DtMatrixGetQuaternion    (float* matrix,float* scalar,float* xAxis,float* yAxis,float* zAxis);
  241. int    DtMatrixGetRotation        (float* matrix,float* xRot,float* yRot,float* zRot);
  242. int    DtMatrixGetScale        (float* matrix,float* xScale,float* yScale,float* zScale);
  243. int DtMatrixGetTransforms(float *matrix, float *translate, 
  244.                           float *scale, float *quaternion, float *rotation);
  245.  
  246.  
  247.  
  248. #if 0
  249. void    DtImageRead     (char* name,int* width,int* height,
  250.                                         int* components,unsigned char** image);
  251. int    DtImageWrite     (char* name,char* key,int width,int height,
  252.                                         int components,unsigned char* image,
  253.                                         IMF_CAP_SETTING** settings,IMF_LUT* lut);
  254.  
  255. #endif
  256.  
  257. // SCENE FUNCTIONS:
  258. //
  259.  
  260. char *DtAPIVersion();
  261.  
  262. void    DtSceneGetName        (char** name);
  263. int     DtSceneGetType        (void);
  264.  
  265. int    DtFrameSet            (int frame);
  266. int    DtFrameGet            (void);
  267. int    DtFrameGetCount        (void);
  268. void    DtFrameSetStart        (int start);
  269. int    DtFrameGetStart      (void);
  270. void    DtFrameSetEnd        (int end);
  271. int    DtFrameGetEnd       (void);
  272. void    DtFrameSetBy        (int by);
  273. int    DtFrameGetBy        (void);
  274. int    DtFrameGetRange        (int* start,int* end,int* by);
  275. void    DtFrameGetKeyFrames    (int* count,int** frames);
  276.  
  277. void    DtEnvGetAttenuation    (float* a2,float* a1,float* a0);
  278. int    DtEnvGetFogType        (int *type);
  279. void    DtEnvGetFogColor    (float* red,float* green,float* blue);
  280. int    DtEnvGetFogVisibility    (float *vis);
  281.  
  282. // CAMERA FUNCTIONS: 
  283. //
  284.  
  285. int     DtCameraGetCount       (int* count);
  286. int     DtCameraGetType        (int cameraID,int* type);
  287. int        DtCameraGetName           (int cameraID,char** name);
  288. int     DtCameraGetPosition    (int cameraID, float* xTran,
  289.                                               float* yTran,float* zTran);
  290. int        DtCameraGetInterest    (int cameraID, float* xTran,
  291.                                               float* yTran,float* zTran);
  292.     
  293. int     DtCameraGetUpPosition  (int cameraID, float* xTran, 
  294.                                               float* yTran,float* zTran); 
  295. int     DtCameraGetOrientation (int cameraID, float* xRot,
  296.                                               float* yRot,float* zRot);
  297. int     DtCameraGetOrientationQuaternion(int cameraID,
  298.                                                         float* xRot,
  299.                                                         float* yRot,
  300.                                                         float* zRot,
  301.                                                         float* wRot);
  302. int     DtCameraGetMatrix       (int cameraID,float** matrix);
  303. int     DtCameraGetAspect       (int cameraID,float* aspect);
  304. int     DtCameraGetNearClip     (int cameraID,float* Lnear);
  305. int     DtCameraGetFarClip      (int cameraID,float* Lfar);
  306. int     DtCameraGetFocalDistance   (int cameraID,float* focal);
  307. int     DtCameraGetHeightAngle  (int cameraID,float* angle);
  308. int     DtCameraGetHeight       (int cameraID,float* height);
  309.  
  310. int     DtCameraIsValid         (int cameraID,int valid_bit);
  311.  
  312. // LIGHT FUNCTIONS:
  313. //
  314.  
  315. int    DtEnvGetAmbientIntensity  (float *intensity);
  316. void   DtEnvGetAmbientColor      (float* red, float* green,
  317.                                                                 float* blue);
  318. int     DtLightGetCount      (int* count);
  319. int     DtLightGetType       (int lightID,int* type);
  320. int     DtLightGetOn         (int lightID,int* on);
  321. int     DtLightGetIntensity  (int lightID,float* intensity);
  322. int     DtLightGetColor      (int lightID,
  323.                                                 float* red,float* green,
  324.                                                 float* blue);
  325. int     DtLightGetPosition   (int lightID,
  326.                                                 float* xTrans,float* yTrans,
  327.                                                 float* zTrans);
  328. int     DtLightGetDirection  (int lightID,
  329.                                                 float* xRot,float* yRot,
  330.                                                 float* zRot);
  331. int     DtLightGetDropOffRate  (int lightID,float* rate);
  332. int     DtLightGetCutOffAngle  (int lightID,float* angle);
  333. int     DtLightIsValid         (int lightID,int valid_bit);
  334.  
  335.  
  336. // SHAPE FUNCTIONS: 
  337. //
  338.  
  339. int    DtShapeGetCount                 (void);
  340.  
  341. void   DtShapeUpdate                       (void);
  342. int    DtShapeGetName                    (int shapeID,char** name);
  343. int    DtShapeGetParentID                (int shapeID );
  344. void   DtShapeGetParentName            (int shapeID,char** name);
  345. int    DtShapeGetMatrix                (int shapeID,float** matrix);
  346.  
  347.  
  348.  
  349. int     DtShapeGetRotationPivot     (int shapeID,float *x, float *y, float *z);
  350. int     DtShapeGetScalePivot        (int shapeID,float *x, float *y, float *z);
  351. int     DtShapeGetTranslation       (int shapeID,float *x, float *y, float *z);
  352. int     DtShapeGetRotation          (int shapeID,float *x, float *y, float *z);
  353. int     DtShapeGetScale             (int shapeID,float *x, float *y, float *z);
  354. int        DtShapeGetSetName            (int shapeID,char ** name);
  355.  
  356.  
  357.  
  358.  
  359. int    DtShapeGetVertexCount           (int shapeID,int* count);
  360. int    DtShapeGetVertex                (int shapeID,int index,DtVec3f* vertex);
  361. int    DtShapeGetVertices              (int shapeID,int* count,DtVec3f** vertices);
  362. int    DtShapeGetVerticesAnimated       (int shapeID, int *count, int **vertices);
  363. int    DtShapeGetTextureVertexCount    (int shapeID,int* count);
  364. int    DtShapeGetTextureVertex          (int shapeID,int index,DtVec2f* vertex);
  365. int    DtShapeGetTextureVertices        (int shapeID,int* count,DtVec2f** vertices);
  366. int    DtShapeGetNormalCount           (int shapeID,int* count);
  367. int    DtShapeGetNormal                (int shapeID,int index,DtVec3f* normal);
  368. int    DtShapeGetNormals               (int shapeID,int* count,DtVec3f** normals);
  369. int    DtShapeGetPolygonNormalCount (int shapeID,int* count);
  370. int    DtShapeGetPolygonNormal      (int shapeID,int index,DtVec3f* normal);
  371. int    DtShapeGetPolygonNormals     (int shapeID,int* count,DtVec3f** normals);
  372. int    DtShapeGetPolygonNormalIdx   (int shapeID,int groupID,int *count,int **indices);
  373.  
  374.  
  375. int    DtShapeGetVerticesColor         (int shapeID,int* count,DtRGBA** colors);
  376. int    DtShapeGetVertexColor           (int shapeID, int index, DtRGBA *color);
  377.  
  378.  
  379. int       DtShapeGetVerticesFaceColors    (int shapeID,int* count,DtFltRGBA** colors);
  380.  
  381. int       DtShapeGetChildren                (int shapeID,int* count,int** children);
  382.  
  383. int    DtShapeIsDoubleSided                (int shapeID);
  384. int       DtShapeIsOpposite                (int shapeID);
  385. int    DtShapeIsFlatShaded                 (int shapeID);
  386.  
  387. int     DtGroupGetCount                    (int shapeID);
  388.  
  389. int     DtGroupGetParentID                (int shapeID,int groupID);
  390. void    DtGroupGetName                    (int shapeID,int groupID,char** name);
  391. void    DtGroupGetParentName            (int shapeID,int groupID,char** name);
  392. int     DtGroupGetMatrix                (int shapeID,int groupID,float** matrix);
  393. int     DtGroupGetVertexCount           (int shapeID,int groupID,int* count);
  394. int     DtGroupGetVertex                (int shapeID,int groupID,int index,DtVec3f* vertex);
  395. int     DtGroupGetVertices              (int shapeID,int groupID,int* count,DtVec3f** vertices);
  396. int     DtGroupGetTextureVertexCount    (int shapeID,int groupID,int* count);
  397. int     DtGroupGetTextureVertex          (int shapeID,int groupID,int index,DtVec2f* vertex);
  398. int     DtGroupGetTextureVertices        (int shapeID,int groupID,int* count,DtVec2f** vertices);
  399. int     DtGroupGetNormalCount           (int shapeID,int groupID,int* count);
  400. int     DtGroupGetNormal                (int shapeID,int groupID,int index,DtVec3f* normal);
  401. int     DtGroupGetNormals               (int shapeID,int groupID,int* count,DtVec3f** normals);
  402.  
  403. int     DtPolygonGetCount               (int shapeID,int groupID,int* count);
  404. int     DtPolygonGetIndices             (int index,int* vCount,int** vIdx,int** nIdx,int** tIdx);
  405.  
  406. int     DtFaceGetIndexByGroup           (int shapeID,int groupID,int* count,int** indices);
  407. int     DtFaceGetNormalIndexByGroup     (int shapeID,int groupID,int* count,int** indices);
  408. int     DtFaceGetTextureIndexByGroup    (int shapeID,int groupID,int* count,int** indices);
  409. int     DtFaceGetIndexByShape           (int shapeID,int groupID,int* count,int** indices);
  410. int     DtFaceGetNormalIndexByShape     (int shapeID,int groupID,int* count,int** indices);
  411. int     DtFaceGetColorIndexByShape     (int shapeID,int groupID,int* count,int** indices);
  412. int     DtFaceGetTextureIndexByShape    (int shapeID,int groupID,int* count,int** indices);
  413. int     DtFaceGetMaterialIndex (int shapeID,int groupID,
  414.                                                 int *count,int **indices);
  415.  
  416.  
  417. int    DtLineGetIndex            (int shapeID,int groupID,
  418.                                                 int* count,int** indices);
  419. int    DtLineGetNormalIndex    (int shapeID,int groupID,
  420.                                                 int* count,int** indices);
  421. int    DtLineGetTextureIndex    (int shapeID,int groupID,
  422.                                                 int* count,int** indices);
  423. int    DtPointGetIndex            (int shapeID,int groupID,
  424.                                                 int* count,int** indices);
  425. int    DtPointGetNormalIndex    (int shapeID,int groupID,
  426.                                                 int* count,int** indices);
  427. int    DtPointGetTextureIndex    (int shapeID,int groupID,
  428.                                                 int* count,int** indices);
  429.  
  430. int    DtNurbsGetNumCtrlPoints    (int shapeID,int groupID,
  431.                                                 int* uNum,int* vNum);
  432. int    DtNurbsGetIndex            (int shapeID,int groupID,
  433.                                                 int* count,int** indices);
  434. int    DtNurbsGetUKnotVector    (int shapeID,int groupID,
  435.                                                 int* num,float** uKnotVector);
  436. int    DtNurbsGetVKnotVector    (int shapeID,int groupID,
  437.                                                 int* num,float** vKnotVector);
  438.  
  439. int    DtNurbsGetTrimVertices    (int shapeID,int groupID,
  440.                                                 int* count,DtVec2f** vertices);
  441. int    DtNurbsTrimGetCount    (int shapeID,int groupID,int* count);
  442. int    DtNurbsTrimGetIndex        (int shapeID,int groupID,
  443.                                     int trimID,int* count,int** indices);
  444. int    DtNurbsTrimGetKnotVector    (int shapeID,int groupID,
  445.                                     int trimID,int* num,float** knotVector);
  446.  
  447. int     DtShapeIsValid        (int shapeID,int valid_bit);
  448. int     DtGroupIsValid        (int shapeID,int groupID,int valid_bit);
  449.  
  450. // MATERIAL FUNCTIONS:
  451. //
  452.  
  453.  
  454. int  DtPolygonMtlGetName (int shapeID,int groupID,int index,
  455.                                                                 char** name);
  456. int     DtMtlGetSceneCount    (int* count);        
  457.  
  458. int     DtMtlGetName        (int shapeID,int groupID,char** name);
  459.  
  460. int     DtMtlGetNameByID    (int mtl_id,char** name);        
  461. int     DtMtlGetID            (int shapeID,int groupID,int* mtl_id);
  462. int     DtMtlGetAllClrbyID    (int mtl_id,int index,
  463.                             float* ared,float* agreen,float* ablue,
  464.                             float* dred,float* dgreen,float* dblue,
  465.                             float* sred,float* sgreen,float* sblue,
  466.                             float* ered,float* egreen,float* eblue,
  467.                             float* shininess,float* transparency);
  468. int     DtMtlGetAmbientClr    (char* name,int index,
  469.                                         float* red,float* green,float* blue);
  470. int     DtMtlGetDiffuseClr    (char* name,int index,
  471.                                         float* red,float* green,float* blue);
  472. int     DtMtlGetSpecularClr    (char* name,int index,
  473.                                         float* red,float* green,float* blue);
  474. int     DtMtlGetEmissiveClr    (char* name,int index,
  475.                                         float* red,float* green,float* blue);
  476. int     DtMtlGetShininess    (char* name,int index,float* shininess);
  477. int     DtMtlGetTransparency    (char* name,int index,float* transparency);
  478. int     DtMtlGetLightSource    (char* name,int index,int* lightsource);
  479. int     DtMtlIsRflMap        (char* name);
  480. int        DtMtlHasAlpha        (char* name);
  481. int        DtMtlHasAlphaById    (int mtl_id);
  482. int     DtTextureGetSceneCount    (int* count);
  483. int     DtTextureGetCount    (int shapeID,int* count);
  484. int     DtTextureGetName    (char* mtl_name,char** name);
  485. int        DtTextureGetFileName(char *mtl_name, char **name);
  486. int     DtTextureGetID        (int mtl_id,int* textureID);
  487. int        DtTextureGetNameID(int textureID,char** name);        
  488. int     DtTextureGetFileNameID    (int textureID,char** name);
  489.  
  490. int     DtTextureGetNameMulti (char* mtl_name, char *texType, char** name);
  491. int     DtTextureGetIDMulti   (int mtl_id, char *texType, int* textureID);
  492.  
  493. int     DtTextureGetWrap    (char* name,int* horizontal,int* vertical);
  494. int     DtTextureGetMode    (char* name,int* mode);
  495. int     DtTextureGetBlendClr    (char* name,float* red,float* green,float* blue);
  496. int     DtTextureGetImageSize    (char* name,int* width,int* height,int* components);
  497. int     DtTextureGetImageSizeByID    (int LID,int* width,int* height,int* components);
  498. int     DtTextureGetImage        (char* name,unsigned char** image);
  499. int     DtTextureGetImageByID    (int LID,unsigned char** LImage);        
  500. int     DtTextureGetTranslation    (char* name,float* s,float* t);
  501. int     DtTextureGetRotation    (char* name,float* angle);
  502. int     DtTextureGetScale        (char* name,float* s,float* t);
  503. int     DtTextureGetCenter        (char* name,float* x,float* y);
  504.  
  505. int     DtMtlIsValid            (char* name,int valid_bit);
  506. int     DtTextureIsValid        (char* name,int valid_bit);
  507.  
  508. int     DtFaceCount                        (int indexCnt,int* indices);
  509. int     DtIndexCount                    (int* indices);
  510.  
  511. // CHARACTER NETWORK STATE TABLE FUNCTIONS:
  512. //
  513.  
  514. int     DtCnetCharacterCount            (int* count);
  515. int DtCnetCharacterGetShapes    (int cnetId, int *count, int ** shapelist);
  516. int DtCnetCharacterGetFrameRange(int cnetId, int *start, int *end);
  517.  
  518. int     DtCnetCharacterName                (int cnetId,char** name);
  519. int    DtCnetGetStateTable                (int cnetId,DtStateTable** table);
  520.  
  521. // KINEMATION FUNCTIONS:
  522. //
  523. int    DtKinGetBodyCount    (int* count);
  524. int    DtKinGetBodyName    (int bodyID,char** name);
  525. int    DtKinGetSegmentCount    (int bodyID,int* count);
  526. int    DtKinGetSegmentName    (int bodyID,int segID,char** name);
  527. int    DtKinGetSegmentXfm    (int bodyID,int segID,int frame,float** xfm);
  528. int    DtKinGetGroupCount    (int bodyID,int segID,int* count);
  529. int    DtKinGetGroupName    (int bodyID,int segID,int groupID,char** name);
  530.  
  531. void    dtPolygonGetFaceList    (int shapeID,int groupID,int** list,int* count);
  532.  
  533.  
  534. // SCENE INPUT SOURCE DEFINES (formally from Scene.h):
  535.  
  536. #define DN_ALL            -3
  537. #define DN_NO_TEXTURE        -1
  538.  
  539. #define DN_CAMERA_EXT        "cam"        /* scene entity types */
  540. #define DN_LIGHT_EXT        "lgt"
  541. #define DN_OBJECT_EXT        "obj"
  542. #define DN_REFLECT_EXT        "rfm"
  543.  
  544. #define DN_SWITCH        "Switch"    /* scene graph specific nodes */
  545. #define DN_COMPLEX        "Complex"
  546. #define DN_DRAWSTYLE        "DrawStyle"    
  547. #define DN_MTL_BIND        "MtlBind"
  548.  
  549. #define DN_MATERIAL        "Material"
  550. #define DN_TOPOLOGY        "Topology"
  551. #define DN_FACES        "Faces"
  552. #define DN_LINES        "Lines"
  553. #define DN_POINTS        "Points"
  554. #define DN_TRIM            "Trim"
  555. #define DN_NURBS        "Nurbs"
  556.  
  557.  
  558. #ifdef __cplusplus
  559. };
  560. #endif
  561.  
  562. //
  563. //    Now for some cplusplus enabled functions
  564. //
  565.  
  566. int DtShapeGetTRSAnimKeys( int shapeID, MIntArray *keyFrames );
  567. int DtShapeGetVtxAnimKeys( int shapeID, MIntArray *keyFrames );
  568.  
  569. int DtLightGetTRSAnimKeys( int lightID, MIntArray *keyFrames );
  570. int DtLightGetAnimKeys( int lightID, MIntArray *keyFrames );
  571.  
  572. int DtCameraGetTRSAnimKeys( int cameraID, MIntArray *keyFrames );
  573. int DtCameraGetAnimKeys( int cameraID, MIntArray *keyFrames );
  574.  
  575. int DtMtlGetAnimKeys( int mtlID, MIntArray *keyFrames );
  576.  
  577.  
  578. #endif    /* __MDt_h__ */
  579.