ply.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <math.h>`
`#include <string.h>`
`#include "SurgSim/DataStructures/ply.h"`

## Macros

#define | NO_OTHER_PROPS -1
#define | DONT_STORE_PROP 0
#define | STORE_PROP 1
#define | OTHER_PROP 0
#define | NAMED_PROP 1
#define | BIG_STRING 4096

## Functions

int | equal_strings (const char *, const char *)
PlyElement * | find_element (PlyFile *, const char *)
PlyProperty * | find_property (PlyElement *, const char *, int *)
void | write_scalar_type (FILE *, int)
char ** | get_words (FILE *, int *, char **)
char ** | old_get_words (FILE *, int *)
void | write_binary_item (FILE *, int, unsigned int, double, int)
void | write_ascii_item (FILE *, int, unsigned int, double, int)
double | old_write_ascii_item (FILE *, char *, int)
void | add_element (PlyFile *, char **, int)
void | add_property (PlyFile *, char **, int)
void | add_comment (PlyFile *, char *)
void | add_obj_info (PlyFile *, char *)
void | copy_property (PlyProperty *, PlyProperty *)
void | store_item (char *, int, int, unsigned int, double)
void | get_stored_item (void *, int, int *, unsigned int *, double *)
double | get_item_value (char *, int)
void | get_ascii_item (char *, int, int *, unsigned int *, double *)
void | get_binary_item (FILE *, int, int *, unsigned int *, double *)
void | ascii_get_element (PlyFile *, char *)
void | binary_get_element (PlyFile *, char *)
PlyFile * | ply_write (FILE *fp, int nelems, char **elem_names, int file_type)
PlyFile * | ply_open_for_writing (const char *filename, int nelems, char **elem_names, int file_type, float *version)
void | ply_describe_element (PlyFile *plyfile, char *elem_name, int nelems, int nprops, PlyProperty *prop_list)
void | ply_describe_property (PlyFile *plyfile, char *elem_name, PlyProperty *prop)
void | ply_describe_other_properties (PlyFile *plyfile, PlyOtherProp *other, int offset)
void | ply_element_count (PlyFile *plyfile, char *elem_name, int nelems)
void | ply_header_complete (PlyFile *plyfile)
void | ply_put_element_setup (PlyFile *plyfile, char *elem_name)
void | ply_put_element (PlyFile *plyfile, void *elem_ptr)
void | ply_put_comment (PlyFile *plyfile, char *comment)
void | ply_put_obj_info (PlyFile *plyfile, char *obj_info)
PlyFile * | ply_read (FILE *fp, int *nelems, char ***elem_names)
PlyFile * | ply_open_for_reading (const char *filename, int *nelems, char ***elem_names, int *file_type, float *version)
PlyProperty ** | ply_get_element_description (PlyFile *plyfile, char *elem_name, int *nelems, int *nprops)
void | ply_get_element_setup (PlyFile *plyfile, char *elem_name, int nprops, PlyProperty *prop_list)
void | ply_get_property (PlyFile *plyfile, char *elem_name, PlyProperty *prop)
void | ply_get_element (PlyFile *plyfile, void *elem_ptr)
char ** | ply_get_comments (PlyFile *plyfile, int *num_comments)
char ** | ply_get_obj_info (PlyFile *plyfile, int *num_obj_info)
void | setup_other_props (PlyFile *plyfile, PlyElement *elem)
PlyOtherProp * | ply_get_other_properties (PlyFile *plyfile, char *elem_name, int offset)
PlyOtherElems * | ply_get_other_element (PlyFile *plyfile, char *elem_name, int elem_count)
void | ply_describe_other_elements (PlyFile *plyfile, PlyOtherElems *other_elems)
void | ply_put_other_elements (PlyFile *plyfile)
void | ply_free_other_elements (PlyOtherElems *other_elems)
void | ply_close (PlyFile *plyfile)
void | ply_get_info (PlyFile *ply, float *version, int *file_type)
int | get_prop_type (char *type_name)
char * | my_alloc (int size, int lnum, char *fname)

## Variables

char * | type_names []
int | ply_type_size []

## Macro Definition Documentation

## BIG_STRING

#define BIG_STRING 4096

## DONT_STORE_PROP

#define DONT_STORE_PROP 0

## NAMED_PROP

#define NAMED_PROP 1

## NO_OTHER_PROPS

#define NO_OTHER_PROPS -1

## OTHER_PROP

#define OTHER_PROP 0

## STORE_PROP

#define STORE_PROP 1

## Function Documentation

## add_comment()

void add_comment | ( | PlyFile * | plyfile,
|  | char * | line
| ) |  |

## add_element()

void add_element | ( | PlyFile * | plyfile,
|  | char ** | words,
|  | int | nwords
| ) |  |

## add_obj_info()

void add_obj_info | ( | PlyFile * | plyfile,
|  | char * | line
| ) |  |

## add_property()

void add_property | ( | PlyFile * | plyfile,
|  | char ** | words,
|  | int | nwords
| ) |  |

## ascii_get_element()

void ascii_get_element | ( | PlyFile * | plyfile,
|  | char * | elem_ptr
| ) |  |

## binary_get_element()

void binary_get_element | ( | PlyFile * | plyfile,
|  | char * | elem_ptr
| ) |  |

## copy_property()

void copy_property | ( | PlyProperty * | dest,
|  | PlyProperty * | src
| ) |  |

## equal_strings()

int equal_strings | ( | const char * | s1,
|  | const char * | s2
| ) |  |

## find_element()

PlyElement * find_element | ( | PlyFile * | plyfile,
|  | const char * | element
| ) |  |

## find_property()

PlyProperty * find_property | ( | PlyElement * | elem,
|  | const char * | prop_name,
|  | int * | index
| ) |  |

## get_ascii_item()

void get_ascii_item | ( | char * | word,
|  | int | type,
|  | int * | int_val,
|  | unsigned int * | uint_val,
|  | double * | double_val
| ) |  |

## get_binary_item()

void get_binary_item | ( | FILE * | fp,
|  | int | type,
|  | int * | int_val,
|  | unsigned int * | uint_val,
|  | double * | double_val
| ) |  |

## get_item_value()

double get_item_value | ( | char * | item,
|  | int | type
| ) |  |

## get_prop_type()

int get_prop_type | ( | char * | type_name | ) |

## get_stored_item()

void get_stored_item | ( | void * | ptr,
|  | int | type,
|  | int * | int_val,
|  | unsigned int * | uint_val,
|  | double * | double_val
| ) |  |

## get_words()

char ** get_words | ( | FILE * | fp,
|  | int * | nwords,
|  | char ** | orig_line
| ) |  |

## my_alloc()

char* my_alloc | ( | int | size,
|  | int | lnum,
|  | char * | fname
| ) |  |

## old_get_words()

char** old_get_words | ( | FILE * | ,
|  | int * |
| ) |  |

## old_write_ascii_item()

double old_write_ascii_item | ( | FILE * | fp,
|  | char * | item,
|  | int | type
| ) |  |

## ply_close()

void ply_close | ( | PlyFile * | plyfile | ) |

## ply_describe_element()

void ply_describe_element | ( | PlyFile * | plyfile,
|  | char * | elem_name,
|  | int | nelems,
|  | int | nprops,
|  | PlyProperty * | prop_list
| ) |  |

## ply_describe_other_elements()

void ply_describe_other_elements | ( | PlyFile * | plyfile,
|  | PlyOtherElems * | other_elems
| ) |  |

## ply_describe_other_properties()

void ply_describe_other_properties | ( | PlyFile * | plyfile,
|  | PlyOtherProp * | other,
|  | int | offset
| ) |  |

## ply_describe_property()

void ply_describe_property | ( | PlyFile * | plyfile,
|  | char * | elem_name,
|  | PlyProperty * | prop
| ) |  |

## ply_element_count()

void ply_element_count | ( | PlyFile * | plyfile,
|  | char * | elem_name,
|  | int | nelems
| ) |  |

## ply_free_other_elements()

void ply_free_other_elements | ( | PlyOtherElems * | other_elems | ) |

## ply_get_comments()

char** ply_get_comments | ( | PlyFile * | plyfile,
|  | int * | num_comments
| ) |  |

## ply_get_element()

void ply_get_element | ( | PlyFile * | plyfile,
|  | void * | elem_ptr
| ) |  |

## ply_get_element_description()

PlyProperty** ply_get_element_description | ( | PlyFile * | plyfile,
|  | char * | elem_name,
|  | int * | nelems,
|  | int * | nprops
| ) |  |

## ply_get_element_setup()

void ply_get_element_setup | ( | PlyFile * | plyfile,
|  | char * | elem_name,
|  | int | nprops,
|  | PlyProperty * | prop_list
| ) |  |

## ply_get_info()

void ply_get_info | ( | PlyFile * | ply,
|  | float * | version,
|  | int * | file_type
| ) |  |

## ply_get_obj_info()

char** ply_get_obj_info | ( | PlyFile * | plyfile,
|  | int * | num_obj_info
| ) |  |

## ply_get_other_element()

PlyOtherElems* ply_get_other_element | ( | PlyFile * | plyfile,
|  | char * | elem_name,
|  | int | elem_count
| ) |  |

## ply_get_other_properties()

PlyOtherProp* ply_get_other_properties | ( | PlyFile * | plyfile,
|  | char * | elem_name,
|  | int | offset
| ) |  |

## ply_get_property()

void ply_get_property | ( | PlyFile * | plyfile,
|  | char * | elem_name,
|  | PlyProperty * | prop
| ) |  |

## ply_header_complete()

void ply_header_complete | ( | PlyFile * | plyfile | ) |

## ply_open_for_reading()

PlyFile* ply_open_for_reading | ( | const char * | filename,
|  | int * | nelems,
|  | char *** | elem_names,
|  | int * | file_type,
|  | float * | version
| ) |  |

## ply_open_for_writing()

PlyFile* ply_open_for_writing | ( | const char * | filename,
|  | int | nelems,
|  | char ** | elem_names,
|  | int | file_type,
|  | float * | version
| ) |  |

## ply_put_comment()

void ply_put_comment | ( | PlyFile * | plyfile,
|  | char * | comment
| ) |  |

## ply_put_element()

void ply_put_element | ( | PlyFile * | plyfile,
|  | void * | elem_ptr
| ) |  |

## ply_put_element_setup()

void ply_put_element_setup | ( | PlyFile * | plyfile,
|  | char * | elem_name
| ) |  |

## ply_put_obj_info()

void ply_put_obj_info | ( | PlyFile * | plyfile,
|  | char * | obj_info
| ) |  |

## ply_put_other_elements()

void ply_put_other_elements | ( | PlyFile * | plyfile | ) |

## ply_read()

PlyFile* ply_read | ( | FILE * | fp,
|  | int * | nelems,
|  | char *** | elem_names
| ) |  |

## ply_write()

PlyFile* ply_write | ( | FILE * | fp,
|  | int | nelems,
|  | char ** | elem_names,
|  | int | file_type
| ) |  |

## setup_other_props()

void setup_other_props | ( | PlyFile * | plyfile,
|  | PlyElement * | elem
| ) |  |

## store_item()

void store_item | ( | char * | item,
|  | int | type,
|  | int | int_val,
|  | unsigned int | uint_val,
|  | double | double_val
| ) |  |

## write_ascii_item()

void write_ascii_item | ( | FILE * | fp,
|  | int | int_val,
|  | unsigned int | uint_val,
|  | double | double_val,
|  | int | type
| ) |  |

## write_binary_item()

void write_binary_item | ( | FILE * | fp,
|  | int | int_val,
|  | unsigned int | uint_val,
|  | double | double_val,
|  | int | type
| ) |  |

## write_scalar_type()

void write_scalar_type | ( | FILE * | fp,
|  | int | code
| ) |  |

## Variable Documentation

## ply_type_size

int ply_type_size[]

## type_names

char* type_names[]