VIDI Presenter 3D Animator Toolkit
Filename: EscherDefs.h
#define NopType 0 /* No-Operation, data type ignored by Modeler */
#define GroupType 1 /* Header for group of Elements/Groups */
#define DotType 2 /* A single XYZ point (obsolete) */
#define LineType 3 /* Line + All Continuations */
#define ArcType 4 /* arc/circle definition */
#define rArcType 5 /* rotate arc/circle definition */
#define CubeType 6 /* Cube consisting of 8 vertices */
#define MeshType 7 /* Spline Mesh with lots of splines */
#define PPtype 8 /* Grid Of Points, Line Surface */
#define PCPtype 9 /* Smooth Surface contains all factors */
#define PCLtype 10 /* Smooth Line contains all factors */
#define ParallelType 11 /* Parallel Lines with all continuations */
#define PictType 12 /* PICT display in the database*/
#define paletteType 13 /* Pallete of colors for the group it's in */
#define InsertType 14 /* Historical - Not Used (treat as no-op) */
#define LibraryType 15 /* Historical - Not Used (treat as no-op) */
#define sCubeType 16
#define CylinderType 17 /* also doubles as cone */
#define SphereType 18 /* Replaces old SphereType */
#define DiskType 19
#define TorusType 20
#define PlaneType 21
#define PrismType 22 /* also doubles as PyramidType */
#define PPStype 23 /* Grid of Points with normals */
#define MultiType 24 /* sub structure contains lines, splines and arcs */
#define JoinType 25 /* Join mesh of points */
#define MorphMeshType 26 /* Spline Mesh on Steroids */
#ifdef __powerc
#define bitfield unsigned
#else
#define bitfield unsigned char
#endif
typedef struct XYZr { /* used for normals or when precision not a must */
float x, y, z;
} XYZr;
typedef struct MaxType { /* used to hold box limits for objects/groups */
Point3D Min, Max;
} MaxType;
typedef struct TypeSize { /* this is at the start of every datatype */
uchar Typ, Siz, Color, Style_;
} TypeSize;
typedef struct CLdat_Rec { /* used in place of Group Tmat for cameras/lights, etc */
Point3D Point1; /* location of light/camera */
float Bank, Focal; /* more light/camera info */
long ActiveCamID; /* if active camera record, holds ID of cam rec */
long ActiveCamOffset;/* if active camera record, hold offset to cam rec */
} CLdat_Rec, *CLdat_Ptr;
typedef struct Object_Rec { /* Identical to GroupRec */
TypeSize TS;
long BigSize; /* When TS.siz=0, =size of this record */
long GroupSize; /* size of this record and all data within folder */
long ID; /* ID, top nibble is block index */
uchar Name[16]; /* Name of Object */
short TreeIndex; /* ModelPro only */
bitfield Selected : 1; /* TRUE if object is selected */
bitfield Parent : 1; /* TURE if object contains other objects */
bitfield SubsShown : 1; /* TRUE if parent-object folder is open */
bitfield b3 : 1; /* was Shown, now available */
bitfield RotateMode: 1; /* was ExtentsOnly, now RotateMode for Oz */
bitfield Assembly : 1; /* do not allow to open folder */
bitfield Locked : 1; /* no changes allowed */
bitfield HasData : 1; /* false when a block insert (insertID then valid) */
uchar Visibility; /* 0=off, 1=extents, 2=fast wire, 3=full wire, 4=rendered */
Point3D Point2; /* usually rotation point */
MaxType Limits; /* rotated max type */
union {
Tmat4_Rec Tmat; /* modeled transformations applied to group */
CLdat_Rec CL; /* Camera/Light data (Tmat not used in these recs) */
} TX;
long InsertID; /* if non-zero contains reference ID for original object */
} Object_Rec, *Object_Ptr;
typedef struct Group_Rec { /* Identical to ObjectRec in size */
TypeSize TS;
long BigSize; /* When TS.siz=0, =size of this record */
long GroupSize; /* size of this record and all data within folder */
long ID; /* ID = integer main data/Longint Blocks */
uchar Name[16]; /* Name of Object */
short TreeIndex; /* ModelPro Only */
bitfield Selected : 1; /* TRUE if object is selected */
bitfield Parent : 1; /* TURE if object contains other objects */
bitfield SubsShown : 1; /* TRUE if parent-object folder is open */
bitfield b3 : 1; /* was Shown, now available */
bitfield b4: 1; /* was ExtentsOnly, now available */
bitfield Assembly : 1; /* do not allow to open folder */
bitfield Locked : 1; /* no changes allowed */
bitfield HasData : 1; /* false when a block insert (insertID then valid) */
uchar Visibility; /* 0=off, 1=extents, 2=fast wire, 3=full wire, 4=rendered */
Point3D Point2; /* usually rotation point */
MaxType Limits; /* rotated max type */
Tmat4_Rec Tmat; /* modeled transformations applied to group */
long InsertID; /* if non-zero contains reference for original object */
} GroupRec, Group_Rec, *Group_Ptr;
typedef struct EscherPalette_Rec {
RGBColor Color[128];
} EscherPalette_Rec, *EscherPalette_Ptr, **EscherPalette_Hndl;
typedef struct PolyRecord {
short ref[500];
} PolyRecord;
typedef struct ptNrml {
Point3D pt;
XYZr nrml;
} ptNrml;
typedef struct SetRecord {
short count, color, sides;
uchar identity;
bitfield smoothShade:1, duplicateNormal:1; /* bits only */
long offset;
} SetRecord, Set_Rec, *Set_Ptr;
typedef struct JoinRec {
TypeSize TS;
long bigSize;
short points; /* VertexArray starting at 0.. */
short setCount;
SetRecord sets[1]; /* Vertex array follows sets */
} JoinRec, Join_Rec, *Join_Ptr;
/* JoinRec Info: setCount is # of SetRecords in JoinRec */
/* PtNrml array follows set records */
/* vertex index array follows PtNrml array */
/* SetRecord.offset points to entry in index array from top */
/* of JoinRec. (index & 0x7F) is index to PtNrml starting at zero */
typedef struct MultiRec {
TypeSize TS;
long BigSize;
MaxType Limits;
boolean closed, filled, edge, b4; /* filled only true when planar */
} MultiRec, Multi_Rec, *Multi_Ptr;
typedef struct PictRecord {
TypeSize TS;
long BigSize;
short Plane, i1;
Point3D Loc;
Double scaleX, scaleY;
Picture thePICT;
} PictRecord;
/* ===== Geometry Data Types ===== */
typedef struct DotRec {
TypeSize TS;
Point3D Loc;
} DotRec, Dot_Rec, *Dot_Ptr;
typedef struct LineRec {
TypeSize TS;
Point3D Loc[2];
} LineRec, Line_Rec, *Line_Ptr;
typedef struct ptCS {
Point3D pt; /* Stored in groups according to number of lines*/
uchar Color, Style, uc2, uc3;
} ptCS;
typedef struct ParallelRec {
TypeSize TS;
long BigSize;
short Points, Lines;
Double gap;
ptCS Loc[1];
} ParallelRec, Parallel_Rec, *Parallel_Ptr;
typedef struct ArcRec {
TypeSize TS; /* style 0=norm, 1=hidden) */
long plane;
float start, length;
Double hRad, vRad;
Point3D Loc;
} ArcRec, Arc_Rec, *Arc_Ptr;
typedef struct PPrec {
TypeSize TS;
long BigSize;
long Points;
short Row, Clmn;
MaxType SizeLimits;
Point3D Loc[1];
} PPrec, PP_Rec, *PP_Ptr;
typedef struct PPSrec {
TypeSize TS;
long BigSize;
long Points;
short Row, Clmn;
MaxType SizeLimits;
ptNrml Loc[1];
} PPSrec, PPS_Rec, *PPS_Ptr;
typedef struct factor015 {
Double factor[16];
} factor015;
typedef struct SurfaceRecord {
uchar Hinge[8];
uchar FlatMinor, FlatMajor, Color, Style;
factor015 Loc[3];
} SurfaceRecord;
typedef struct PCPrec {
TypeSize TS;
long BigSize;
MaxType Limits;
short Main, Minor;
long Total;
boolean ClosedMain, ClosedMinor, FilledMain, FilledMinor;
SurfaceRecord Surface[1];
} PCPrec, PCP_Rec, *PCP_Ptr;
typedef struct factors03 {
Double factor[4];
} factors03;
typedef Double Factor_Rec[4], (*Factor_Ptr)[4];
typedef struct SplineRecord {
uchar typ, siz, Color;
bitfield smoothStart : 1;
bitfield smoothEnd : 1;
bitfield straight : 1;
bitfield edge : 1;
bitfield hingeStart : 1;
bitfield hingeEnd : 1;
bitfield selectStart : 1;
bitfield selectEnd : 1;
factors03 Loc[3];
} SplineRecord, Spline_Rec, *Spline_Ptr;
typedef SplineRecord PCLrec, PCL_Rec, *PCL_Ptr;
typedef struct MeshRec {
TypeSize TS;
long BigSize;
MaxType Limits;
long Total;
short Main, Minor;
uchar ClosedMain, ClosedMinor, FilledMain, FilledMinor;
SplineRecord Spline[1];
} MeshRec, Mesh_Rec, *Mesh_Ptr;
typedef struct MSplineRecord { /* morph spline alternet */
unsigned short replace; /* spline of main mesh that this one adds to (0 start) */
uchar color;
bitfield smoothStart : 1, smoothEnd : 1, straight : 1, edge : 1,
hingeStart : 1, hingeEnd : 1, selectStart : 1, selectEnd : 1;
factors03 loc[3];
} MSplineRecord;
typedef struct AltRecord {
long offset; /* offset from MorphMeshRec to splines */
long count; /* number of splines in this alternet */
char name[24]; /* name of this alternet */
} AltRecord;
typedef struct MorphMeshRec {
TypeSize TS;
long bigSize;
MaxType Limits; /*Limits for all Splines, using current active */
long Total;
short Main, Minor;
uchar ClosedMain, ClosedMinor, filledFront, filledBack;
short alternets, active; /* 0 is main mesh */
AltRecord alt[1]; /* 0 represents main shape */
// MSplineRecord Spline[1]; /* follows the AltRecords, however many */
} MorphMeshRec;
typedef struct MeshPointsRec {
TypeSize TS;
long BigSize;
short Main, Minor;
long CheckSum, GroupID, LastUsed;
Point3D PointBase;
XYZr Point[1];
} MeshPointsRec, MeshPoints_Rec, *MeshPoints_Ptr;
typedef struct MeshSurfacesRec
{
TypeSize TS;
long BigSize;
short Main, Minor;
long CheckSum, GroupID, LastUsed;
SurfaceRecord Surface[1];
} MeshSurfacesRec, MeshSurfaces_Rec, *MeshSurfaces_Ptr;
typedef struct CubeRec {
TypeSize TS;
Point3D Loc[8];
} CubeRec, Cube_Rec, *Cube_Ptr;
typedef struct SolidCubeRec {
TypeSize TS;
Point3D Loc, Siz;
} SolidCubeRec, SolidCube_Rec, *SolidCube_Ptr;
typedef struct SolidCylinderRec {
TypeSize TS;
Point3D Loc; /* center of top (use Plane/Length for bottom) */
long Plane; /* 0=Y 1=Z 2=Y*/
Double hRad, vRad, Length;
boolean TopClosed, BotClosed,
Pinched, xTra; /* Pinched true the top is a point making a Cone */
} SolidCylinderRec, SolidCylinder_Rec, *SolidCylinder_Ptr;
typedef struct SolidPrismRec {
TypeSize TS;
Point3D Loc; /* begining and end of shape */
short Sides, Plane;
Double hRad, vRad, Length;
boolean TopClosed, BotClosed,
Pinched, xTra; /* Pinched true then Top is a point for a Pyramid */
Double Angle;
} SolidPrismRec, SolidPrism_Rec, *SolidPrism_Ptr;
typedef struct SolidSphereRec {
TypeSize TS;
Point3D Loc;
Double xRad, yRad, zRad;
} SolidSphereRec, SolidSphere_Rec, *SolidSphere_Ptr;
typedef struct SolidDiskRec {
TypeSize TS;
Point3D Loc;
long Plane;
Double hRad, vRad;
} SolidDiskRec, SolidDisk_Rec, *SolidDisk_Ptr;
typedef struct SolidTorusRec {
TypeSize TS;
Point3D Loc;
long plane;
Double hRadMajor, vRadMajor, hRadMinor, vRadMinor;
} SolidTorusRec, SolidTorus_Rec, *SolidTorus_Ptr;
typedef struct SolidPlaneRec {
TypeSize TS;
Point3D Loc, Siz; /* starting point, size of plane */
long plane;
} SolidPlaneRec, SolidPlane_Rec, *SolidPlane_Ptr;
Last update 04MAR96 by Eric Popejoy.
|
|
|
|
|
|
|
|
|