home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / raytrace / radiance / nextrad.lha / NeXtRad / datastruct.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-22  |  1.1 KB  |  59 lines

  1. /* datastruct.c 
  2. /* written by : Jason R. Wilson   */
  3. /* these routines perform initialization on data */
  4. /* structures found in datastruct.h              */
  5. /* specifically, sets all pointers initially to NULL */
  6.  
  7. #include "datastruct.h"
  8. #include <stdio.h>
  9. void InitVertexListCell (VertexListCell *VertList)
  10. {
  11.    VertList->Vertex = NULL;
  12.    VertList->Rest = NULL;
  13. }
  14.  
  15. void InitPolygonListCell (PolygonListCell *PolyList)
  16. {
  17.    PolyList->Polygon = NULL;
  18.    PolyList->Rest = NULL;
  19. }
  20.  
  21. void InitVisVertexCell (VisVertexCell *VisVert)
  22. {
  23.    VisVert->Next = NULL;
  24.    VisVert->B.r = 0.0;
  25.    VisVert->B.g = 0.0;
  26.    VisVert->B.b = 0.0;
  27. }
  28.  
  29. void InitPolygonCell (PolygonCell *Poly)
  30. {
  31.    Poly->Vertices = NULL;
  32.    Poly->VisVertices = NULL;
  33.    Poly->Next = NULL;
  34.    Poly->Culled = false;
  35.    Poly->Textured = false;
  36.    Poly->Subs[0] = NULL;
  37.    Poly->Subs[1] = NULL;
  38.    Poly->Subs[2] = NULL;
  39.    Poly->Subs[3] = NULL;   
  40. }
  41.  
  42. void InitVertexCell (VertexCell *Vert)
  43. {
  44.    Vert->Polygons = NULL;
  45.    Vert->Next = NULL;
  46.    Vert->Number = 0;
  47. }
  48.  
  49. void InitObjectCell (ObjectCell *Object)
  50. {
  51.    Object->VertexHead = NULL;
  52.    Object->PolygonHead = NULL;
  53.    Object->Next = NULL;
  54. }
  55.  
  56.  
  57.  
  58.  
  59.