home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / 2611 / create_monolith.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-23  |  858 b   |  56 lines

  1. #ifndef lint
  2. static    char    sccsid[] = "@(#)create_monolith.c 1.1 92/05/28 SMI" ;
  3.     /* from create_monolith.c 1.2 88/10/19 SMI */
  4. #endif
  5.  
  6. /*
  7.  * Copyright (c) 1986 by Sun Microsystems, Inc.
  8.  */
  9.  
  10. /*
  11.  * This file generates the graphic description of a monolith
  12.  *
  13.  */
  14.  
  15.  
  16. #include <stdio.h>
  17. #include <math.h>
  18. #include "graphics.h"
  19. #include "dstar.h"
  20. #include "object_types.h"
  21. #include "bsp_object.h"
  22.  
  23. extern    int    debug_level ;
  24.  
  25.  
  26. #include "monolith_bsp.h"
  27.  
  28.  
  29. /* these routines create a description for a monolith */
  30.  
  31.  
  32. void
  33. init_monolith(index)
  34.     int    index ;
  35. {
  36.  
  37.     Object_Desc    *desc1 ;
  38.  
  39.     desc1 = (Object_Desc *) malloc(sizeof(Object_Desc)) ;
  40.  
  41.     if(desc1)
  42.     {
  43.       descriptions[index] = desc1 ;
  44.  
  45.       desc1->thresh = 0.0 ;
  46.       desc1->next = NULL ;
  47.       desc1->type = BSP_TREE ;
  48.       desc1->first = (caddr_t) &Nmono6 ;
  49.     }
  50.     else
  51.     {
  52.       perror("init_monolith: malloc:") ;
  53.       exit(1) ;
  54.     }
  55. }
  56.