2019/03/08

<model	unit="millimeter"	>
	<resources	>
		<texture id="1"  path="1706_001.png"	/>
		<texture id="7"  path="1706_002.png"	/>
		<texture id="21" path="1706_003.png"	/>
		<color   id="2"  value="tex(1)"  />
		<color   id="3"  value="tex(1)"  />
		...
		<color   id="8"  value="tex(7)"  />
		<color   id="9"  value="tex(1)"  />
		...
		<color   id="20" value="tex(1)"  />
		<color   id="22" value="tex(21)" />
		<color   id="23" value="tex(21)" />
		<object  id="24" colorid="2"	>
			<mesh	>
				<vertices	>
					<vertex	x="0"	y="180"	z="0"	/>
					<vertex	x="200"	y="180"	z="0"	/>
					...
					<vertex	x="200"	y="200"	z="0"	/>
					</vertices>
				<texturevertices	>
					<texturevertex	u="0"	v="0"	/>
					<texturevertex	u="10"	v="0"	/>
					...
					<texturevertex	u="-10"	v="0"	/>
					</texturevertices>
				<triangles	>
					<triangle	v1="0"	v2="1"	v3="2"	cv1="0"  cv2="1"  cv3="2"  />
					<triangle	v1="0"	v2="2"	v3="3"	cv1="0"  cv2="2"  cv3="3"  />
					...
					<triangle	v1="20"	v2="22"	v3="23"	cv1="20" cv2="22" cv3="23" />
					</triangles>
				</mesh>
			</object>
		<object	id="25"	colorid="3"	>
			<mesh	>
				<vertices	>
					<vertex	x="120"	y="180"	z="0"	/>
					<vertex	x="120"	y="0"	z="0"	/>
					...
					</vertices>
				<texturevertices	>
					<texturevertex	u="0.6"	v="-9."	/>
					<texturevertex	u="0.6"	v="0"	/>
					...
					</texturevertices>
				<triangles	>
					<triangle	v1="0"	v2="1"	v3="2"	cv1="0"	cv2="1"	cv3="2"	/>
					<triangle	v1="0"	v2="2"	v3="3"	cv1="0"	cv2="2"	cv3="3"	/>
					...
					</triangles>
				</mesh>
			</object>
		...
		<object	id="43"	colorid="23"	>
			<mesh	>
				<vertices	>
					<vertex	x="1613.261471"	y="1259.897501"	z="418"	/>
					<vertex	x="1613.261471"	y="653.897501"	z="418"	/>
					...
					</vertices>
				<texturevertices	>
					<texturevertex	u="-6.299488"	v="2.09"	/>
					<texturevertex	u="-3.269488"	v="2.09"	/>
					...
					</texturevertices>
				<triangles	>
					<triangle	v1="0"	v2="1"	v3="2"	cv1="0"	cv2="1"	cv3="2"	/>
					<triangle	v1="0"	v2="2"	v3="3"	cv1="0"	cv2="2"	cv3="3"	/>
					...
					</triangles>
				</mesh>
			</object>
		</resources>
	<build	>
		<item	objectid="24"	/>
		<item	objectid="25"	/>
		...
		<item	objectid="43"	/>
		</build>
	</model>


1 つの object とそれに関するテクスチャとのリンク
build
    item	objectid="24"
        object	id="24"	colorid="2"
            color	id="2"	value="tex(1)"
                texture	id="1"	path="1706_001.png"


1 つの mesh とその情報
object	id="24"	colorid="2"
    mesh
        vertices
            vertex	x="0"	y="180"	z="0"
            vertex	x="200"	y="180"	z="0"
        texturevertices
            texturevertex	u="0"	v="0"
            texturevertex	u="10"	v="0"
        triangles
            triangle	v1="0"	v2="1"	v3="2"	cv1="0"  cv2="1"  cv3="2"
            triangle	v1="0"	v2="2"	v3="3"	cv1="0"  cv2="2"  cv3="3"

triangle の v1 ... と cv1 ... が,それぞれ頂点座標とテクスチャ座標のインデックス





































広告