- initial import
git-svn-id: http://moon:8086/svn/mips@1 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
/*************************************************************************/
|
||||
/* Types.h
|
||||
/*************************************************************************/
|
||||
#ifndef GRAPH_STATE_H
|
||||
#define GRAPH_STATE_H
|
||||
|
||||
#include "types.h"
|
||||
#include "stack.h"
|
||||
|
||||
#define PI 3.1415926535897932384626433832795
|
||||
#define NUM_COORD_SYSTEMS 6
|
||||
|
||||
typedef struct _sdisplay_t
|
||||
{
|
||||
char *name;
|
||||
RtToken type;
|
||||
RtToken mode;
|
||||
|
||||
} display_t;
|
||||
|
||||
typedef struct _sprojection_t
|
||||
{
|
||||
RtToken type;
|
||||
RtFloat fov;
|
||||
UINT32 flags;
|
||||
|
||||
} projection_t;
|
||||
|
||||
typedef struct _sformat_t
|
||||
{
|
||||
RtInt xres;
|
||||
RtInt yres;
|
||||
RtFloat ar_f;
|
||||
RtFloat ar_p;
|
||||
|
||||
} format_t;
|
||||
|
||||
typedef struct _sopt_t
|
||||
{
|
||||
display_t display;
|
||||
projection_t projection;
|
||||
format_t format;
|
||||
RtFloat crop[4];
|
||||
RtFloat screen[4];
|
||||
RtFloat clipping[2];
|
||||
|
||||
} opt_t;
|
||||
|
||||
typedef struct _sattr_t
|
||||
{
|
||||
RtColor cs;
|
||||
RtFloat shadingrate;
|
||||
RtPointer ubasis, vbasis;
|
||||
RtInt ustep, vstep;
|
||||
RtInt nsides;
|
||||
|
||||
} attr_t;
|
||||
|
||||
typedef struct _sxform_t
|
||||
{
|
||||
RtMatrix space[NUM_COORD_SYSTEMS];
|
||||
|
||||
} xform_t;
|
||||
|
||||
typedef struct _sgraph_state_t
|
||||
{
|
||||
UINT32 frame;
|
||||
UINT32 context;
|
||||
UINT32 curr_xform;
|
||||
opt_t *pOpt;
|
||||
attr_t *pAttr;
|
||||
xform_t *pXform;
|
||||
stack_t *pOpt_stack;
|
||||
stack_t *pAttr_stack;
|
||||
stack_t *pXform_stack;
|
||||
RtMatrix *pXform_curr;
|
||||
|
||||
} graph_state_t;
|
||||
|
||||
enum eSpaces
|
||||
{
|
||||
object_space = 0, world_space, camera_space, screen_space, raster_space, ndc_space
|
||||
};
|
||||
|
||||
void GS_init(graph_state_t *pObj);
|
||||
void GS_free(graph_state_t *pObj);
|
||||
void GS_opt_push(graph_state_t *pObj);
|
||||
void GS_opt_pop(graph_state_t *pObj);
|
||||
void GS_attr_push(graph_state_t *pObj);
|
||||
void GS_attr_pop(graph_state_t *pObj);
|
||||
void GS_xform_push(graph_state_t *pObj);
|
||||
void GS_xform_pop(graph_state_t *pObj);
|
||||
void GS_xform_set(graph_state_t *pObj, UINT32 id);
|
||||
|
||||
#endif // GRAPH_STATE_H
|
||||
|
||||
Reference in New Issue
Block a user