home *** CD-ROM | disk | FTP | other *** search
- /*
- * Maceditor.h
- */
-
- /* Resource pointers for dialog, and enumerated types for each control item */
- /* postfix codes are used to identify different types of control item :
-
- ST = static text
- ET = editable text
- SB = slider bar
- CB = check box
- PI = picture
- IC = icon
- BU = button
- RB = radio button
- UI = useritem
- */
-
- #define editordialogR 133
- enum {
- ewmodifyBU = 1,
- ewcreateBU,
- ewdeleteBU,
- ewlightsBU,
- sphereselectIC,
- cylinderselectIC,
- coneselectIC,
- triangleselectIC,
- torusselectIC,
- blobselectIC,
- boxselectIC,
- discselectIC,
- polyselectIC,
- csgselectIC,
- lightsselectIC,
- cameraselectIC,
- sideUI,
- frontUI,
- topUI,
- backBU,
- zoominBU,
- zoomoutBU,
- coordinfoUI,
- worldlistUI
- } ;
-
- /* Some Filter flags */
-
- #define F_SPHERE 1
- #define F_CONE 2
- #define F_BOX 4
- #define F_TORUS 8
- #define F_BLOB 16
- #define F_DISC 32
- #define F_TRIANGLE 64
- #define F_POLYGON 128
- #define F_HF 256
- #define F_CYLINDER 512
- #define F_CSG 1024
- #define F_LIST 2048
- #define F_GRID 4096
- #define F_INSTANCE 8192
- #define F_PLANE 16384
- #define F_LIGHTS 32768
- #define F_CAMERA 65536
-
- #define SET_FILTER(flags) FilterFlags |= (flags)
- #define UNSET_FILTER(flags) FilterFlags &= ~(flags)
-
- #define FILTER_SET(flags) (FilterFlags & (flags))
-
- /* Now for some object types.
- * Rayshade does not keep note of what type and object is. Therefore it is necessary to create
- * a function that does this for you.
- */
-
- /* Each object ID may later correspond to the resource number of its associated icons
- * But for now they are just sequential
- */
-
- #define PLANE 0
- #define SPHERE 1
- #define CONE 2
- #define BOX 3
- #define TORUS 5
- #define BLOB 6
- #define DISC 7
- #define TRIANGLE 8
- #define POLYGON 9
- #define HF 10
- #define CYLINDER 11
- #define CSG 12
- #define LIST 13
- #define GRID 14
- #define INSTANCE 15
-
- /* IDs for each light type */
-
- #define L_POINT 0
- #define L_INFINITE 1
- #define L_SPOT 2
- #define L_JITTERED 3
- #define L_EXTENDED 4
-
- /* IDs for each texture type */
-
- #define T_BLOTCH 0
- #define T_BUMP 1
- #define T_CHECKER 2
- #define T_CLOUD 3
- #define T_FBM 4
- #define T_FBMBUMP 5
- #define T_GLOSS 6
- #define T_IMAGE 7
- #define T_MARBLE 8
- #define T_SKY 9
- #define T_STRIPE 10
- #define T_WOOD 11
-
- /* IDs for each transform type */
-
- #define TR_SCALE 0
- #define TR_TRANSLATE 1
- #define TR_ROTATE 2
- #define TR_TRANSFORM 3
-
- /* IDs for each view plane */
-
- #define VIEW_TOP 0
- #define VIEW_SIDE 1
- #define VIEW_FRONT 2
-
- /* A rather large macro to convert from 3d to 2d points. Note that this macro also takes care
- * of the Macintosh having its coords start in the top left of the screen
- * by negating the y values
- */
-
- #define ProjectCoords(x,y,fx,fy,fz,viewdir) \
- { \
- switch(viewdir) { \
- case VIEW_TOP: \
- *(y) = (short) - ((fy) * zoom); \
- *(x) = (short) ((fx) * zoom) ; \
- break ; \
- case VIEW_FRONT: \
- *(x) = (short) ((fx) * zoom) ; \
- *(y) = (short) -((fz) * zoom) ; \
- break ; \
- case VIEW_SIDE: \
- *(x) = (short) ((fy) * zoom) ; \
- *(y) = (short) -((fz) * zoom) ; \
- break ; \
- } \
- }
-
-
- extern Float zoom ;
-
-
- #define MAX_STACK_PARENTS 20
- #define MAX_STACK_OBJECTS 1000
-
- struct ObjectStack {
- Geom *parentlist[MAX_STACK_PARENTS] ;
- Geom *objectlist[MAX_STACK_OBJECTS] ;
- short numobjects ;
- short numparents ;
- } ;
-
-
- #ifdef GEOM_H
- extern int ObjectType(Geom *o) ;
- #endif
- #ifdef LIGHT_H
- extern int LightType(Light *l) ;
- #endif
- #ifdef TEXTURE_H
- extern int TextureType(Texture *t) ;
- #endif