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

  1. /******************************************************************************
  2. Name: apbndry.h, AME_APLIB_APHEAD_apbndry.h
  3.  
  4. Description: AME2/API Object's boundary 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. /* Surface Types */
  35.  
  36. typedef enum {
  37.     AP_PLANAR = 0,
  38.     AP_CYLINDRICAL,
  39.     AP_CONICAL,
  40.     AP_SPHERICAL,
  41.     AP_TOROIDAL,
  42.     AP_SURFTYPE4BYTES = 65537 /* Dummy value to ensure 4 bytes memory spaces */
  43.    } ap_Surftype;
  44.  
  45. /* Surface Parameters */
  46.  
  47. struct ap_sphsurf {
  48.     ap_Real r;
  49. };                                    /* Spherical */
  50.  
  51. struct ap_consurf {
  52.     ap_Real rx, ry;
  53. };                                    /* Conical */
  54.  
  55. struct ap_cylsurf {
  56.     ap_Real rx, ry;
  57. };                                    /*Cylindrical */
  58.  
  59. struct ap_plasurf {
  60.     ads_point norm;
  61. };                                    /* Planar */
  62.  
  63. struct ap_torsurf {
  64.     ap_Real rmaj, rmin;
  65. };                                    /* Toroidal */
  66.  
  67. /* Face Information */
  68.  
  69. typedef struct ap_faceinfo {
  70.     ap_Surftype stype;
  71.     ap_Real perimeter;                /* Sum of Edges */
  72.     ap_Trans3d face_rm;               /* Current Rigid Motion */
  73.     union {
  74.         struct ap_sphsurf sph;
  75.         struct ap_consurf con;
  76.         struct ap_cylsurf cyl;
  77.         struct ap_torsurf tor;
  78.         struct ap_plasurf pla;
  79.     } surf;
  80. } ap_Faceinfo;
  81.  
  82. /* Face List Structure */
  83.  
  84. typedef struct ap_facelist {
  85.     ap_Featid face_id;                /* The Unique Face Id of the Surface */
  86.     ap_Faceinfo *face;                /* Information of The Face */
  87.     struct ap_facelist *facenext;     /* Pointer to the Next Face */
  88. } ap_Facelist;
  89.  
  90. /* Curve Types */
  91.  
  92. typedef enum {
  93.     AP_LINE = 0,
  94.     AP_ELLIPSE,
  95.     AP_HYPERBOLA,
  96.     AP_PARABOLA,
  97.     AP_CYLCYL,
  98.     AP_CONCON,
  99.     AP_CURVETYPE4BYTES = 65537 /* Dummy value to ensure 4 bytes memory spaces */
  100.    } ap_Curvetype;
  101.  
  102. /* Curve Parameters */
  103.  
  104. struct ap_ellseg {
  105.     ap_Real ru, rv;
  106. };                                    /* Ellipse */
  107.  
  108. struct ap_parseg {
  109.     ap_Real fourp;
  110. };                                    /* Parabola */
  111.  
  112. struct ap_hypseg {
  113.     ap_Real a, b;
  114. };                                    /* Hyperbola */
  115.  
  116. struct ap_ccseg
  117. {
  118.     ap_Real a, b, c, d, e, f, g, h, i, radx, rady, sign;
  119. };  /* Cylinder Cylinder Intersection */
  120.  
  121. struct ap_kkseg
  122. {
  123.     ap_Real a, b, c, d, e, f, g, h, i, alpha, beta, sign;
  124. };  /* Cone Cone Intersection */
  125.  
  126. /* Edge Information */
  127.  
  128. typedef struct ap_edgeinfo {
  129.     ap_Curvetype ctype;
  130.     ap_Real edge_len;                 /* Length of the Edge */
  131.     ap_Real s_parm, e_parm;           /* Start and End Parameters t0, t1 */
  132.     ap_Trans3d edge_rm;               /* Current Rigid Motion */
  133.     ads_point s_pt, e_pt;             /* End Points of the Edge */
  134.     union {
  135.         struct ap_ellseg ell;
  136.         struct ap_parseg par;
  137.         struct ap_hypseg hyp;
  138.         struct ap_ccseg cce;
  139.         struct ap_kkseg kke;
  140.     } curve;
  141. } ap_Edgeinfo;
  142.  
  143. /* Edge List Structure */
  144.  
  145. typedef struct ap_edgelist {
  146.     ap_Featid edge_id;                /* Unique Edge ID for a Edge */
  147.     ap_Edgeinfo *edge;                /* Edge Information of the Edge */
  148.     struct ap_edgelist *edgenext;     /* Pointer to the Next Edge */
  149. } ap_Edgelist;
  150.  
  151. /* Point and Edge Classification */
  152.  
  153. typedef enum {
  154.     AP_FAILED,
  155.     AP_OFFOBJECT,
  156.     AP_ONOBJECT,
  157.     AP_INOBJECT
  158.    } ap_Class;
  159.  
  160. typedef struct ap_edgeseg {
  161.     ap_Class edge_class;
  162.     ap_Real s_parm;
  163.     ap_Real e_parm;
  164. } ap_Edgeseg;
  165.  
  166. typedef struct ap_seglist {
  167.     ap_Edgeseg seg;
  168.     struct ap_seglist *segnext;
  169. } ap_Seglist;
  170.  
  171. /* Parameter Structure */
  172.  
  173. typedef struct ap_param {
  174.     ap_Real param1;
  175.     ap_Real param2;
  176. } ap_Param;
  177.  
  178.  
  179. /* EOF */
  180.  
  181.  
  182.  
  183.  
  184.  
  185.