diff options
author | Renanse <[email protected]> | 2013-03-14 21:52:41 -0500 |
---|---|---|
committer | Renanse <[email protected]> | 2013-03-14 21:52:41 -0500 |
commit | 19bd8d8e1e5de5d31fab60bf2a3dedc9778782d0 (patch) | |
tree | f14c233f6181afaf91d00f83d5e078af27c3cafd /ardor3d-collada | |
parent | aedbc04cc0c605496fc5aa12ba074643ef16d6d9 (diff) | |
parent | c81013c8f8bec5588be7e762a254c509286cbb46 (diff) |
Merge remote-tracking branch 'origin/master'
Conflicts:
ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/DataCache.java
Diffstat (limited to 'ardor3d-collada')
21 files changed, 381 insertions, 417 deletions
diff --git a/ardor3d-collada/.classpath b/ardor3d-collada/.classpath deleted file mode 100644 index 70c378d..0000000 --- a/ardor3d-collada/.classpath +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src/main/java"/> - <classpathentry kind="lib" path="lib/jdom/jaxen.jar"/> - <classpathentry kind="lib" path="lib/jdom/jdom.jar"/> - <classpathentry kind="lib" path="lib/jdom/saxpath.jar"/> - <classpathentry combineaccessrules="false" kind="src" path="/ardor3d-core"/> - <classpathentry combineaccessrules="false" kind="src" path="/ardor3d-animation"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/ardor3d-collada/.project b/ardor3d-collada/.project deleted file mode 100644 index b1307aa..0000000 --- a/ardor3d-collada/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>ardor3d-collada</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/ardor3d-collada/.settings/org.eclipse.core.resources.prefs b/ardor3d-collada/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 5456664..0000000 --- a/ardor3d-collada/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Wed Jan 07 11:32:27 PST 2009 -eclipse.preferences.version=1 -encoding/<project>=UTF-8 diff --git a/ardor3d-collada/.settings/org.eclipse.jdt.core.prefs b/ardor3d-collada/.settings/org.eclipse.jdt.core.prefs index 8093834..19eadb6 100644 --- a/ardor3d-collada/.settings/org.eclipse.jdt.core.prefs +++ b/ardor3d-collada/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,3 @@ -#Tue Apr 06 11:24:48 CDT 2010 eclipse.preferences.version=1 org.eclipse.jdt.core.codeComplete.argumentPrefixes= org.eclipse.jdt.core.codeComplete.argumentSuffixes= @@ -17,6 +16,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 diff --git a/ardor3d-collada/.settings/org.eclipse.jdt.ui.prefs b/ardor3d-collada/.settings/org.eclipse.jdt.ui.prefs index 47508e3..1a36ec5 100644 --- a/ardor3d-collada/.settings/org.eclipse.jdt.ui.prefs +++ b/ardor3d-collada/.settings/org.eclipse.jdt.ui.prefs @@ -1,114 +1,113 @@ -#Mon Nov 14 15:41:55 CST 2011 -cleanup.add_default_serial_version_id=true -cleanup.add_generated_serial_version_id=false -cleanup.add_missing_annotations=true -cleanup.add_missing_deprecated_annotations=true -cleanup.add_missing_methods=true -cleanup.add_missing_nls_tags=false -cleanup.add_missing_override_annotations=true -cleanup.add_serial_version_id=true -cleanup.always_use_blocks=true -cleanup.always_use_parentheses_in_expressions=true -cleanup.always_use_this_for_non_static_field_access=false -cleanup.always_use_this_for_non_static_method_access=false -cleanup.convert_to_enhanced_for_loop=false -cleanup.correct_indentation=true -cleanup.format_source_code=true -cleanup.format_source_code_changes_only=false -cleanup.make_local_variable_final=true -cleanup.make_parameters_final=true -cleanup.make_private_fields_final=true -cleanup.make_type_abstract_if_missing_method=false -cleanup.make_variable_declarations_final=true -cleanup.never_use_blocks=false -cleanup.never_use_parentheses_in_expressions=false -cleanup.organize_imports=true -cleanup.qualify_static_field_accesses_with_declaring_class=false -cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -cleanup.qualify_static_member_accesses_with_declaring_class=true -cleanup.qualify_static_method_accesses_with_declaring_class=false -cleanup.remove_private_constructors=true -cleanup.remove_trailing_whitespaces=true -cleanup.remove_trailing_whitespaces_all=true -cleanup.remove_trailing_whitespaces_ignore_empty=false -cleanup.remove_unnecessary_casts=true -cleanup.remove_unnecessary_nls_tags=true -cleanup.remove_unused_imports=true -cleanup.remove_unused_local_variables=false -cleanup.remove_unused_private_fields=true -cleanup.remove_unused_private_members=false -cleanup.remove_unused_private_methods=true -cleanup.remove_unused_private_types=true -cleanup.sort_members=false -cleanup.sort_members_all=false -cleanup.use_blocks=true -cleanup.use_blocks_only_for_return_and_throw=false -cleanup.use_parentheses_in_expressions=false -cleanup.use_this_for_non_static_field_access=true -cleanup.use_this_for_non_static_field_access_only_if_necessary=true -cleanup.use_this_for_non_static_method_access=true -cleanup.use_this_for_non_static_method_access_only_if_necessary=true -cleanup_profile=_ArdorLabs -cleanup_settings_version=2 -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_ArdorLabs -formatter_settings_version=11 -org.eclipse.jdt.ui.exception.name=ex -org.eclipse.jdt.ui.gettersetter.use.is=true -org.eclipse.jdt.ui.javadoc=false -org.eclipse.jdt.ui.keywordthis=false -org.eclipse.jdt.ui.overrideannotation=true -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/**\n * Copyright (c) 2008-2011 Ardor Labs, Inc.\n *\n * This file is part of Ardor3D.\n *\n * Ardor3D is free software\: you can redistribute it and/or modify it \n * under the terms of its license which may be found in the accompanying\n * LICENSE file or at <http\://www.ardor3d.com/LICENSE>.\n */\n\n${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> -sp_cleanup.add_default_serial_version_id=true -sp_cleanup.add_generated_serial_version_id=false -sp_cleanup.add_missing_annotations=true -sp_cleanup.add_missing_deprecated_annotations=true -sp_cleanup.add_missing_methods=false -sp_cleanup.add_missing_nls_tags=false -sp_cleanup.add_missing_override_annotations=true -sp_cleanup.add_serial_version_id=false -sp_cleanup.always_use_blocks=true -sp_cleanup.always_use_parentheses_in_expressions=false -sp_cleanup.always_use_this_for_non_static_field_access=false -sp_cleanup.always_use_this_for_non_static_method_access=false -sp_cleanup.convert_to_enhanced_for_loop=false -sp_cleanup.correct_indentation=true -sp_cleanup.format_source_code=true -sp_cleanup.format_source_code_changes_only=false -sp_cleanup.make_local_variable_final=true -sp_cleanup.make_parameters_final=true -sp_cleanup.make_private_fields_final=true -sp_cleanup.make_type_abstract_if_missing_method=false -sp_cleanup.make_variable_declarations_final=true -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=true -sp_cleanup.on_save_use_additional_actions=true -sp_cleanup.organize_imports=true -sp_cleanup.qualify_static_field_accesses_with_declaring_class=false -sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=true -sp_cleanup.qualify_static_method_accesses_with_declaring_class=false -sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_trailing_whitespaces=true -sp_cleanup.remove_trailing_whitespaces_all=true -sp_cleanup.remove_trailing_whitespaces_ignore_empty=false -sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=true -sp_cleanup.remove_unused_imports=true -sp_cleanup.remove_unused_local_variables=false -sp_cleanup.remove_unused_private_fields=true -sp_cleanup.remove_unused_private_members=false -sp_cleanup.remove_unused_private_methods=true -sp_cleanup.remove_unused_private_types=true -sp_cleanup.sort_members=false -sp_cleanup.sort_members_all=false -sp_cleanup.use_blocks=true -sp_cleanup.use_blocks_only_for_return_and_throw=false -sp_cleanup.use_parentheses_in_expressions=false -sp_cleanup.use_this_for_non_static_field_access=true -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true -sp_cleanup.use_this_for_non_static_method_access=true -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=true
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=true
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=true
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=true
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=false
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_ArdorLabs
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_ArdorLabs
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/**\n * Copyright (c) 2008-2011 Ardor Labs, Inc.\n *\n * This file is part of Ardor3D.\n *\n * Ardor3D is free software\: you can redistribute it and/or modify it \n * under the terms of its license which may be found in the accompanying\n * LICENSE file or at <http\://www.ardor3d.com/LICENSE>.\n */\n\n${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=true
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/ardor3d-collada/lib/jdom/jaxen.jar b/ardor3d-collada/lib/jdom/jaxen.jar Binary files differdeleted file mode 100644 index b633631..0000000 --- a/ardor3d-collada/lib/jdom/jaxen.jar +++ /dev/null diff --git a/ardor3d-collada/lib/jdom/jdom.jar b/ardor3d-collada/lib/jdom/jdom.jar Binary files differdeleted file mode 100644 index 65a1b3f..0000000 --- a/ardor3d-collada/lib/jdom/jdom.jar +++ /dev/null diff --git a/ardor3d-collada/lib/jdom/saxpath.jar b/ardor3d-collada/lib/jdom/saxpath.jar Binary files differdeleted file mode 100644 index 2b43955..0000000 --- a/ardor3d-collada/lib/jdom/saxpath.jar +++ /dev/null diff --git a/ardor3d-collada/lib/jdom/version_info.txt b/ardor3d-collada/lib/jdom/version_info.txt deleted file mode 100644 index 200a83b..0000000 --- a/ardor3d-collada/lib/jdom/version_info.txt +++ /dev/null @@ -1 +0,0 @@ -jdom version: 1.1.1
\ No newline at end of file diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java index da9773f..d20278c 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java @@ -25,9 +25,9 @@ import java.util.StringTokenizer; import java.util.logging.Level; import java.util.logging.Logger; -import org.jdom.Attribute; -import org.jdom.DataConversionException; -import org.jdom.Element; +import org.jdom2.Attribute; +import org.jdom2.DataConversionException; +import org.jdom2.Element; import com.ardor3d.extension.animation.skeletal.AttachmentPoint; import com.ardor3d.extension.animation.skeletal.Joint; @@ -198,7 +198,7 @@ public class ColladaAnimUtils { if (meshNode != null) { // Look for skeleton entries in the original <instance_controller> element final List<Element> skeletonRoots = Lists.newArrayList(); - for (final Element sk : (List<Element>) instanceController.getChildren("skeleton")) { + for (final Element sk : instanceController.getChildren("skeleton")) { final Element skroot = _colladaDOMUtil.findTargetWithId(sk.getText()); if (skroot != null) { // add as a possible root for when we need to locate a joint by name later. @@ -220,7 +220,7 @@ public class ColladaAnimUtils { final List<Transform> bindMatrices = Lists.newArrayList(); final List<ColladaInputPipe.ParamType> paramTypes = Lists.newArrayList(); - for (final Element inputEL : (List<Element>) jointsEL.getChildren("input")) { + for (final Element inputEL : jointsEL.getChildren("input")) { final ColladaInputPipe pipe = new ColladaInputPipe(_colladaDOMUtil, inputEL); final ColladaInputPipe.SourceData sd = pipe.getSourceData(); if (pipe.getType() == ColladaInputPipe.Type.JOINT) { @@ -330,7 +330,7 @@ public class ColladaAnimUtils { int indOff = 0, weightOff = 0; int maxOffset = 0; - for (final Element inputEL : (List<Element>) weightsEL.getChildren("input")) { + for (final Element inputEL : weightsEL.getChildren("input")) { final ColladaInputPipe pipe = new ColladaInputPipe(_colladaDOMUtil, inputEL); final ColladaInputPipe.SourceData sd = pipe.getSourceData(); if (pipe.getOffset() > maxOffset) { @@ -650,7 +650,7 @@ public class ColladaAnimUtils { private void buildAnimations(final Element parentElement, final Collection<TargetChannel> targetList) { final List<Element> elementTransforms = new ArrayList<Element>(); - for (final Element child : (List<Element>) parentElement.getChildren()) { + for (final Element child : parentElement.getChildren()) { if (_dataCache.getTransformTypes().contains(child.getName())) { elementTransforms.add(child); } @@ -675,7 +675,7 @@ public class ColladaAnimUtils { final EnumMap<Type, ColladaInputPipe> pipes = Maps.newEnumMap(Type.class); final Element samplerElement = _colladaDOMUtil.findTargetWithId(source); - for (final Element inputElement : (List<Element>) samplerElement.getChildren("input")) { + for (final Element inputElement : samplerElement.getChildren("input")) { final ColladaInputPipe pipe = new ColladaInputPipe(_colladaDOMUtil, inputElement); pipes.put(pipe.getType(), pipe); } @@ -849,7 +849,7 @@ public class ColladaAnimUtils { final AnimationItem animationItem = new AnimationItem(name); animationItemRoot.getChildren().add(animationItem); - for (final Element animationElement : (List<Element>) animationRoot.getChildren("animation")) { + for (final Element animationElement : animationRoot.getChildren("animation")) { parseAnimations(channelMap, animationElement, animationItem); } } diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaDOMUtil.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaDOMUtil.java index 73287c6..956af66 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaDOMUtil.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaDOMUtil.java @@ -18,15 +18,15 @@ import java.util.StringTokenizer; import java.util.logging.Level; import java.util.logging.Logger; -import org.jdom.Attribute; -import org.jdom.CDATA; -import org.jdom.Comment; -import org.jdom.DataConversionException; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.ProcessingInstruction; -import org.jdom.Text; -import org.jdom.xpath.XPath; +import org.jdom2.Attribute; +import org.jdom2.CDATA; +import org.jdom2.Comment; +import org.jdom2.DataConversionException; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.ProcessingInstruction; +import org.jdom2.Text; +import org.jdom2.xpath.XPath; import com.ardor3d.extension.model.collada.jdom.data.DataCache; import com.ardor3d.math.ColorRGBA; @@ -361,7 +361,7 @@ public class ColladaDOMUtil { */ @SuppressWarnings("unchecked") public Element getPositionSource(final Element v) { - for (final Element input : (List<Element>) v.getChildren("input")) { + for (final Element input : v.getChildren("input")) { if ("POSITION".equals(input.getAttributeValue("semantic"))) { final Element n = findTargetWithId(input.getAttributeValue("source")); if (n != null && "source".equals(n.getName())) { diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaException.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaException.java index b4d4927..edadb0b 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaException.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaException.java @@ -1,31 +1,31 @@ -/**
- * Copyright (c) 2008-2012 Ardor Labs, Inc.
- *
- * This file is part of Ardor3D.
- *
- * Ardor3D is free software: you can redistribute it and/or modify it
- * under the terms of its license which may be found in the accompanying
- * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
- */
-
-package com.ardor3d.extension.model.collada.jdom;
-
-/**
- * Customer exception thrown when something unexpected is encountered in a Collada file.
- */
-public class ColladaException extends RuntimeException {
-
- private static final long serialVersionUID = 1L;
-
- public ColladaException(final String message, final Object source) {
- super(ColladaException.createMessage(message, source));
- }
-
- public ColladaException(final String msg, final Object source, final Throwable cause) {
- super(ColladaException.createMessage(msg, source), cause);
- }
-
- private static String createMessage(final String message, final Object source) {
- return "Collada problem for source: " + (source != null ? source.toString() : "null") + ": " + message;
- }
-}
+/** + * Copyright (c) 2008-2012 Ardor Labs, Inc. + * + * This file is part of Ardor3D. + * + * Ardor3D is free software: you can redistribute it and/or modify it + * under the terms of its license which may be found in the accompanying + * LICENSE file or at <http://www.ardor3d.com/LICENSE>. + */ + +package com.ardor3d.extension.model.collada.jdom; + +/** + * Customer exception thrown when something unexpected is encountered in a Collada file. + */ +public class ColladaException extends RuntimeException { + + private static final long serialVersionUID = 1L; + + public ColladaException(final String message, final Object source) { + super(ColladaException.createMessage(message, source)); + } + + public ColladaException(final String msg, final Object source, final Throwable cause) { + super(ColladaException.createMessage(msg, source), cause); + } + + private static String createMessage(final String message, final Object source) { + return "Collada problem for source: " + (source != null ? source.toString() : "null") + ": " + message; + } +} diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java index 0298984..c813e5d 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java @@ -22,15 +22,17 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.logging.Logger; -import org.jdom.Attribute; -import org.jdom.DataConversionException; -import org.jdom.DefaultJDOMFactory; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.Namespace; -import org.jdom.Text; -import org.jdom.input.SAXBuilder; -import org.jdom.input.SAXHandler; +import org.jdom2.Attribute; +import org.jdom2.DataConversionException; +import org.jdom2.DefaultJDOMFactory; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMFactory; +import org.jdom2.Namespace; +import org.jdom2.Text; +import org.jdom2.input.SAXBuilder; +import org.jdom2.input.sax.SAXHandler; +import org.jdom2.input.sax.SAXHandlerFactory; import org.xml.sax.SAXException; import com.ardor3d.extension.animation.skeletal.Joint; @@ -289,18 +291,18 @@ public class ColladaImporter { */ private Element readCollada(final ResourceSource resource, final DataCache dataCache) { try { - final SAXBuilder builder = new SAXBuilder() { + final JDOMFactory jdomFac = new ArdorFactory(dataCache); + final SAXBuilder builder = new SAXBuilder(null, new SAXHandlerFactory() { @Override - protected SAXHandler createContentHandler() { - return new SAXHandler(new ArdorFactory(dataCache)) { + public SAXHandler createSAXHandler(final JDOMFactory factory) { + return new SAXHandler(jdomFac) { @Override public void startPrefixMapping(final String prefix, final String uri) throws SAXException { // Just kill what's usually done here... } - }; } - }; + }, jdomFac); final Document doc = builder.build(resource.openStream()); final Element collada = doc.getRootElement(); @@ -335,7 +337,7 @@ public class ColladaImporter { } @Override - public Text text(final String text) { + public Text text(final int line, final int col, final String text) { try { switch (bufferType) { case Float: { @@ -435,29 +437,29 @@ public class ColladaImporter { } @Override - public Element element(final String name, final Namespace namespace) { - currentElement = super.element(name); + public Element element(final int line, final int col, final String name, final Namespace namespace) { + currentElement = super.element(line, col, name); handleTypes(name); return currentElement; } @Override - public Element element(final String name, final String prefix, final String uri) { - currentElement = super.element(name); + public Element element(final int line, final int col, final String name, final String prefix, final String uri) { + currentElement = super.element(line, col, name); handleTypes(name); return currentElement; } @Override - public Element element(final String name, final String uri) { - currentElement = super.element(name); + public Element element(final int line, final int col, final String name, final String uri) { + currentElement = super.element(line, col, name); handleTypes(name); return currentElement; } @Override - public Element element(final String name) { - currentElement = super.element(name); + public Element element(final int line, final int col, final String name) { + currentElement = super.element(line, col, name); handleTypes(name); return currentElement; } diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaInputPipe.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaInputPipe.java index 75704ec..d883756 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaInputPipe.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaInputPipe.java @@ -16,7 +16,7 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -import org.jdom.Element; +import org.jdom2.Element; import com.ardor3d.extension.model.collada.jdom.data.DataCache; import com.ardor3d.scenegraph.FloatBufferData; diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaMaterialUtils.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaMaterialUtils.java index 34626bb..e4572ff 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaMaterialUtils.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaMaterialUtils.java @@ -14,7 +14,7 @@ import java.util.HashMap; import java.util.List; import java.util.logging.Logger; -import org.jdom.Element; +import org.jdom2.Element; import com.ardor3d.extension.model.collada.jdom.data.DataCache; import com.ardor3d.extension.model.collada.jdom.data.MaterialInfo; @@ -154,7 +154,7 @@ public class ColladaMaterialUtils { /* Diffuse property */ property = blinnPhongLambert.getChild("diffuse"); if (property != null) { - final Element propertyValue = (Element) property.getChildren().get(0); + final Element propertyValue = property.getChildren().get(0); if ("color".equals(propertyValue.getName())) { final ColorRGBA color = _colladaDOMUtil.getColor(propertyValue.getText()); mState.setDiffuse(MaterialFace.FrontAndBack, color); @@ -166,7 +166,7 @@ public class ColladaMaterialUtils { /* Ambient property */ property = blinnPhongLambert.getChild("ambient"); if (property != null) { - final Element propertyValue = (Element) property.getChildren().get(0); + final Element propertyValue = property.getChildren().get(0); if ("color".equals(propertyValue.getName())) { final ColorRGBA color = _colladaDOMUtil.getColor(propertyValue.getText()); mState.setAmbient(MaterialFace.FrontAndBack, color); @@ -177,7 +177,7 @@ public class ColladaMaterialUtils { /* Transparent property */ property = blinnPhongLambert.getChild("transparent"); if (property != null) { - final Element propertyValue = (Element) property.getChildren().get(0); + final Element propertyValue = property.getChildren().get(0); if ("color".equals(propertyValue.getName())) { transparent = _colladaDOMUtil.getColor(propertyValue.getText()); // TODO: use this @@ -190,7 +190,7 @@ public class ColladaMaterialUtils { /* Transparency property */ property = blinnPhongLambert.getChild("transparency"); if (property != null) { - final Element propertyValue = (Element) property.getChildren().get(0); + final Element propertyValue = property.getChildren().get(0); if ("float".equals(propertyValue.getName())) { transparency = Float.parseFloat(propertyValue.getText().replace(",", ".")); // TODO: use this @@ -205,7 +205,7 @@ public class ColladaMaterialUtils { /* Emission property */ property = blinnPhongLambert.getChild("emission"); if (property != null) { - final Element propertyValue = (Element) property.getChildren().get(0); + final Element propertyValue = property.getChildren().get(0); if ("color".equals(propertyValue.getName())) { mState.setEmissive(MaterialFace.FrontAndBack, _colladaDOMUtil.getColor(propertyValue.getText())); } else if ("texture".equals(propertyValue.getName()) && _loadTextures) { @@ -215,7 +215,7 @@ public class ColladaMaterialUtils { /* Specular property */ property = blinnPhongLambert.getChild("specular"); if (property != null) { - final Element propertyValue = (Element) property.getChildren().get(0); + final Element propertyValue = property.getChildren().get(0); if ("color".equals(propertyValue.getName())) { mState.setSpecular(MaterialFace.FrontAndBack, _colladaDOMUtil.getColor(propertyValue.getText())); } else if ("texture".equals(propertyValue.getName()) && _loadTextures) { @@ -225,7 +225,7 @@ public class ColladaMaterialUtils { /* Shininess property */ property = blinnPhongLambert.getChild("shininess"); if (property != null) { - final Element propertyValue = (Element) property.getChildren().get(0); + final Element propertyValue = property.getChildren().get(0); if ("float".equals(propertyValue.getName())) { float shininess = Float.parseFloat(propertyValue.getText().replace(",", ".")); if (shininess >= 0.0f && shininess <= 1.0f) { @@ -248,7 +248,7 @@ public class ColladaMaterialUtils { float reflectivity = 1.0f; property = blinnPhongLambert.getChild("reflectivity"); if (property != null) { - final Element propertyValue = (Element) property.getChildren().get(0); + final Element propertyValue = property.getChildren().get(0); if ("float".equals(propertyValue.getName())) { reflectivity = Float.parseFloat(propertyValue.getText().replace(",", ".")); } @@ -256,7 +256,7 @@ public class ColladaMaterialUtils { /* Reflective property. Texture only */ property = blinnPhongLambert.getChild("reflective"); if (property != null) { - final Element propertyValue = (Element) property.getChildren().get(0); + final Element propertyValue = property.getChildren().get(0); if ("texture".equals(propertyValue.getName()) && _loadTextures) { final Texture reflectiveTexture = populateTextureState(mesh, propertyValue, effect, loadedTextures, mInfo, "reflective"); @@ -414,7 +414,7 @@ public class ColladaMaterialUtils { } if ("newparam".equals(node.getName())) { - node = (Element) node.getChildren().get(0); + node = node.getChildren().get(0); } Element sampler = null; @@ -434,7 +434,7 @@ public class ColladaMaterialUtils { } if ("newparam".equals(node.getName())) { - node = (Element) node.getChildren().get(0); + node = node.getChildren().get(0); } if ("surface".equals(node.getName())) { @@ -457,7 +457,7 @@ public class ColladaMaterialUtils { // look for an init_from with lowest mip and use that. (usually 0) // TODO: mip? - final Element lowest = (Element) surface.getChildren("init_from").get(0); + final Element lowest = surface.getChildren("init_from").get(0); // Element lowest = null; // for (final Element i : (List<Element>) surface.getChildren("init_from")) { // if (lowest == null || lowest.getMip() > i.getMip()) { @@ -541,8 +541,7 @@ public class ColladaMaterialUtils { return; } - for (final Element instance : (List<Element>) bindMaterial.getChild("technique_common").getChildren( - "instance_material")) { + for (final Element instance : bindMaterial.getChild("technique_common").getChildren("instance_material")) { final Element matNode = _colladaDOMUtil.findTargetWithId(instance.getAttributeValue("target")); if (matNode != null && "material".equals(matNode.getName())) { _dataCache.bindMaterial(instance.getAttributeValue("symbol"), matNode); @@ -559,8 +558,7 @@ public class ColladaMaterialUtils { if (bindMaterial == null || bindMaterial.getChildren().isEmpty()) { return; } - for (final Element instance : (List<Element>) bindMaterial.getChild("technique_common").getChildren( - "instance_material")) { + for (final Element instance : bindMaterial.getChild("technique_common").getChildren("instance_material")) { _dataCache.unbindMaterial(instance.getAttributeValue("symbol")); } } diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaMeshUtils.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaMeshUtils.java index bbff59e..c04e854 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaMeshUtils.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaMeshUtils.java @@ -13,10 +13,9 @@ package com.ardor3d.extension.model.collada.jdom; import java.nio.FloatBuffer; import java.util.EnumSet; import java.util.LinkedList; -import java.util.List; import java.util.logging.Logger; -import org.jdom.Element; +import org.jdom2.Element; import com.ardor3d.extension.model.collada.jdom.ColladaInputPipe.Type; import com.ardor3d.extension.model.collada.jdom.data.DataCache; @@ -88,7 +87,7 @@ public class ColladaMeshUtils { // Create each as an Ardor3D Mesh, and attach to node boolean hasChild = false; if (cMesh.getChild("polygons") != null) { - for (final Element p : (List<Element>) cMesh.getChildren("polygons")) { + for (final Element p : cMesh.getChildren("polygons")) { final Mesh child = buildMeshPolygons(colladaGeometry, p); if (child != null) { if (child.getName() == null) { @@ -100,7 +99,7 @@ public class ColladaMeshUtils { } } if (cMesh.getChild("polylist") != null) { - for (final Element p : (List<Element>) cMesh.getChildren("polylist")) { + for (final Element p : cMesh.getChildren("polylist")) { final Mesh child = buildMeshPolylist(colladaGeometry, p); if (child != null) { if (child.getName() == null) { @@ -112,7 +111,7 @@ public class ColladaMeshUtils { } } if (cMesh.getChild("triangles") != null) { - for (final Element t : (List<Element>) cMesh.getChildren("triangles")) { + for (final Element t : cMesh.getChildren("triangles")) { final Mesh child = buildMeshTriangles(colladaGeometry, t); if (child != null) { if (child.getName() == null) { @@ -124,7 +123,7 @@ public class ColladaMeshUtils { } } if (cMesh.getChild("lines") != null) { - for (final Element l : (List<Element>) cMesh.getChildren("lines")) { + for (final Element l : cMesh.getChildren("lines")) { final Line child = buildMeshLines(colladaGeometry, l); if (child != null) { if (child.getName() == null) { @@ -243,7 +242,7 @@ public class ColladaMeshUtils { // use interval & sum of sizes of p entries to determine buffer sizes. int numEntries = 0; int numIndices = 0; - for (final Element vals : (List<Element>) polys.getChildren("p")) { + for (final Element vals : polys.getChildren("p")) { final int length = _colladaDOMUtil.parseIntArray(vals).length; numEntries += length; numIndices += (length / interval - 2) * 3; @@ -268,7 +267,7 @@ public class ColladaMeshUtils { // go through the polygon entries int firstIndex = 0, vecIndex; final int[] currentVal = new int[interval]; - for (final Element dia : (List<Element>) polys.getChildren("p")) { + for (final Element dia : polys.getChildren("p")) { // for each p, iterate using max offset final int[] vals = _colladaDOMUtil.parseIntArray(dia); @@ -528,13 +527,13 @@ public class ColladaMeshUtils { private int extractPipes(final Element inputsParent, final LinkedList<ColladaInputPipe> pipesStore) { int maxOffset = 0; int texCount = 0; - for (final Element input : (List<Element>) inputsParent.getChildren("input")) { + for (final Element input : inputsParent.getChildren("input")) { maxOffset = Math.max(maxOffset, _colladaDOMUtil.getAttributeIntValue(input, "offset", 0)); try { final Type type = Type.valueOf(input.getAttributeValue("semantic")); if (type == Type.VERTEX) { final Element vertexElement = _colladaDOMUtil.findTargetWithId(input.getAttributeValue("source")); - for (final Element vertexInput : (List<Element>) vertexElement.getChildren("input")) { + for (final Element vertexInput : vertexElement.getChildren("input")) { vertexInput.setAttribute("offset", input.getAttributeValue("offset")); vertexInput.setAttribute("isVertexDefined", "true"); final ColladaInputPipe pipe = new ColladaInputPipe(_colladaDOMUtil, vertexInput); diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java index eb5ae6f..165ad89 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -import org.jdom.Element; +import org.jdom2.Element; import com.ardor3d.extension.animation.skeletal.AttachmentPoint; import com.ardor3d.extension.animation.skeletal.Joint; @@ -87,7 +87,7 @@ public class ColladaNodeUtils { // Load each sub node and attach final JointNode baseJointNode = new JointNode(null); _dataCache.setRootJointNode(baseJointNode); - for (final Element n : (List<Element>) visualScene.getChildren("node")) { + for (final Element n : visualScene.getChildren("node")) { final Node subNode = buildNode(n, baseJointNode); if (subNode != null) { sceneRoot.attachChild(subNode); @@ -163,7 +163,7 @@ public class ColladaNodeUtils { public AssetData parseAsset(final Element asset) { final AssetData assetData = new AssetData(); - for (final Element child : (List<Element>) asset.getChildren()) { + for (final Element child : asset.getChildren()) { if ("contributor".equals(child.getName())) { parseContributor(assetData, child); } else if ("created".equals(child.getName())) { @@ -204,7 +204,7 @@ public class ColladaNodeUtils { @SuppressWarnings("unchecked") private void parseContributor(final AssetData assetData, final Element contributor) { - for (final Element child : (List<Element>) contributor.getChildren()) { + for (final Element child : contributor.getChildren()) { if ("author".equals(child.getName())) { assetData.setAuthor(child.getText()); } else if ("authoringTool".equals(child.getName())) { @@ -270,7 +270,7 @@ public class ColladaNodeUtils { final Node node = new Node(nodeName); final List<Element> transforms = new ArrayList<Element>(); - for (final Element child : (List<Element>) dNode.getChildren()) { + for (final Element child : dNode.getChildren()) { if (_dataCache.getTransformTypes().contains(child.getName())) { transforms.add(child); } @@ -287,7 +287,7 @@ public class ColladaNodeUtils { } // process any instance geometries - for (final Element instance_geometry : (List<Element>) dNode.getChildren("instance_geometry")) { + for (final Element instance_geometry : dNode.getChildren("instance_geometry")) { _colladaMaterialUtils.bindMaterials(instance_geometry.getChild("bind_material")); final Spatial mesh = _colladaMeshUtils.getGeometryMesh(instance_geometry); @@ -299,12 +299,12 @@ public class ColladaNodeUtils { } // process any instance controllers - for (final Element instanceController : (List<Element>) dNode.getChildren("instance_controller")) { + for (final Element instanceController : dNode.getChildren("instance_controller")) { _dataCache.getControllers().add(new ControllerStore(node, instanceController)); } // process any instance nodes - for (final Element in : (List<Element>) dNode.getChildren("instance_node")) { + for (final Element in : dNode.getChildren("instance_node")) { final Node subNode = getNode(in, jointNode); if (subNode != null) { node.attachChild(subNode); @@ -317,7 +317,7 @@ public class ColladaNodeUtils { } // process any concrete child nodes. - for (final Element n : (List<Element>) dNode.getChildren("node")) { + for (final Element n : dNode.getChildren("node")) { final Node subNode = buildNode(n, jointNode); if (subNode != null) { node.attachChild(subNode); diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/AnimationItem.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/AnimationItem.java index 43c732b..400384c 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/AnimationItem.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/AnimationItem.java @@ -1,94 +1,94 @@ -/**
- * Copyright (c) 2008-2012 Ardor Labs, Inc.
- *
- * This file is part of Ardor3D.
- *
- * Ardor3D is free software: you can redistribute it and/or modify it
- * under the terms of its license which may be found in the accompanying
- * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
- */
-
-package com.ardor3d.extension.model.collada.jdom.data;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.ardor3d.annotation.SavableFactory;
-import com.ardor3d.extension.animation.skeletal.clip.AnimationClip;
-import com.ardor3d.util.export.InputCapsule;
-import com.ardor3d.util.export.OutputCapsule;
-import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Lists;
-
-@SavableFactory(factoryMethod = "initSavable")
-public class AnimationItem implements Savable {
- private final String _name;
- private final List<AnimationItem> _children = Lists.newArrayList();
- private AnimationClip _animationClip;
-
- public AnimationItem(final String name) {
- _name = name;
- }
-
- public AnimationClip getAnimationClip() {
- return _animationClip;
- }
-
- public void setAnimationClip(final AnimationClip animationClip) {
- _animationClip = animationClip;
- }
-
- public String getName() {
- return _name;
- }
-
- public List<AnimationItem> getChildren() {
- return _children;
- }
-
- @Override
- public String toString() {
- return "AnimationItem [name=" + _name + (_animationClip != null ? ", " + _animationClip.toString() : "") + "]";
- }
-
- // /////////////////
- // Methods for Savable
- // /////////////////
-
- @Override
- public Class<? extends AnimationItem> getClassTag() {
- return this.getClass();
- }
-
- @Override
- public void read(final InputCapsule capsule) throws IOException {
- final String name = capsule.readString("name", "");
- try {
- final Field field1 = AnimationClip.class.getDeclaredField("_name");
- field1.setAccessible(true);
- field1.set(this, name);
- } catch (final Exception e) {
- e.printStackTrace();
- }
- _children.clear();
- _children.addAll(capsule.readSavableList("children", new ArrayList<AnimationItem>()));
- _animationClip = (AnimationClip) capsule.readSavable("animationClip", null);
- }
-
- @Override
- public void write(final OutputCapsule capsule) throws IOException {
- capsule.write(_name, "name", null);
- capsule.writeSavableList(_children, "children", null);
- capsule.write(_animationClip, "animationClip", null);
- }
-
- public static AnimationItem initSavable() {
- return new AnimationItem();
- }
-
- private AnimationItem() {
- this(null);
- }
-}
+/** + * Copyright (c) 2008-2012 Ardor Labs, Inc. + * + * This file is part of Ardor3D. + * + * Ardor3D is free software: you can redistribute it and/or modify it + * under the terms of its license which may be found in the accompanying + * LICENSE file or at <http://www.ardor3d.com/LICENSE>. + */ + +package com.ardor3d.extension.model.collada.jdom.data; + +import java.io.IOException; +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; + +import com.ardor3d.annotation.SavableFactory; +import com.ardor3d.extension.animation.skeletal.clip.AnimationClip; +import com.ardor3d.util.export.InputCapsule; +import com.ardor3d.util.export.OutputCapsule; +import com.ardor3d.util.export.Savable; +import com.google.common.collect.Lists; + +@SavableFactory(factoryMethod = "initSavable") +public class AnimationItem implements Savable { + private final String _name; + private final List<AnimationItem> _children = Lists.newArrayList(); + private AnimationClip _animationClip; + + public AnimationItem(final String name) { + _name = name; + } + + public AnimationClip getAnimationClip() { + return _animationClip; + } + + public void setAnimationClip(final AnimationClip animationClip) { + _animationClip = animationClip; + } + + public String getName() { + return _name; + } + + public List<AnimationItem> getChildren() { + return _children; + } + + @Override + public String toString() { + return "AnimationItem [name=" + _name + (_animationClip != null ? ", " + _animationClip.toString() : "") + "]"; + } + + // ///////////////// + // Methods for Savable + // ///////////////// + + @Override + public Class<? extends AnimationItem> getClassTag() { + return this.getClass(); + } + + @Override + public void read(final InputCapsule capsule) throws IOException { + final String name = capsule.readString("name", ""); + try { + final Field field1 = AnimationClip.class.getDeclaredField("_name"); + field1.setAccessible(true); + field1.set(this, name); + } catch (final Exception e) { + e.printStackTrace(); + } + _children.clear(); + _children.addAll(capsule.readSavableList("children", new ArrayList<AnimationItem>())); + _animationClip = (AnimationClip) capsule.readSavable("animationClip", null); + } + + @Override + public void write(final OutputCapsule capsule) throws IOException { + capsule.write(_name, "name", null); + capsule.writeSavableList(_children, "children", null); + capsule.write(_animationClip, "animationClip", null); + } + + public static AnimationItem initSavable() { + return new AnimationItem(); + } + + private AnimationItem() { + this(null); + } +} diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/ControllerStore.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/ControllerStore.java index 9da548b..b827add 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/ControllerStore.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/data/ControllerStore.java @@ -1,7 +1,7 @@ package com.ardor3d.extension.model.collada.jdom.data; -import org.jdom.Element; +import org.jdom2.Element; import com.ardor3d.scenegraph.Node; diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/plugin/ColladaExtraPlugin.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/plugin/ColladaExtraPlugin.java index f9b4bd3..d766f38 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/plugin/ColladaExtraPlugin.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/plugin/ColladaExtraPlugin.java @@ -1,19 +1,19 @@ -/**
- * Copyright (c) 2008-2012 Ardor Labs, Inc.
- *
- * This file is part of Ardor3D.
- *
- * Ardor3D is free software: you can redistribute it and/or modify it
- * under the terms of its license which may be found in the accompanying
- * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
- */
-
-package com.ardor3d.extension.model.collada.jdom.plugin;
-
-import org.jdom.Element;
-
-public interface ColladaExtraPlugin {
-
- boolean processExtra(Element extra, Object[] params);
-
-}
+/** + * Copyright (c) 2008-2012 Ardor Labs, Inc. + * + * This file is part of Ardor3D. + * + * Ardor3D is free software: you can redistribute it and/or modify it + * under the terms of its license which may be found in the accompanying + * LICENSE file or at <http://www.ardor3d.com/LICENSE>. + */ + +package com.ardor3d.extension.model.collada.jdom.plugin; + +import org.jdom2.Element; + +public interface ColladaExtraPlugin { + + boolean processExtra(Element extra, Object[] params); + +} diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/plugin/GoogleEarthPlugin.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/plugin/GoogleEarthPlugin.java index 8481428..73621ff 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/plugin/GoogleEarthPlugin.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/plugin/GoogleEarthPlugin.java @@ -1,46 +1,44 @@ -/**
- * Copyright (c) 2008-2012 Ardor Labs, Inc.
- *
- * This file is part of Ardor3D.
- *
- * Ardor3D is free software: you can redistribute it and/or modify it
- * under the terms of its license which may be found in the accompanying
- * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
- */
-
-package com.ardor3d.extension.model.collada.jdom.plugin;
-
-import java.util.List;
-
-import org.jdom.Attribute;
-import org.jdom.Element;
-
-import com.ardor3d.renderer.state.CullState;
-import com.ardor3d.scenegraph.Mesh;
-
-public class GoogleEarthPlugin implements ColladaExtraPlugin {
- @SuppressWarnings("unchecked")
- @Override
- public boolean processExtra(final Element extra, final Object[] params) {
- if (params.length > 0 && params[0] instanceof Mesh) {
- final Mesh mesh = (Mesh) params[0];
- // should have a child: <technique profile="GOOGLEEARTH">
- final Element technique = extra.getChild("technique");
- if (technique != null) {
- final Attribute profile = technique.getAttribute("profile");
- if (profile != null && "GOOGLEEARTH".equalsIgnoreCase(profile.getValue())) {
- for (final Element child : (List<Element>) technique.getChildren()) {
- // disable back face culling if it's been enabled.
- if ("double_sided".equalsIgnoreCase(child.getName()) && "1".equals(child.getTextTrim())) {
- final CullState cs = new CullState();
- cs.setEnabled(false);
- mesh.setRenderState(cs);
- }
- }
- return true;
- }
- }
- }
- return false;
- }
-}
+/** + * Copyright (c) 2008-2012 Ardor Labs, Inc. + * + * This file is part of Ardor3D. + * + * Ardor3D is free software: you can redistribute it and/or modify it + * under the terms of its license which may be found in the accompanying + * LICENSE file or at <http://www.ardor3d.com/LICENSE>. + */ + +package com.ardor3d.extension.model.collada.jdom.plugin; + +import org.jdom2.Attribute; +import org.jdom2.Element; + +import com.ardor3d.renderer.state.CullState; +import com.ardor3d.scenegraph.Mesh; + +public class GoogleEarthPlugin implements ColladaExtraPlugin { + + @Override + public boolean processExtra(final Element extra, final Object[] params) { + if (params.length > 0 && params[0] instanceof Mesh) { + final Mesh mesh = (Mesh) params[0]; + // should have a child: <technique profile="GOOGLEEARTH"> + final Element technique = extra.getChild("technique"); + if (technique != null) { + final Attribute profile = technique.getAttribute("profile"); + if (profile != null && "GOOGLEEARTH".equalsIgnoreCase(profile.getValue())) { + for (final Element child : technique.getChildren()) { + // disable back face culling if it's been enabled. + if ("double_sided".equalsIgnoreCase(child.getName()) && "1".equals(child.getTextTrim())) { + final CullState cs = new CullState(); + cs.setEnabled(false); + mesh.setRenderState(cs); + } + } + return true; + } + } + } + return false; + } +} |