public:
std::vector<lm::vec3f> m_Verts;
+ std::vector<lib_graph::color3b> m_Col;
std::vector<lm::vec3f> m_Normals;
std::vector<lm::vec2f> m_UVs;
{
-inline float ReadNextFloat(istream& ist)
-{
- string s;
- ist >> s;
- return (float)atof(s.c_str());
-}
-
-inline void ReadVec(istream& ist, lm::vec2f& v)
-{
- v.x = ReadNextFloat(ist);
- v.y = ReadNextFloat(ist);
-}
-
-inline void ReadVec(istream& ist, lm::vec3f& v)
-{
- v.x = ReadNextFloat(ist);
- v.y = ReadNextFloat(ist);
- v.z = ReadNextFloat(ist);
-}
-
-
// \83t\83@\83C\83\8b\93Ç\8d\9e
bool ObjMeshReader::Load( ObjMesh& mesh , const string& filename )
{
bool CheckAndModifyContinueToNextLine(std::string& s) const;
+ float ReadNextFloat(std::istream& ist)
+ {
+ ist >> m_ReadCache;
+ return (float)atof(m_ReadCache.c_str());
+ }
+
+ void ReadVec(std::istream& ist, lm::vec2f& v)
+ {
+ v.x = ReadNextFloat(ist);
+ v.y = ReadNextFloat(ist);
+ }
+
+ void ReadVec(std::istream& ist, lm::vec3f& v)
+ {
+ v.x = ReadNextFloat(ist);
+ v.y = ReadNextFloat(ist);
+ v.z = ReadNextFloat(ist);
+ }
private:
std::map<std::string, int> m_MatIdxMap;
int m_PrimaryGroupIdx;
std::string m_LoadWorkDirPath;
+
+ std::string m_ReadCache;
};