OBJ coerce invalid nan or inf texture coords to 0

Some exporters (eg Vectorworks 2019) may export texture coordinate components as "nan".

While this is invalid, it's better to coerce these values to 0 rather than reject the entire file.
This commit is contained in:
RichardTea
2019-04-17 13:55:08 +01:00
parent 51be6236a7
commit e8bcf162dd
2 changed files with 26 additions and 4 deletions

View File

@@ -96,7 +96,7 @@ protected:
/// Get the number of components in a line.
size_t getNumComponentsInDataDefinition();
/// Stores the vector
size_t getVector( std::vector<aiVector3D> &point3d_array );
size_t getTexCoordVector( std::vector<aiVector3D> &point3d_array );
/// Stores the following 3d vector.
void getVector3( std::vector<aiVector3D> &point3d_array );
/// Stores the following homogeneous vector as a 3D vector