<?xml version="1.0" encoding="UTF-8"?>
<!--
	toxic - A Global Illumination Renderer
	Copyright (C) 2003-2004 Francois Beaune
	Contact: http://toxicengine.sourceforge.net/

	This file is part of toxic.

	toxic is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	toxic is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with toxic; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xsd:annotation>
		<xsd:documentation xml:lang="en">
			This is the XML Schema defining toxic scene file format.
		</xsd:documentation>
	</xsd:annotation>
	<xsd:element name="ToxicScene">
		<xsd:complexType>
			<xsd:choice minOccurs="0" maxOccurs="unbounded">
				<xsd:element name="SurfaceShader" type="surfaceShader"/>
				<xsd:element name="Frame">
					<xsd:complexType>
						<xsd:choice minOccurs="0" maxOccurs="unbounded">
							<xsd:element name="Parameter" type="parameter"/>
							<xsd:element name="Object" type="object"/>
							<xsd:element name="SurfaceShader" type="surfaceShader"/>
						</xsd:choice>
					</xsd:complexType>
				</xsd:element>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>
	<xsd:complexType name="vector">
		<xsd:attribute name="value" type="xsd:string" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="parameter">
		<xsd:attribute name="name" type="xsd:string" use="required"/>
		<xsd:attribute name="value" type="xsd:string" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="object">
		<xsd:choice minOccurs="0" maxOccurs="unbounded">
			<xsd:element name="Parameter" type="parameter"/>
			<xsd:element name="Transform">
				<xsd:complexType>
					<xsd:choice minOccurs="0" maxOccurs="unbounded">
						<xsd:element name="Matrix4"/>
						<xsd:element name="Scale" type="vector"/>
						<xsd:element name="Rotation">
							<xsd:complexType>
								<xsd:attribute name="angle" type="xsd:double" use="required"/>
								<xsd:attribute name="axis" type="xsd:string" use="required"/>
							</xsd:complexType>
						</xsd:element>
						<xsd:element name="Translation" type="vector"/>
					</xsd:choice>
				</xsd:complexType>
			</xsd:element>
		</xsd:choice>
		<xsd:attribute name="type" type="xsd:string" use="required"/>
		<xsd:attribute name="name" type="xsd:string" use="optional"/>
		<xsd:attribute name="base" type="xsd:string" use="optional"/>
	</xsd:complexType>
	<xsd:complexType name="surfaceShader">
		<xsd:all>
			<xsd:element name="EDF" minOccurs="0">
				<xsd:complexType>
					<xsd:attribute name="type" type="xsd:string" use="required"/>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="RadiantExitance" type="vector" minOccurs="0"/>
			<xsd:element name="BDF" minOccurs="0">
				<xsd:complexType>
					<xsd:attribute name="type" type="xsd:string" use="required"/>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="Reflectance" minOccurs="0">
				<xsd:complexType>
					<xsd:choice>
						<xsd:element name="ConstantTexture" type="vector"/>
						<xsd:element name="ImageTexture">
							<xsd:complexType>
								<xsd:attribute name="href" type="xsd:string" use="required"/>
							</xsd:complexType>
						</xsd:element>
					</xsd:choice>
				</xsd:complexType>
			</xsd:element>
		</xsd:all>
		<xsd:attribute name="name" type="xsd:string" use="required"/>
		<xsd:attribute name="base" type="xsd:string" use="optional"/>
	</xsd:complexType>
</xsd:schema>
