Преглед изворни кода

- Messing with the scene
- Unit testing
- New template class: Object

Panagiotis Christopoulos Charitos пре 14 година
родитељ
комит
994f4938a7

+ 66 - 562
.cproject

@@ -5,322 +5,75 @@
 	<storageModule moduleId="org.eclipse.cdt.core.settings">
 		<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1191103617">
 			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1191103617" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1191103617" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
-<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1191103617." name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.265738319" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
-<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1307654940" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
-<builder buildPath="${workspace_loc:/anki/build}" id="cdt.managedbuild.target.gnu.builder.exe.debug.887785930" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="4" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.archiver.base.1037353125" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.733325444" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
-<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.678362421" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.527125870" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.option.include.paths.2128411428" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
-<listOptionValue builtIn="false" value="/usr/include"/>
-<listOptionValue builtIn="false" value="&quot;${workspace_loc:/anki/anki}&quot;"/>
-</option>
-<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1705857210" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.509716139" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
-<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.857210792" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
-<option id="gnu.c.compiler.exe.debug.option.debugging.level.236164295" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
-<option id="gnu.c.compiler.option.include.paths.2141416219" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
-<listOptionValue builtIn="false" value="/usr/include"/>
-<listOptionValue builtIn="false" value="&quot;${workspace_loc:/anki/anki}&quot;"/>
-</option>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1888715461" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1831689831" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1936286391" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
-<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1344251973" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1152709085" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
-<option id="gnu.both.asm.option.include.paths.1360594794" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
-<listOptionValue builtIn="false" value="/usr/include"/>
-<listOptionValue builtIn="false" value="&quot;${workspace_loc:/anki/anki}&quot;"/>
-</option>
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1588784404" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-</configuration>
-</storageModule>
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1191103617" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+					<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1191103617." name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.265738319" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+							<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1307654940" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
+							<builder buildPath="${workspace_loc:/anki/build}" id="cdt.managedbuild.target.gnu.builder.exe.debug.887785930" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="4" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
+							<tool id="cdt.managedbuild.tool.gnu.archiver.base.1037353125" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.733325444" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+								<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.678362421" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+								<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.527125870" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+								<option id="gnu.cpp.compiler.option.include.paths.2128411428" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value="/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/anki/anki}&quot;"/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1705857210" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.509716139" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
+								<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.857210792" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
+								<option id="gnu.c.compiler.exe.debug.option.debugging.level.236164295" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+								<option id="gnu.c.compiler.option.include.paths.2141416219" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value="/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/anki/anki}&quot;"/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1888715461" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1831689831" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1936286391" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1344251973" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1152709085" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
+								<option id="gnu.both.asm.option.include.paths.1360594794" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value="/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/anki/anki}&quot;"/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1588784404" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
 			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
 			<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
 			<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
-		<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1191103617;cdt.managedbuild.config.gnu.exe.debug.1191103617.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.733325444;cdt.managedbuild.tool.gnu.cpp.compiler.input.1705857210">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1191103617;cdt.managedbuild.config.gnu.exe.debug.1191103617.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.509716139;cdt.managedbuild.tool.gnu.c.compiler.input.1888715461">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-</cconfiguration>
+		</cconfiguration>
 		<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.571635259">
 			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.571635259" moduleId="org.eclipse.cdt.core.settings" name="Release">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.571635259" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
 					<folderInfo id="cdt.managedbuild.config.gnu.exe.release.571635259." name="/" resourcePath="">
@@ -355,260 +108,11 @@
 			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
 			<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
 			<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
-		<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1191103617;cdt.managedbuild.config.gnu.exe.debug.1191103617.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.733325444;cdt.managedbuild.tool.gnu.cpp.compiler.input.1705857210">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1191103617;cdt.managedbuild.config.gnu.exe.debug.1191103617.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.509716139;cdt.managedbuild.tool.gnu.c.compiler.input.1888715461">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-</cconfiguration>
+		</cconfiguration>
 	</storageModule>
 	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<project id="anki.cdt.managedbuild.target.gnu.exe.1185865252" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
-</storageModule>
+		<project id="anki.cdt.managedbuild.target.gnu.exe.1185865252" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
+	</storageModule>
 	<storageModule moduleId="scannerConfiguration">
 		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
 		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.571635259;cdt.managedbuild.config.gnu.exe.release.571635259.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1634217479;cdt.managedbuild.tool.gnu.cpp.compiler.input.1897753799">

+ 0 - 68
anki/core/Object.cpp

@@ -1,68 +0,0 @@
-#include <algorithm>
-#include <boost/foreach.hpp>
-
-#include "anki/core/Object.h"
-#include "anki/util/Assert.h"
-#include "anki/util/Exception.h"
-
-
-namespace anki {
-
-
-//==============================================================================
-Object::Object(Object* parent)
-	: objParent(NULL)
-{
-	if(parent != NULL)
-	{
-		parent->addChild(this);
-	}
-}
-
-
-//==============================================================================
-Object::~Object()
-{
-	if(objParent != NULL)
-	{
-		objParent->removeChild(this);
-	}
-
-	// delete all children
-	BOOST_REVERSE_FOREACH(Object* child, objChilds)
-	{
-		delete child;
-	}
-}
-
-
-//==============================================================================
-void Object::addChild(Object* child)
-{
-	ANKI_ASSERT(child != NULL);
-	ANKI_ASSERT(child->objParent == NULL); // Child already has parent
-
-	child->objParent = this;
-	objChilds.push_back(child);
-}
-
-
-//==============================================================================
-void Object::removeChild(Object* child)
-{
-	ANKI_ASSERT(child != NULL);
-
-	Container::iterator it = std::find(objChilds.begin(), objChilds.end(),
-		child);
-
-	if(it == objChilds.end())
-	{
-		throw ANKI_EXCEPTION("Internal error");
-	}
-
-	objChilds.erase(it);
-	child->objParent = NULL;
-}
-
-
-} // end namespace

+ 0 - 58
anki/core/Object.h

@@ -1,58 +0,0 @@
-#ifndef ANKI_CORE_OBJECT_H
-#define ANKI_CORE_OBJECT_H
-
-#include <vector>
-
-
-namespace anki {
-
-
-/// A class for automatic garbage collection. Cause we -the programmers- get
-/// bored when it comes to deallocation. Dont even think to put as a parent an
-/// object that has not created dynamically
-class Object
-{
-public:
-	typedef std::vector<Object*> Container;
-
-	/// Calls addChild if parent is not NULL
-	/// @exception Exception
-	Object(Object* parent);
-
-	/// Delete childs from the last entered to the first and update parent
-	virtual ~Object();
-
-protected:
-	/// @name Accessors
-	/// @{
-	const Object* getObjParent() const
-	{
-		return objParent;
-	}
-	Object* getObjParent()
-	{
-		return objParent;
-	}
-	const Container& getObjChildren() const
-	{
-		return objChilds;
-	}
-	Container& getObjChildren()
-	{
-		return objChilds;
-	}
-	/// @}
-
-	void addChild(Object* child);
-	void removeChild(Object* child);
-
-private:
-	Object* objParent; ///< May be nullptr
-	Container objChilds;
-};
-
-
-} // end namespace
-
-
-#endif

+ 0 - 1
anki/gl/Vao.h

@@ -3,7 +3,6 @@
 
 #include "anki/util/StdTypes.h"
 #include "anki/util/Assert.h"
-#include "anki/core/Object.h"
 #include "anki/gl/GlException.h"
 #include <GL/glew.h>
 

+ 0 - 21
anki/scene/PatchNode.cpp

@@ -1,21 +0,0 @@
-#include "anki/scene/PatchNode.h"
-#include "anki/resource/Material.h"
-#include "anki/scene/MaterialRuntime.h"
-
-
-namespace anki {
-
-
-//==============================================================================
-// Constructor                                                                 =
-//==============================================================================
-PatchNode::PatchNode(const ModelPatch& modelPatch, ulong flags,
-	SceneNode& parent)
-:	RenderableNode(parent.getScene(), flags | SNF_INHERIT_PARENT_TRANSFORM,
-		&parent),
-	rsrc(modelPatch),
-	mtlRun(new MaterialRuntime(rsrc.getMaterial()))
-{}
-
-
-} // end namespace

+ 0 - 69
anki/scene/PatchNode.h

@@ -1,69 +0,0 @@
-#ifndef ANKI_SCENE_PATCH_NODE_H
-#define ANKI_SCENE_PATCH_NODE_H
-
-#include "anki/gl/Vao.h"
-#include "anki/gl/Vbo.h"
-#include "anki/resource/Mesh.h" // For the Vbos enum
-#include "anki/resource/Resource.h"
-#include "anki/resource/Model.h"
-#include "anki/scene/RenderableNode.h"
-#include "anki/scene/MaterialRuntime.h"
-#include <boost/scoped_ptr.hpp>
-#include <boost/array.hpp>
-
-
-namespace anki {
-
-
-class Material;
-
-
-/// Inherited by ModelPatchNode and SkinPatchNode. It contains common code,
-/// the derived classes are responsible to initialize the VAOs
-class PatchNode: public RenderableNode
-{
-	public:
-		typedef boost::array<const Vbo*, Mesh::VBOS_NUM> VboArray;
-
-		PatchNode(const ModelPatch& modelPatch, ulong flags,
-			SceneNode& parent);
-
-		/// @name Accessors
-		/// @{
-
-		/// Implements RenderableNode::getVertIdsNum
-		uint getVertIdsNum(const PassLevelKey& k) const
-		{
-			return rsrc.getMesh().getVertIdsNum();
-		}
-
-		/// Implements RenderableNode::getMaterialRuntime
-		MaterialRuntime& getMaterialRuntime()
-		{
-			return *mtlRun;
-		}
-
-		/// Implements RenderableNode::getMaterialRuntime
-		const MaterialRuntime& getMaterialRuntime() const
-		{
-			return *mtlRun;
-		}
-
-		const ModelPatch& getModelPatchRsrc() const
-		{
-			return rsrc;
-		}
-		/// @}
-
-	protected:
-		/// The sub-resource
-		const ModelPatch& rsrc;
-
-		boost::scoped_ptr<MaterialRuntime> mtlRun; ///< Material runtime
-};
-
-
-} // end namespace
-
-
-#endif

+ 0 - 16
anki/scene/RenderableNode.cpp

@@ -1,16 +0,0 @@
-#include "anki/scene/RenderableNode.h"
-
-
-namespace anki {
-
-
-RenderableNode::RenderableNode(Scene& scene, ulong flags, SceneNode* parent)
-:	SceneNode(SNT_RENDERABLE_NODE, scene, flags, parent)
-{}
-
-
-RenderableNode::~RenderableNode()
-{}
-
-
-} // end namespace

+ 0 - 41
anki/scene/RenderableNode.h

@@ -1,41 +0,0 @@
-#ifndef ANKI_SCENE_RENDERABLE_NODE_H
-#define ANKI_SCENE_RENDERABLE_NODE_H
-
-#include "anki/scene/SceneNode.h"
-#include "anki/resource/MaterialCommon.h"
-
-
-namespace anki {
-
-
-class Vao;
-class Material;
-class MaterialRuntime;
-
-
-/// Abstract class that acts as an interface for the renderable objects of the
-/// scene
-class RenderableNode: public SceneNode
-{
-	public:
-		RenderableNode(Scene& scene, ulong flags, SceneNode* parent);
-		virtual ~RenderableNode();
-
-		/// Get VAO depending the rendering pass
-		virtual const Vao& getVao(const PassLevelKey& k) const = 0;
-
-		/// Get vert ids number for rendering
-		virtual uint getVertIdsNum(const PassLevelKey& k) const = 0;
-
-		/// Get the material runtime
-		virtual MaterialRuntime& getMaterialRuntime() = 0;
-
-		/// Const version of getMaterialRuntime
-		virtual const MaterialRuntime& getMaterialRuntime() const = 0;
-};
-
-
-} // end namespace
-
-
-#endif

+ 7 - 8
anki/scene/Scene.h

@@ -26,14 +26,13 @@ class Scene
 	public:
 		/// Typetraits
 		template<typename T>
-		class Types
-		{
-			public:
-				typedef std::vector<T*> Container;
-				typedef typename Container::iterator Iterator;
-				typedef typename Container::const_iterator ConstIterator;
-				typedef boost::iterator_range<Iterator> MutableRange;
-				typedef boost::iterator_range<ConstIterator> ConstRange;
+		struct Types
+		{
+			typedef std::vector<T*> Container;
+			typedef typename Container::iterator Iterator;
+			typedef typename Container::const_iterator ConstIterator;
+			typedef boost::iterator_range<Iterator> MutableRange;
+			typedef boost::iterator_range<ConstIterator> ConstRange;
 		};
 
 		enum

+ 3 - 130
anki/scene/SceneNode.cpp

@@ -1,96 +1,24 @@
 #include "anki/scene/SceneNode.h"
-#include "anki/scene/Scene.h"
-#include "anki/util/Exception.h"
-#include <algorithm>
-#include <boost/lexical_cast.hpp>
-#include <boost/foreach.hpp>
 
 
 namespace anki {
 
 
-//==============================================================================
-// Statics                                                                     =
-//==============================================================================
-
-uint SceneNode::uid = 0;
-
-
-//==============================================================================
-// Constructor                                                                 =
-//==============================================================================
-SceneNode::SceneNode(SceneNodeType type_, Scene& scene_, ulong flags_,
-	SceneNode* parent_)
-:	type(type_),
- 	flags(flags_),
- 	parent(NULL),
- 	scene(scene_)
-{
-	++uid;
-
-	getWorldTransform().setIdentity();
-	getLocalTransform().setIdentity();
-
-	name = boost::lexical_cast<std::string>(uid);
-
-	enableFlag(SNF_ACTIVE);
-
-	if(parent_ != NULL)
-	{
-		parent_->addChild(*this);
-	}
-
-	// This goes last
-	scene.registerNode(this);
-}
-
-
-//==============================================================================
-// Destructor                                                                  =
-//==============================================================================
-SceneNode::~SceneNode()
-{
-	scene.unregisterNode(this);
-
-	if(parent != NULL)
-	{
-		parent->removeChild(*this);
-	}
-
-	if(isFlagEnabled(SNF_ON_DELETE_DELETE_CHILDREN))
-	{
-		BOOST_REVERSE_FOREACH(SceneNode* child, children)
-		{
-			delete child;
-		}
-	}
-	else
-	{
-		BOOST_REVERSE_FOREACH(SceneNode* child, children)
-		{
-			child->parent = NULL;
-		}
-	}
-}
-
-
-//==============================================================================
-// updateWorldTransform                                                        =
 //==============================================================================
 void SceneNode::updateWorldTransform()
 {
 	prevWTrf = wTrf;
 
-	if(parent)
+	if(getParent())
 	{
 		if(isFlagEnabled(SNF_INHERIT_PARENT_TRANSFORM))
 		{
-			wTrf = parent->getWorldTransform();
+			wTrf = getParent()->getWorldTransform();
 		}
 		else
 		{
 			wTrf = Transform::combineTransformations(
-				parent->getWorldTransform(), lTrf);
+				getParent()->getWorldTransform(), lTrf);
 		}
 	}
 	else // else copy
@@ -100,59 +28,4 @@ void SceneNode::updateWorldTransform()
 }
 
 
-//==============================================================================
-// addChild                                                                    =
-//==============================================================================
-void SceneNode::addChild(SceneNode& child)
-{
-	ANKI_ASSERT(child.parent == NULL); // Child already has parent
-
-	child.parent = this;
-	children.push_back(&child);
-}
-
-
-//==============================================================================
-// removeChild                                                                 =
-//==============================================================================
-void SceneNode::removeChild(SceneNode& child)
-{
-	std::vector<SceneNode*>::iterator it = std::find(children.begin(),
-		children.end(), &child);
-
-	if(it == children.end())
-	{
-		throw ANKI_EXCEPTION("Child not found");
-	}
-
-	children.erase(it);
-	child.parent = NULL;
-}
-
-
-//==============================================================================
-// Move(s)                                                                     =
-//==============================================================================
-
-void SceneNode::moveLocalX(float distance)
-{
-	Vec3 x_axis = lTrf.getRotation().getColumn(0);
-	getLocalTransform().getOrigin() += x_axis * distance;
-}
-
-
-void SceneNode::moveLocalY(float distance)
-{
-	Vec3 y_axis = lTrf.getRotation().getColumn(1);
-	getLocalTransform().getOrigin() += y_axis * distance;
-}
-
-
-void SceneNode::moveLocalZ(float distance)
-{
-	Vec3 z_axis = lTrf.getRotation().getColumn(2);
-	getLocalTransform().getOrigin() += z_axis * distance;
-}
-
-
 } // end namespace

+ 123 - 214
anki/scene/SceneNode.h

@@ -3,252 +3,161 @@
 
 #include "anki/math/Math.h"
 #include "anki/collision/Obb.h"
-#include <vector>
-#include <memory>
+#include "anki/util/Object.h"
 #include <string>
 
 
 namespace anki {
 
 
-class Material;
-class Controller;
-class Scene;
-
-
-/// @addtogroup Scene
+/// @addtogroup scene
 /// @{
 
 /// Interface class backbone of scene
-class SceneNode
+class SceneNode: public Object<SceneNode>
 {
-	public:
-		/// Class ID for scene nodes
-		enum SceneNodeType
-		{
-			SNT_CAMERA,
-			SNT_GHOST_NODE,
-			SNT_MODEL_NODE,
-			SNT_LIGHT,
-			SNT_PARTICLE_EMITTER_NODE,
-			SNT_RENDERABLE_NODE,
-			SNT_SKIN_NODE
-		};
-
-		enum SceneNodeFlags
-		{
-			SNF_NONE = 0,
-			SNF_VISIBLE = 1,
-			SNF_ACTIVE = 2,
-			SNF_MOVED = 4,
-			SNF_INHERIT_PARENT_TRANSFORM = 8,
-			SNF_ON_DELETE_DELETE_CHILDREN = 16
-		};
-
-		/// The one and only constructor
-		/// @param type The type of the scene node
-		/// @param scene The scene to register the node
-		/// @param flags The flags with the node properties
-		/// @param parent The nods's parent. Its nulptr only for the root node
-		explicit SceneNode(SceneNodeType type, Scene& scene, ulong flags,
-			SceneNode* parent);
-
-		virtual ~SceneNode();
-
-		virtual void init(const char*) = 0; ///< init using a script file
-
-		/// @name Accessors
-		/// @{
-		SceneNodeType getSceneNodeType() const
-		{
-			return type;
-		}
-
-		const Scene& getScene() const
-		{
-			return scene;
-		}
-		Scene& getScene()
-		{
-			return scene;
-		}
-
-		const Transform& getLocalTransform() const
-		{
-			return lTrf;
-		}
-		Transform& getLocalTransform()
-		{
-			return lTrf;
-		}
-		void setLocalTransform(const Transform& x)
-		{
-			lTrf = x;
-		}
-
-		const Transform& getWorldTransform() const
-		{
-			return wTrf;
-		}
-		Transform& getWorldTransform()
-		{
-			return wTrf;
-		}
-		void setWorldTransform(const Transform& x)
-		{
-			wTrf = x;
-		}
-
-		const Transform& getPrevWorldTransform() const
-		{
-			return prevWTrf;
-		}
+public:
+	typedef Object<SceneNode> Base;
 
-		const SceneNode* getParent() const
-		{
-			return parent;
-		}
-		SceneNode* getParent()
-		{
-			return parent;
-		}
-
-		const std::string& getSceneNodeName() const
-		{
-			return name;
-		}
+	enum SceneNodeFlags
+	{
+		SNF_NONE = 0,
+		SNF_INHERIT_PARENT_TRANSFORM = 1 ///< Ignore local transform
+	};
+
+	/// The one and only constructor
+	/// @param flags The flags with the node properties
+	/// @param parent The nods's parent. Its nulptr only for the root node
+	explicit SceneNode(ulong flags, SceneNode* parent)
+		: Base(parent), flags(flags_)
+	{}
+
+	virtual ~SceneNode();
+
+	/// @name Accessors
+	/// @{
+	const Transform& getLocalTransform() const
+	{
+		return lTrf;
+	}
+	Transform& getLocalTransform()
+	{
+		return lTrf;
+	}
+	void setLocalTransform(const Transform& x)
+	{
+		lTrf = x;
+	}
 
-		ulong getFlags() const
-		{
-			return flags;
-		}
+	const Transform& getWorldTransform() const
+	{
+		return wTrf;
+	}
+	Transform& getWorldTransform()
+	{
+		return wTrf;
+	}
+	void setWorldTransform(const Transform& x)
+	{
+		wTrf = x;
+	}
 
-		const std::vector<SceneNode*>& getChildren() const
-		{
-			return children;
-		}
+	const Transform& getPrevWorldTransform() const
+	{
+		return prevWTrf;
+	}
 
-		/// Get the collision shape to for visibility testing
-		virtual const CollisionShape*
-			getVisibilityCollisionShapeWorldSpace() const
-		{
-			return NULL;
-		}
-		/// @}
+	ulong getFlags() const
+	{
+		return flags;
+	}
+	/// @}
 
-		/// @name Flag manipulation
-		/// @{
-		void enableFlag(SceneNodeFlags flag, bool enable = true);
-		void disableFlag(SceneNodeFlags flag)
+	/// @name Flag manipulation
+	/// @{
+	void enableFlag(SceneNodeFlags flag, bool enable = true)
+	{
+		if(enable)
 		{
-			enableFlag(flag, false);
+			flags |= flag;
 		}
-		bool isFlagEnabled(SceneNodeFlags flag) const
+		else
 		{
-			return flags & flag;
+			flags &= ~flag;
 		}
-		/// @}
-
-		/// @name Updates
-		/// Two separate updates for the main loop. The update happens anyway
-		/// and the updateTrf only when the node is being moved
-		/// @{
-
-		/// This is called every frame
-		virtual void frameUpdate(float prevUpdateTime, float crntTime);
-
-		/// This is called if the node moved
-		virtual void moveUpdate()
-		{}
-		/// @}
-
-		/// @name Mess with the local transform
-		/// @{
-		void rotateLocalX(float angDegrees);
-		void rotateLocalY(float angDegrees);
-		void rotateLocalZ(float angDegrees);
-		void moveLocalX(float distance);
-		void moveLocalY(float distance);
-		void moveLocalZ(float distance);
-		/// @}
-
-		/// This update happens only when the object gets moved. Called only by
-		/// the Scene
-		void updateWorldTransform();
-
-		/// XXX
-		void addChild(SceneNode& node);
-
-		/// XXX
-		void removeChild(SceneNode& node);
-
-	protected:
-		std::string name;
-
-	private:
-		static uint uid; ///< Unique identifier
-
-		SceneNodeType type; ///< Type
-
-		Transform lTrf; ///< The transformation in local space
-
-		/// The transformation in world space (local combined with parent's
-		/// transformation)
-		Transform wTrf;
-
-		/// Keep the previous transformation for blurring calculations
-		Transform prevWTrf;
-
-		/// This means that the the node will inherit the world transform of
-		/// its parent (if there is one) and it will not take into account its
-		/// local transform at all
-		bool inheritParentTrfFlag;
+	}
+	void disableFlag(SceneNodeFlags flag)
+	{
+		enableFlag(flag, false);
+	}
+	bool isFlagEnabled(SceneNodeFlags flag) const
+	{
+		return flags & flag;
+	}
+	/// @}
 
-		ulong flags; ///< The state flags
+	/// @name Updates
+	/// Two separate updates for the main loop. The update happens anyway
+	/// and the updateTrf only when the node is being moved
+	/// @{
 
-		SceneNode* parent; ///< Could not be nullptr
-		std::vector<SceneNode*> children;
+	/// This is called every frame
+	virtual void frameUpdate(float prevUpdateTime, float crntTime)
+	{}
 
-		Scene& scene;
-};
-/// @}
+	/// This is called if the node moved
+	virtual void moveUpdate()
+	{}
+	/// @}
 
-
-inline void SceneNode::enableFlag(SceneNodeFlags flag, bool enable)
-{
-	if(enable)
+	/// @name Mess with the local transform
+	/// @{
+	void rotateLocalX(float angDegrees)
 	{
-		flags |= flag;
+		lTrf.getRotation().rotateXAxis(angDegrees);
 	}
-	else
+	void rotateLocalY(float angDegrees)
 	{
-		flags &= ~flag;
+		lTrf.getRotation().rotateYAxis(angDegrees);
 	}
-}
-
-
-inline void SceneNode::frameUpdate(float , float)
-{
-	// do nothing
-}
-
+	void rotateLocalZ(float angDegrees)
+	{
+		lTrf.getRotation().rotateZAxis(angDegrees);
+	}
+	void moveLocalX(float distance)
+	{
+		Vec3 x_axis = lTrf.getRotation().getColumn(0);
+		lTrf.getOrigin() += x_axis * distance;
+	}
+	void moveLocalY(float distance)
+	{
+		Vec3 y_axis = lTrf.getRotation().getColumn(1);
+		lTrf.getOrigin() += y_axis * distance;
+	}
+	void moveLocalZ(float distance)
+	{
+		Vec3 z_axis = lTrf.getRotation().getColumn(2);
+		lTrf.getOrigin() += z_axis * distance;
+	}
+	/// @}
 
-inline void SceneNode::rotateLocalX(float angDegrees)
-{
-	lTrf.getRotation().rotateXAxis(angDegrees);
-}
+	/// This update happens only when the object gets moved. Called only by
+	/// the Scene
+	void updateWorldTransform();
 
+private:
+	Transform lTrf; ///< The transformation in local space
 
-inline void SceneNode::rotateLocalY(float angDegrees)
-{
-	lTrf.getRotation().rotateYAxis(angDegrees);
-}
+	/// The transformation in world space (local combined with parent's
+	/// transformation)
+	Transform wTrf;
 
+	/// Keep the previous transformation for blurring calculations
+	Transform prevWTrf;
 
-inline void SceneNode::rotateLocalZ(float angDegrees)
-{
-	lTrf.getRotation().rotateZAxis(angDegrees);
-}
+	ulong flags; ///< The state flags
+};
+/// @}
 
 
 } // end namespace

+ 9 - 7
anki/scene/SkinNode.cpp

@@ -1,8 +1,8 @@
 #include "anki/scene/SkinNode.h"
 #include "anki/resource/Skin.h"
-#include "anki/scene/SkinPatchNode.h"
 #include "anki/resource/Skeleton.h"
 #include "anki/resource/SkelAnim.h"
+#include "anki/resource/MeshData.h"
 #include <boost/foreach.hpp>
 
 
@@ -16,18 +16,20 @@ namespace anki {
 #define BUFFER_OFFSET(i) ((char *)NULL + (i))
 
 //==============================================================================
-SkinPatchNode::SkinPatchNode(const ModelPatch& modelPatch_, SkinNode& parent)
-:	PatchNode(modelPatch_, SNF_NONE, parent)
+SkinPatchNode::SkinPatchNode(const ModelPatch* modelPatch_, SceneNode* parent)
+	: SceneNode(SNT_RENDERABLE_NODE, parent->getScene(),
+		SNF_INHERIT_PARENT_TRANSFORM, parent),
+		modelPatch(modelPatch_),
+		mtlr(new MaterialRuntime(modelPatch_->getMaterial()))
 {
 	ModelPatch::VboArray vboArr;
+	const Mesh& mesh = modelPatch->getMesh();
 
 	for(uint i = 0; i < Mesh::VBOS_NUM; i++)
 	{
-		vboArr[i] = &rsrc.getMesh().getVbo((Mesh::Vbos)i);
+		vboArr[i] = &mesh.getVbo((Mesh::Vbos)i);
 	}
 
-	const Mesh& mesh = rsrc.getMesh();
-
 	//
 	// Create the VAOs
 	//
@@ -146,7 +148,7 @@ void SkinNode::init(const char* filename)
 
 	BOOST_FOREACH(const ModelPatch& patch, skin->getModelPatches())
 	{
-		patches.push_back(new SkinPatchNode(patch, *this));
+		patches.push_back(new SkinPatchNode(&patch, this));
 	}
 
 	uint bonesNum = skin->getSkeleton().getBones().size();

+ 4 - 12
anki/scene/SkinNode.h

@@ -3,6 +3,8 @@
 
 #include "anki/scene/SceneNode.h"
 #include "anki/scene/Renderable.h"
+#include "anki/scene/MaterialRuntime.h"
+#include "anki/resource/Model.h"
 #include "anki/math/Math.h"
 #include <boost/range/iterator_range.hpp>
 #include <vector>
@@ -37,12 +39,7 @@ class SkinPatchNode: public Renderable, public SceneNode
 			VERT_WEIGHT_WEIGHTS_LOC
 		};
 
-		SkinPatchNode(const ModelPatch* modelPatch, SkinNode* parent)
-			: SceneNode(SNT_RENDERABLE_NODE, parent->getScene(),
-				SNF_INHERIT_PARENT_TRANSFORM, parent), modelPatch(modelPatch_)
-		{
-			mtlr.reset(new MaterialRuntime(modelPatch->getMaterial()));
-		}
+		SkinPatchNode(const ModelPatch* modelPatch_, SceneNode* parent);
 
 		/// @name Accessors
 		/// @{
@@ -55,11 +52,6 @@ class SkinPatchNode: public Renderable, public SceneNode
 		{
 			return tfVbos[i];
 		}
-
-		const Vao& getVao(const PassLevelKey& k) const
-		{
-			return *vaosHashMap.at(k);
-		}
 		/// @}
 
 		void init(const char*)
@@ -68,7 +60,7 @@ class SkinPatchNode: public Renderable, public SceneNode
 		/// Implements Renderable::getVao
 		const Vao& getVao(const PassLevelKey& k)
 		{
-			return vaosHashMap[k];
+			return *vaosHashMap.at(k);
 		}
 
 		/// Implements Renderable::getVertexIdsNum

+ 0 - 123
anki/scene/SkinPatchNode.cpp

@@ -1,123 +0,0 @@
-#include "anki/scene/SkinPatchNode.h"
-#include "anki/scene/SkinNode.h"
-#include "anki/resource/MeshData.h"
-
-
-namespace anki {
-
-
-#define BUFFER_OFFSET(i) ((char *)NULL + (i))
-
-
-//==============================================================================
-// Constructor                                                                 =
-//==============================================================================
-SkinPatchNode::SkinPatchNode(const ModelPatch& modelPatch_, SkinNode& parent)
-:	PatchNode(modelPatch_, SNF_NONE, parent)
-{
-	ModelPatch::VboArray vboArr;
-
-	for(uint i = 0; i < Mesh::VBOS_NUM; i++)
-	{
-		vboArr[i] = &rsrc.getMesh().getVbo((Mesh::Vbos)i);
-	}
-
-	const Mesh& mesh = rsrc.getMesh();
-
-	//
-	// Create the VAOs
-	//
-
-	tfVao.create();
-
-	// Positions
-	if(mesh.getVbo(Mesh::VBO_VERT_POSITIONS).isCreated())
-	{
-		tfVbos[TFV_POSITIONS].create(GL_ARRAY_BUFFER,
-			mesh.getVbo(Mesh::VBO_VERT_POSITIONS).getSizeInBytes(),
-			NULL,
-			GL_STATIC_DRAW);
-
-		vboArr[Mesh::VBO_VERT_POSITIONS] = &tfVbos[TFV_POSITIONS];
-
-		tfVao.attachArrayBufferVbo(mesh.getVbo(Mesh::VBO_VERT_POSITIONS),
-			POSITION_LOC,
-			3,
-			GL_FLOAT,
-			false,
-			0,
-			NULL);
-	}
-
-	// Normals
-	if(mesh.getVbo(Mesh::VBO_VERT_NORMALS).isCreated())
-	{
-		tfVbos[TFV_NORMALS].create(GL_ARRAY_BUFFER,
-			mesh.getVbo(Mesh::VBO_VERT_NORMALS).getSizeInBytes(),
-			NULL,
-			GL_STATIC_DRAW);
-
-		vboArr[Mesh::VBO_VERT_NORMALS] = &tfVbos[TFV_NORMALS];
-
-		tfVao.attachArrayBufferVbo(mesh.getVbo(Mesh::VBO_VERT_NORMALS),
-			NORMAL_LOC,
-			3,
-			GL_FLOAT,
-			false,
-			0,
-			NULL);
-	}
-
-	// Tangents
-	if(mesh.getVbo(Mesh::VBO_VERT_TANGENTS).isCreated())
-	{
-		tfVbos[TFV_TANGENTS].create(GL_ARRAY_BUFFER,
-			mesh.getVbo(Mesh::VBO_VERT_TANGENTS).getSizeInBytes(),
-			NULL,
-			GL_STATIC_DRAW);
-
-		vboArr[Mesh::VBO_VERT_TANGENTS] = &tfVbos[TFV_TANGENTS];
-
-		tfVao.attachArrayBufferVbo(mesh.getVbo(Mesh::VBO_VERT_TANGENTS),
-			TANGENT_LOC,
-			4,
-			GL_FLOAT,
-			false,
-			0,
-			NULL);
-	}
-
-	// Attach some extra stuff to the tfVao
-	ANKI_ASSERT(mesh.getVbo(Mesh::VBO_VERT_WEIGHTS).isCreated());
-
-	tfVao.attachArrayBufferVbo(mesh.getVbo(Mesh::VBO_VERT_WEIGHTS),
-		VERT_WEIGHT_BONES_NUM_LOC,
-		1,
-		GL_FLOAT,
-		GL_FALSE,
-		sizeof(MeshData::VertexWeight),
-		BUFFER_OFFSET(0));
-
-	tfVao.attachArrayBufferVbo(mesh.getVbo(Mesh::VBO_VERT_WEIGHTS),
-		VERT_WEIGHT_BONE_IDS_LOC,
-		4,
-		GL_FLOAT,
-		GL_FALSE,
-		sizeof(MeshData::VertexWeight),
-		BUFFER_OFFSET(4));
-
-	tfVao.attachArrayBufferVbo(mesh.getVbo(Mesh::VBO_VERT_WEIGHTS),
-		VERT_WEIGHT_WEIGHTS_LOC,
-		4,
-		GL_FLOAT,
-		GL_FALSE,
-		sizeof(MeshData::VertexWeight),
-		BUFFER_OFFSET(20));
-
-
-	ModelPatch::createVaos(getMaterialRuntime().getMaterial(),
-		vboArr, vaos, vaosHashMap);
-}
-
-
-} // end namespace

+ 0 - 74
anki/scene/SkinPatchNode.h

@@ -1,74 +0,0 @@
-#ifndef ANKI_SCENE_SKIN_NODE_SKIN_PATCH_NODE_H
-#define ANKI_SCENE_SKIN_NODE_SKIN_PATCH_NODE_H
-
-#include <boost/array.hpp>
-#include "anki/scene/PatchNode.h"
-#include "anki/gl/Vbo.h"
-#include "anki/gl/Vao.h"
-
-
-namespace anki {
-
-
-class SkinNode;
-
-
-/// A fragment of the SkinNode
-class SkinPatchNode: public PatchNode
-{
-	public:
-		enum TransformFeedbackVbo
-		{
-			TFV_POSITIONS,
-			TFV_NORMALS,
-			TFV_TANGENTS,
-			TFV_NUM
-		};
-
-		/// See TfHwSkinningGeneric.glsl for the locations
-		enum TfShaderProgAttribLoc
-		{
-			POSITION_LOC,
-			NORMAL_LOC,
-			TANGENT_LOC,
-			VERT_WEIGHT_BONES_NUM_LOC,
-			VERT_WEIGHT_BONE_IDS_LOC,
-			VERT_WEIGHT_WEIGHTS_LOC
-		};
-
-		SkinPatchNode(const ModelPatch& modelPatch, SkinNode& parent);
-
-		void init(const char*)
-		{}
-
-		/// @name Accessors
-		/// @{
-		const Vao& getTfVao() const
-		{
-			return tfVao;
-		}
-
-		const Vbo& getTfVbo(uint i) const
-		{
-			return tfVbos[i];
-		}
-
-		const Vao& getVao(const PassLevelKey& k) const
-		{
-			return *vaosHashMap.at(k);
-		}
-		/// @}
-
-	private:
-		ModelPatch::VaosContainer vaos;
-		ModelPatch::PassLevelToVaoHashMap vaosHashMap;
-
-		boost::array<Vbo, TFV_NUM> tfVbos;
-		Vao tfVao; ///< For TF passes
-};
-
-
-} // end namespace
-
-
-#endif

+ 2 - 2
anki/scene/VisibilityInfo.h

@@ -8,7 +8,7 @@
 namespace anki {
 
 
-class RenderableNode;
+class Renderable;
 class PointLight;
 class SpotLight;
 
@@ -18,7 +18,7 @@ class SpotLight;
 class VisibilityInfo
 {
 	public:
-		typedef std::deque<RenderableNode*> RContainer;
+		typedef std::deque<Renderable*> RContainer;
 		typedef std::vector<PointLight*> PLContainer;
 		typedef std::vector<SpotLight*> SLContainer;
 

+ 1 - 2
anki/scene/VisibilityTester.cpp

@@ -1,9 +1,7 @@
-#include <boost/foreach.hpp>
 #include "anki/scene/VisibilityTester.h"
 #include "anki/scene/Scene.h"
 #include "anki/scene/ModelNode.h"
 #include "anki/scene/SkinNode.h"
-#include "anki/scene/ModelPatchNode.h"
 #include "anki/resource/Material.h"
 #include "anki/collision/Sphere.h"
 #include "anki/scene/PointLight.h"
@@ -11,6 +9,7 @@
 #include "anki/core/ParallelManager.h"
 #include "anki/core/Logger.h"
 #include "anki/core/Globals.h"
+#include <boost/foreach.hpp>
 
 
 namespace anki {

+ 1 - 1
anki/scene/VisibilityTester.h

@@ -12,7 +12,7 @@ namespace anki {
 
 class Camera;
 class Scene;
-class RenderableNode;
+class Renderable;
 class SpotLight;
 class PointLight;
 class SceneNode;

+ 110 - 0
anki/util/Object.h

@@ -0,0 +1,110 @@
+#ifndef ANKI_UTIL_OBJECT_H
+#define ANKI_UTIL_OBJECT_H
+
+#include "anki/util/Assert.h"
+#include <vector>
+#include <boost/foreach.hpp>
+#include <boost/range/iterator_range.hpp>
+
+
+namespace anki {
+
+
+/// A hierarchical object
+template<typename T>
+class Object
+{
+public:
+	typedef T Value;
+	typedef std::vector<Object*> Container;
+	typedef boost::iterator_range<typename Container::const_iterator>
+		ConstIteratorRange;
+	typedef boost::iterator_range<typename Container::iterator>
+		MutableIteratorRange;
+
+	/// Calls addChild if parent is not NULL
+	/// @exception Exception
+	Object(Object* parent_)
+		: parent(NULL)
+	{
+		if(parent_ != NULL)
+		{
+			parent_->addChild(this);
+		}
+	}
+
+	/// Delete childs from the last entered to the first and update parent
+	virtual ~Object()
+	{
+		if(parent != NULL)
+		{
+			parent->removeChild(this);
+		}
+
+		// Remove all children
+		BOOST_FOREACH(Object* child, childs)
+		{
+			child->parent = NULL;
+		}
+	}
+
+	/// @name Accessors
+	/// @{
+	const Object* getParent() const
+	{
+		return parent;
+	}
+	Object* getParent()
+	{
+		return parent;
+	}
+
+	ConstIteratorRange getChildren() const
+	{
+		return ConstIteratorRange(childs.begin(), childs.end());
+	}
+	MutableIteratorRange getChildren()
+	{
+		return MutableIteratorRange(childs.begin(), childs.end());
+	}
+
+	size_t getChildrenSize() const
+	{
+		return childs.size();
+	}
+	/// @}
+
+	/// Add a new child
+	void addChild(Object* child)
+	{
+		ANKI_ASSERT(child != NULL && "Null arg");
+		ANKI_ASSERT(child->parent ==  NULL && "Child already has parent");
+
+		child->parent = this;
+		childs.push_back(child);
+	}
+
+	/// Remove a child
+	void removeChild(Object* child)
+	{
+		ANKI_ASSERT(child != NULL && "Null arg");
+
+		typename Container::iterator it =
+			std::find(childs.begin(), childs.end(), child);
+
+		ANKI_ASSERT(it != childs.end() && "Child not found");
+
+		childs.erase(it);
+		child->parent = NULL;
+	}
+
+private:
+	Object* parent; ///< May be nullptr
+	Container childs;
+};
+
+
+} // end namespace
+
+
+#endif

+ 24 - 22
docs/drafts/scene2.xmi

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMI verified="false" xmi.version="1.2" timestamp="2011-11-17T19:33:43" xmlns:UML="http://schema.omg.org/spec/UML/1.3" >
+<XMI verified="false" xmi.version="1.2" timestamp="2011-12-23T18:54:18" xmlns:UML="http://schema.omg.org/spec/UML/1.3" >
  <XMI.header>
   <XMI.documentation>
    <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
@@ -96,21 +96,20 @@
       </UML:Class>
       <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tRKo3clH6yzT" name="Renderable" >
        <UML:Classifier.feature>
-        <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="i1a0wMeuxyfs" name="getMaterial" >
+        <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="i1a0wMeuxyfs" name="getMaterial" />
+        <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hup81s2ak3bD" name="getVao" >
          <UML:BehavioralFeature.parameter>
-          <UML:Parameter visibility="private" isSpecification="false" xmi.id="Nb3ESFZXHJIl" type="zbqJPYCQnefR" value="" name="passId" />
-          <UML:Parameter visibility="private" isSpecification="false" xmi.id="EZQITkw8ZXHU" type="zbqJPYCQnefR" value="" name="level" />
+          <UML:Parameter visibility="private" isSpecification="false" xmi.id="u1jbuvlWp4f8" type="vgq4ym8aTrBV" value="" name="key" />
          </UML:BehavioralFeature.parameter>
         </UML:Operation>
-        <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hup81s2ak3bD" name="getVao" >
+        <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="anjW7OQ4M3wy" name="getWorldTransformation" >
          <UML:BehavioralFeature.parameter>
-          <UML:Parameter visibility="private" isSpecification="false" xmi.id="PGfgWQvyPAXn" type="zbqJPYCQnefR" value="" name="passId" />
-          <UML:Parameter visibility="private" isSpecification="false" xmi.id="CCVzcUVyYZss" type="zbqJPYCQnefR" value="" name="level" />
+          <UML:Parameter visibility="private" isSpecification="false" xmi.id="08G3mMT7GKye" type="vgq4ym8aTrBV" value="" name="key" />
          </UML:BehavioralFeature.parameter>
         </UML:Operation>
-        <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="anjW7OQ4M3wy" name="getWorldTransformation" >
+        <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="T05FNZKbtIDV" name="getVertexIdsSize" >
          <UML:BehavioralFeature.parameter>
-          <UML:Parameter visibility="private" isSpecification="false" xmi.id="82Bhu3osXB4B" type="zbqJPYCQnefR" value="" name="passId" />
+          <UML:Parameter visibility="private" isSpecification="false" xmi.id="tqt3pitW2xqp" type="vgq4ym8aTrBV" value="" name="key" />
          </UML:BehavioralFeature.parameter>
         </UML:Operation>
        </UML:Classifier.feature>
@@ -226,17 +225,18 @@
       </UML:Association>
       <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="HWqxKhoAyn7H" xmi.id="TDV00RrlHN2J" parent="J6qXHlxchzMq" name="" />
       <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7qtCN74kkWxC" name="lklk" />
+      <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vgq4ym8aTrBV" name="PassLodKey" />
      </UML:Namespace.ownedElement>
      <XMI.extension xmi.extender="umbrello" >
       <diagrams>
        <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" showpubliconly="1" showpackage="0" showstereotype="0" name="class diagram" font="Sans,10,-1,5,50,0,0,0,0,0" canvasheight="830" canvaswidth="1552" localid="" snapcsgrid="0" showgrid="0" showops="1" usefillcolor="1" fillcolor="#ffffc0" zoom="81" xmi.id="PbF0CcmZxcnO" documentation="" showscope="1" snapgrid="0" showatts="1" type="1" >
         <widgets>
-         <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="0" x="424" showattsigs="601" y="98" showattributes="1" font="Sans,10,-1,5,75,0,0,0,0,0" width="235" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="J6qXHlxchzMq" showscope="1" height="72" showopsigs="601" />
-         <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="326" showattsigs="601" y="517" showattributes="1" font="Sans,10,-1,5,75,0,0,0,0,0" width="69" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="JFHkOnc4nZlD" showscope="1" height="38" showopsigs="601" />
+         <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="0" x="424" showattsigs="601" y="98" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="235" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="J6qXHlxchzMq" showscope="1" height="72" showopsigs="601" />
+         <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="326" showattsigs="601" y="517" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="69" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="JFHkOnc4nZlD" showscope="1" height="38" showopsigs="601" />
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="757" showattsigs="601" y="511" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="94" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="rG36YOguGgft" showscope="1" height="32" showopsigs="601" />
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="942" showattsigs="601" y="506" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="80" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="qRB4itQTVUH2" showscope="1" height="32" showopsigs="601" />
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="627" showattsigs="601" y="513" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="47" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="0NjsdvgyuCHT" showscope="1" height="32" showopsigs="601" />
-         <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="0" x="884" showattsigs="601" y="331" showattributes="1" font="Sans Serif,10,-1,5,75,0,0,0,0,0" width="264" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="tRKo3clH6yzT" showscope="1" height="82" showopsigs="601" />
+         <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="0" x="884" showattsigs="601" y="331" showattributes="1" font="Sans Serif,10,-1,5,75,0,0,0,0,0" width="293" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="tRKo3clH6yzT" showscope="1" height="88" showopsigs="601" />
          <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="0" x="437" showattsigs="601" y="336" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="124" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="Z2oCygxy3epf" showscope="1" height="40" showopsigs="601" />
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="136" showattsigs="601" y="415" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="124" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="HWqxKhoAyn7H" showscope="1" height="32" showopsigs="601" />
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="173" showattsigs="601" y="656" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="154" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="pMvCpt3xbeEr" showscope="1" height="32" showopsigs="601" />
@@ -244,7 +244,7 @@
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="558" showattsigs="601" y="661" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="81" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="OTT5nNmCL1f4" showscope="1" height="32" showopsigs="601" />
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="754" showattsigs="601" y="661" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="85" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="9vKXhXVI6N4T" showscope="1" height="32" showopsigs="601" />
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="657" showattsigs="601" y="661" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="85" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="tlRLHbjj2mWP" showscope="1" height="32" showopsigs="601" />
-         <notewidget width="313" x="1169" noteType="0" y="329" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="229" linecolor="none" xmi.id="eCXMZulyodF1" usefillcolor="1" linewidth="none" font="Sans,10,-1,5,50,0,0,0,0,0" text="Renderable is the entity that renders in one or more from MS, BS, IS, DBGS, DPS stages. It contains only stuff that renderer needs and nothing else.&#xa;&#xa;The renderables are, ModelPatchNodes, SkinPatchNodes or lights&#xa;&#xa;Renderable flags:&#xa;MOVABLE&#xa;RENDER_ONLY_CHILDREN&#xa;DEBUG" />
+         <notewidget width="313" x="1199" noteType="0" y="330" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="229" linecolor="none" xmi.id="eCXMZulyodF1" usefillcolor="1" linewidth="none" font="Sans,10,-1,5,50,0,0,0,0,0" text="Renderable is the entity that renders in one or more from MS, BS, IS, DBGS, DPS stages. It contains only stuff that renderer needs and nothing else.&#xa;&#xa;The renderables are, ModelPatchNodes, SkinPatchNodes or lights&#xa;&#xa;Renderable flags:&#xa;MOVABLE&#xa;RENDER_ONLY_CHILDREN&#xa;DEBUG" />
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="912" showattsigs="601" y="103" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="98" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="aCSkjpKcYIQB" showscope="1" height="32" showopsigs="601" />
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="0" x="876" showattsigs="601" y="10" showattributes="1" font="Sans,10,-1,5,50,0,0,0,0,0" width="59" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="CLERaYxl75Nb" showscope="1" height="32" showopsigs="601" />
          <notewidget width="268" x="109" noteType="0" y="56" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="89" linecolor="none" xmi.id="tsst9QuOreU7" usefillcolor="1" linewidth="none" font="Sans,10,-1,5,50,0,0,0,0,0" text="SceneNode is the basis of all scene&#xa;related objects" />
@@ -268,7 +268,7 @@
          <assocwidget indexa="1" indexb="3" widgetaid="JFHkOnc4nZlD" linecolor="none" totalcounta="2" xmi.id="nAuXyvwBw1mu" widgetbid="tRKo3clH6yzT" totalcountb="4" type="500" linewidth="none" >
           <linepath>
            <startpoint startx="395" starty="536" />
-           <endpoint endx="884" endy="392" />
+           <endpoint endx="884" endy="397" />
           </linepath>
          </assocwidget>
          <assocwidget indexa="2" indexb="3" widgetaid="0NjsdvgyuCHT" linecolor="none" totalcounta="3" xmi.id="rbxnyzWmmgbb" widgetbid="J6qXHlxchzMq" totalcountb="6" type="500" linewidth="none" >
@@ -286,19 +286,19 @@
          <assocwidget indexa="2" indexb="1" widgetaid="rG36YOguGgft" linecolor="none" totalcounta="3" xmi.id="EzYAJgfcpn2S" widgetbid="tRKo3clH6yzT" totalcountb="3" type="500" linewidth="none" >
           <linepath>
            <startpoint startx="819" starty="511" />
-           <endpoint endx="972" endy="413" />
+           <endpoint endx="981" endy="419" />
           </linepath>
          </assocwidget>
          <assocwidget indexa="2" indexb="2" widgetaid="qRB4itQTVUH2" linecolor="none" totalcounta="3" xmi.id="ggqVRqwliqtq" widgetbid="tRKo3clH6yzT" totalcountb="3" type="500" linewidth="none" >
           <linepath>
            <startpoint startx="995" starty="506" />
-           <endpoint endx="1060" endy="413" />
+           <endpoint endx="1079" endy="419" />
           </linepath>
          </assocwidget>
          <assocwidget indexa="1" indexb="2" widgetaid="HWqxKhoAyn7H" linecolor="none" totalcounta="2" xmi.id="qMoQMJPMNT0s" widgetbid="tRKo3clH6yzT" totalcountb="4" type="500" linewidth="none" >
           <linepath>
            <startpoint startx="260" starty="431" />
-           <endpoint endx="884" endy="372" />
+           <endpoint endx="884" endy="375" />
           </linepath>
          </assocwidget>
          <assocwidget indexa="1" indexb="1" widgetaid="pMvCpt3xbeEr" linecolor="none" totalcounta="2" xmi.id="WilVNneG7Bvd" widgetbid="JFHkOnc4nZlD" totalcountb="3" type="500" linewidth="none" >
@@ -336,13 +336,13 @@
            <startpoint startx="905" starty="42" />
            <endpoint endx="961" endy="103" />
           </linepath>
-          <floatingtext width="16" x="895" y="46" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="701" linecolor="none" xmi.id="UR1tOCcMjicY" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,5,50,0,0,0,0,0" text="1" pretext="" />
-          <floatingtext width="15" x="957" y="79" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="702" linecolor="none" xmi.id="8IYrdrwUhzhA" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,5,50,0,0,0,0,0" text="*" pretext="" />
+          <floatingtext width="16" x="895" y="46" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="701" linecolor="none" xmi.id="53wEI1dRPk8Y" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,5,50,0,0,0,0,0" text="1" pretext="" />
+          <floatingtext width="15" x="957" y="79" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="702" linecolor="none" xmi.id="xLlh1NJFEf3x" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,5,50,0,0,0,0,0" text="*" pretext="" />
          </assocwidget>
          <assocwidget indexa="1" indexb="1" widgetaid="Z2oCygxy3epf" linecolor="none" totalcounta="2" xmi.id="3MMBumzpG7XC" widgetbid="tRKo3clH6yzT" totalcountb="4" type="500" linewidth="none" >
           <linepath>
            <startpoint startx="561" starty="356" />
-           <endpoint endx="884" endy="351" />
+           <endpoint endx="884" endy="353" />
           </linepath>
          </assocwidget>
          <assocwidget indexa="2" indexb="1" widgetaid="JFHkOnc4nZlD" linecolor="none" totalcounta="3" xmi.id="6deEBqMPAeYr" widgetbid="Z2oCygxy3epf" totalcountb="3" type="500" linewidth="none" >
@@ -354,7 +354,7 @@
          <assocwidget indexa="2" indexb="1" widgetaid="aCSkjpKcYIQB" linecolor="none" totalcounta="3" xmi.id="7zcnD3kOQKlZ" widgetbid="tRKo3clH6yzT" totalcountb="2" type="501" linewidth="none" >
           <linepath>
            <startpoint startx="977" starty="135" />
-           <endpoint endx="1016" endy="331" />
+           <endpoint endx="1030" endy="331" />
           </linepath>
          </assocwidget>
          <assocwidget indexa="1" indexb="2" widgetaid="0NjsdvgyuCHT" linecolor="none" totalcounta="3" xmi.id="mDLBX4kpG6g7" widgetbid="Z2oCygxy3epf" totalcountb="3" type="500" linewidth="none" >
@@ -396,7 +396,7 @@
   </UML:Model>
  </XMI.content>
  <XMI.extensions xmi.extender="umbrello" >
-  <docsettings viewid="PbF0CcmZxcnO" uniqueid="82Bhu3osXB4B" documentation="" />
+  <docsettings viewid="PbF0CcmZxcnO" uniqueid="tqt3pitW2xqp" documentation="" />
   <listview>
    <listitem open="1" type="800" label="Views" >
     <listitem open="1" type="801" id="Logical View" >
@@ -411,12 +411,14 @@
      <listitem open="1" type="813" id="CLERaYxl75Nb" />
      <listitem open="1" type="813" id="aCSkjpKcYIQB" />
      <listitem open="1" type="813" id="LwjR0FVi9FGO" />
+     <listitem open="1" type="813" id="vgq4ym8aTrBV" />
      <listitem open="1" type="813" id="pMvCpt3xbeEr" />
      <listitem open="1" type="813" id="tlRLHbjj2mWP" />
      <listitem open="1" type="813" id="tRKo3clH6yzT" >
       <listitem open="0" type="815" id="i1a0wMeuxyfs" />
       <listitem open="0" type="815" id="hup81s2ak3bD" />
       <listitem open="0" type="815" id="anjW7OQ4M3wy" />
+      <listitem open="0" type="815" id="T05FNZKbtIDV" />
      </listitem>
      <listitem open="1" type="813" id="J6qXHlxchzMq" >
       <listitem open="0" type="815" id="DqiQZJDHpKfG" />

+ 0 - 145
tests/Math/MathCommon.ut.h

@@ -1,145 +0,0 @@
-#ifndef MATH_COMMON_UT_H
-#define MATH_COMMON_UT_H
-
-#include "Util.h"
-
-
-/// Get random float and not zero cause of the divs
-inline float randFloat()
-{
-	const float RANGE_MIN = -1.00123;
-	const float RANGE_MAX = 900.9990001;
-
-	float f;
-	while(true)
-	{
-		f = Util::randRange(RANGE_MIN, RANGE_MAX);
-		if(!isZero(f))
-		{
-			break;
-		}
-	}
-
-	return f;
-}
-
-
-//==============================================================================                                        ==//==============================================================================loat arr[sizeof(Type) / sizeof(float)];
-
-	f = randFloat();
-	for(uint i = 0; i < (sizeof(Type) / sizeof(float)); i++)
-	{
-		a[i] = f;
-		b[i] = randFloat();
-		arr[i] = b[i];
-	}
-
-	// float
-	EXPECT_EQ(Type(f), a);
-
-	// arr
-	EXPECT_EQ(Type(arr), b);
-
-	// Copy
-	EXPECT_EQ(Type(b), b);
-}
-
-
-//==============================================================================//===============================================================================
-//==============================================================================
-
-inline float addf(float a, float b)
-{
-//==============================================================================n a * b;
-}
-
-
-inline float divf(float a, float b)
-{
-	return a / b;
-}
-
-
-template<
-	typename Type,
-	Type (Type::* op)(const Type&) const,
-	Type& (Type::* compoundAssignment)(const Type&),
-	float (* normalOp)(float, float)>
-void testOperators()
-{
-	Type a, b, c;
-
-	for(uint i = 0; i < (sizeof(Type) / sizeof(float)); i++)
-	{
-		a[i] = randFloat();
-		b[i] = randFloat();
-		c[i] = normalOp(a[i], b[i]);
-	}
-
-	EXPECT_EQ((a.*op)(b), c);
-
-	(a.*compoundAssignment)(b);
-
-	EXPECT_EQ(a, c);
-}
-
-/// @tparam op eg Type + float
-/// @tparam compoundAssignment eg Type += float
-/// @tparam opExtern eg float + Type
-/// @tparam normalOp The normal function
-template<
-	typename Type,
-	Type (Type::* op)(float) const,
-	Type& (Type::* compoundAssignment)(float),
-	Type (* opExtern)(float, const Type&),
-	float (* normalOp)(float, float)>
-void testOperatorsWithFloat()
-{
-	Type a, b, c;
-	float f = randFloat();
-
-	for(uint i = 0; i < (sizeof(Type) / sizeof(float)); i++)
-	{
-		a[i] = randFloat();
-		b[i] = normalOp(a[i], f);
-		c[i] = normalOp(f, a[i]);
-	}
-
-	EXPECT_EQ((a.*op)(f), b);
-
-	EXPECT_EQ(opExtern(f, a), c);
-
-	(a.*compoundAssignment)(f);
-	EXPECT_EQ(a, b);
-}
-
-
-template<typename Type>
-void testCmpOperators()
-{
-	Type a, b;
-
-	for(uint i = 0; i < (sizeof(Type) / sizeof(float)); i++)
-	{
-		a[i] = b[i] = randFloat();
-	}
-
-	EXPECT_EQ(a == b, true);
-	EXPECT_EQ(a != b, false);
-}
-
-
-template<typename Type>
-void testNegOperator()
-{
-	Type a, b;
-	for(int i = 0; i < (sizeof(Type) / sizeof(float)); i++)
-	{
-		a[i] = randFloat();
-		b[i] = -a[i];
-	}
-
-	EXPECT_EQ(-a == b, true);
-}
-
-#endif

+ 0 - 58
tests/Math/Matrices.ut.cpp

@@ -1,58 +0,0 @@
-#include <gtest/gtest.h>
-#include <iostream>
-#include "Math.h"
-#include "MathCommon.ut.h"
-
-/// Test nxn matrix multiplication
-template<typename Type>
-void testMatrixMul()
-{
-	int dimention = log2(sizeof(Type) / sizeof(float));
-	Type r, a, b;
-
-	// Fill
-	for(int i = 0; i < dimention; i++)
-	{
-		for(int j = 0; j < dimention; j++)
-		{
-			a(i, j) = randFloat();
-			b(i, j) = randFloat();
-		}
-	}
-
-	// Calc r = a * b as usual
-	for(int i = 0; i < dimention; i++)
-	{
-		for(int j = 0; j < dimention; j++)
-		{
-			r(i, j) = 0.0;
-			for(int k = 0; k < dimention; k++)
-			{
-				r(i, j) += a(i, k) * b(k, j);
-			}
-		}
-	}
-
-	EXPECT_EQ(r, a * b);
-}
-
-
-template<typename Type>
-void arithmeticOperations()
-{
-	testOperators<Type, &Type::operator+, &Type::operator+=, &addf>();
-	testMatrixMul<Type>();
-	testOperators<Type, &Type::operator-, &Type::operator-=, &subf>();
-	testOperatorsWithFloat<Type, &Type::operator+, &Type::operator+=, &operator+, &addf>();
-	testOperatorsWithFloat<Type, &Type::operator-, &Type::operator-=, &operator-, &subf>();
-	testOperatorsWithFloat<Type, &Type::operator*, &Type::operator*=, &operator*, &mulf>();
-	testOperatorsWithFloat<Type, &Type::operator/, &Type::operator/=, &operator/, &divf>();
-	testCmpOperators<Type>();
-}
-
-
-TEST(MathTests, MatrixOperators)
-{
-	arithmeticOperations<Mat3>();
-	arithmeticOperations<Mat4>();
-}

+ 0 - 99
tests/Math/Vectors.ut.cpp

@@ -1,99 +0,0 @@
-#include <gtest/gtest.h>
-#include <iostream>
-#include "Math.h"
-#include "MathCommon.ut.h"
-
-
-const float REALY_SMALL_FLOAT = 1.0e-3;
-
-
-
-
-//==============================================================================                                        ==//==============================================================================ECT_EQ(sizeof(Vec2), FS * 2);
-	EXPECT_EQ(sizeof(Vec3), FS * 3);
-	EXPECT_EQ(sizeof(Vec4), FS * 4);
-	EXPECT_EQ(sizeof(Quat), FS * 4);
-	EXPECT_EQ(sizeof(Euler), FS * 3);
-	EXPECT_EQ(sizeof(Mat3), FS * 9);
-	EXPECT_EQ(sizeof(Mat4), FS * 16);
-}
-
-
-TEST(MathTests, VectorConstructors)
-{
-	testCommonContructors<Vec2>();
-	testCommonContructors<Vec3>();
-	testCommonContructors<Vec4>();
-}
-
-
-//==============================================================================//===============================================================================
-//==============================================================================
-
-template<typename Type>
-void arithmeti//==============================================================================-, &Type::operator-=, &subf>();
-	testOperators<Type, &Type::operator*, &Type::operator*=, &mulf>();
-	testOperators<Type, &Type::operator/, &Type::operator/=, &divf>();
-	testOperatorsWithFloat<Type, &Type::operator+, &Type::operator+=, &operator+, &addf>();
-	testOperatorsWithFloat<Type, &Type::operator-, &Type::operator-=, &operator-, &subf>();
-	testOperatorsWithFloat<Type, &Type::operator*, &Type::operator*=, &operator*, &mulf>();
-	testOperatorsWithFloat<Type, &Type::operator/, &Type::operator/=, &operator/, &divf>();
-	testCmpOperators<Type>();
-}
-
-
-TEST(MathTests, VectorArithmetic)
-{
-	arithmeticOperations<Vec2>();
-	arithmeticOperations<Vec3>();
-	arithmeticOperations<Vec4>();
-}
-
-
-//==============================================================================
-// Misc                                                                        //================================================================================
-
-template<typename Type>
-void testDotProd()
-{
-	Type a, b;
-	float o = 0.0;
-
-	for(uint i = 0; i < (sizeof(Type) / sizeof(//==============================================================================N);
-}
-
-
-TEST(MathTests, DotProducts)
-{
-	testDotProd<Vec2>();
-	testDotProd<Vec3>();
-	testDotProd<Vec4>();
-}
-
-
-template<typename Type>
-void testLengthAndNormalize()
-{
-	Type a;
-	float o = 0.0;
-
-	for(uint i = 0; i < (sizeof(Type) / sizeof(float)); i++)
-	{
-		a[i] = randFloat();
-		o += a[i] * a[i];
-	}
-
-	o = sqrt(o);
-
-	EXPECT_NEAR(a.getLength(), o, REALY_SMALL_FLOAT);
-	EXPECT_NEAR(a.getNormalized().getLength(), 1.0, REALY_SMALL_FLOAT);
-	//EXPECT_EQ(a.getNormalized() * a.getLength(), a);
-}
-
-
-TEST(MathTests, LengthsAndNormals)
-{
-	testLengthAndNormalize<Vec2>();
-	testLengthAndNormalize<Vec3>();
-	testLengthAndNormalize<Vec4>();
-}

+ 0 - 35
tests/Resources/Material.ut.cpp

@@ -1,35 +0,0 @@
-#include <gtest/gtest.h>
-#include "anki/resource/Material.h"aterial.h"
-#include "anki/resource/RsrcPtr.h"
-
-
-TEST(MaterialTests, Test)
-{
-	// Tests
-	{
-		MaterialResourcePointer mtl;
-		EXPECT_NO_THROW(mtl.load("unit-tests/data/custom_sprog.mtl"));
-		EXPECT_EQ(mtl->isBlendingEnabled(), false);
-	}
-
-	{
-		MaterialResourcePointer mtl;
-		EXPECT_NO_THROW(mtl.load("unit-tests/data/custom_sprog_skinning.mtl"));
-		EXPECT_EQ(mtl->getBlendingSfactor(), GL_ONE);
-		EXPECT_EQ(mtl->getBlendingDfactor(), GL_SRC_ALPHA);
-		EXPECT_EQ(mtl->isBlendingEnabled(), true);
-	}
-	
-	{
-		MaterialResourcePointer mtl;
-		EXPECT_ANY_THROW(mtl.load("unit-tests/data/bool_err.mtl"));
-	}
-
-	{
-		MaterialResourcePointer mtl;
-		EXPECT_NO_THROW(mtl.load("unit-tests/data/complex.mtl"));
-		EXPECT_EQ(mtl->getUserDefinedVars().size(), 6);
-		Vec3 tmp = mtl->getUserDefinedVars()[3].get<Vec3>();
-		EXPECT_EQ(tmp, Vec3(1.0, 2.0, -0.8));
-	}
-}

+ 0 - 23
tests/Scripting/ScriptingEngine.ut.cpp

@@ -1,23 +0,0 @@
-#include <gtest/gtest.h>
-#include "ScriptingEngine.h"
-#include "Math.h"
-#include "anki/core/Logger.h"
-#include "anki/core/Globals.h"ls.h"
-
-
-TEST(ScriptingTests, ScriptingEngine)
-{
-	Vec4 v;
-	ScriptingEngineSingleton::get().exposeVar<Vec4>("v", &v);
-	
-	const char* src =
-		"from Anki import *\n" 
-		"v.x = 1.0\n"
-		"v.y = 2.0\n"
-		"v.z = 3.0\n"
-		"v.w = 4.0\n"
-		"v += Vec4(1.0)\n";
-		
-	EXPECT_NO_THROW(ScriptingEngineSingleton::get().execScript(src));
-	EXPECT_EQ(v, Vec4(2.0, 3.0, 4.0, 5.0));
-}

+ 0 - 18
tests/Ui/UiFtFontLoader.ut.cpp

@@ -1,18 +0,0 @@
-#include <gtest/gtest.h>
-#include <malloc.h>
-#include "UiFtFontLoader.h"
-
-
-TEST(UiTests, UiFtFontLoader)
-{
-	struct mallinfo pre = mallinfo();
-	
-	{
-		FT_Vector ftSize = {20, 20};
-		ui::FtFontLoader ft("engine-rsrc/ModernAntiqua.ttf", ftSize);
-	}
-	
-	struct mallinfo post = mallinfo();
-	
-	EXPECT_EQ(post.uordblks - pre.uordblks, 0);
-}

+ 0 - 10
tests/data/bool_err.mtl

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<material>
-	<shaderProg>
-		<file>shaders/MsGeneric.glsl</file>
-	</shaderProg>
-	
-	<blendingStage>error</blendingStage>
-</material>
-

+ 0 - 58
tests/data/complex.mtl

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<material>
-	<shaderProg>
-		<customMsSProg>
-			<defines>
-				<define>DIFFUSE_MAPPING</define>
-				<define>NORMAL_MAPPING</define>
-				<define>ENVIRONMENT_MAPPING</define>
-			</defines>
-		</customMsSProg>
-	</shaderProg>
-
-	<userDefinedVars>
-		<userDefinedVar>
-			<name>diffuseMap</name>
-			<value>
-				<texture>meshes/horse/horse.diff.png</texture>
-			</value>
-		</userDefinedVar>
-	
-		<userDefinedVar>
-			<name>normalMap</name>
-			<value>
-				<texture>meshes/horse/horse.norm.png</texture>
-			</value>
-		</userDefinedVar>
-	
-		<userDefinedVar>
-			<name>environmentMap</name>
-			<value>
-				<texture>textures/env/env_map_3.png</texture>
-			</value>
-		</userDefinedVar>
-	
-		<userDefinedVar>
-			<name>specularCol</name>
-			<value>
-				<vec3><x>1.0</x><y>2.0</y><z>-0.8</z></vec3>
-			</value>
-		</userDefinedVar>
-	
-		<userDefinedVar>
-			<name>diffuseCol</name>
-			<value>
-				<vec3><x>1.0</x><y>1.0</y><z>1.0</z></vec3>
-			</value>
-		</userDefinedVar>
-	
-		<userDefinedVar>
-			<name>shininess</name>
-			<value>
-				<float>90.0</float>
-			</value>
-		</userDefinedVar>
-	</userDefinedVars>
-</material>
-

+ 0 - 9
tests/data/custom_sprog.mtl

@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<material>
-	<shaderProg>
-		<customDpSProg>
-		</customDpSProg>
-	</shaderProg>
-</material>
-

+ 0 - 17
tests/data/custom_sprog_skinning.mtl

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<material>
-	<shaderProg>
-		<customDpSProg>
-			<defines>
-				<define>HARDWARE_SKINNING</define>
-			</defines>
-		</customDpSProg>
-	</shaderProg>
-	
-	<blendFuncs>
-		<sFactor>GL_ONE</sFactor>
-		<dFactor>GL_SRC_ALPHA</dFactor>
-	</blendFuncs>
-</material>
-

+ 1 - 1
tests/Util/HighRezTimer.ut.cpp → tests/util/HighRezTimer.ut.cpp

@@ -1,5 +1,5 @@
+#include "anki/util/HighRezTimer.h"
 #include <gtest/gtest.h>
-#include "HighRezTimer.h"
 
 
 TEST(HighRezTimer, Test)

+ 9 - 0
tests/util/Object.cpp

@@ -0,0 +1,9 @@
+#include <anki/util/Object.h>
+#include <gtest/gtest.h>
+
+
+TEST(Object, All)
+{
+	/// XXX
+}
+

+ 3 - 3
tests/Util/Scanner.ut.cpp → tests/util/Scanner.ut.cpp

@@ -1,11 +1,11 @@
+#include "anki/util/Scanner.h"
 #include <gtest/gtest.h>
 #include <sstream>
 #include <iostream>
 #include <memory>
-#include "Scanner.h"
 
 
-TEST(ScannerTests, Numbers)
+TEST(Scanner, Numbers)
 {
 	std::stringstream ss;	
 	ss << "12345678901234 1.12 0.00000000000001 0.01e1 1e- 10.123e-7 1ab";
@@ -58,7 +58,7 @@ TEST(ScannerTests, Numbers)
 }
 
 
-TEST(ScannerTests, Identifiers)
+TEST(Scanner, Identifiers)
 {
 	std::stringstream ss;	
 	ss << "1 la0_la ha\n_ha";