<?xml version="1.0" encoding="UTF-8" ?>
<sector name="Testbed.xml" >

    <vEye> {-35.0, 3.0, 0.0} </vEye>
	<vTarget> {0.0, 0.0, 0.0} </vTarget>
	<fHeading> 0.0 </fHeading> <!-- degrees -->
	<fPitch> -10.0 </fPitch> <!-- degrees -->
	<fZoom> 10.0 </fZoom>
	
	<fPitchIncrement> 5.0 </fPitchIncrement>
	<fHeadingIncrement> 5.0 </fHeadingIncrement>
	<fZoomIncrement> 0.25 </fZoomIncrement>
	
	<vViewport> {0.0, 0.0, 640.0, 480.0} </vViewport>
	<vUp> {0.0, 1.0, 0.0} </vUp>
	<fFOV> 90.0 </fFOV> <!-- horizontal -->
	<fClipNear> 0.1 </fClipNear>
	<fClipFar> 10000.0 </fClipFar>
	<tPlane prototype="EntityCollidable">
	<!--Graphics related-->
		<pVertexBuffer>NULL</pVertexBuffer>
		<pXFormedVertexBuffer>NULL</pXFormedVertexBuffer>
		<pIndexBuffer>NULL</pIndexBuffer>
		<sFilename>box.obj</sFilename>
		<iNumVertices>0</iNumVertices>
		<iNumFaces>0</iNumFaces>
		<iUseIndexBuffer>true</iUseIndexBuffer>
		<iHasNormals>false</iHasNormals> <!-- set by ActionCreateGeometryBuffers -->
		<iHasTexCoords>false</iHasTexCoords> <!-- set by ActionCreateGeometryBuffers -->
		<vScale> {1.0, 1.0, 1.0} </vScale>
        <xRotate> {1 0 0 0  0 1 0 0  0 0 1 0  0 0 0 1} </xRotate>
		<vRotate> {0.0, 0.0, 1.0, 0.0} </vRotate>
		<vTranslate> {0.0, 0.0, 0.0} </vTranslate> <!--meters-->
		<pMaterial>NULL</pMaterial>
		<pTexture>NULL</pTexture>
		<pVertexShader>NULL</pVertexShader>
		<pPixelShader>NULL</pPixelShader>
		<!-- Physics Related -->
	    <fElasticity>0</fElasticity>
	    <fBoundingRadius>100.0</fBoundingRadius>
	    <iBoundingVolumeType>PLNE</iBoundingVolumeType>
        <vConvHull index="0"> {0, 0, -1, 5.0} </vConvHull>
        <rConvexHull>vConvHull</rConvexHull>
        <fMassInverse>0.0</fMassInverse> <!-- 0 means immobile -->
        <vVelocity></vVelocity>
        <vMomentum></vMomentum>
        <vForce></vForce>
        <rForce>vForce</rForce>
        <vPosOfForce></vPosOfForce>
        <rPosOfForce>vPosOfForce</rPosOfForce>
        <vAngMomentum></vAngMomentum>
        <vAngVelocity></vAngVelocity>
		<Init>
			<tInitOrbitCam prototype="ActionSetOrbitCamera">
				<rEye> vEye </rEye>
				<rTarget> vTarget </rTarget>
				<rHeading> fHeading </rHeading>
				<rPitch> fPitch </rPitch>
				<rZoom> fZoom </rZoom>
			</tInitOrbitCam>
			<tInitCameras prototype="ActionSetCamera">
				<rViewport> vViewport </rViewport>
				<rEye> vEye </rEye>
				<rTarget> vTarget </rTarget>
				<rUp>vUp </rUp>
				<rFOV> fFOV </rFOV> <!-- horizontal -->
				<rClipNear> fClipNear </rClipNear>
				<rClipFar> fClipFar </rClipFar>
			</tInitCameras>
			<tCreateGeometry prototype="ActionCreateGeometryBuffers">
				<rVertexBuffer>pVertexBuffer</rVertexBuffer>	
				<rXFormedVertexBuffer>pXFormedVertexBuffer</rXFormedVertexBuffer>
				<rIndexBuffer>pIndexBuffer</rIndexBuffer>
				<rFilename>sFilename</rFilename>
				<rNumVertices>iNumVertices</rNumVertices>
				<rNumFaces>iNumFaces</rNumFaces>
				<rUseIndexBuffer>iUseIndexBuffer</rUseIndexBuffer>
				<rHasNormals>iHasNormals</rHasNormals>
				<rHasTexCoords>iHasTexCoords</rHasTexCoords>
			</tCreateGeometry>
			<tSetMaterial prototype="ActionSetMaterial">
			    <rMaterialPointer>pMaterial</rMaterialPointer>
			    <rTexturePointer>pTexture</rTexturePointer>
			    <rVertexShaderPointer>pVertexShader</rVertexShaderPointer>
			    <rPixelShaderPointer>pPixelShader</rPixelShaderPointer>
				<vDiffuse> {1.0, 1.0, 1.0, 1.0} </vDiffuse>
				<sTextureFile> fiealogo.dds </sTextureFile>
				<sVertexShader> C3E2v_varying.cg </sVertexShader> 
				<sPixelShader> BlueTint.cg </sPixelShader> 
				<!-- <vAmbient> {1.0, 0.0, 0.0, 1.0} </vAmbient> -->
				<!-- <vSpecular> {1.0, 0.0, 0.0, 1.0} </vSpecular> -->
				<!-- <vEmissive> {0.0, 0.0, 1.0, 1.0} </vEmissive> -->
				<!-- <fPower>1.0</fPower> -->
			</tSetMaterial>
			<tSetLight prototype="ActionSetLight">
				<iType>1</iType>	<!-- 1 = point, 2 = spot, 3 = directional -->
				<iName>0</iName>
				<vColorDiffuse> { 1.0, 1.0, 1.0, 1.0 } </vColorDiffuse>
				<vPosition> {2.0, 2.0, -2.0, 1.0 } </vPosition>
				<!-- <vDirection> {0.0, 0.0, 1.0, 1.0 } </vDirection> -->
				<fRange> 100.0 </fRange>
				<fAttenuation0> 1.0 </fAttenuation0>
				<!-- <fTheta> 5.0 </fTheta> -->
				<!-- <fPhi> 10.0 </fPhi> -->
			</tSetLight>
			
		</Init>
		
		<Update>
		    <tRefreshOrbitCam prototype="ActionSetOrbitCamera">
				<rEye> vEye </rEye>
				<rTarget> vTarget </rTarget>
				<rHeading> fHeading </rHeading>
				<rPitch> fPitch </rPitch>
				<rZoom> fZoom </rZoom>
			</tRefreshOrbitCam>
		    <tRefreshCamera prototype="ActionSetCamera">
				
				<rEye> vEye </rEye>
				<rTarget> vTarget </rTarget>
				<rUp>vUp </rUp>
				
			</tRefreshCamera>
		</Update>
		
		<!--<Render>
			<tSetMaterial prototype="ActionSetMaterial">
			    <rMaterialPointer>pMaterial</rMaterialPointer>
			    <rTexturePointer>pTexture</rTexturePointer>
			    <rVertexShaderPointer>pVertexShader</rVertexShaderPointer>
			    <rPixelShaderPointer>pPixelShader</rPixelShaderPointer>
			</tSetMaterial>
			<tRenderGeometry prototype="ActionRenderGeometry">
				<rVertexBuffer>pVertexBuffer</rVertexBuffer>
				<rXFormedVertexBuffer>pXFormedVertexBuffer</rXFormedVertexBuffer>
				<rIndexBuffer>pIndexBuffer</rIndexBuffer>
				<rFilename>sFilename</rFilename>
				<rNumVertices>iNumVertices</rNumVertices>
				<rNumFaces>iNumFaces</rNumFaces>
				<rUseIndexBuffer>iUseIndexBuffer</rUseIndexBuffer>
				<rHasNormals>iHasNormals</rHasNormals>
				<rHasTexCoords>iHasTexCoords</rHasTexCoords>
				<rScale>vScale</rScale>
				<rOrientation>xRotate</rOrientation>
				<rRotate>vRotate</rRotate>
				<rTranslate>vTranslate</rTranslate>
			</tRenderGeometry>
		</Render>-->
		
	</tPlane>
	
	<!-- BEGIN BOUNCING BALL ///////////////////////////////////////////////////////////////-->
	<!-- Dynamic Object -->
	<tBall1 prototype="EntityCollidable">
	    <!--Graphics related-->
	    <pMaterial>NULL</pMaterial>
		<pTexture>NULL</pTexture>
		<pVertexShader>NULL</pVertexShader>
		<pPixelShader>NULL</pPixelShader>
		<pVertexBuffer>NULL</pVertexBuffer>
		<pXFormedVertexBuffer>NULL</pXFormedVertexBuffer>
		<pIndexBuffer>NULL</pIndexBuffer>
		<sFilename>sphere.obj</sFilename>
		<iNumVertices>0</iNumVertices>
		<iNumFaces>0</iNumFaces>
		<iUseIndexBuffer>true</iUseIndexBuffer>
		<iHasNormals>false</iHasNormals> <!-- set by ActionCreateGeometryBuffers -->
		<iHasTexCoords>false</iHasTexCoords> <!-- set by ActionCreateGeometryBuffers -->
		<vScale> {1.0, 1.0, 1.0} </vScale>
        <xRotate> {1 0 0 0  0 1 0 0  0 0 1 0  0 0 0 1} </xRotate>
		<vRotate> {0.0, 0.0, 1.0, 0.0} </vRotate>
		<vTranslate> {0.0, 3.0, 0.0} </vTranslate> <!--meters-->
		<!--Physics related-->
		<vOrientation> {0 0 0 0} </vOrientation> <!-- Axis, angle format -->
        <vAngMomentum> {0 0 0 0} </vAngMomentum>
        <vAngVelocity> {0 0 0 0} </vAngVelocity>
        <vVelocity> {0 0 0 0} </vVelocity>  <!--m/s-->  <!--calculated output value-->
        <vForce index="0"> {0 0 0 0} </vForce>        <!--Newtons-->
        <vPosOfForce>  {0 0 0 0} </vPosOfForce>
        <vPosOfForce index="1">  {0 0 0 0} </vPosOfForce>
        <vMomentum> {0 0 1 0} </vMomentum>  <!--N*s-->
        <!-- Collidable Entity Prescribed Attributes -->
        <fMassInverse> 1.0 </fMassInverse>
        <fMass> 1.0 </fMass>
        <vCenterOfMass> {0,0,0,0} </vCenterOfMass>
        <fElasticity> 1.0 </fElasticity>
        <fBoundingRadius> 0.79 </fBoundingRadius>
        <iBoundingVolumeType>SPHR</iBoundingVolumeType>
        <vConvexHull index="0"> {1,0,0,0.395} </vConvexHull>
        <vConvexHull index="1"> {-1,0,0,-0.395} </vConvexHull>
        <vConvexHull index="2"> {0,1,0,0.395} </vConvexHull>
        <vConvexHull index="3"> {0,-1,0,-0.395} </vConvexHull>
        <vConvexHull index="4"> {0,0,1,0.395} </vConvexHull>
        <vConvexHull index="5"> {0,0,-1,-0.395} </vConvexHull>
        <rConvexHull> vConvexHull </rConvexHull>
        <rMomentum> vMomentum </rMomentum>
        <rForce> vForce </rForce>
        <rPosOfForce> vPosOfForce </rPosOfForce>
        <rAngMomentum> vAngMomentum </rAngMomentum>
        <rAngVelocity> vAngVelocity </rAngVelocity>
		<Init>
			<tCreateGeometry prototype="ActionCreateGeometryBuffers">
				<rVertexBuffer>pVertexBuffer</rVertexBuffer>	
				<rXFormedVertexBuffer>pXFormedVertexBuffer</rXFormedVertexBuffer>
				<rIndexBuffer>pIndexBuffer</rIndexBuffer>
				<rFilename>sFilename</rFilename>
				<rNumVertices>iNumVertices</rNumVertices>
				<rNumFaces>iNumFaces</rNumFaces>
				<rUseIndexBuffer>iUseIndexBuffer</rUseIndexBuffer>
				<rHasNormals>iHasNormals</rHasNormals>
				<rHasTexCoords>iHasTexCoords</rHasTexCoords>
			</tCreateGeometry>
			<tSetLight prototype="ActionSetLight">
				<iType>1</iType>	<!-- 1 = point, 2 = spot, 3 = directional -->
				<iName>0</iName>
				<vColorDiffuse> { 1.0, 1.0, 1.0, 1.0 } </vColorDiffuse>
				<vPosition> {2.0, 2.0, -2.0, 1.0 } </vPosition>
				<!-- <vDirection> {0.0, 0.0, 1.0, 1.0 } </vDirection> -->
				<fRange> 100.0 </fRange>
				<fAttenuation0> 1.0 </fAttenuation0>
				<!-- <fTheta> 5.0 </fTheta> -->
				<!-- <fPhi> 10.0 </fPhi> -->
			</tSetLight>
			<tSetMaterial prototype="ActionSetMaterial">
			    <rMaterialPointer>pMaterial</rMaterialPointer>
			    <rTexturePointer>pTexture</rTexturePointer>
			    <rVertexShaderPointer>pVertexShader</rVertexShaderPointer>
			    <rPixelShaderPointer>pPixelShader</rPixelShaderPointer>
				<vDiffuse> {1.0, 1.0, 1.0, 1.0} </vDiffuse>
				<sTextureFile> fiealogo.dds </sTextureFile>
				<sVertexShader> C3E2v_varying.cg </sVertexShader> 
				<sPixelShader> BlueTint.cg </sPixelShader> 
				<!-- <vAmbient> {1.0, 0.0, 0.0, 1.0} </vAmbient> -->
				<!-- <vSpecular> {1.0, 0.0, 0.0, 1.0} </vSpecular> -->
				<!-- <vEmissive> {0.0, 0.0, 1.0, 1.0} </vEmissive> -->
				<!-- <fPower>1.0</fPower> -->
			</tSetMaterial>
		</Init>
		<Update>
		    <tUpdateDynamics prototype="ActionUpdateDynamics">
                <rPosition>vTranslate</rPosition>
                <rVelocity>vVelocity</rVelocity>
                <rForce>vForce</rForce>
                <rMomentum>vMomentum</rMomentum>
                <rRadius>fBoundingRadius</rRadius>
                <rOrientation>xRotate</rOrientation>
                <rAngMomentum>vAngMomentum</rAngMomentum>
                <rPosOfForce>vPosOfForce</rPosOfForce>
                <rAngVelocity>vAngVelocity</rAngVelocity>
                <rMass>fMass</rMass>
                <rMassInverse>fMassInverse</rMassInverse>
                <rCenterOfMass>vCenterOfMass</rCenterOfMass>
            </tUpdateDynamics>
            <!--expr> vForce [ 0 ] = {0,0,5,0} </expr>
            <expr index="1"> vPosOfForce [ 0 ] = vCenterOfMass </expr -->
		</Update>
		<Render>
			<tSetMaterial prototype="ActionSetMaterial">
			    <rMaterialPointer>pMaterial</rMaterialPointer>
			    <rTexturePointer>pTexture</rTexturePointer>
			    <rVertexShaderPointer>pVertexShader</rVertexShaderPointer>
			    <rPixelShaderPointer>pPixelShader</rPixelShaderPointer>
			</tSetMaterial>
			<tRenderGeometry prototype="ActionRenderGeometry">
				<rVertexBuffer>pVertexBuffer</rVertexBuffer>
				<rXFormedVertexBuffer>pXFormedVertexBuffer</rXFormedVertexBuffer>
				<rIndexBuffer>pIndexBuffer</rIndexBuffer>
				<rFilename>sFilename</rFilename>
				<rNumVertices>iNumVertices</rNumVertices>
				<rNumFaces>iNumFaces</rNumFaces>
				<rUseIndexBuffer>iUseIndexBuffer</rUseIndexBuffer>
				<rHasNormals>iHasNormals</rHasNormals>
				<rHasTexCoords>iHasTexCoords</rHasTexCoords>
				<rScale>vScale</rScale>
				<rOrientation>xRotate</rOrientation>
				<rRotate>vRotate</rRotate>
				<rTranslate>vTranslate</rTranslate>
			</tRenderGeometry>
		</Render>
	</tBall1>
	<!-- END BOUNCING BALL ///////////////////////////////////////////////////////////////-->
	
	<!--tReactionColl prototype="ReactionCollision">
	    <expr> tBall1 . vTranslate = {0,0,0,0} </expr>
	</tReactionColl-->
	
	<!-- Input Reactions -->
	<!-- Camera Controls -->
	<tReactionUp prototype="ReactionInput">
		<iSoughtInputs>btup</iSoughtInputs>
		<iMask>-1</iMask>
		
		<expr> fPitch = fPitch + fPitchIncrement </expr>
			
	</tReactionUp>
	
	<tReactionDown prototype="ReactionInput">
		<iSoughtInputs>btdn</iSoughtInputs>
		<iMask>-1</iMask>
		
		<expr> fPitch = fPitch - fPitchIncrement </expr>
			
	</tReactionDown>
	
	<tReactionLeft prototype="ReactionInput">
		<iSoughtInputs>btlt</iSoughtInputs>
		<iMask>-1</iMask>
		
		<expr> fHeading = fHeading + fHeadingIncrement </expr>
			
	</tReactionLeft>
	
	<tReactionF1 prototype="ReactionInput">
		<iSoughtInputs>btf1</iSoughtInputs>
		<iMask>-1</iMask>
		
		<expr> fZoom -= fZoomIncrement </expr>
			
	</tReactionF1>
	
	<tReactionF2 prototype="ReactionInput">
		<iSoughtInputs>btf2</iSoughtInputs>
		<iMask>-1</iMask>
		
		<expr> fZoom += fZoomIncrement </expr>
			
	</tReactionF2>
	
	<tReactionRight prototype="ReactionInput">
		<iSoughtInputs>btrt</iSoughtInputs>
		<iMask>-1</iMask>
		
		<expr> fHeading = fHeading - fHeadingIncrement </expr>
			
		
	</tReactionRight>
	
</sector>