Builder/Builder/Common/plyfile.c
/******************************************************************************
Specify which properties of an element are to be returned.  This should be
called before a call to the routine ply_get_element().

Entry:
  plyfile   - file identifier
  elem_name - which element we're talking about
  nprops    - number of properties
  prop_list - list of properties
******************************************************************************/
Specify which properties of an element are to be returned.  This should be
called before a call to the routine ply_get_element().

plyfile   - file identifier
elem_name - which element we're talking about
nprops    - number of properties
prop_list - list of properties
Specify which properties of an element are to be returned . This should be called before a call to the routine ply_get_element () . plyfile - file identifier elem_name - which element we ' re talking about nprops - number of properties prop_list - list of properties
void ply_get_element_setup(
  PlyFile *plyfile,
  char *elem_name,
  int nprops,
  PlyProperty *prop_list
)
{
  int i;
  PlyElement *elem;
  PlyProperty *prop;
  int index;
  elem = find_element (plyfile, elem_name);
  plyfile->which_elem = elem;
  for (i = 0; i < nprops; i++) {
    prop = find_property (elem, prop_list[i].name, &index);
    if (prop == NULL) {
      fprintf (stderr, "Warning:  Can't find property '%s' in element '%s'\n",
               prop_list[i].name, elem_name);
      continue;
    }
    prop->internal_type = prop_list[i].internal_type;
    prop->offset = prop_list[i].offset;
    prop->count_internal = prop_list[i].count_internal;
    prop->count_offset = prop_list[i].count_offset;
    elem->store_prop[index] = STORE_PROP;
  }
}
void ply_get_element_setup ( PlyFile * plyfile , char * elem_name , int nprops , PlyProperty * prop_list ) { int i ; PlyElement * elem ; PlyProperty * prop ; int index ; elem = find_element ( plyfile , elem_name ) ; plyfile -> which_elem = elem ; for ( i = 0 ; i < nprops ; i ++ ) { prop = find_property ( elem , prop_list [ i ] . name , & index ) ; if ( prop == NULL ) { fprintf ( stderr , " \n " , prop_list [ i ] . name , elem_name ) ; continue ; } prop -> internal_type = prop_list [ i ] . internal_type ; prop -> offset = prop_list [ i ] . offset ; prop -> count_internal = prop_list [ i ] . count_internal ; prop -> count_offset = prop_list [ i ] . count_offset ; elem -> store_prop [ index ] = STORE_PROP ; } }
Specify which properties of an element are to be returned.
Specify which properties of an element are to be returned .
/* find information about the element */ /* deposit the property information into the element's description */ /* look for actual property */ /* store its description */ /* specify that the user wants this property */