#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>#include <ply.h>
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 | 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) |
| PlyRuleList * | append_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 (char *, char *) |
| PlyElement * | find_element (PlyFile *, char *) |
| PlyProperty * | find_property (PlyElement *, 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) |
| PlyOtherElems * | get_other_element_ply (PlyFile *plyfile) |
| static PlyOtherProp * | get_other_properties (PlyFile *plyfile, PlyElement *elem, int offset) |
| PlyOtherProp * | get_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) |
| PlyPropRules * | init_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 *) |
| PlyFile * | open_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) |
| PlyOtherProp * | ply_get_other_properties (PlyFile *plyfile, char *elem_name, int offset) |
| void | ply_get_property (PlyFile *plyfile, char *elem_name, PlyProperty *prop) |
| PlyFile * | ply_open_for_reading (char *filename, int *nelems, char ***elem_names, int *file_type, float *version) |
| PlyFile * | ply_read (FILE *fp, int *nelems, char ***elem_names) |
| PlyFile * | ply_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) |
| PlyFile * | read_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 *plyfile, 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) |
| PlyFile * | write_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 BIG_STRING 4096 |
| #define DONT_STORE_PROP 0 |
| #define NAMED_PROP 1 |
| #define NO_OTHER_PROPS -1 |
| #define OTHER_PROP 0 |
| #define STORE_PROP 1 |
| void add_comment | ( | PlyFile * | plyfile, |
| char * | line | ||
| ) |
| void add_element | ( | PlyFile * | plyfile, |
| char ** | words, | ||
| int | nwords | ||
| ) |
| void add_obj_info | ( | PlyFile * | plyfile, |
| char * | line | ||
| ) |
| void add_property | ( | PlyFile * | plyfile, |
| char ** | words, | ||
| int | nwords | ||
| ) |
| void append_comment_ply | ( | PlyFile * | ply, |
| char * | comment | ||
| ) |
| void append_obj_info_ply | ( | PlyFile * | ply, |
| char * | obj_info | ||
| ) |
| PlyRuleList* append_prop_rule | ( | PlyRuleList * | rule_list, |
| char * | name, | ||
| char * | property | ||
| ) |
| void ascii_get_element | ( | PlyFile * | plyfile, |
| char * | elem_ptr | ||
| ) |
| void binary_get_element | ( | PlyFile * | plyfile, |
| char * | elem_ptr | ||
| ) |
| 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 * | dest, |
| PlyProperty * | src | ||
| ) |
| 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 | ( | char * | s1, |
| char * | s2 | ||
| ) |
| PlyElement * find_element | ( | PlyFile * | plyfile, |
| char * | element | ||
| ) |
| PlyProperty * find_property | ( | PlyElement * | elem, |
| char * | prop_name, | ||
| int * | index | ||
| ) |
| void free_other_elements_ply | ( | PlyOtherElems * | other_elems | ) |
| void get_ascii_item | ( | char * | word, |
| int | type, | ||
| int * | int_val, | ||
| unsigned int * | uint_val, | ||
| double * | double_val | ||
| ) |
| void get_binary_item | ( | FILE * | fp, |
| int | type, | ||
| int * | int_val, | ||
| unsigned int * | uint_val, | ||
| double * | double_val | ||
| ) |
| 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 * | item, |
| int | type | ||
| ) |
| void* get_new_props_ply | ( | PlyFile * | ply | ) |
| char** get_obj_info_ply | ( | PlyFile * | plyfile, |
| int * | num_obj_info | ||
| ) |
| PlyOtherElems* get_other_element_ply | ( | PlyFile * | plyfile | ) |
| static PlyOtherProp* get_other_properties | ( | PlyFile * | plyfile, |
| PlyElement * | elem, | ||
| int | offset | ||
| ) | [static] |
| PlyOtherProp* get_other_properties_ply | ( | PlyFile * | plyfile, |
| int | offset | ||
| ) |
| int get_prop_type | ( | char * | type_name | ) |
| void get_stored_item | ( | void * | ptr, |
| int | type, | ||
| int * | int_val, | ||
| unsigned int * | uint_val, | ||
| double * | double_val | ||
| ) |
| char ** get_words | ( | FILE * | fp, |
| int * | nwords, | ||
| char ** | orig_line | ||
| ) |
| void header_complete_ply | ( | PlyFile * | plyfile | ) |
| PlyPropRules* init_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 | size, |
| int | lnum, | ||
| char * | fname | ||
| ) | [static] |
| PlyFile* open_for_writing_ply | ( | char * | filename, |
| int | nelems, | ||
| char ** | elem_names, | ||
| int | file_type | ||
| ) |
| void ply_describe_property | ( | PlyFile * | plyfile, |
| char * | elem_name, | ||
| PlyProperty * | prop | ||
| ) |
| void ply_get_element | ( | PlyFile * | plyfile, |
| void * | elem_ptr | ||
| ) |
| PlyOtherProp* ply_get_other_properties | ( | PlyFile * | plyfile, |
| char * | elem_name, | ||
| int | offset | ||
| ) |
| void ply_get_property | ( | PlyFile * | plyfile, |
| char * | elem_name, | ||
| PlyProperty * | prop | ||
| ) |
| PlyFile* ply_open_for_reading | ( | char * | filename, |
| int * | nelems, | ||
| char *** | elem_names, | ||
| int * | file_type, | ||
| float * | version | ||
| ) |
| 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 | ) |
| 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 * | plyfile, |
| PlyElement * | elem | ||
| ) |
| void setup_property_ply | ( | PlyFile * | plyfile, |
| PlyProperty * | prop | ||
| ) |
| void start_props_ply | ( | PlyFile * | ply, |
| PlyPropRules * | rules | ||
| ) |
| void store_item | ( | char * | item, |
| int | type, | ||
| int | int_val, | ||
| unsigned int | uint_val, | ||
| double | double_val | ||
| ) |
| void weight_props_ply | ( | PlyFile * | ply, |
| float | weight, | ||
| void * | other_props | ||
| ) |
| void write_ascii_item | ( | FILE * | fp, |
| int | int_val, | ||
| unsigned int | uint_val, | ||
| double | double_val, | ||
| int | type | ||
| ) |
| void write_binary_item | ( | FILE * | fp, |
| int | int_val, | ||
| unsigned int | uint_val, | ||
| double | double_val, | ||
| int | type | ||
| ) |
| void write_scalar_type | ( | FILE * | fp, |
| int | code | ||
| ) |
| char* old_type_names[] |
| int ply_type_size[] |
{
AVERAGE_RULE, "avg",
RANDOM_RULE, "rnd",
MINIMUM_RULE, "max",
MAXIMUM_RULE, "min",
MAJORITY_RULE, "major",
SAME_RULE, "same",
-1, "end_marker",
}
| char* type_names[] |