3 *
\83\81\83^
\83Z
\83R
\83C
\83A
\82Ì
\83\82\83f
\83\8b\83f
\81[
\83^
\81B
\83e
\83L
\83X
\83g
\8c`
\8e®
\81B
4 *
\83}
\83e
\83\8a\83A
\83\8b\8fî
\95ñ
\82Æ
\8c`
\8fó
\83f
\81[
\83^
\82ð
\95Û
\8e\9d\82·
\82é
\81B
5 *
\83\82\83f
\83\8a\83\93\83O
\8cü
\82¯
\82É
\88Ù
\82È
\82é
\92¸
\93_
\91®
\90«
\82ð
\8e\9d\82Â
\92¸
\93_
\82ð
\82Ð
\82Æ
\82Â
\82Ì
\92¸
\93_
\82Æ
\82µ
\82Ä
\88µ
\82Á
\82Ä
\82¢
\82é
\82Ì
\82Å
\81A
6 *
\83v
\83\8d\83O
\83\89\83\80\82Å
\92¸
\93_
\94z
\97ñ
\82ð
\8dì
\82é
\8fê
\8d\87\82Í
\83}
\83e
\83\8a\83A
\83\8b\81AUV
\82È
\82Ç
\82ª
\88Ù
\82È
\82é
\92l
\82ð
\8e\9d\82Â
\92¸
\93_
\82ð
7 *
\95Ê
\82Ì
\92¸
\93_
\82Æ
\82µ
\82Ä
\95ª
\97£
\82·
\82é
\8dì
\8bÆ
\82ª
\95K
\97v
\82É
\82È
\82é
\81B
8 *
\96@
\90ü
\82Í
\8cv
\8eZ
\82µ
\82Ä
\8eZ
\8fo
\82·
\82é
\95K
\97v
\82ª
\82 \82é
\81B
20 *
\83I
\83u
\83W
\83F
\83N
\83g
\82Ì
\95Û
\8e\9d\82·
\82é
\83X
\83\80\81[
\83W
\83\93\83O
\92l
\82ð
\8eQ
\8fÆ
\82µ
\82Ä
\96Ê
\96@
\90ü
\82©
\82ç
\8cv
\8eZ
\82·
\82é
\81B
22 *
\97 \96Ê
\82Ì
\88µ
\82¢
23 *
\83I
\83\8a\83W
\83i
\83\8b\82Å
\82Í
\83o
\83b
\83N
\83J
\83\8a\83\93\83O
\97L
\8cø
\81B
25 * MIKOTO
\95û
\8e®
\82Ì
\83{
\81[
\83\93
26 * MQO
\82Í
\95W
\8f\80\82Å
\83X
\83L
\83j
\83\93\83O
\8fî
\95ñ
\82ð
\8e\9d\82½
\82È
\82¢
\82ª
\81A
\93Á
\92è
\82Ì
\83\8b\81[
\83\8b\82Å
\83}
\83e
\83\8a\83A
\83\8b\82Æ
\83I
\83u
\83W
\83F
\83N
\83g
27 *
\82ð
\8dì
\90¬
\82·
\82é
\82±
\82Æ
\82Å
\82±
\82ê
\82ð
\8dì
\90¬
\82·
\82é
\81B
29 *
\8eQ
\8dl
\83T
\83C
\83g
30 * http://www.metaseq.net/metaseq/format.html
33 #ifndef MESH_IO_MQO_H_INCLUDED
34 #define MESH_IO_MQO_H_INCLUDED
45 typedef ::meshio::la::Vector2 Vector2;
46 typedef ::meshio::la::Vector3 Vector3;
47 typedef ::meshio::la::Vector4 Vector4;
48 typedef ::meshio::color::fRGBA RGBA;
50 //! Scene
\83`
\83\83\83\93\83N
61 : head(0), pitch(0), ortho(false), zoom2(2)
64 inline std::ostream &operator<<(std::ostream &os, const Scene &rhs)
68 << " pos: " << rhs.pos
69 << ", lookat: " << rhs.lookat
70 << ", head: " << rhs.head
71 << ", pitch: " << rhs.pitch
72 << ", ortho: " << rhs.ortho
73 << ", zoom2: " << rhs.zoom2
74 << ", ambient: " << rhs.ambient
80 //! Material
\83`
\83\83\83\93\83N
97 : shader(0), diffuse(1), ambient(0), emmit(0), specular(0), power(0),
101 // for python3 unicode
102 std::wstring getName()const;
103 std::wstring getTexture()const;
105 inline std::ostream &operator<<(std::ostream &os, const Material &rhs)
109 << '"' << rhs.name << '"'
110 << " shader:" << rhs.shader
111 << ", color:" << rhs.color
112 << ", diffuse:" << rhs.diffuse
113 << ", ambient:" << rhs.ambient
114 << ", emmit:" << rhs.emmit
115 << ", specular:" << rhs.specular
116 << ", power:" << rhs.power
117 << ", texture:\"" << rhs.texture << '"'
118 << ", alphamap:\"" << rhs.alphamap << '"'
119 << ", bumpmap:\"" << rhs.bumpmap << '"'
125 //! face
\83`
\83\83\83\93\83N
128 unsigned int index_count;
129 unsigned int indices[4];
130 unsigned int material_index;
134 : index_count(0), material_index(0)
145 int getIndex(int i){ return indices[i]; }
146 Vector2 getUV(int i){ return uv[i]; }
148 inline std::ostream &operator<<(std::ostream &os, const Face &rhs)
150 switch(rhs.index_count)
155 << "indices:{" << rhs.indices[0] << ',' << rhs.indices[1] << "}"
156 << ", material_index: " << rhs.material_index
157 << ", uv:{" << rhs.uv[0] << ',' << rhs.uv[1] << "}"
158 << ", color:{" << rhs.color[0] << ',' << rhs.color[1] << "}"
166 << "indices:{" << rhs.indices[0]
167 << ',' << rhs.indices[1]
168 << ',' << rhs.indices[2] << "}"
169 << ", material_index: " << rhs.material_index
170 << ", uv:{" << rhs.uv[0] << ',' << rhs.uv[1] << ',' << rhs.uv[2] << "}"
172 << rhs.color[0] << ',' << rhs.color[1] << ',' << rhs.color[2] << "}"
180 << "indices:{" << rhs.indices[0]
181 << ',' << rhs.indices[1]
182 << ',' << rhs.indices[2]
183 << ',' << rhs.indices[3] << "}"
184 << ", material_index: " << rhs.material_index
185 << ", uv:{" << rhs.uv[0] << ',' << rhs.uv[1]
186 << ',' << rhs.uv[2] << ',' << rhs.uv[3] << "}"
187 << ", color:{" << rhs.color[0]
188 << ',' << rhs.color[1]
189 << ',' << rhs.color[2]
190 << ',' << rhs.color[3] << "}"
201 //! Object
\83`
\83\83\83\93\83N
218 std::vector<Vector3> vertices;
219 std::vector<Face> faces;
222 : depth(0), folding(0), visible(1), locking(0), shading(0),
223 smoothing(60.0f), color_type(0), mirror(0)
226 std::wstring getName()const;
228 inline std::ostream &operator<<(std::ostream &os, const Object &rhs)
232 << '"' << rhs.name << '"'
233 << " vertices:" << rhs.vertices.size()
234 << ", faces:" << rhs.faces.size()
240 ///////////////////////////////////////////////////////////////////////////////
242 ///////////////////////////////////////////////////////////////////////////////
246 std::vector<Material> materials;
247 std::vector<Object> objects;
249 bool read(binary::IReader &reader);
250 bool read(const char *path);
252 bool read(const wchar_t *path);
254 bool write(binary::IWriter &writer);
255 bool write(const char *path);
259 } // namespace meshio
261 #endif // MESH_IO_MQO_H_INCLUDED