37 OBJFile(
const std::string& filename,
bool normalize=
false);
58 void ltrim(std::string &s);
60 void rtrim(std::string &s);
62 void trim(std::string &s);
69 std::vector<std::string> tokenize(
const std::string& str,
size_t startpos);
77 template <
typename T> T fromStr(
const std::string& str) {
79 std::istringstream iss{str};
3D vector template with arithmetic, geometry helpers, and RNG utilities.
std::vector< Vec3 > normals
Per-vertex normals.
Definition OBJFile.h:54
std::vector< Vec3 > vertices
Vertex positions parsed from "v" records (x,y,z).
Definition OBJFile.h:48
std::vector< IndexType > indices
Triangle index buffer (each element is one face as three indices).
Definition OBJFile.h:46
std::array< size_t, 3 > IndexType
Index triple forming one triangle (zero-based vertex indices).
Definition OBJFile.h:43
OBJFile(const std::string &filename, bool normalize=false)
Load an OBJ file.
Definition OBJFile.cpp:6