Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ply.h File Reference

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>

Include dependency graph for ply.h:

Go to the source code of this file.

Compounds

struct  PlyProperty
struct  PlyElement
struct  PlyOtherProp
struct  OtherData
struct  OtherElem
struct  PlyOtherElems
struct  PlyFile

Defines

#define PLY_ASCII   1
#define PLY_BINARY_BE   2
#define PLY_BINARY_LE   3
#define PLY_BINARY_NATIVE   4
#define PLY_OKAY   0
#define PLY_ERROR   -1
#define PLY_START_TYPE   0
#define PLY_CHAR   1
#define PLY_SHORT   2
#define PLY_INT   3
#define PLY_UCHAR   4
#define PLY_USHORT   5
#define PLY_UINT   6
#define PLY_FLOAT   7
#define PLY_DOUBLE   8
#define PLY_END_TYPE   9
#define PLY_SCALAR   0
#define PLY_LIST   1
#define myalloc(mem_size)    my_alloc((mem_size), __LINE__, __FILE__)
#define REALLOCN(PTR,TYPE,OLD_N,NEW_N)
#define ALLOCN(PTR,TYPE,N)
#define FREE(PTR)    { free((PTR)); (PTR) = NULL; }

Typedefs

typedef struct PlyProperty  PlyProperty
typedef struct PlyElement  PlyElement
typedef struct PlyOtherProp  PlyOtherProp
typedef struct OtherData  OtherData
typedef struct OtherElem  OtherElem
typedef struct PlyOtherElems  PlyOtherElems
typedef struct PlyFile  PlyFile

Functions

char* my_alloc ()
PlyFileply_write (FILE *, int, char **, int)
PlyFileply_open_for_writing (char *, int, char **, int, float *)
void ply_describe_element (PlyFile *, char *, int, int, PlyProperty *)
void ply_describe_property (PlyFile *, char *, PlyProperty *)
void ply_element_count (PlyFile *, char *, int)
void ply_header_complete (PlyFile *)
void ply_put_element_setup (PlyFile *, char *)
void ply_put_element (PlyFile *, void *)
void ply_put_comment (PlyFile *, char *)
void ply_put_obj_info (PlyFile *, char *)
PlyFileply_read (FILE *, int *, char ***)
PlyFileply_open_for_reading ( char *, int *, char ***, int *, float *)
PlyProperty** ply_get_element_description (PlyFile *, char *, int*, int*)
void ply_get_element_setup ( PlyFile *, char *, int, PlyProperty *)
void ply_get_property (PlyFile *, char *, PlyProperty *)
PlyOtherPropply_get_other_properties (PlyFile *, char *, int)
void ply_get_element (PlyFile *, void *)
char** ply_get_comments (PlyFile *, int *)
char** ply_get_obj_info (PlyFile *, int *)
void ply_close (PlyFile *)
void ply_get_info (PlyFile *, float *, int *)
PlyOtherElemsply_get_other_element (PlyFile *, char *, int)
void ply_describe_other_elements ( PlyFile *, PlyOtherElems *)
void ply_put_other_elements (PlyFile *)
void ply_free_other_elements (PlyOtherElems *)
void ply_describe_other_properties (PlyFile *, PlyOtherProp *, int)
int equal_strings (char *, char *)


Define Documentation

#define ALLOCN(PTR, TYPE, N)

Initial value:

\
    { (PTR) = (TYPE *) calloc(((unsigned)(N)),sizeof(TYPE));\
      if ((PTR) == NULL) {                  \
      fprintf(stderr, "Memory allocation failed on line %d in %s\n", \
         __LINE__, __FILE__);                           \
      exit(-1);                                             \
      }                         \
    }

Definition at line 159 of file ply.h.

#define FREE(PTR)   { free((PTR)); (PTR) = NULL; }

Definition at line 169 of file ply.h.

#define PLY_ASCII   1

Definition at line 45 of file ply.h.

#define PLY_BINARY_BE   2

Definition at line 46 of file ply.h.

#define PLY_BINARY_LE   3

Definition at line 47 of file ply.h.

#define PLY_BINARY_NATIVE   4

Definition at line 48 of file ply.h.

#define PLY_CHAR   1

Definition at line 57 of file ply.h.

#define PLY_DOUBLE   8

Definition at line 64 of file ply.h.

#define PLY_END_TYPE   9

Definition at line 65 of file ply.h.

#define PLY_ERROR   -1

Definition at line 52 of file ply.h.

#define PLY_FLOAT   7

Definition at line 63 of file ply.h.

#define PLY_INT   3

Definition at line 59 of file ply.h.

#define PLY_LIST   1

Definition at line 68 of file ply.h.

#define PLY_OKAY   0

Definition at line 51 of file ply.h.

#define PLY_SCALAR   0

Definition at line 67 of file ply.h.

#define PLY_SHORT   2

Definition at line 58 of file ply.h.

#define PLY_START_TYPE   0

Definition at line 56 of file ply.h.

#define PLY_UCHAR   4

Definition at line 60 of file ply.h.

#define PLY_UINT   6

Definition at line 62 of file ply.h.

#define PLY_USHORT   5

Definition at line 61 of file ply.h.

#define REALLOCN(PTR, TYPE, OLD_N, NEW_N)

Initial value:

\
        {                                       \
        if ((OLD_N) == 0)                                                   \
        {   ALLOCN((PTR),TYPE,(NEW_N));}                                    \
        else                                    \
        {                                           \
           (PTR) = (TYPE *)realloc((PTR),(NEW_N)*sizeof(TYPE));         \
           if (((PTR) == NULL) && ((NEW_N) != 0))                   \
           {                                    \
           fprintf(stderr, "Memory reallocation failed on line %d in %s\n",     \
                   __LINE__, __FILE__);                                     \
           fprintf(stderr, "  tried to reallocate %d->%d\n",            \
               (OLD_N), (NEW_N));                                   \
           exit(-1);                                \
           }                                    \
           if ((NEW_N)>(OLD_N))                         \
           memset((char *)(PTR)+(OLD_N)*sizeof(TYPE), 0,            \
                  ((NEW_N)-(OLD_N))*sizeof(TYPE));              \
        }                                       \
    }

Definition at line 138 of file ply.h.

#define myalloc(mem_size)   my_alloc((mem_size), __LINE__, __FILE__)

Definition at line 135 of file ply.h.


Typedef Documentation

typedef struct OtherData OtherData

typedef struct OtherElem OtherElem

typedef struct PlyElement PlyElement

typedef struct PlyFile PlyFile

typedef struct PlyOtherElems PlyOtherElems

typedef struct PlyOtherProp PlyOtherProp

typedef struct PlyProperty PlyProperty


Function Documentation

int equal_strings (char *, char *)

char* my_alloc ()

void ply_close (PlyFile *)

void ply_describe_element (PlyFile *, char *, int, int, PlyProperty *)

void ply_describe_other_elements (PlyFile *, PlyOtherElems *)

void ply_describe_other_properties (PlyFile *, PlyOtherProp *, int)

void ply_describe_property (PlyFile *, char *, PlyProperty *)

void ply_element_count (PlyFile *, char *, int)

void ply_free_other_elements (PlyOtherElems *)

char** ply_get_comments (PlyFile *, int *)

void ply_get_element (PlyFile *, void *)

PlyProperty** ply_get_element_description (PlyFile *, char *, int *, int *)

void ply_get_element_setup (PlyFile *, char *, int, PlyProperty *)

void ply_get_info (PlyFile *, float *, int *)

char** ply_get_obj_info (PlyFile *, int *)

PlyOtherElems* ply_get_other_element (PlyFile *, char *, int)

PlyOtherProp* ply_get_other_properties (PlyFile *, char *, int)

void ply_get_property (PlyFile *, char *, PlyProperty *)

void ply_header_complete (PlyFile *)

PlyFile* ply_open_for_reading (char *, int *, char ***, int *, float *)

PlyFile* ply_open_for_writing (char *, int, char **, int, float *)

void ply_put_comment (PlyFile *, char *)

void ply_put_element (PlyFile *, void *)

void ply_put_element_setup (PlyFile *, char *)

void ply_put_obj_info (PlyFile *, char *)

void ply_put_other_elements (PlyFile *)

PlyFile* ply_read (FILE *, int *, char ***)

PlyFile* ply_write (FILE *, int, char **, int)


Generated at Sat Aug 5 00:17:02 2000 for Graphics Class Library by doxygen 1.1.0 written by Dimitri van Heesch, © 1997-2000