#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(); }
2011년 3월 8일 화요일
txt2float
피드 구독하기:
댓글 (Atom)
기본 페이지 - 복사용
마크다운 코드 박스 (가독성 최적화 스킨)
-
bool atob(const char * string) { if (!strcmp(string, "true")) return true; return false; }
-
/// CXXXView.cpp void CXXXView::OnInitialUpdate() { CView::OnInitialUpdate(); // TODO: Add your specialized code here and/or call the ...
-
WxWidgets: http://www.wxwidgets.org/downloads/ MinGW: http://sourceforge.net/projects/mingw/files/ * Microsoft Windows Environment Var...
댓글 없음:
댓글 쓰기