home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- Name: apobj.h, AME_HEAD_apobj.h
-
- Description: AME2/API object data type definitions
-
- Author: AME Group
- Autodesk, Inc.
-
- (C) Copyright 1988-1992 by Autodesk, Inc.
- *******************************************************************************
- * *
- * This program is copyrighted by Autodesk, Inc. and is licensed *
- * to you under the following conditions. You may not distribute *
- * or publish the source code of this program in any form. You *
- * may incorporate this code in object form in derivative works *
- * provided such derivative works are (i.) are designed and *
- * intended to work solely with Autodesk, Inc. products, and *
- * (ii.) contain Autodesk's copyright notice "(C) Copyright *
- * 1988-1992 by Autodesk, Inc." *
- * *
- * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. *
- * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MER- *
- * CHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. *
- * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE *
- * UNINTERRUPTED OR ERROR FREE. *
- * *
- *******************************************************************************
-
- Notes:
-
-
- ******************************************************************************/
-
- /* Object Types */
-
- typedef enum {
- AP_REGION = 0,
- AP_SOLID
- } ap_Objtype;
-
- /* Object Primitive Types */
-
- typedef enum {
- AP_BOX = 0,
- AP_CON,
- AP_CYL,
- AP_SPH,
- AP_TOR,
- AP_FIL,
- AP_CHA,
- AP_BOO,
- AP_EXT,
- AP_REV,
- AP_WED,
- AP_CIR,
- AP_POLY
- } ap_Primtype;
-
- /* Boolean Operators */
-
- typedef enum {
- AP_SUBTRACT = 0,
- AP_INT,
- AP_UNION
- } ap_Booltype;
-
- /* Vertex Types for Swept Profiles */
-
- typedef enum {
- AP_PT_LINE = 0, /* End of a Line */
- AP_PT_ARCEND /* End of an Arc */
- } ap_Pointtype;
-
- /* Vertex Coordinates for Swept Profile */
-
- typedef struct ap_swp_pts {
- ap_Real x;
- ap_Real y;
- ap_Pointtype type;
- } ap_Swp_pts;
-
- /* Object Primitive Parameters */
-
- struct ap_cirinfo {
- ap_Real r;
- }; /* Circle */
-
- struct ap_polyinfo {
- long n;
- ap_Swp_pts *pts;
- }; /* Polyline */
-
- struct ap_boxinfo {
- ap_Real x, y, z;
- }; /* Box */
-
- struct ap_wedinfo {
- ap_Real x, y, z;
- }; /* Wedge */
-
- struct ap_cylinfo {
- ap_Real rx, ry, h;
- }; /* Cylinder */
-
- struct ap_coninfo {
- ap_Real rx, ry, h;
- }; /* Cone */
-
- struct ap_sphinfo {
- ap_Real r;
- }; /* Sphere */
-
- struct ap_torinfo {
- ap_Real rmaj, rmin;
- }; /* Torus */
-
- struct ap_extinfo {
- ap_Real h, taper;
- long n;
- ap_Swp_pts *pts;
- }; /* Extrusion Solid */
-
- struct ap_revinfo {
- ap_Real angle;
- long n;
- ap_Swp_pts *pts;
- }; /* Revolution Solid */
-
- struct ap_booinfo {
- ap_Booltype op;
- ap_Objid op1;
- ap_Objid op2;
- }; /* Composite Solid */
-
- /* Fillet and Chamfer Types */
-
- typedef enum {
- AP_STRAIGHT, /* Straight Fillet Between Two Planar Faces */
- AP_CIRCULAR /* Circular Fillet Between Cyl, Con and Pln */
- } ap_Filcha;
-
- struct ap_filinfo {
- ap_Filcha type;
- ap_Real r;
- }; /* Fillet Solid */
-
- struct ap_chainfo {
- ap_Filcha type;
- ap_Real d1, d2;
- }; /* Chamfer Solid */
-
- /* Object Primitive Union */
-
- typedef union {
- struct ap_cirinfo cir;
- struct ap_polyinfo poly;
- struct ap_boxinfo box;
- struct ap_wedinfo wed;
- struct ap_coninfo con;
- struct ap_cylinfo cyl;
- struct ap_sphinfo sph;
- struct ap_torinfo tor;
- struct ap_revinfo rev;
- struct ap_chainfo cha;
- struct ap_booinfo boo;
- struct ap_extinfo ext;
- struct ap_filinfo fil;
- } ap_Primitive;
-
- /* Object Information */
-
- typedef struct ap_objinfo {
- ap_Objtype obj; /* Region or Solid */
- ap_Primtype type; /* Type of Object Primitive */
- ap_Bool iswire; /* Representation Wireframe/Mesh */
- ap_Objid parent; /* Object Id for Object's Parent */
- ap_Bool isnull; /* True if the Object is NULL */
- ap_Trans3d mat; /* Rigid Motion of the Object */
- short color; /* Color of the Object */
- char matl[64]; /* The Material of the Object */
- ap_Primitive prim; /* The Object Primitive */
- } ap_Objinfo; /* Object Information */
-
- /* Object Representation Types */
-
- typedef enum {
- AP_POSTMESH,
- AP_POSTWIRE,
- AP_UNPOST
- } ap_Posttype;
-
- /* Ray Projection Direction for Mass Properties Calculations */
-
- typedef enum {
- AP_X_DIR = 0,
- AP_Y_DIR,
- AP_Z_DIR
- } ap_Rayproj;
-
- /* Object Mass Point Structure */
-
- typedef struct {
- ap_Real x, std_x;
- ap_Real y, std_y;
- ap_Real z, std_z;
- } ap_Mppt;
-
- /* Object Mass Properties Structure */
-
- typedef struct ap_massprop {
- ap_Rayproj projdir; /* Direction or Ray Firing */
- short sublevel; /* Level of Subdivision (3D only) */
- ap_Bool coplanar; /* True if the Region and UCS xy Plan are Coplanar */
- ap_Real area; /* Area of Object (2D only) */
- ap_Real perimeter; /* Perimeter of Region (2D only) */
- ap_Real mass; /* Mass of the Object (3D only) */
- ap_Real volume; /* Volume of the Object (3D only) */
- ap_Real std_vol; /* Error in Massprop Volume (3D only)*/
- ap_Mppt centroid; /* Centroid */
- ap_Mppt momint; /* Moments of Inertia */
- ap_Mppt prodint; /* Product of Inertia */
- ads_point radgyr; /* Radii of Gyration */
- ads_point prinmomt; /* Principal Moments about the Centroid */
- ads_point prindir[3]; /* Principal Directions of the respective PM */
- } ap_Massprop;
-
- /* Object Material Property Structure */
-
- typedef struct {
- char name[64]; /* Material Name */
- char desc[64]; /* Material Description */
- ap_Real density; /* Density */
- ap_Real ymodulus; /* Young's Modulus */
- ap_Real pratio; /* Poisson's Ratio */
- ap_Real ystress; /* Yield Strength */
- ap_Real uystress; /* Ultimate Tensile Strength */
- ap_Real tconduct; /* Thermal Conductivity */
- ap_Real lexpans; /* Coeff. of Linear Expansion */
- ap_Real spheat; /* Specific Heat */
- } ap_Material;
-
-
- /* EOF */
-