Skip to content

Commit

Permalink
Fix BIC-MNI/Display#76 - alternate name of vertex indices.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert D. Vincent committed Dec 20, 2016
1 parent 52a3cf7 commit c3c0c8e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Objects/ply_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* \file ply_io.c
* \brief Input Stanford .ply format surface files.
*
* This is an incomplete but functional implementation. It has not been
* thoroughly tested because I have access to only a fairly small database
* This is an incomplete but functional implementation. It has not been
* thoroughly tested because I have access to only a fairly small database
* of files, and the format is both vague and complex.
*
* \copyright
Expand Down Expand Up @@ -74,12 +74,12 @@ typedef enum property_type
INT, UINT, FLOAT, DOUBLE, LIST
} property_type_t;

/**
/**
* This defines the maximum number of bytes that a property can contain.
*/
#define MAX_PROPERTY_BYTES 2048

/**
/**
* This defines the maximum number of properties that an element can
* contain.
*/
Expand Down Expand Up @@ -367,7 +367,7 @@ get_property_element( struct property_record *prop_ptr, int k, void *value_ptr )
return 1;
}

/**
/**
* Return non-zero if the processor is big-endian.
*/
static int
Expand Down Expand Up @@ -535,6 +535,10 @@ input_ply_surface_file( FILE *fp, object_struct *object_ptr )
prec_vertex_indices = find_property( face_props, face_count,
"vertex_indices" );

if ( prec_vertex_indices == NULL )
prec_vertex_indices = find_property( face_props, face_count,
"vertex_index" );

if ( prec_vertex_indices == NULL )
{
print_error( "Can't read this .ply file, missing the vertex indices.\n" );
Expand Down

0 comments on commit c3c0c8e

Please sign in to comment.