Prechádzať zdrojové kódy

[+] Few models for AMF and X3D.

Alexandr Arutjunov 9 rokov pred
rodič
commit
165f0f0548

BIN
test/models-nonbsd/AMF/3_bananas.amf.7z


BIN
test/models-nonbsd/AMF/screenshot_3_bananas.jpeg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 302 - 0
test/models-nonbsd/X3D/Chevy/ChevyTahoe.x3d


BIN
test/models-nonbsd/X3D/Chevy/textures/ChevyTahoeTexture.jpg


BIN
test/models-nonbsd/X3D/Chevy/textures/ChevyTahoeTires.jpg


+ 1 - 0
test/models/AMF/README

@@ -0,0 +1 @@
+Simple models for testing importer. No desription because models are simple and created by hands.

+ 59 - 0
test/models/AMF/test1.amf

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<mesh>
+			<vertices>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<triangle>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+</amf>

+ 65 - 0
test/models/AMF/test2.amf

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<color>
+			<r>0.1</r>
+			<g>0.6</g>
+			<b>0.1</b>
+			<a>1</a>
+		</color>
+		<mesh>
+			<vertices>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<triangle>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+</amf>

+ 71 - 0
test/models/AMF/test3.amf

@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<color>
+			<r>0.1</r>
+			<g>0.6</g>
+			<b>0.1</b>
+			<a>1</a>
+		</color>
+		<mesh>
+			<vertices>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<color>
+					<r>0.6</r>
+					<g>0.1</g>
+					<b>0.1</b>
+					<a>1</a>
+				</color>
+				<triangle>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+</amf>

+ 77 - 0
test/models/AMF/test4.amf

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<color>
+			<r>0.1</r>
+			<g>0.6</g>
+			<b>0.1</b>
+			<a>1</a>
+		</color>
+		<mesh>
+			<vertices>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<color>
+					<r>0.6</r>
+					<g>0.1</g>
+					<b>0.1</b>
+					<a>1</a>
+				</color>
+				<triangle>
+					<color>
+						<r>0.0</r>
+						<g>0.0</g>
+						<b>1</b>
+						<a>1</a>
+					</color>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+</amf>

+ 95 - 0
test/models/AMF/test5.amf

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<color>
+			<r>0.1</r>
+			<g>0.6</g>
+			<b>0.1</b>
+			<a>1</a>
+		</color>
+		<mesh>
+			<vertices>
+				<vertex>
+					<color>
+						<r>0.5</r>
+						<g>0.5</g>
+						<b>0</b>
+						<a>1</a>
+					</color>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<color>
+						<r>0.5</r>
+						<g>0.5</g>
+						<b>0.2</b>
+						<a>1</a>
+					</color>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<color>
+						<r>0.5</r>
+						<g>0.5</g>
+						<b>0.4</b>
+						<a>1</a>
+					</color>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<color>
+						<r>0.5</r>
+						<g>0.5</g>
+						<b>0.8</b>
+						<a>1</a>
+					</color>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<color>
+					<r>0.6</r>
+					<g>0.1</g>
+					<b>0.1</b>
+					<a>1</a>
+				</color>
+				<triangle>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+</amf>

+ 77 - 0
test/models/AMF/test5a.amf

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<color>
+			<r>0.1</r>
+			<g>0.6</g>
+			<b>0.1</b>
+			<a>1</a>
+		</color>
+		<mesh>
+			<vertices>
+				<vertex>
+					<color>
+						<r>0.5</r>
+						<g>0.5</g>
+						<b>0</b>
+						<a>1</a>
+					</color>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<color>
+					<r>0.6</r>
+					<g>0.1</g>
+					<b>0.1</b>
+					<a>1</a>
+				</color>
+				<triangle>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+</amf>

+ 83 - 0
test/models/AMF/test6.amf

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<color>
+			<r>0.1</r>
+			<g>0.6</g>
+			<b>0.1</b>
+			<a>1</a>
+		</color>
+		<mesh>
+			<vertices>
+				<vertex>
+					<color>
+						<r>0.5</r>
+						<g>0.5</g>
+						<b>0</b>
+						<a>1</a>
+					</color>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<color>
+					<r>0.6</r>
+					<g>0.1</g>
+					<b>0.1</b>
+					<a>1</a>
+				</color>
+				<triangle>
+					<color>
+						<r>0.0</r>
+						<g>0.0</g>
+						<b>1</b>
+						<a>1</a>
+					</color>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+</amf>

+ 112 - 0
test/models/AMF/test7.amf

@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<color>
+			<r>0.1</r>
+			<g>0.6</g>
+			<b>0.1</b>
+			<a>1</a>
+		</color>
+		<mesh>
+			<vertices>
+				<vertex>
+					<color>
+						<r>0.5</r>
+						<g>0.5</g>
+						<b>0</b>
+						<a>1</a>
+					</color>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>-4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<color>
+					<r>0.6</r>
+					<g>0.1</g>
+					<b>0.1</b>
+					<a>1</a>
+				</color>
+				<triangle>
+					<color>
+						<r>0.0</r>
+						<g>0.0</g>
+						<b>1</b>
+						<a>1</a>
+					</color>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+			<volume>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>4</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>2</v2>
+					<v3>4</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>4</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+</amf>

+ 130 - 0
test/models/AMF/test8.amf

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<color>
+			<r>0.1</r>
+			<g>0.6</g>
+			<b>0.1</b>
+			<a>1</a>
+		</color>
+		<mesh>
+			<vertices>
+				<vertex>
+					<color>
+						<r>0.5</r>
+						<g>0.5</g>
+						<b>0</b>
+						<a>1</a>
+					</color>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>-4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<color>
+					<r>0.6</r>
+					<g>0.1</g>
+					<b>0.1</b>
+					<a>1</a>
+				</color>
+				<triangle>
+					<color>
+						<r>0.0</r>
+						<g>0.0</g>
+						<b>1</b>
+						<a>1</a>
+					</color>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+			<volume>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>4</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>2</v2>
+					<v3>4</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>4</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+	<constellation id="2">
+		<instance objectid="1">
+			<deltax>-5</deltax>
+			<deltay>0</deltay>
+			<deltaz>0</deltaz>
+			<rx>-45</rx>
+			<ry>0</ry>
+			<rz>0</rz>
+		</instance>
+		<instance objectid="1">
+			<deltax>5</deltax>
+			<deltay>0</deltay>
+			<deltaz>0</deltaz>
+			<rx>45</rx>
+			<ry>0</ry>
+			<rz>0</rz>
+		</instance>
+	</constellation>
+</amf>

+ 180 - 0
test/models/AMF/test9.amf

@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="utf-8"?>
+<amf>
+	<object id="1">
+		<color>
+			<r>0.1</r>
+			<g>0.6</g>
+			<b>0.1</b>
+			<a>1</a>
+		</color>
+		<mesh>
+			<vertices>
+				<vertex>
+					<color>
+						<r>0.5</r>
+						<g>0.5</g>
+						<b>0</b>
+						<a>1</a>
+					</color>
+					<coordinates>
+						<x>-0.5</x>
+						<y>-0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>-0.5</x>
+						<y>0.5</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>1</x>
+						<y>0</y>
+						<z>0</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>4</z>
+					</coordinates>
+				</vertex>
+				<vertex>
+					<coordinates>
+						<x>0</x>
+						<y>0</y>
+						<z>-4</z>
+					</coordinates>
+				</vertex>
+			</vertices>
+			<volume>
+				<color>
+					<r>0.6</r>
+					<g>0.1</g>
+					<b>0.1</b>
+					<a>1</a>
+				</color>
+				<triangle>
+					<color>
+						<r>0.0</r>
+						<g>0.0</g>
+						<b>1</b>
+						<a>1</a>
+					</color>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>3</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>3</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>3</v3>
+				</triangle>
+			</volume>
+			<volume>
+				<triangle>
+					<v1>0</v1>
+					<v2>2</v2>
+					<v3>1</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>4</v2>
+					<v3>2</v3>
+				</triangle>
+				<triangle>
+					<v1>1</v1>
+					<v2>2</v2>
+					<v3>4</v3>
+				</triangle>
+				<triangle>
+					<v1>0</v1>
+					<v2>1</v2>
+					<v3>4</v3>
+				</triangle>
+			</volume>
+		</mesh>
+	</object>
+	<constellation id="2">
+		<instance objectid="1">
+			<deltax>-5</deltax>
+			<deltay>0</deltay>
+			<deltaz>0</deltaz>
+			<rx>-45</rx>
+			<ry>0</ry>
+			<rz>0</rz>
+		</instance>
+		<instance objectid="1">
+			<deltax>5</deltax>
+			<deltay>0</deltay>
+			<deltaz>0</deltaz>
+			<rx>45</rx>
+			<ry>0</ry>
+			<rz>0</rz>
+		</instance>
+		<instance objectid="1">
+			<deltax>0</deltax>
+			<deltay>-5</deltay>
+			<deltaz>0</deltaz>
+			<rx>0</rx>
+			<ry>-45</ry>
+			<rz>0</rz>
+		</instance>
+		<instance objectid="1">
+			<deltax>0</deltax>
+			<deltay>5</deltay>
+			<deltaz>0</deltaz>
+			<rx>0</rx>
+			<ry>45</ry>
+			<rz>0</rz>
+		</instance>
+		<instance objectid="1">
+			<deltax>0</deltax>
+			<deltay>0</deltay>
+			<deltaz>-5</deltaz>
+			<rx>0</rx>
+			<ry>0</ry>
+			<rz>-45</rz>
+		</instance>
+		<instance objectid="1">
+			<deltax>0</deltax>
+			<deltay>0</deltay>
+			<deltaz>5</deltaz>
+			<rx>0</rx>
+			<ry>0</ry>
+			<rz>45</rz>
+		</instance>
+	</constellation>
+	<constellation id="3">
+		<instance objectid="2">
+			<deltax>-20</deltax>
+			<deltay>0</deltay>
+			<deltaz>0</deltaz>
+			<rx>-20</rx>
+			<ry>0</ry>
+			<rz>0</rz>
+		</instance>
+		<instance objectid="2">
+			<deltax>20</deltax>
+			<deltay>0</deltay>
+			<deltaz>0</deltaz>
+			<rx>20</rx>
+			<ry>0</ry>
+			<rz>0</rz>
+		</instance>
+	</constellation>
+</amf>

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov