home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p024 / 15.img / AME2.LIB / APOBJ.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-17  |  7.6 KB  |  244 lines

  1. /******************************************************************************
  2. Name: apobj.h, AME_HEAD_apobj.h
  3.  
  4. Description: AME2/API object data type definitions
  5.  
  6. Author: AME Group
  7.         Autodesk, Inc.
  8.  
  9. (C) Copyright 1988-1992 by Autodesk, Inc.
  10. *******************************************************************************
  11. *                                                                             *
  12. *    This program is copyrighted by Autodesk, Inc. and is  licensed           *
  13. *    to you under the following conditions.  You may not distribute           *
  14. *    or  publish the source code of this program in any form.   You           *
  15. *    may  incorporate this code in object form in derivative  works           *
  16. *    provided  such  derivative  works  are  (i.) are  designed and           *
  17. *    intended  to  work  solely  with  Autodesk, Inc. products, and           *
  18. *    (ii.)  contain  Autodesk's  copyright  notice  "(C)  Copyright           *
  19. *    1988-1992 by Autodesk, Inc."                                             *
  20. *                                                                             *
  21. *    AUTODESK  PROVIDES THIS PROGRAM "AS IS" AND WITH  ALL  FAULTS.           *
  22. *    AUTODESK  SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF  MER-           *
  23. *    CHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK,  INC.           *
  24. *    DOES  NOT  WARRANT THAT THE OPERATION OF THE PROGRAM  WILL  BE           *
  25. *    UNINTERRUPTED OR ERROR FREE.                                             *
  26. *                                                                             *
  27. *******************************************************************************
  28.  
  29. Notes:
  30.  
  31.  
  32. ******************************************************************************/
  33.  
  34. /* Object Types */
  35.  
  36. typedef enum {
  37.     AP_REGION = 0,
  38.     AP_SOLID
  39.    } ap_Objtype;
  40.  
  41. /* Object Primitive Types */
  42.  
  43. typedef enum {
  44.     AP_BOX = 0,
  45.     AP_CON,
  46.     AP_CYL,
  47.     AP_SPH,
  48.     AP_TOR,
  49.     AP_FIL,
  50.     AP_CHA,
  51.     AP_BOO,
  52.     AP_EXT,
  53.     AP_REV,
  54.     AP_WED,
  55.     AP_CIR,
  56.     AP_POLY
  57.    } ap_Primtype;
  58.  
  59. /* Boolean Operators */
  60.  
  61. typedef enum {
  62.     AP_SUBTRACT = 0,
  63.     AP_INT,
  64.     AP_UNION
  65.    } ap_Booltype;
  66.  
  67. /* Vertex Types for Swept Profiles */
  68.  
  69. typedef enum {
  70.     AP_PT_LINE = 0,                   /* End of a Line */
  71.     AP_PT_ARCEND                      /* End of an Arc */
  72.    } ap_Pointtype;
  73.  
  74. /* Vertex Coordinates for Swept Profile */
  75.  
  76. typedef struct ap_swp_pts {
  77.     ap_Real x;
  78.     ap_Real y;
  79.     ap_Pointtype type;
  80. } ap_Swp_pts;
  81.  
  82. /* Object Primitive Parameters */
  83.  
  84. struct ap_cirinfo {
  85.     ap_Real r;
  86. };                                    /* Circle */
  87.  
  88. struct ap_polyinfo {
  89.     long n;
  90.     ap_Swp_pts *pts;
  91. };                                    /* Polyline */
  92.  
  93. struct ap_boxinfo {
  94.     ap_Real x, y, z;
  95. };                                    /* Box */
  96.  
  97. struct ap_wedinfo {
  98.     ap_Real x, y, z;
  99. };                                    /* Wedge */
  100.  
  101. struct ap_cylinfo {
  102.     ap_Real rx, ry, h;
  103. };                                    /* Cylinder */
  104.  
  105. struct ap_coninfo {
  106.     ap_Real rx, ry, h;
  107. };                                    /* Cone */
  108.  
  109. struct ap_sphinfo {
  110.     ap_Real r;
  111. };                                    /* Sphere */
  112.  
  113. struct ap_torinfo {
  114.     ap_Real rmaj, rmin;
  115. };                                    /* Torus */
  116.  
  117. struct ap_extinfo {
  118.     ap_Real h, taper;
  119.     long n;
  120.     ap_Swp_pts *pts;
  121. };                                    /* Extrusion Solid */
  122.  
  123. struct ap_revinfo {
  124.     ap_Real angle;
  125.     long n;
  126.     ap_Swp_pts *pts;
  127. };                                    /* Revolution Solid */
  128.  
  129. struct ap_booinfo {
  130.     ap_Booltype op;
  131.     ap_Objid op1;
  132.     ap_Objid op2;
  133. };                                    /* Composite Solid */
  134.  
  135. /* Fillet and Chamfer Types */
  136.  
  137. typedef enum {
  138.     AP_STRAIGHT,             /* Straight Fillet Between Two Planar Faces */
  139.     AP_CIRCULAR              /* Circular Fillet Between Cyl, Con and Pln */
  140.    } ap_Filcha;
  141.  
  142. struct ap_filinfo {
  143.     ap_Filcha type;
  144.     ap_Real r;
  145. };                                    /* Fillet Solid */
  146.  
  147. struct ap_chainfo {
  148.     ap_Filcha type;
  149.     ap_Real d1, d2;
  150. };                                    /* Chamfer Solid */
  151.  
  152. /* Object Primitive Union */
  153.  
  154. typedef union {
  155.     struct ap_cirinfo cir;
  156.     struct ap_polyinfo poly;
  157.     struct ap_boxinfo box;
  158.     struct ap_wedinfo wed;
  159.     struct ap_coninfo con;
  160.     struct ap_cylinfo cyl;
  161.     struct ap_sphinfo sph;
  162.     struct ap_torinfo tor;
  163.     struct ap_revinfo rev;
  164.     struct ap_chainfo cha;
  165.     struct ap_booinfo boo;
  166.     struct ap_extinfo ext;
  167.     struct ap_filinfo fil;
  168. } ap_Primitive;
  169.  
  170. /* Object Information */
  171.  
  172. typedef struct ap_objinfo {
  173.     ap_Objtype obj;                   /* Region or Solid */
  174.     ap_Primtype type;                 /* Type of Object Primitive */
  175.     ap_Bool iswire;                   /* Representation Wireframe/Mesh */
  176.     ap_Objid parent;                  /* Object Id for Object's Parent */
  177.     ap_Bool isnull;                   /* True if the Object is NULL */
  178.     ap_Trans3d mat;                   /* Rigid Motion of the Object */
  179.     short color;                      /* Color of the Object */
  180.     char matl[64];                    /* The Material of the Object */
  181.     ap_Primitive prim;                /* The Object Primitive */
  182. } ap_Objinfo;                         /* Object Information  */
  183.  
  184. /* Object Representation Types */
  185.  
  186. typedef enum {
  187.     AP_POSTMESH,
  188.     AP_POSTWIRE,
  189.     AP_UNPOST
  190.    } ap_Posttype;
  191.  
  192. /* Ray Projection Direction for Mass Properties Calculations */
  193.  
  194. typedef enum {
  195.     AP_X_DIR = 0,
  196.     AP_Y_DIR,
  197.     AP_Z_DIR
  198.    } ap_Rayproj;
  199.  
  200. /* Object Mass Point Structure */
  201.  
  202. typedef struct {
  203.     ap_Real x, std_x;
  204.     ap_Real y, std_y;
  205.     ap_Real z, std_z;
  206. } ap_Mppt;
  207.  
  208. /* Object Mass Properties Structure */
  209.  
  210. typedef struct ap_massprop {
  211.     ap_Rayproj projdir;               /* Direction or Ray Firing */
  212.     short sublevel;                   /* Level of Subdivision (3D only) */
  213.     ap_Bool coplanar;                 /* True if the Region and UCS xy Plan are Coplanar */
  214.     ap_Real area;                     /* Area of Object (2D only) */
  215.     ap_Real perimeter;                /* Perimeter of Region (2D only) */
  216.     ap_Real mass;                     /* Mass of the Object (3D only) */
  217.     ap_Real volume;                   /* Volume of the Object (3D only) */
  218.     ap_Real std_vol;                  /* Error in Massprop Volume (3D only)*/
  219.     ap_Mppt centroid;                 /* Centroid */
  220.     ap_Mppt momint;                   /* Moments of Inertia */
  221.     ap_Mppt prodint;                  /* Product of Inertia */
  222.     ads_point radgyr;                 /* Radii of  Gyration */
  223.     ads_point prinmomt;               /* Principal Moments about the Centroid */
  224.     ads_point prindir[3];             /* Principal Directions of the respective PM */
  225. } ap_Massprop;
  226.  
  227. /* Object Material Property Structure */
  228.  
  229. typedef struct {
  230.     char name[64];                    /* Material Name */
  231.     char desc[64];                    /* Material Description */
  232.     ap_Real density;                  /* Density */
  233.     ap_Real ymodulus;                 /* Young's Modulus */
  234.     ap_Real pratio;                   /* Poisson's Ratio */
  235.     ap_Real ystress;                  /* Yield Strength */
  236.     ap_Real uystress;                 /* Ultimate Tensile Strength */
  237.     ap_Real tconduct;                 /* Thermal Conductivity */
  238.     ap_Real lexpans;                  /* Coeff. of Linear Expansion */
  239.     ap_Real spheat;                   /* Specific Heat */
  240. } ap_Material;
  241.  
  242.  
  243. /* EOF */
  244.