namespace meshio {
namespace pmd {
-typedef la::Vector2 Vector2;
-typedef la::Vector3 Vector3;
-typedef la::Vector4 Vector4;
-typedef color::fRGBA fRGBA;
-typedef color::fRGB fRGB;
+typedef ::meshio::la::Vector2 Vector2;
+typedef ::meshio::la::Vector3 Vector3;
+typedef ::meshio::la::Vector4 Vector4;
+typedef ::meshio::color::fRGBA fRGBA;
+typedef ::meshio::color::fRGB fRGB;
////////////////////////////////////////////////////////////
//! \92¸\93_
unsigned int vertex_count;
//! \83e\83N\83X\83`\83\83
char texture[20];
+
+ std::wstring getTexture()const;
};
inline std::ostream &operator<<(std::ostream &os,
const Material &rhs)
unsigned short ik_index;
// \83{\81[\83\93\8dÀ\95W
Vector3 pos;
+ //! \89p\8cê\96¼
+ char english_name[20];
+ //! \83{\81[\83\93\8aK\91w\8d\\92z\97p
+ Bone* parent;
+ Vector3 tail;
+ std::vector<Bone*> children;
+ unsigned short index;
+
+ Bone()
+ : parent(0)
+ {}
+ std::wstring getName()const;
};
inline std::ostream &operator<<(std::ostream &os,
const Bone &rhs)
std::vector<unsigned int> indices;
//! \88Ú\93®\97Ê
std::vector<Vector3> pos_list;
+ //! \89p\8cê\96¼
+ char english_name[20];
+
+ void append(int index, float x, float y, float z);
+ std::wstring getName()const;
};
inline std::ostream &operator<<(std::ostream &os, const Morph &rhs)
{
}
////////////////////////////////////////////////////////////
+//! \83{\81[\83\93\95\\8e¦\98g
+////////////////////////////////////////////////////////////
+struct BoneDisplayName
+{
+ char name[50];
+ char english_name[50];
+};
+
+////////////////////////////////////////////////////////////
+//! \83g\83D\81[\83\93\83e\83N\83X\83`\83\83
+////////////////////////////////////////////////////////////
+struct ToonTexture
+{
+ char name[100];
+};
+
+////////////////////////////////////////////////////////////
//! \8d\84\91Ì
////////////////////////////////////////////////////////////
//! \8c`\8fó
char comment[256];
std::vector<Vertex> vertices;
std::vector<unsigned short> indices;
- std::vector<Material> materials;
+ std::vector<Material*> materials;
std::vector<Bone> bones;
std::vector<IK> ik_list;
std::vector<Morph> morph_list;
- std::vector<std::pair<unsigned short, unsigned char> > bone_list;
- std::vector<std::string> bone_name_list;
+ std::vector<unsigned short> face_list;
+ std::vector<BoneDisplayName> bone_display_name_list;
+ std::vector<std::pair<unsigned short, unsigned char> > bone_display_list;
+ ToonTexture toon_textures[10];
std::vector<RigidBody> rigidbodies;
std::vector<Constraint> constraints;
+ char english_name[20];
+ char english_comment[256];
+
IO();
+ ~IO();
bool read(binary::IReader &reader);
- bool write(std::ostream &os);
+ //bool read(const char *path);
+ bool read(const wchar_t *path);
+ bool write(binary::IWriter &writer);
+ bool write(const char *path);
+
+ const Vector2* getUV(int index)const;
+ std::wstring getName()const;
};
inline std::ostream &operator<<(std::ostream &os, const IO &rhs)
{