%}
%include "std_vector.i"
%include "std_wstring.i"
+%include "std_string.i"
%include "../include/color.h"
%include "../include/la.h"
%include "../include/pmd.h"
%template(PBoneVector) std::vector<meshio::pmd::Bone*>;
///////////////////////////////////////////////////////////////////////////////
-// vertices
+// meshio::pmd::IO::each_vertex
///////////////////////////////////////////////////////////////////////////////
%inline %{
//! Thin wrapper for ONLY the increment operator
}
}
+///////////////////////////////////////////////////////////////////////////////
+// addVertex
+// addMaterial
+// addBone
+// addMorph
+///////////////////////////////////////////////////////////////////////////////
+%extend meshio::pmd::IO {
+
+meshio::pmd::Vertex * addVertex()
+{
+ $self->vertices.push_back(meshio::pmd::Vertex());
+ return &($self->vertices.back());
+}
+
+meshio::pmd::Material *addMaterial()
+{
+ $self->materials.push_back(new meshio::pmd::Material);
+ return $self->materials.back();
+}
+
+meshio::pmd::Bone *addBone()
+{
+ $self->bones.push_back(meshio::pmd::Bone());
+ return &($self->bones.back());
+}
+
+meshio::pmd::Morph *addMorph()
+{
+ $self->morph_list.push_back(meshio::pmd::Morph());
+ return &($self->morph_list.back());
+}
+
+meshio::pmd::IK *addIK()
+{
+ $self->ik_list.push_back(meshio::pmd::IK());
+ return &($self->ik_list.back());
+}
+
+void addBoneDisplay(unsigned short bone_index, unsigned char display_index)
+{
+ $self->bone_display_list.push_back(
+ std::make_pair(bone_index, display_index));
+}
+
+meshio::pmd::BoneDisplayName *addBoneDisplayName()
+{
+ $self->bone_display_name_list.push_back(meshio::pmd::BoneDisplayName());
+ return &($self->bone_display_name_list.back());
+}
+
+meshio::pmd::ToonTexture *getToonTexture(int index)
+{
+ return &($self->toon_textures[index]);
+}
+
+}