struct Vertex
{
//! \8dÀ\95W
- Vector3 pos;
+ meshio::Vector3 pos;
//! \96@\90ü\83x\83N\83g\83\8b
- Vector3 normal;
+ meshio::Vector3 normal;
//! \83e\83N\83X\83`\83\83UV
- Vector2 uv;
+ meshio::Vector2 uv;
//! \83u\83\8c\83\93\83f\83B\83\93\83O\83{\81[\83\931
unsigned short bone0;
//! \83u\83\8c\83\93\83f\83B\83\93\83O\83{\81[\83\932
//! \94ñ\83G\83b\83W
unsigned char edge_flag;
};
+#ifndef SWIG
inline std::ostream &operator<<(std::ostream &os, const Vertex &rhs)
{
os
;
return os;
}
+#endif
////////////////////////////////////////////////////////////
//! \8dÞ\8e¿
struct Material
{
//! Diffuse
- fRGBA diffuse;
+ meshio::fRGBA diffuse;
//! Shinness
float shinness;
//! Specular
- fRGB specular;
+ meshio::fRGB specular;
//! Ambient
- fRGB ambient;
+ meshio::fRGB ambient;
//! \83g\83D\81[\83\93\83e\83N\83X\83`\83\83
unsigned char toon_index;
//! \97Ö\8as/\89e
//! \96Ê\92¸\93_\90\94
unsigned int vertex_count;
//! \83e\83N\83X\83`\83\83
- fixed_string<20> texture;
+ meshio::fixed_string<20> texture;
};
+#ifndef SWIG
inline std::ostream &operator<<(std::ostream &os,
const Material &rhs)
{
;
return os;
}
+#endif
////////////////////////////////////////////////////////////
//! \83{\81[\83\93
struct Bone
{
//! \96¼\91O
- fixed_string<20> name;
+ meshio::fixed_string<20> name;
//! \90e\83{\81[\83\93
unsigned short parent_index;
//! \8eq\83{\81[\83\93
//! \89e\8b¿IK\83{\81[\83\93
unsigned short ik_index;
// \83{\81[\83\93\8dÀ\95W
- Vector3 pos;
+ meshio::Vector3 pos;
//! \89p\8cê\96¼
- fixed_string<20> english_name;
+ meshio::fixed_string<20> english_name;
//! \83{\81[\83\93\8aK\91w\8d\\92z\97p
Bone* parent;
- Vector3 tail;
+ meshio::Vector3 tail;
std::vector<Bone*> children;
unsigned short index;
: parent_index(-1), tail_index(-1), type(BONE_UNKNOWN), ik_index(-1), parent(0), index(-1)
{}
};
+#ifndef SWIG
inline std::ostream &operator<<(std::ostream &os,
const Bone &rhs)
{
;
return os;
}
+#endif
////////////////////////////////////////////////////////////
//! IK
//! \83G\83t\83F\83N\83^\82É\98A\93®\82·\82é\83{\81[\83\93(\8aî\96{\93I\82É\90e\83{\81[\83\93\82É\91k\82é)
std::vector<unsigned short> children;
};
+#ifndef SWIG
inline std::ostream &operator<<(std::ostream &os, const IK &rhs)
{
os
;
return os;
}
+#endif
////////////////////////////////////////////////////////////
//! \95\\8fî
struct Morph
{
//! \95\\8fî\96¼
- fixed_string<20> name;
+ meshio::fixed_string<20> name;
//! \8eg\97p\82·\82é\92¸\93_\90\94
unsigned int vertex_count;
//! \95ª\97Þ
//! \92¸\93_Index
std::vector<unsigned int> indices;
//! \88Ú\93®\97Ê
- std::vector<Vector3> pos_list;
+ std::vector<meshio::Vector3> pos_list;
//! \89p\8cê\96¼
- fixed_string<20> english_name;
+ meshio::fixed_string<20> english_name;
};
+#ifndef SWIG
inline std::ostream &operator<<(std::ostream &os, const Morph &rhs)
{
os
;
return os;
}
+#endif
////////////////////////////////////////////////////////////
//! \83{\81[\83\93\95\\8e¦\98g
////////////////////////////////////////////////////////////
struct BoneGroup
{
- fixed_string<50> name;
- fixed_string<50> english_name;
+ meshio::fixed_string<50> name;
+ meshio::fixed_string<50> english_name;
};
////////////////////////////////////////////////////////////
struct RigidBody
{
//! \8d\84\91Ì\96¼
- fixed_string<20> name;
+ meshio::fixed_string<20> name;
//! \8aÖ\98A\83{\81[\83\93(\83{\81[\83\93\92Ç\8f]\82Æ\83{\81[\83\93\88Ê\92u\8d\87\82í\82¹\82Å\95K\97v)
unsigned short boneIndex;
//! \83O\83\8b\81[\83v
float h;
float d;
//! \8ep\90¨
- Vector3 position;
- Vector3 rotation;
+ meshio::Vector3 position;
+ meshio::Vector3 rotation;
//! \8e¿\97Ê
float weight;
//! \95¨\97\9d\89\89\8eZ\83p\83\89\83\81\81[\83^(bullet)
struct Constraint
{
//! Joint\96¼
- fixed_string<20> name;
+ meshio::fixed_string<20> name;
//! \90Ú\91±\8d\84\91ÌA
unsigned int rigidA;
//! \90Ú\91±\8d\84\91ÌB
unsigned int rigidB;
//! \88Ê\92u
- Vector3 pos;
+ meshio::Vector3 pos;
//! \89ñ\93]
- Vector3 rot;
+ meshio::Vector3 rot;
//! \88Ú\93®\90§\8cÀ
- Vector3 constraintPosMin;
- Vector3 constraintPosMax;
+ meshio::Vector3 constraintPosMin;
+ meshio::Vector3 constraintPosMax;
//! \89ñ\93]\90§\8cÀ
- Vector3 constraintRotMin;
- Vector3 constraintRotMax;
+ meshio::Vector3 constraintRotMin;
+ meshio::Vector3 constraintRotMax;
//! \82Î\82Ë
- Vector3 springPos;
- Vector3 springRot;
+ meshio::Vector3 springPos;
+ meshio::Vector3 springRot;
};
struct IO
{
float version;
- fixed_string<20> name;
- fixed_string<256> comment;
+ meshio::fixed_string<20> name;
+ meshio::fixed_string<256> comment;
std::vector<Vertex> vertices;
std::vector<unsigned short> indices;
std::vector<Material> materials;
std::vector<unsigned short> face_list;
std::vector<BoneGroup> bone_group_list;
std::vector<std::pair<unsigned short, unsigned char> > bone_display_list;
- std::array<fixed_string<100>, 10> toon_textures;
+ std::array<meshio::fixed_string<100>, 10> toon_textures;
std::vector<RigidBody> rigidbodies;
std::vector<Constraint> constraints;
- fixed_string<20> english_name;
- fixed_string<256> english_comment;
+ meshio::fixed_string<20> english_name;
+ meshio::fixed_string<256> english_comment;
IO();
bool read(const char *path);
bool write(const char *path);
- bool read(binary::IReader &reader);
- bool write(binary::IWriter &writer);
+ bool read(meshio::binary::IReader &reader);
+ bool write(meshio::binary::IWriter &writer);
};
+#ifndef SWIG
inline std::ostream &operator<<(std::ostream &os, const IO &rhs)
{
os
;
return os;
}
+#endif
} // namespace pmd