ply.c File Reference

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <ply.h>
Include dependency graph for ply.c:

Go to the source code of this file.

Classes

struct  RuleName

Defines

#define BIG_STRING   4096
#define DONT_STORE_PROP   0
#define NAMED_PROP   1
#define NO_OTHER_PROPS   -1
#define OTHER_PROP   0
#define ROUND(x)   ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
#define STORE_PROP   1

Typedefs

typedef struct RuleName RuleName

Functions

void add_comment (PlyFile *, char *)
void add_element (PlyFile *, char **, int)
void add_obj_info (PlyFile *, char *)
void add_property (PlyFile *, char **, int)
void append_comment_ply (PlyFile *ply, char *comment)
void append_obj_info_ply (PlyFile *ply, char *obj_info)
PlyRuleListappend_prop_rule (PlyRuleList *rule_list, char *name, char *property)
void ascii_get_element (PlyFile *, char *)
void binary_get_element (PlyFile *, char *)
void close_ply (PlyFile *plyfile)
void copy_comments_ply (PlyFile *out_ply, PlyFile *in_ply)
void copy_obj_info_ply (PlyFile *out_ply, PlyFile *in_ply)
void copy_property (PlyProperty *, PlyProperty *)
void describe_element_ply (PlyFile *plyfile, char *elem_name, int nelems)
void describe_other_elements_ply (PlyFile *plyfile, PlyOtherElems *other_elems)
void describe_other_properties_ply (PlyFile *plyfile, PlyOtherProp *other, int offset)
void describe_property_ply (PlyFile *plyfile, PlyProperty *prop)
void element_count_ply (PlyFile *plyfile, char *elem_name, int nelems)
void element_layout_ply (PlyFile *plyfile, char *elem_name, int nelems, int nprops, PlyProperty *prop_list)
int equal_strings (const char *, const char *)
PlyElementfind_element (PlyFile *, char *)
PlyPropertyfind_property (const PlyElement *, const char *, int *)
void free_other_elements_ply (PlyOtherElems *other_elems)
void free_ply (PlyFile *plyfile)
void get_ascii_item (char *, int, int *, unsigned int *, double *)
void get_binary_item (FILE *, int, int *, unsigned int *, double *)
char ** get_comments_ply (PlyFile *plyfile, int *num_comments)
PlyProperty ** get_element_description_ply (PlyFile *plyfile, char *elem_name, int *nelems, int *nprops)
char ** get_element_list_ply (PlyFile *ply, int *num_elems)
void get_element_ply (PlyFile *plyfile, void *elem_ptr)
void get_element_setup_ply (PlyFile *plyfile, char *elem_name, int nprops, PlyProperty *prop_list)
void get_info_ply (PlyFile *ply, float *version, int *file_type)
double get_item_value (char *, int)
void * get_new_props_ply (PlyFile *ply)
char ** get_obj_info_ply (PlyFile *plyfile, int *num_obj_info)
PlyOtherElemsget_other_element_ply (PlyFile *plyfile)
static PlyOtherPropget_other_properties (PlyFile *plyfile, PlyElement *elem, int offset)
PlyOtherPropget_other_properties_ply (PlyFile *plyfile, int offset)
int get_prop_type (char *type_name)
void get_stored_item (void *, int, int *, unsigned int *, double *)
char ** get_words (FILE *, int *, char **)
void header_complete_ply (PlyFile *plyfile)
PlyPropRulesinit_rule_ply (PlyFile *ply, char *elem_name)
int matches_rule_name (char *name)
void modify_rule_ply (PlyPropRules *rules, char *prop_name, int rule_type)
static char * my_alloc (int, int, char *)
PlyFileopen_for_writing_ply (char *filename, int nelems, char **elem_names, int file_type)
void ply_close (PlyFile *plyfile)
void ply_describe_property (PlyFile *plyfile, char *elem_name, PlyProperty *prop)
void ply_get_element (PlyFile *plyfile, void *elem_ptr)
PlyOtherPropply_get_other_properties (PlyFile *plyfile, char *elem_name, int offset)
void ply_get_property (PlyFile *plyfile, char *elem_name, PlyProperty *prop)
PlyFileply_open_for_reading (char *filename, int *nelems, char ***elem_names, int *file_type, float *version)
PlyFileply_read (FILE *fp, int *nelems, char ***elem_names)
PlyFileply_write (FILE *fp, int nelems, char **elem_names, int file_type)
void put_element_ply (PlyFile *plyfile, void *elem_ptr)
void put_element_setup_ply (PlyFile *plyfile, char *elem_name)
void put_other_elements_ply (PlyFile *plyfile)
PlyFileread_ply (FILE *fp)
char * recreate_command_line (int argc, char *argv[])
void set_prop_rules_ply (PlyFile *ply, PlyRuleList *prop_rules)
char * setup_element_read_ply (PlyFile *ply, int index, int *elem_count)
void setup_other_props (PlyFile *unused_file, PlyElement *elem)
void setup_property_ply (PlyFile *plyfile, PlyProperty *prop)
void start_props_ply (PlyFile *ply, PlyPropRules *rules)
void store_item (char *, int, int, unsigned int, double)
void weight_props_ply (PlyFile *ply, float weight, void *other_props)
void write_ascii_item (FILE *, int, unsigned int, double, int)
void write_binary_item (FILE *, int, unsigned int, double, int)
PlyFilewrite_ply (FILE *fp, int nelems, char **elem_names, int file_type)
void write_scalar_type (FILE *, int)

Variables

char * old_type_names []
int ply_type_size []
RuleName rule_name_list []
char * type_names []

Define Documentation

#define BIG_STRING   4096
#define DONT_STORE_PROP   0

Definition at line 72 of file ply.c.

#define NAMED_PROP   1

Definition at line 76 of file ply.c.

#define NO_OTHER_PROPS   -1

Definition at line 70 of file ply.c.

#define OTHER_PROP   0

Definition at line 75 of file ply.c.

#define ROUND (  )     ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))

Definition at line 42 of file ply.c.

#define STORE_PROP   1

Definition at line 73 of file ply.c.


Typedef Documentation

typedef struct RuleName RuleName

Function Documentation

void add_comment ( PlyFile plyfile,
char *  line 
)

Definition at line 2419 of file ply.c.

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

Definition at line 2303 of file ply.c.

void add_obj_info ( PlyFile plyfile,
char *  line 
)

Definition at line 2440 of file ply.c.

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

Definition at line 2368 of file ply.c.

void append_comment_ply ( PlyFile ply,
char *  comment 
)

Definition at line 2589 of file ply.c.

void append_obj_info_ply ( PlyFile ply,
char *  obj_info 
)

Definition at line 2629 of file ply.c.

PlyRuleList* append_prop_rule ( PlyRuleList rule_list,
char *  name,
char *  property 
)

Definition at line 3294 of file ply.c.

void ascii_get_element ( PlyFile plyfile,
char *  elem_ptr 
)

Definition at line 1426 of file ply.c.

void binary_get_element ( PlyFile plyfile,
char *  elem_ptr 
)

Definition at line 1560 of file ply.c.

void close_ply ( PlyFile plyfile  ) 

Definition at line 2668 of file ply.c.

void copy_comments_ply ( PlyFile out_ply,
PlyFile in_ply 
)

Definition at line 2612 of file ply.c.

void copy_obj_info_ply ( PlyFile out_ply,
PlyFile in_ply 
)

Definition at line 2652 of file ply.c.

void copy_property ( PlyProperty dest,
PlyProperty src 
)

Definition at line 2457 of file ply.c.

void describe_element_ply ( PlyFile plyfile,
char *  elem_name,
int  nelems 
)

Definition at line 2812 of file ply.c.

void describe_other_elements_ply ( PlyFile plyfile,
PlyOtherElems other_elems 
)

Definition at line 2941 of file ply.c.

void describe_other_properties_ply ( PlyFile plyfile,
PlyOtherProp other,
int  offset 
)

Definition at line 2881 of file ply.c.

void describe_property_ply ( PlyFile plyfile,
PlyProperty prop 
)

Definition at line 2842 of file ply.c.

void element_count_ply ( PlyFile plyfile,
char *  elem_name,
int  nelems 
)

Definition at line 344 of file ply.c.

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

Definition at line 249 of file ply.c.

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

Definition at line 1321 of file ply.c.

PlyElement * find_element ( PlyFile plyfile,
char *  element 
)

Definition at line 1379 of file ply.c.

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

Definition at line 1403 of file ply.c.

void free_other_elements_ply ( PlyOtherElems other_elems  ) 

Definition at line 1267 of file ply.c.

void free_ply ( PlyFile plyfile  ) 

Definition at line 2681 of file ply.c.

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

Definition at line 2186 of file ply.c.

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

Definition at line 2076 of file ply.c.

char** get_comments_ply ( PlyFile plyfile,
int *  num_comments 
)

Definition at line 945 of file ply.c.

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

Definition at line 788 of file ply.c.

char** get_element_list_ply ( PlyFile ply,
int *  num_elems 
)

Definition at line 2564 of file ply.c.

void get_element_ply ( PlyFile plyfile,
void *  elem_ptr 
)

Definition at line 2730 of file ply.c.

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

Definition at line 832 of file ply.c.

void get_info_ply ( PlyFile ply,
float *  version,
int *  file_type 
)

Definition at line 1307 of file ply.c.

double get_item_value ( char *  item,
int  type 
)

Definition at line 1833 of file ply.c.

void* get_new_props_ply ( PlyFile ply  ) 

Definition at line 3152 of file ply.c.

char** get_obj_info_ply ( PlyFile plyfile,
int *  num_obj_info 
)

Definition at line 964 of file ply.c.

PlyOtherElems* get_other_element_ply ( PlyFile plyfile  ) 

Definition at line 1173 of file ply.c.

static PlyOtherProp* get_other_properties ( PlyFile plyfile,
PlyElement elem,
int  offset 
) [static]

Definition at line 1060 of file ply.c.

PlyOtherProp* get_other_properties_ply ( PlyFile plyfile,
int  offset 
)

Definition at line 2790 of file ply.c.

int get_prop_type ( char *  type_name  ) 

Definition at line 2340 of file ply.c.

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

Definition at line 2006 of file ply.c.

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

Definition at line 1719 of file ply.c.

void header_complete_ply ( PlyFile plyfile  ) 

Definition at line 372 of file ply.c.

PlyPropRules* init_rule_ply ( PlyFile ply,
char *  elem_name 
)

Definition at line 3000 of file ply.c.

int matches_rule_name ( char *  name  ) 

Definition at line 3353 of file ply.c.

void modify_rule_ply ( PlyPropRules rules,
char *  prop_name,
int  rule_type 
)

Definition at line 3071 of file ply.c.

static char * my_alloc ( int  size,
int  lnum,
char *  fname 
) [static]

Definition at line 2480 of file ply.c.

PlyFile* open_for_writing_ply ( char *  filename,
int  nelems,
char **  elem_names,
int  file_type 
)

Definition at line 200 of file ply.c.

void ply_close ( PlyFile plyfile  ) 

Definition at line 1287 of file ply.c.

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

Definition at line 294 of file ply.c.

void ply_get_element ( PlyFile plyfile,
void *  elem_ptr 
)

Definition at line 925 of file ply.c.

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

Definition at line 1130 of file ply.c.

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

Definition at line 883 of file ply.c.

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

Definition at line 734 of file ply.c.

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

Definition at line 623 of file ply.c.

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

Definition at line 145 of file ply.c.

void put_element_ply ( PlyFile plyfile,
void *  elem_ptr 
)

Definition at line 473 of file ply.c.

void put_element_setup_ply ( PlyFile plyfile,
char *  elem_name 
)

Definition at line 449 of file ply.c.

void put_other_elements_ply ( PlyFile plyfile  ) 

Definition at line 1237 of file ply.c.

PlyFile* read_ply ( FILE *  fp  ) 

Definition at line 2513 of file ply.c.

char* recreate_command_line ( int  argc,
char *  argv[] 
)

Definition at line 1343 of file ply.c.

void set_prop_rules_ply ( PlyFile ply,
PlyRuleList prop_rules 
)

Definition at line 3276 of file ply.c.

char* setup_element_read_ply ( PlyFile ply,
int  index,
int *  elem_count 
)

Definition at line 2700 of file ply.c.

void setup_other_props ( PlyFile unused_file,
PlyElement elem 
)

Definition at line 982 of file ply.c.

void setup_property_ply ( PlyFile plyfile,
PlyProperty prop 
)

Definition at line 2749 of file ply.c.

void start_props_ply ( PlyFile ply,
PlyPropRules rules 
)

Definition at line 3098 of file ply.c.

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

Definition at line 2239 of file ply.c.

void weight_props_ply ( PlyFile ply,
float  weight,
void *  other_props 
)

Definition at line 3117 of file ply.c.

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

Definition at line 1962 of file ply.c.

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

Definition at line 1900 of file ply.c.

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

Definition at line 2538 of file ply.c.

void write_scalar_type ( FILE *  fp,
int  code 
)

Definition at line 1689 of file ply.c.


Variable Documentation

char* old_type_names[]
Initial value:
 {  
"invalid",
"char", "short", "int", "uchar", "ushort", "uint", "float", "double",
}

Definition at line 61 of file ply.c.

Initial value:
 {
  0, 1, 2, 4, 1, 2, 4, 4, 8
}

Definition at line 66 of file ply.c.

Initial value:
 {
  {AVERAGE_RULE, "avg"},
  {RANDOM_RULE, "rnd"},
  {MINIMUM_RULE, "max"},
  {MAXIMUM_RULE, "min"},
  {MAJORITY_RULE, "major"},
  {SAME_RULE, "same"},
  {-1, "end_marker"},
  }

Definition at line 2976 of file ply.c.

char* type_names[]
Initial value:
 {  
"invalid",
"int8", "int16", "int32", "uint8", "uint16", "uint32", "float32", "float64",
}

Definition at line 56 of file ply.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


graspit
Author(s):
autogenerated on Fri Jan 11 11:19:47 2013