Back to index

radiance  4R0+20100331
Functions | Variables
free_os.c File Reference
#include "copyright.h"
#include "standard.h"
#include "octree.h"
#include "object.h"
#include "otypes.h"
#include "face.h"
#include "cone.h"
#include "instance.h"
#include "mesh.h"

Go to the source code of this file.

Functions

int free_os (OBJREC *op)

Variables

static const char RCSid [] = "$Id: free_os.c,v 3.4 2003/07/17 09:21:29 schorsch Exp $"

Function Documentation

int free_os ( OBJREC op)

Definition at line 23 of file free_os.c.

{
       if (op->os == NULL)
              return(0);
       switch (op->otype) {
       case OBJ_FACE:              /* polygon */
              freeface(op);
              return(1);
       case OBJ_CONE:              /* cone */
       case OBJ_RING:              /* disk */
       case OBJ_CYLINDER:   /* cylinder */
       case OBJ_CUP:        /* inverted cone */
       case OBJ_TUBE:              /* inverted cylinder */
              freecone(op);
              return(1);
       case OBJ_INSTANCE:   /* octree instance */
              freeinstance(op);
              return(1);
       case OBJ_MESH:              /* mesh instance */
              freemeshinst(op);
              return(1);
       }
                            /* don't really know */
       free((void *)op->os);
       op->os = NULL;
       return(1);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char RCSid[] = "$Id: free_os.c,v 3.4 2003/07/17 09:21:29 schorsch Exp $" [static]

Definition at line 2 of file free_os.c.