/*************************************************************************/ /* */ /* Copyright (c) 1994 Stanford University */ /* */ /* All rights reserved. */ /* */ /* Permission is given to use, copy, and modify this software for any */ /* non-commercial purpose as long as this copyright notice is not */ /* removed. All other uses, including redistribution in whole or in */ /* part, are forbidden without prior written permission. */ /* */ /* This software is provided with absolutely no warranty and no */ /* support. */ /* */ /*************************************************************************/ /* Header file for model data structures and definitions */ #ifndef _MODEL_H #define _MODEL_H /************************************************************************ * * Constants * *************************************************************************/ #define MODEL_TRIANGLE (0) #define MODEL_RECTANGLE (1) #define MODEL_NULL (-1) #define MODEL_TEST_DATA (0) #define MODEL_ROOM_DATA (1) #define MODEL_LARGEROOM_DATA (2) /************************************************************************ * * Model descriptor * *************************************************************************/ /* General structure of the model descriptor */ typedef struct { Rgb color ; /* Diffuse color */ Rgb emittance ; /* Radiant emittance */ Vertex _dummy[4] ; } Model ; /* Triangle */ typedef struct { Rgb color ; /* Diffuse color */ Rgb emittance ; /* Radiant emittance */ Vertex p1, p2, p3 ; } Model_Triangle ; typedef Model_Triangle Model_Rectangle ; typedef struct { long type ; Model model ; } ModelDataBase ; /* * modelman.C */ void init_modeling_tasks(long process_id); void process_model(Model *model, long type, long process_id); extern long model_selector ; #endif