Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
- <!-- Simple 2D triangle in COLLADA -->
- <!-- by miguelmartins1987 -->
- <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
- <!-- Z axis = UP axis -->
- <asset>
- <up_axis>Z_UP</up_axis>
- </asset>
- <!-- Define a Google SketchUp scene (which shall be the only scene) -->
- <library_visual_scenes>
- <visual_scene id="MyScene">
- <node name="SketchUp">
- <instance_geometry url="#MyTriangle"/>
- </node>
- </visual_scene>
- </library_visual_scenes>
- <!-- Begin defining geometries -->
- <library_geometries>
- <!-- Just a simple triangle (including normal) -->
- <geometry id="MyTriangle">
- <mesh>
- <!-- Define a triangle with coordinates
- (0,0,0) (1,0,0) (0,1,0) -->
- <source id="MyTrianglePosition">
- <float_array id="MyTriangleCoordinates" count="9">0 0 0 1 0 0 0 1 0</float_array>
- <technique_common>
- <accessor count="3" source="#MyTriangleCoordinates" stride="3">
- <param name="X" type="float" />
- <param name="Y" type="float" />
- <param name="Z" type="float" />
- </accessor>
- </technique_common>
- </source>
- <!-- The normal shall be (0,0,-1) (parallel to the Z axis) -->
- <source id="MyTriangleNormal">
- <float_array id="MyTriangleNormalCoordinates" count="9">0 0 -1 0 0 -1 0 0 -1</float_array>
- <technique_common>
- <accessor count="3" source="#MyTriangleNormalCoordinates" stride="3">
- <param name="X" type="float" />
- <param name="Y" type="float" />
- <param name="Z" type="float" />
- </accessor>
- </technique_common>
- </source>
- <!-- Reference the position and the normal defined before -->
- <vertices id="MyTriangleVertices">
- <input semantic="POSITION" source="#MyTrianglePosition" />
- <input semantic="NORMAL" source="#MyTriangleNormal" />
- </vertices>
- <!-- The triangles contained by this geometry -->
- <triangles count="1">
- <input offset="0" semantic="VERTEX" source="#MyTriangleVertices" />
- <p>0 1 2</p>
- </triangles>
- </mesh>
- </geometry>
- </library_geometries>
- <!-- Allow the application to render our only scene -->
- <scene>
- <instance_visual_scene url="#MyScene" />
- </scene>
- </COLLADA>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement