Blender V2.61 - r43446
|
Go to the source code of this file.
Defines | |
#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 (char *, char *) |
PlyElement * | find_element (PlyFile *, char *) |
PlyProperty * | find_property (PlyElement *, 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 **) |
void | add_property (PlyFile *, char **) |
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 *) |
char * | my_alloc (int, int, char *) |
PlyFile * | ply_write (FILE *fp, int nelems, char **elem_names, int file_type) |
PlyFile * | ply_open_for_writing (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 (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 (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_close (PlyFile *plyfile) |
void | ply_get_info (PlyFile *ply, float *version, int *file_type) |
int | get_prop_type (char *type_name) |
Variables | |
char * | type_names [] |
int | ply_type_size [] |
#define BIG_STRING 4096 |
Referenced by get_words().
#define DONT_STORE_PROP 0 |
Definition at line 82 of file bsp/test/BSP_GhostTest/plyfile.c.
Referenced by ply_read().
#define NAMED_PROP 1 |
Definition at line 86 of file bsp/test/BSP_GhostTest/plyfile.c.
Referenced by ply_describe_element(), and ply_describe_property().
#define NO_OTHER_PROPS -1 |
Definition at line 80 of file bsp/test/BSP_GhostTest/plyfile.c.
Referenced by ascii_get_element(), binary_get_element(), ply_get_other_properties(), and ply_read().
#define OTHER_PROP 0 |
Definition at line 85 of file bsp/test/BSP_GhostTest/plyfile.c.
Referenced by ply_describe_other_properties(), and ply_put_element().
#define STORE_PROP 1 |
Definition at line 83 of file bsp/test/BSP_GhostTest/plyfile.c.
Referenced by ply_get_element_setup(), and ply_get_property().
void add_comment | ( | PlyFile * | plyfile, |
char * | line | ||
) |
Definition at line 2471 of file bsp/test/BSP_GhostTest/plyfile.c.
References i, and ply_put_comment().
Referenced by ply_read().
void add_element | ( | PlyFile * | plyfile, |
char ** | words | ||
) |
Definition at line 2372 of file bsp/test/BSP_GhostTest/plyfile.c.
References PlyFile::elems, myalloc, PlyElement::name, PlyFile::nelems, PlyElement::nprops, and PlyElement::num.
Referenced by ply_read().
void add_obj_info | ( | PlyFile * | plyfile, |
char * | line | ||
) |
Definition at line 2492 of file bsp/test/BSP_GhostTest/plyfile.c.
References i, and ply_put_obj_info().
Referenced by ply_read().
void add_property | ( | PlyFile * | plyfile, |
char ** | words | ||
) |
Definition at line 2427 of file bsp/test/BSP_GhostTest/plyfile.c.
References PlyProperty::count_external, PlyFile::elems, equal_strings(), PlyProperty::external_type, get_prop_type(), PlyProperty::is_list, myalloc, PlyProperty::name, PlyFile::nelems, PlyElement::nprops, and PlyElement::props.
void ascii_get_element | ( | PlyFile * | plyfile, |
char * | elem_ptr | ||
) |
Definition at line 1489 of file bsp/test/BSP_GhostTest/plyfile.c.
References PlyProperty::count_external, PlyProperty::count_internal, PlyProperty::count_offset, PlyProperty::external_type, PlyFile::fp, addon::engine::free(), get_ascii_item(), get_words(), PlyProperty::internal_type, PlyProperty::is_list, myalloc, NO_OTHER_PROPS, PlyElement::nprops, NULL, PlyProperty::offset, PlyElement::other_offset, PlyElement::other_size, ply_type_size, PlyElement::props, store_item(), PlyElement::store_prop, and PlyFile::which_elem.
Referenced by ply_get_element().
void binary_get_element | ( | PlyFile * | plyfile, |
char * | elem_ptr | ||
) |
Definition at line 1618 of file bsp/test/BSP_GhostTest/plyfile.c.
References PlyProperty::count_external, PlyProperty::count_internal, PlyProperty::count_offset, PlyProperty::external_type, PlyFile::fp, get_binary_item(), PlyProperty::internal_type, PlyProperty::is_list, myalloc, NO_OTHER_PROPS, PlyElement::nprops, NULL, PlyProperty::offset, PlyElement::other_offset, PlyElement::other_size, ply_type_size, PlyElement::props, store_item(), PlyElement::store_prop, and PlyFile::which_elem.
Referenced by ply_get_element().
void copy_property | ( | PlyProperty * | dest, |
PlyProperty * | src | ||
) |
Definition at line 2509 of file bsp/test/BSP_GhostTest/plyfile.c.
References PlyProperty::count_external, PlyProperty::count_internal, PlyProperty::count_offset, PlyProperty::external_type, PlyProperty::internal_type, PlyProperty::is_list, PlyProperty::name, and PlyProperty::offset.
int equal_strings | ( | char * | s1, |
char * | s2 | ||
) |
Definition at line 1417 of file bsp/test/BSP_GhostTest/plyfile.c.
PlyElement * find_element | ( | PlyFile * | plyfile, |
char * | element | ||
) |
Definition at line 1442 of file bsp/test/BSP_GhostTest/plyfile.c.
References PlyFile::elems, equal_strings(), i, PlyElement::name, PlyFile::nelems, and NULL.
Referenced by ply_describe_element(), ply_describe_other_properties(), ply_describe_property(), ply_element_count(), ply_get_element_description(), ply_get_element_setup(), ply_get_other_element(), ply_get_other_properties(), ply_get_property(), and ply_put_element_setup().
PlyProperty * find_property | ( | PlyElement * | elem, |
char * | prop_name, | ||
int * | index | ||
) |
Definition at line 1466 of file bsp/test/BSP_GhostTest/plyfile.c.
References equal_strings(), i, PlyProperty::name, PlyElement::nprops, NULL, and PlyElement::props.
Referenced by ply_get_element_setup(), and ply_get_property().
void get_ascii_item | ( | char * | word, |
int | type, | ||
int * | int_val, | ||
unsigned int * | uint_val, | ||
double * | double_val | ||
) |
Definition at line 2255 of file bsp/test/BSP_GhostTest/plyfile.c.
References NULL, PLY_CHAR, PLY_DOUBLE, PLY_FLOAT, PLY_INT, PLY_SHORT, PLY_UCHAR, PLY_UINT, and PLY_USHORT.
Referenced by ascii_get_element().
void get_binary_item | ( | FILE * | fp, |
int | type, | ||
int * | int_val, | ||
unsigned int * | uint_val, | ||
double * | double_val | ||
) |
Definition at line 2172 of file bsp/test/BSP_GhostTest/plyfile.c.
References PLY_CHAR, PLY_DOUBLE, PLY_FLOAT, PLY_INT, PLY_SHORT, PLY_UCHAR, PLY_UINT, and PLY_USHORT.
Referenced by binary_get_element().
double get_item_value | ( | char * | item, |
int | type | ||
) |
Definition at line 1857 of file bsp/test/BSP_GhostTest/plyfile.c.
References PLY_CHAR, PLY_DOUBLE, PLY_FLOAT, PLY_INT, PLY_SHORT, PLY_UCHAR, PLY_UINT, and PLY_USHORT.
int get_prop_type | ( | char * | type_name | ) |
Definition at line 2405 of file bsp/test/BSP_GhostTest/plyfile.c.
References equal_strings(), i, PLY_END_TYPE, PLY_START_TYPE, and type_names.
Referenced by add_property().
void get_stored_item | ( | void * | ptr, |
int | type, | ||
int * | int_val, | ||
unsigned int * | uint_val, | ||
double * | double_val | ||
) |
Definition at line 2102 of file bsp/test/BSP_GhostTest/plyfile.c.
References PLY_CHAR, PLY_DOUBLE, PLY_FLOAT, PLY_INT, PLY_SHORT, PLY_UCHAR, PLY_UINT, and PLY_USHORT.
Referenced by ply_put_element().
char ** get_words | ( | FILE * | fp, |
int * | nwords, | ||
char ** | orig_line | ||
) |
Definition at line 1770 of file bsp/test/BSP_GhostTest/plyfile.c.
References BIG_STRING, myalloc, NULL, and str.
Referenced by ascii_get_element(), and ply_read().
static char * my_alloc | ( | int | size, |
int | lnum, | ||
char * | fname | ||
) |
Definition at line 2532 of file bsp/test/BSP_GhostTest/plyfile.c.
char** old_get_words | ( | FILE * | , |
int * | |||
) |
double old_write_ascii_item | ( | FILE * | fp, |
char * | item, | ||
int | type | ||
) |
Definition at line 2026 of file bsp/test/BSP_GhostTest/plyfile.c.
References PLY_CHAR, PLY_DOUBLE, PLY_FLOAT, PLY_INT, PLY_SHORT, PLY_UCHAR, PLY_UINT, and PLY_USHORT.
void ply_close | ( | PlyFile * | plyfile | ) |
Definition at line 1383 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_describe_element | ( | PlyFile * | plyfile, |
char * | elem_name, | ||
int | nelems, | ||
int | nprops, | ||
PlyProperty * | prop_list | ||
) |
Definition at line 267 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_describe_other_elements | ( | PlyFile * | plyfile, |
PlyOtherElems * | other_elems | ||
) |
Definition at line 1304 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_describe_other_properties | ( | PlyFile * | plyfile, |
PlyOtherProp * | other, | ||
int | offset | ||
) |
Definition at line 358 of file bsp/test/BSP_GhostTest/plyfile.c.
References copy_property(), find_element(), i, myalloc, PlyOtherProp::name, PlyOtherProp::nprops, PlyElement::nprops, NULL, PlyElement::other_offset, OTHER_PROP, PlyElement::other_size, PlyOtherProp::props, PlyElement::props, PlyOtherProp::size, and PlyElement::store_prop.
Referenced by ply_describe_other_elements().
void ply_describe_property | ( | PlyFile * | plyfile, |
char * | elem_name, | ||
PlyProperty * | prop | ||
) |
Definition at line 312 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_element_count | ( | PlyFile * | plyfile, |
char * | elem_name, | ||
int | nelems | ||
) |
Definition at line 418 of file bsp/test/BSP_GhostTest/plyfile.c.
char** ply_get_comments | ( | PlyFile * | plyfile, |
int * | num_comments | ||
) |
Definition at line 1035 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_get_element | ( | PlyFile * | plyfile, |
void * | elem_ptr | ||
) |
Definition at line 1015 of file bsp/test/BSP_GhostTest/plyfile.c.
PlyProperty** ply_get_element_description | ( | PlyFile * | plyfile, |
char * | elem_name, | ||
int * | nelems, | ||
int * | nprops | ||
) |
Definition at line 878 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_get_element_setup | ( | PlyFile * | plyfile, |
char * | elem_name, | ||
int | nprops, | ||
PlyProperty * | prop_list | ||
) |
Definition at line 922 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_get_info | ( | PlyFile * | ply, |
float * | version, | ||
int * | file_type | ||
) |
Definition at line 1403 of file bsp/test/BSP_GhostTest/plyfile.c.
char** ply_get_obj_info | ( | PlyFile * | plyfile, |
int * | num_obj_info | ||
) |
Definition at line 1054 of file bsp/test/BSP_GhostTest/plyfile.c.
PlyOtherElems* ply_get_other_element | ( | PlyFile * | plyfile, |
char * | elem_name, | ||
int | elem_count | ||
) |
Definition at line 1232 of file bsp/test/BSP_GhostTest/plyfile.c.
PlyOtherProp* ply_get_other_properties | ( | PlyFile * | plyfile, |
char * | elem_name, | ||
int | offset | ||
) |
Definition at line 1143 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_get_property | ( | PlyFile * | plyfile, |
char * | elem_name, | ||
PlyProperty * | prop | ||
) |
Definition at line 973 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_header_complete | ( | PlyFile * | plyfile | ) |
Definition at line 445 of file bsp/test/BSP_GhostTest/plyfile.c.
PlyFile* ply_open_for_reading | ( | char * | filename, |
int * | nelems, | ||
char *** | elem_names, | ||
int * | file_type, | ||
float * | version | ||
) |
Definition at line 824 of file bsp/test/BSP_GhostTest/plyfile.c.
PlyFile* ply_open_for_writing | ( | char * | filename, |
int | nelems, | ||
char ** | elem_names, | ||
int | file_type, | ||
float * | version | ||
) |
Definition at line 214 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_put_comment | ( | PlyFile * | plyfile, |
char * | comment | ||
) |
Definition at line 655 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_put_element | ( | PlyFile * | plyfile, |
void * | elem_ptr | ||
) |
Definition at line 542 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_put_element_setup | ( | PlyFile * | plyfile, |
char * | elem_name | ||
) |
Definition at line 518 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_put_obj_info | ( | PlyFile * | plyfile, |
char * | obj_info | ||
) |
Definition at line 679 of file bsp/test/BSP_GhostTest/plyfile.c.
void ply_put_other_elements | ( | PlyFile * | plyfile | ) |
Definition at line 1337 of file bsp/test/BSP_GhostTest/plyfile.c.
PlyFile* ply_read | ( | FILE * | fp, |
int * | nelems, | ||
char *** | elem_names | ||
) |
Definition at line 717 of file bsp/test/BSP_GhostTest/plyfile.c.
PlyFile* ply_write | ( | FILE * | fp, |
int | nelems, | ||
char ** | elem_names, | ||
int | file_type | ||
) |
Definition at line 158 of file bsp/test/BSP_GhostTest/plyfile.c.
void setup_other_props | ( | PlyElement * | elem | ) |
Definition at line 1072 of file bsp/test/BSP_GhostTest/plyfile.c.
References PlyProperty::count_external, PlyProperty::count_internal, PlyProperty::count_offset, PlyProperty::external_type, i, PlyProperty::internal_type, PlyProperty::is_list, PlyElement::nprops, PlyProperty::offset, PlyElement::other_size, ply_type_size, PlyElement::props, size(), and PlyElement::store_prop.
Referenced by ply_get_other_properties().
void store_item | ( | char * | item, |
int | type, | ||
int | int_val, | ||
unsigned int | uint_val, | ||
double | double_val | ||
) |
Definition at line 2308 of file bsp/test/BSP_GhostTest/plyfile.c.
References PLY_CHAR, PLY_DOUBLE, PLY_FLOAT, PLY_INT, PLY_SHORT, PLY_UCHAR, PLY_UINT, and PLY_USHORT.
Referenced by ascii_get_element(), and binary_get_element().
void write_ascii_item | ( | FILE * | fp, |
int | int_val, | ||
unsigned int | uint_val, | ||
double | double_val, | ||
int | type | ||
) |
Definition at line 1984 of file bsp/test/BSP_GhostTest/plyfile.c.
References PLY_CHAR, PLY_DOUBLE, PLY_FLOAT, PLY_INT, PLY_SHORT, PLY_UCHAR, PLY_UINT, and PLY_USHORT.
Referenced by ply_put_element().
void write_binary_item | ( | FILE * | fp, |
int | int_val, | ||
unsigned int | uint_val, | ||
double | double_val, | ||
int | type | ||
) |
Definition at line 1922 of file bsp/test/BSP_GhostTest/plyfile.c.
References PLY_CHAR, PLY_DOUBLE, PLY_FLOAT, PLY_INT, PLY_SHORT, PLY_UCHAR, PLY_UINT, and PLY_USHORT.
Referenced by ply_put_element().
void write_scalar_type | ( | FILE * | fp, |
int | code | ||
) |
Definition at line 1740 of file bsp/test/BSP_GhostTest/plyfile.c.
References PLY_END_TYPE, and type_names.
Referenced by ply_header_complete().
int ply_type_size[] |
{ 0, 1, 2, 4, 1, 2, 4, 4, 8 }
Definition at line 76 of file bsp/test/BSP_GhostTest/plyfile.c.
Referenced by ascii_get_element(), binary_get_element(), ply_put_element(), and setup_other_props().
char* type_names[] |
{ "invalid", "char", "short", "int", "uchar", "ushort", "uint", "float", "double", }
***** BEGIN GPL LICENSE BLOCK *****
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. All rights reserved.
The Original Code is: all of this file.
Contributor(s): none yet.
***** END GPL LICENSE BLOCK *****
Definition at line 69 of file bsp/test/BSP_GhostTest/plyfile.c.
Referenced by get_prop_type(), and write_scalar_type().