#include#include #include class txt2float { public: void push_back(const char * text) { float f = (float) atof(text); m_vf.push_back(f); char * p = (char *) text; while (*p) { if (*p == 0x20) { f = (float) atof(p); m_vf.push_back(f); } p++; } } void clear() { m_vf.clear(); } float * data() { return m_vf.data(); } std::vector & get() { return m_vf; } private: std::vector m_vf; }; { txt2float tf; tf.push_back(Value); SubMaterial.Diffuse = tf.get(); }
댓글 없음:
댓글 쓰기