[DEV] initial add with many stupid things

This commit is contained in:
Edouard DUPIN 2020-11-30 11:58:25 +01:00
parent 7c3137ce88
commit 839a2f9c4f
609 changed files with 2511825 additions and 0 deletions

7
.checkstyle Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<fileset name="all" enabled="true" check-config-name="ewol" local="false">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>

41
.classpath Normal file
View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/*.java__|**/__*.java" kind="src" path="src">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="res"/>
<classpathentry including="**/*.java" kind="src" output="out/eclipse/classes-test" path="test/src">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-14">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/atriasoft-gale">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/atriasoft-etk">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/scenarium-logger">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="out/eclipse/classes"/>
</classpath>

17
.gitignore vendored Normal file
View File

@ -0,0 +1,17 @@
/bin/
/Operator/
/DrawerProperties/
*.pdfd
*.dbc
SchedulerConfig.txt
scenicView.properties
ScenariumConfig.txt
*.class
*~
*.bck
build.number
/extern/
/out/
/.settings/
/junit/
/target/

18
.project Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>atriasoft-ege</name>
<comment></comment>
<projects>
<project>atriasoft-ege</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

66
CheckStyle.xml Executable file
View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Check Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: Marc Checks
Description:
Checkstyle configuration that checks the sun coding conventions.
-->
<module name="Checker">
<property name="severity" value="error"/>
<property name="fileExtensions" value="java, properties, xml"/>
<module name="TreeWalker">
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="AvoidStarImport"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="false"/>
</module>
<module name="ModifierOrder"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="IllegalInstantiation"/>
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="ArrayTypeStyle"/>
<module name="TodoComment"/>
<module name="UpperEll"/>
<module name="AnnotationUseStyle"/>
<module name="MissingDeprecated"/>
<module name="MissingOverride"/>
<module name="PackageAnnotation"/>
<module name="SuppressWarnings"/>
<module name="AnnotationLocation"/>
<module name="ClassTypeParameterName"/>
<module name="MethodTypeParameterName"/>
<module name="InterfaceTypeParameterName"/>
<module name="CatchParameterName"/>
<module name="LambdaParameterName"/>
<module name="Regexp"/>
<module name="RegexpSinglelineJava"/>
</module>
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<module name="Translation"/>
<module name="Header"/>
<module name="RegexpHeader"/>
<module name="RegexpMultiline"/>
<module name="RegexpOnFilename"/>
<module name="RegexpSingleline"/>
</module>

66
CleanUp.xml Normal file
View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE xml>
<profiles version="2">
<profile kind="CleanUpProfile" name="Scenarium" version="2">
<setting id="cleanup.use_autoboxing" value="false"/>
<setting id="cleanup.qualify_static_method_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.always_use_this_for_non_static_method_access" value="false"/>
<setting id="cleanup.organize_imports" value="true"/>
<setting id="cleanup.remove_trailing_whitespaces_ignore_empty" value="false"/>
<setting id="cleanup.format_source_code_changes_only" value="false"/>
<setting id="cleanup.qualify_static_field_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.add_generated_serial_version_id" value="false"/>
<setting id="cleanup.remove_redundant_semicolons" value="false"/>
<setting id="cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class" value="true"/>
<setting id="cleanup.remove_redundant_type_arguments" value="true"/>
<setting id="cleanup.remove_unused_imports" value="true"/>
<setting id="cleanup.insert_inferred_type_arguments" value="false"/>
<setting id="cleanup.make_private_fields_final" value="true"/>
<setting id="cleanup.use_lambda" value="true"/>
<setting id="cleanup.always_use_blocks" value="false"/>
<setting id="cleanup.use_this_for_non_static_field_access_only_if_necessary" value="false"/>
<setting id="cleanup.sort_members_all" value="false"/>
<setting id="cleanup.remove_trailing_whitespaces_all" value="true"/>
<setting id="cleanup.add_missing_annotations" value="true"/>
<setting id="cleanup.always_use_this_for_non_static_field_access" value="true"/>
<setting id="cleanup.make_parameters_final" value="false"/>
<setting id="cleanup.sort_members" value="false"/>
<setting id="cleanup.remove_private_constructors" value="true"/>
<setting id="cleanup.always_use_parentheses_in_expressions" value="false"/>
<setting id="cleanup.remove_unused_local_variables" value="false"/>
<setting id="cleanup.convert_to_enhanced_for_loop" value="false"/>
<setting id="cleanup.remove_unused_private_fields" value="true"/>
<setting id="cleanup.remove_redundant_modifiers" value="false"/>
<setting id="cleanup.never_use_blocks" value="true"/>
<setting id="cleanup.add_missing_deprecated_annotations" value="true"/>
<setting id="cleanup.use_this_for_non_static_field_access" value="true"/>
<setting id="cleanup.remove_unnecessary_nls_tags" value="true"/>
<setting id="cleanup.qualify_static_member_accesses_through_instances_with_declaring_class" value="true"/>
<setting id="cleanup.add_missing_nls_tags" value="false"/>
<setting id="cleanup.remove_unnecessary_casts" value="true"/>
<setting id="cleanup.use_unboxing" value="false"/>
<setting id="cleanup.use_blocks_only_for_return_and_throw" value="false"/>
<setting id="cleanup.format_source_code" value="true"/>
<setting id="cleanup.convert_functional_interfaces" value="true"/>
<setting id="cleanup.add_default_serial_version_id" value="true"/>
<setting id="cleanup.remove_unused_private_methods" value="true"/>
<setting id="cleanup.remove_trailing_whitespaces" value="true"/>
<setting id="cleanup.make_type_abstract_if_missing_method" value="false"/>
<setting id="cleanup.add_serial_version_id" value="true"/>
<setting id="cleanup.use_this_for_non_static_method_access" value="false"/>
<setting id="cleanup.use_this_for_non_static_method_access_only_if_necessary" value="true"/>
<setting id="cleanup.use_anonymous_class_creation" value="false"/>
<setting id="cleanup.add_missing_override_annotations_interface_methods" value="true"/>
<setting id="cleanup.remove_unused_private_members" value="false"/>
<setting id="cleanup.make_local_variable_final" value="false"/>
<setting id="cleanup.add_missing_methods" value="false"/>
<setting id="cleanup.never_use_parentheses_in_expressions" value="true"/>
<setting id="cleanup.qualify_static_member_accesses_with_declaring_class" value="true"/>
<setting id="cleanup.use_parentheses_in_expressions" value="true"/>
<setting id="cleanup.add_missing_override_annotations" value="true"/>
<setting id="cleanup.use_blocks" value="true"/>
<setting id="cleanup.make_variable_declarations_final" value="true"/>
<setting id="cleanup.correct_indentation" value="true"/>
<setting id="cleanup.remove_unused_private_types" value="true"/>
</profile>
</profiles>

366
Formatter.xml Normal file
View File

@ -0,0 +1,366 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE xml>
<profiles version="18">
<profile kind="CodeFormatterProfile" name="Scenarium" version="18">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insertNew_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insertNew_line_before_root_tags" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="200"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_onNew_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_catch_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insertNew_line_between_different_tags" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_type_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_else_in_if_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_beforeNew_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_while_in_do_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insertNew_line_before_finally_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="200"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
</profiles>

373
LICENSE Normal file
View File

@ -0,0 +1,373 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

BIN
res/DragonBlender.blend Normal file

Binary file not shown.

1602527
res/Tree1.obj Normal file

File diff suppressed because it is too large Load Diff

BIN
res/blendMap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 KiB

506
res/box.obj Normal file
View File

@ -0,0 +1,506 @@
# Blender v2.67 (sub 0) OBJ File: ''
# www.blender.org
o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 1.000000 1.000000 -0.999999
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v 0.999999 1.000000 1.000001
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 0.817221 0.889117 1.099401
v 0.817221 0.889117 -1.099401
v 1.048229 0.889117 -1.099401
v 1.048229 0.889117 1.099401
v 0.817221 1.095724 1.099401
v 0.817221 1.095724 -1.099401
v 1.048229 1.095724 -1.099401
v 1.048229 1.095724 1.099401
v 0.817221 1.095724 1.099401
v 0.817221 1.095724 1.099401
v 0.817221 1.095724 -1.099401
v 0.817221 1.095724 -1.099401
v 0.817221 0.889117 -1.099401
v 0.817221 0.889117 -1.099401
v 0.817221 0.889117 1.099401
v 0.817221 0.889117 1.099401
v 1.048229 1.095724 -1.099401
v 1.048229 1.095724 -1.099401
v 1.048229 0.889117 -1.099401
v 1.048229 0.889117 -1.099401
v 1.048229 1.095724 1.099401
v 1.048229 1.095724 1.099401
v 1.048229 0.889117 1.099401
v 1.048229 0.889117 1.099401
v -1.099549 0.889117 1.099401
v -1.099549 0.889117 -1.099401
v -0.868540 0.889117 -1.099401
v -0.868540 0.889117 1.099401
v -1.099549 1.095724 1.099401
v -1.099549 1.095724 -1.099401
v -0.868540 1.095724 -1.099401
v -0.868540 1.095724 1.099401
v -1.099549 1.095724 1.099401
v -1.099549 1.095724 1.099401
v -1.099549 1.095724 -1.099401
v -1.099549 1.095724 -1.099401
v -1.099549 0.889117 -1.099401
v -1.099549 0.889117 -1.099401
v -1.099549 0.889117 1.099401
v -1.099549 0.889117 1.099401
v -0.868540 1.095724 -1.099401
v -0.868540 1.095724 -1.099401
v -0.868540 0.889117 -1.099401
v -0.868540 0.889117 -1.099401
v -0.868540 1.095724 1.099401
v -0.868540 1.095724 1.099401
v -0.868540 0.889117 1.099401
v -0.868540 0.889117 1.099401
v -1.099549 -1.064576 1.099401
v -1.099549 -1.064576 -1.099401
v -0.868540 -1.064576 -1.099401
v -0.868540 -1.064576 1.099401
v -1.099549 -0.857969 1.099401
v -1.099549 -0.857969 -1.099401
v -0.868540 -0.857969 -1.099401
v -0.868540 -0.857969 1.099401
v -1.099549 -0.857969 1.099401
v -1.099549 -0.857969 1.099401
v -1.099549 -0.857969 -1.099401
v -1.099549 -0.857969 -1.099401
v -1.099549 -1.064576 -1.099401
v -1.099549 -1.064576 -1.099401
v -1.099549 -1.064576 1.099401
v -1.099549 -1.064576 1.099401
v -0.868540 -0.857969 -1.099401
v -0.868540 -0.857969 -1.099401
v -0.868540 -1.064576 -1.099401
v -0.868540 -1.064576 -1.099401
v -0.868540 -0.857969 1.099401
v -0.868540 -0.857969 1.099401
v -0.868540 -1.064576 1.099401
v -0.868540 -1.064576 1.099401
v 0.843538 -1.064576 1.099401
v 0.843538 -1.064576 -1.099401
v 1.074547 -1.064576 -1.099401
v 1.074547 -1.064576 1.099401
v 0.843538 -0.857969 1.099401
v 0.843538 -0.857969 -1.099401
v 1.074547 -0.857969 -1.099401
v 1.074547 -0.857969 1.099401
v 0.843538 -0.857969 1.099401
v 0.843538 -0.857969 1.099401
v 0.843538 -0.857969 -1.099401
v 0.843538 -0.857969 -1.099401
v 0.843538 -1.064576 -1.099401
v 0.843538 -1.064576 -1.099401
v 0.843538 -1.064576 1.099401
v 0.843538 -1.064576 1.099401
v 1.074547 -0.857969 -1.099401
v 1.074547 -0.857969 -1.099401
v 1.074547 -1.064576 -1.099401
v 1.074547 -1.064576 -1.099401
v 1.074547 -0.857969 1.099401
v 1.074547 -0.857969 1.099401
v 1.074547 -1.064576 1.099401
v 1.074547 -1.064576 1.099401
v 0.821949 1.004986 -0.868209
v 0.821949 -0.993528 -0.868209
v 1.052958 -0.993528 -0.868209
v 1.052958 1.004986 -0.868209
v 0.821949 1.004986 -1.074816
v 0.821949 -0.993528 -1.074816
v 1.052958 -0.993528 -1.074816
v 1.052958 1.004986 -1.074816
v 0.821949 1.004986 -1.074816
v 0.821949 1.004986 -1.074816
v 0.821949 -0.993528 -1.074816
v 0.821949 -0.993528 -1.074816
v 0.821949 -0.993528 -0.868209
v 0.821949 -0.993528 -0.868209
v 0.821949 1.004986 -0.868209
v 0.821949 1.004986 -0.868209
v 1.052958 -0.993528 -1.074816
v 1.052958 -0.993528 -1.074816
v 1.052958 -0.993528 -0.868209
v 1.052958 -0.993528 -0.868209
v 1.052958 1.004986 -1.074816
v 1.052958 1.004986 -1.074816
v 1.052958 1.004986 -0.868209
v 1.052958 1.004986 -0.868209
v -1.103805 1.004986 -0.868209
v -1.103805 -0.993528 -0.868209
v -0.872797 -0.993528 -0.868209
v -0.872797 1.004986 -0.868209
v -1.103805 1.004986 -1.074816
v -1.103805 -0.993528 -1.074816
v -0.872797 -0.993528 -1.074816
v -0.872797 1.004986 -1.074816
v -1.103805 1.004986 -1.074816
v -1.103805 1.004986 -1.074816
v -1.103805 -0.993528 -1.074816
v -1.103805 -0.993528 -1.074816
v -1.103805 -0.993528 -0.868209
v -1.103805 -0.993528 -0.868209
v -1.103805 1.004986 -0.868209
v -1.103805 1.004986 -0.868209
v -0.872797 -0.993528 -1.074816
v -0.872797 -0.993528 -1.074816
v -0.872797 -0.993528 -0.868209
v -0.872797 -0.993528 -0.868209
v -0.872797 1.004986 -1.074816
v -0.872797 1.004986 -1.074816
v -0.872797 1.004986 -0.868209
v -0.872797 1.004986 -0.868209
v -1.103805 1.004986 1.059242
v -1.103805 -0.993528 1.059241
v -0.872797 -0.993528 1.059241
v -0.872797 1.004986 1.059242
v -1.103805 1.004986 0.852634
v -1.103805 -0.993528 0.852634
v -0.872797 -0.993528 0.852634
v -0.872797 1.004986 0.852634
v -1.103805 1.004986 0.852634
v -1.103805 1.004986 0.852634
v -1.103805 -0.993528 0.852634
v -1.103805 -0.993528 0.852634
v -1.103805 -0.993528 1.059241
v -1.103805 -0.993528 1.059241
v -1.103805 1.004986 1.059242
v -1.103805 1.004986 1.059242
v -0.872797 -0.993528 0.852634
v -0.872797 -0.993528 0.852634
v -0.872797 -0.993528 1.059241
v -0.872797 -0.993528 1.059241
v -0.872797 1.004986 0.852634
v -0.872797 1.004986 0.852634
v -0.872797 1.004986 1.059242
v -0.872797 1.004986 1.059242
v 0.856109 1.004986 1.059242
v 0.856109 -0.993528 1.059241
v 1.087117 -0.993528 1.059241
v 1.087117 1.004986 1.059242
v 0.856109 1.004986 0.852634
v 0.856109 -0.993528 0.852634
v 1.087117 -0.993528 0.852634
v 1.087117 1.004986 0.852634
v 0.856109 1.004986 0.852634
v 0.856109 1.004986 0.852634
v 0.856109 -0.993528 0.852634
v 0.856109 -0.993528 0.852634
v 0.856109 -0.993528 1.059241
v 0.856109 -0.993528 1.059241
v 0.856109 1.004986 1.059242
v 0.856109 1.004986 1.059242
v 1.087117 -0.993528 0.852634
v 1.087117 -0.993528 0.852634
v 1.087117 -0.993528 1.059241
v 1.087117 -0.993528 1.059241
v 1.087117 1.004986 0.852634
v 1.087117 1.004986 0.852634
v 1.087117 1.004986 1.059242
v 1.087117 1.004986 1.059242
v 0.956630 1.105496 1.059242
v -1.041884 1.105496 1.059242
v -1.041884 0.874487 1.059242
v 0.956630 0.874487 1.059242
v 0.956630 1.105496 0.852634
v -1.041884 1.105496 0.852634
v -1.041884 0.874487 0.852634
v 0.956630 0.874487 0.852634
v 0.956630 1.105496 0.852634
v 0.956630 1.105496 0.852634
v -1.041884 1.105496 0.852634
v -1.041884 1.105496 0.852634
v -1.041884 1.105496 1.059242
v -1.041884 1.105496 1.059242
v 0.956630 1.105496 1.059242
v 0.956630 1.105496 1.059242
v -1.041884 0.874487 0.852634
v -1.041884 0.874487 0.852634
v -1.041884 0.874487 1.059242
v -1.041884 0.874487 1.059242
v 0.956630 0.874487 0.852634
v 0.956630 0.874487 0.852634
v 0.956630 0.874487 1.059242
v 0.956630 0.874487 1.059242
v 0.956630 -0.813067 1.059242
v -1.041884 -0.813067 1.059242
v -1.041884 -1.044075 1.059242
v 0.956630 -1.044075 1.059242
v 0.956630 -0.813067 0.852634
v -1.041884 -0.813067 0.852634
v -1.041884 -1.044075 0.852634
v 0.956630 -1.044075 0.852634
v 0.956630 -0.813067 0.852634
v 0.956630 -0.813067 0.852634
v -1.041884 -0.813067 0.852634
v -1.041884 -0.813067 0.852634
v -1.041884 -0.813067 1.059242
v -1.041884 -0.813067 1.059242
v 0.956630 -0.813067 1.059242
v 0.956630 -0.813067 1.059242
v -1.041884 -1.044075 0.852634
v -1.041884 -1.044075 0.852634
v -1.041884 -1.044075 1.059242
v -1.041884 -1.044075 1.059242
v 0.956630 -1.044075 0.852634
v 0.956630 -1.044075 0.852634
v 0.956630 -1.044075 1.059242
v 0.956630 -1.044075 1.059242
v 0.956630 -0.813067 -0.838523
v -1.041884 -0.813067 -0.838523
v -1.041884 -1.044075 -0.838523
v 0.956630 -1.044075 -0.838523
v 0.956630 -0.813067 -1.045130
v -1.041884 -0.813067 -1.045130
v -1.041884 -1.044075 -1.045130
v 0.956630 -1.044075 -1.045130
v 0.956630 -0.813067 -1.045130
v 0.956630 -0.813067 -1.045130
v -1.041884 -0.813067 -1.045130
v -1.041884 -0.813067 -1.045130
v -1.041884 -0.813067 -0.838523
v -1.041884 -0.813067 -0.838523
v 0.956630 -0.813067 -0.838523
v 0.956630 -0.813067 -0.838523
v -1.041884 -1.044075 -1.045130
v -1.041884 -1.044075 -1.045130
v -1.041884 -1.044075 -0.838523
v -1.041884 -1.044075 -0.838523
v 0.956630 -1.044075 -1.045130
v 0.956630 -1.044075 -1.045130
v 0.956630 -1.044075 -0.838523
v 0.956630 -1.044075 -0.838523
v 0.956630 1.075166 -0.838523
v -1.041884 1.075166 -0.838523
v -1.041884 0.844157 -0.838523
v 0.956630 0.844157 -0.838523
v 0.956630 1.075166 -1.045130
v -1.041884 1.075166 -1.045130
v -1.041884 0.844157 -1.045130
v 0.956630 0.844157 -1.045130
v 0.956630 1.075166 -1.045130
v 0.956630 1.075166 -1.045130
v -1.041884 1.075166 -1.045130
v -1.041884 1.075166 -1.045130
v -1.041884 1.075166 -0.838523
v -1.041884 1.075166 -0.838523
v 0.956630 1.075166 -0.838523
v 0.956630 1.075166 -0.838523
v -1.041884 0.844157 -1.045130
v -1.041884 0.844157 -1.045130
v -1.041884 0.844157 -0.838523
v -1.041884 0.844157 -0.838523
v 0.956630 0.844157 -1.045130
v 0.956630 0.844157 -1.045130
v 0.956630 0.844157 -0.838523
v 0.956630 0.844157 -0.838523
vt 0.999900 0.999900
vt 0.000100 0.999900
vt 0.000100 0.000100
vt 0.999900 0.999899
vt 0.999900 0.000100
vt 0.000031 0.000031
vt 0.999969 0.000031
vt 0.000031 0.093989
vt 0.443098 0.396304
vt 0.556902 0.396304
vt 0.556902 0.498086
vt 0.999969 0.093989
vt 0.546766 0.489021
vt 0.453234 0.489021
vt 0.453234 0.405369
vt 0.000069 0.000032
vt 0.999967 0.000378
vt 0.999931 0.105428
vt 0.000032 0.000032
vt 0.999968 0.000033
vt 0.999968 0.105087
vt 0.443098 0.498086
vt 0.000032 0.105087
vt 0.999899 0.000100
vt 0.546766 0.405369
vt 0.000032 0.105083
vn 0.000000 -1.000000 0.000000
vn -0.000000 1.000000 0.000000
vn 1.000000 -0.000000 0.000001
vn -0.000000 -0.000000 1.000000
vn -1.000000 -0.000000 -0.000000
vn 0.000000 0.000000 -1.000000
vn 1.000000 -0.000000 0.000000
vn -1.000000 0.000001 0.000000
s off
f 1/1/1 2/2/1 3/3/1
f 15/4/2 23/2/2 21/3/2
f 9/5/3 5/4/3 6/2/3
f 12/5/4 20/1/4 17/3/4
f 18/2/5 22/3/5 13/1/5
f 16/5/6 10/1/6 14/2/6
f 29/6/5 30/7/5 25/8/5
f 35/9/6 31/10/6 27/11/6
f 41/12/7 32/8/7 28/6/7
f 45/13/4 33/14/4 39/15/4
f 40/16/1 38/17/1 44/18/1
f 46/19/2 42/20/2 36/21/2
f 53/6/5 54/7/5 49/8/5
f 59/9/6 55/10/6 51/11/6
f 65/12/7 56/8/7 52/6/7
f 69/13/4 57/14/4 63/15/4
f 64/16/1 62/17/1 68/18/1
f 70/19/2 66/20/2 60/21/2
f 77/6/5 78/7/5 73/8/5
f 83/9/6 79/10/6 75/11/6
f 89/12/7 80/8/7 76/6/7
f 93/13/4 81/14/4 87/15/4
f 88/16/1 86/17/1 92/18/1
f 94/19/2 90/20/2 84/21/2
f 101/6/5 102/7/5 97/8/5
f 107/9/6 103/10/6 99/11/6
f 113/12/7 104/8/7 100/6/7
f 117/13/4 105/14/4 111/15/4
f 112/16/1 110/17/1 116/18/1
f 118/19/2 114/20/2 108/21/2
f 125/6/5 126/7/5 121/8/5
f 131/9/1 127/10/1 123/11/1
f 137/12/7 128/8/7 124/6/7
f 141/13/2 129/14/2 135/15/2
f 136/16/4 134/17/4 140/18/4
f 142/19/6 138/20/6 132/21/6
f 149/6/5 150/7/5 145/8/5
f 155/9/1 151/10/1 147/11/1
f 161/12/7 152/8/7 148/6/7
f 165/13/2 153/14/2 159/15/2
f 160/16/4 158/17/4 164/18/4
f 166/19/6 162/20/6 156/21/6
f 173/6/5 174/7/5 169/8/5
f 179/9/1 175/10/1 171/11/1
f 185/12/7 176/8/7 172/6/7
f 189/13/2 177/14/2 183/15/2
f 184/16/4 182/17/4 188/18/4
f 190/19/6 186/20/6 180/21/6
f 197/6/5 198/7/5 193/8/5
f 203/9/1 199/10/1 195/11/1
f 209/12/7 200/8/7 196/6/7
f 213/13/2 201/14/2 207/15/2
f 208/16/4 206/17/4 212/18/4
f 214/19/6 210/20/6 204/21/6
f 221/6/2 222/7/2 217/8/2
f 227/9/8 223/10/8 229/22/8
f 233/12/1 224/8/1 220/6/1
f 237/13/7 225/14/7 231/15/7
f 232/16/4 230/17/4 236/18/4
f 238/19/6 234/20/6 226/23/6
f 245/6/2 246/7/2 241/8/2
f 251/9/8 247/10/8 253/22/8
f 257/12/1 248/8/1 244/6/1
f 261/13/7 249/14/7 255/15/7
f 256/16/4 254/17/4 260/18/4
f 262/19/6 258/20/6 250/23/6
f 269/6/2 270/7/2 265/8/2
f 275/9/8 271/10/8 277/22/8
f 281/12/1 272/8/1 268/6/1
f 285/13/7 273/14/7 279/15/7
f 280/16/4 278/17/4 284/18/4
f 286/19/6 282/20/6 276/21/6
f 293/6/2 294/7/2 289/8/2
f 299/9/8 295/10/8 301/22/8
f 305/12/1 296/8/1 292/6/1
f 309/13/7 297/14/7 303/15/7
f 304/16/4 302/17/4 308/18/4
f 310/19/6 306/20/6 300/21/6
f 4/5/1 1/1/1 3/3/1
f 19/24/2 15/4/2 21/3/2
f 11/3/7 9/5/7 6/2/7
f 20/1/4 7/2/4 17/3/4
f 22/3/5 8/5/5 13/1/5
f 24/3/6 16/5/6 14/2/6
f 30/7/5 26/12/5 25/8/5
f 37/22/6 35/9/6 27/11/6
f 43/7/7 41/12/7 28/6/7
f 47/25/4 45/13/4 39/15/4
f 48/26/1 40/16/1 44/18/1
f 34/23/2 46/19/2 36/21/2
f 54/7/5 50/12/5 49/8/5
f 61/22/6 59/9/6 51/11/6
f 67/7/7 65/12/7 52/6/7
f 71/25/4 69/13/4 63/15/4
f 72/26/1 64/16/1 68/18/1
f 58/23/2 70/19/2 60/21/2
f 78/7/5 74/12/5 73/8/5
f 85/22/6 83/9/6 75/11/6
f 91/7/7 89/12/7 76/6/7
f 95/25/4 93/13/4 87/15/4
f 96/26/1 88/16/1 92/18/1
f 82/23/2 94/19/2 84/21/2
f 102/7/5 98/12/5 97/8/5
f 109/22/6 107/9/6 99/11/6
f 115/7/7 113/12/7 100/6/7
f 119/25/4 117/13/4 111/15/4
f 120/26/1 112/16/1 116/18/1
f 106/23/2 118/19/2 108/21/2
f 126/7/5 122/12/5 121/8/5
f 133/22/1 131/9/1 123/11/1
f 139/7/7 137/12/7 124/6/7
f 143/25/2 141/13/2 135/15/2
f 144/26/4 136/16/4 140/18/4
f 130/23/6 142/19/6 132/21/6
f 150/7/5 146/12/5 145/8/5
f 157/22/1 155/9/1 147/11/1
f 163/7/7 161/12/7 148/6/7
f 167/25/2 165/13/2 159/15/2
f 168/26/4 160/16/4 164/18/4
f 154/23/6 166/19/6 156/21/6
f 174/7/5 170/12/5 169/8/5
f 181/22/1 179/9/1 171/11/1
f 187/7/7 185/12/7 172/6/7
f 191/25/2 189/13/2 183/15/2
f 192/26/4 184/16/4 188/18/4
f 178/23/6 190/19/6 180/21/6
f 198/7/5 194/12/5 193/8/5
f 205/22/1 203/9/1 195/11/1
f 211/7/7 209/12/7 196/6/7
f 215/25/2 213/13/2 207/15/2
f 216/26/4 208/16/4 212/18/4
f 202/23/6 214/19/6 204/21/6
f 222/7/2 218/12/2 217/8/2
f 223/10/8 219/11/8 229/22/8
f 235/7/1 233/12/1 220/6/1
f 239/25/7 237/13/7 231/15/7
f 240/26/4 232/16/4 236/18/4
f 234/20/6 228/21/6 226/23/6
f 246/7/2 242/12/2 241/8/2
f 247/10/8 243/11/8 253/22/8
f 259/7/1 257/12/1 244/6/1
f 263/25/7 261/13/7 255/15/7
f 264/26/4 256/16/4 260/18/4
f 258/20/6 252/21/6 250/23/6
f 270/7/2 266/12/2 265/8/2
f 271/10/8 267/11/8 277/22/8
f 283/7/1 281/12/1 268/6/1
f 287/25/7 285/13/7 279/15/7
f 288/26/4 280/16/4 284/18/4
f 274/23/6 286/19/6 276/21/6
f 294/7/2 290/12/2 289/8/2
f 295/10/8 291/11/8 301/22/8
f 307/7/1 305/12/1 292/6/1
f 311/25/7 309/13/7 303/15/7
f 312/26/4 304/16/4 308/18/4
f 298/23/6 310/19/6 300/21/6

BIN
res/box.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

139339
res/bunny.obj Normal file

File diff suppressed because it is too large Load Diff

46
res/cube-one.obj Normal file
View File

@ -0,0 +1,46 @@
# Blender v2.82 (sub 7) OBJ File: 'cube.blend'
# www.blender.org
mtllib cube.mtl
o Cube
v 0.499999 0.499999 -0.499999
v 0.499999 -0.499999 -0.499999
v 0.499999 0.499999 0.499999
v 0.499999 -0.499999 0.499999
v -0.499999 0.499999 -0.499999
v -0.499999 -0.499999 -0.499999
v -0.499999 0.499999 0.499999
v -0.499999 -0.499999 0.499999
vt 0.875000 0.500000
vt 0.625000 0.750000
vt 0.625000 0.500000
vt 0.375000 1.000000
vt 0.375000 0.750000
vt 0.625000 0.000000
vt 0.375000 0.250000
vt 0.375000 0.000000
vt 0.375000 0.500000
vt 0.125000 0.750000
vt 0.125000 0.500000
vt 0.625000 0.250000
vt 0.875000 0.750000
vt 0.625000 1.000000
vn 0.0000 1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
usemtl Material
s off
f 5/1/1 3/2/1 1/3/1
f 3/2/2 8/4/2 4/5/2
f 7/6/3 6/7/3 8/8/3
f 2/9/4 8/10/4 6/11/4
f 1/3/5 4/5/5 2/9/5
f 5/12/6 2/9/6 6/7/6
f 5/1/1 7/13/1 3/2/1
f 3/2/2 7/14/2 8/4/2
f 7/6/3 5/12/3 6/7/3
f 2/9/4 4/5/4 8/10/4
f 1/3/5 3/2/5 4/5/5
f 5/12/6 1/3/6 2/9/6

BIN
res/cube.blend Normal file

Binary file not shown.

12
res/cube.mtl Normal file
View File

@ -0,0 +1,12 @@
# Blender MTL File: 'cube.blend'
# Material Count: 1
newmtl Material
Ns 323.999994
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2

46
res/cube.obj Normal file
View File

@ -0,0 +1,46 @@
# Blender v2.82 (sub 7) OBJ File: 'cube.blend'
# www.blender.org
mtllib cube.mtl
o Cube
v 1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 1.000000 -1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 1.000000
v -1.000000 -1.000000 1.000000
vt 0.875000 0.500000
vt 0.625000 0.750000
vt 0.625000 0.500000
vt 0.375000 1.000000
vt 0.375000 0.750000
vt 0.625000 0.000000
vt 0.375000 0.250000
vt 0.375000 0.000000
vt 0.375000 0.500000
vt 0.125000 0.750000
vt 0.125000 0.500000
vt 0.625000 0.250000
vt 0.875000 0.750000
vt 0.625000 1.000000
vn 0.0000 1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
usemtl Material
s off
f 5/1/1 3/2/1 1/3/1
f 3/2/2 8/4/2 4/5/2
f 7/6/3 6/7/3 8/8/3
f 2/9/4 8/10/4 6/11/4
f 1/3/5 4/5/5 2/9/5
f 5/12/6 2/9/6 6/7/6
f 5/1/1 7/13/1 3/2/1
f 3/2/2 7/14/2 8/4/2
f 7/6/3 5/12/3 6/7/3
f 2/9/4 4/5/4 8/10/4
f 1/3/5 3/2/5 4/5/5
f 5/12/6 1/3/6 2/9/6

BIN
res/dirt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

200007
res/dragon.obj Normal file

File diff suppressed because it is too large Load Diff

544823
res/drone.obj Normal file

File diff suppressed because it is too large Load Diff

333
res/exampleOBJ.obj Normal file
View File

@ -0,0 +1,333 @@
# Blender v2.67 (sub 0) OBJ File: ''
# www.blender.org
o Cube
v -0.277688 1.160465 3.914409
v -0.277688 1.160465 -3.914412
v -0.277688 6.599417 3.914409
v -0.277688 6.599417 -3.914410
v 0.277689 6.749417 -4.064408
v 0.277687 6.749417 4.064413
v -0.277689 6.749417 4.064409
v -0.277688 6.749417 -4.064410
v 0.277688 1.010465 4.064410
v -0.277689 1.010465 4.064410
v 0.277689 1.010465 -4.064410
v -0.277688 1.010465 -4.064412
v 0.073231 1.270795 -3.755601
v 0.073231 1.270795 -3.755601
v 0.073231 1.270795 -3.755601
v 0.073231 1.270795 3.755601
v 0.073231 1.270795 3.755601
v 0.073231 1.270795 3.755601
v 0.073231 6.489087 -3.755599
v 0.073231 6.489087 -3.755599
v 0.073231 6.489087 -3.755599
v 0.073231 6.489087 3.755603
v 0.073231 6.489087 3.755603
v 0.073231 6.489087 3.755603
v -0.277688 1.160465 3.914409
v -0.277688 1.160465 3.914409
v -0.277688 1.160465 3.914409
v -0.277688 1.160465 -3.914412
v -0.277688 1.160465 -3.914412
v -0.277688 1.160465 -3.914412
v -0.277688 6.599417 3.914409
v -0.277688 6.599417 3.914409
v -0.277688 6.599417 3.914409
v -0.277688 6.599417 -3.914410
v -0.277688 6.599417 -3.914410
v -0.277688 6.599417 -3.914410
v 0.277689 6.749417 -4.064408
v 0.277689 6.749417 -4.064408
v 0.277689 6.749417 -4.064408
v 0.277689 6.749417 -4.064408
v 0.277687 6.749417 4.064413
v 0.277687 6.749417 4.064413
v 0.277687 6.749417 4.064413
v 0.277687 6.749417 4.064413
v -0.277688 6.749417 -4.064410
v -0.277688 6.749417 -4.064410
v -0.277688 6.749417 -4.064410
v -0.277688 6.749417 -4.064410
v -0.277689 6.749417 4.064409
v -0.277689 6.749417 4.064409
v -0.277689 6.749417 4.064409
v -0.277689 6.749417 4.064409
v 0.277688 1.010465 4.064410
v 0.277688 1.010465 4.064410
v 0.277688 1.010465 4.064410
v 0.277688 1.010465 4.064410
v -0.277689 1.010465 4.064410
v -0.277689 1.010465 4.064410
v -0.277689 1.010465 4.064410
v -0.277689 1.010465 4.064410
v 0.277689 1.010465 -4.064410
v 0.277689 1.010465 -4.064410
v 0.277689 1.010465 -4.064410
v 0.277689 1.010465 -4.064410
v -0.277688 1.010465 -4.064412
v -0.277688 1.010465 -4.064412
v -0.277688 1.010465 -4.064412
v -0.277688 1.010465 -4.064412
v 0.073231 1.270795 -3.755601
v 0.073231 1.270795 3.755601
v 0.073231 6.489087 -3.755599
v 0.073231 6.489087 3.755603
v -0.224736 -0.263644 3.371318
v -0.224736 -0.263644 2.987625
v 0.158956 -0.263644 2.987625
v 0.158956 -0.263644 3.371318
v -0.224736 1.124989 3.371318
v -0.224736 1.124989 2.987625
v 0.158956 1.124989 2.987625
v 0.158956 1.124989 3.371318
v -0.224736 -0.263644 -2.882437
v -0.224736 -0.263644 -3.266129
v 0.158956 -0.263644 -3.266129
v 0.158956 -0.263644 -2.882437
v -0.224736 1.124989 -2.882437
v -0.224736 1.124989 -3.266129
v 0.158956 1.124989 -3.266129
v 0.158956 1.124989 -2.882437
v -0.224736 1.124989 3.371318
v -0.224736 1.124989 3.371318
v -0.224736 1.124989 2.987625
v -0.224736 1.124989 2.987625
v -0.224736 -0.263644 2.987625
v -0.224736 -0.263644 2.987625
v -0.224736 -0.263644 3.371318
v -0.224736 -0.263644 3.371318
v 0.158956 1.124989 2.987625
v 0.158956 1.124989 2.987625
v 0.158956 -0.263644 2.987625
v 0.158956 -0.263644 2.987625
v 0.158956 1.124989 3.371318
v 0.158956 1.124989 3.371318
v 0.158956 -0.263644 3.371318
v 0.158956 -0.263644 3.371318
v -0.224736 1.124989 -2.882437
v -0.224736 1.124989 -2.882437
v -0.224736 1.124989 -3.266129
v -0.224736 1.124989 -3.266129
v -0.224736 -0.263644 -3.266129
v -0.224736 -0.263644 -3.266129
v -0.224736 -0.263644 -2.882437
v -0.224736 -0.263644 -2.882437
v 0.158956 1.124989 -3.266129
v 0.158956 1.124989 -3.266129
v 0.158956 -0.263644 -3.266129
v 0.158956 -0.263644 -3.266129
v 0.158956 1.124989 -2.882437
v 0.158956 1.124989 -2.882437
v 0.158956 -0.263644 -2.882437
v 0.158956 -0.263644 -2.882437
vt 0.072904 0.888916
vt 0.073177 0.731651
vt 0.892156 0.890337
vt 0.033572 0.648137
vt 0.966498 0.648137
vt 0.966498 0.992902
vt 0.885403 0.739675
vt 0.891024 0.901804
vt 0.046432 0.931085
vt 0.954577 0.995841
vt 0.021651 0.995841
vt 0.021651 0.651076
vt 0.012114 0.940261
vt 0.012114 0.874080
vt 0.945039 0.874080
vt 0.933118 0.757066
vt 0.933118 0.823248
vt 0.000193 0.823248
vt 0.831574 0.730632
vt 0.836172 0.882838
vt 0.038673 0.754583
vt -0.004575 0.653460
vt 0.928462 0.653460
vt 0.928462 0.998267
vt 0.904279 0.752987
vt 0.905988 0.884039
vt 0.223290 0.892944
vt 0.954688 0.997752
vt 0.021651 0.997752
vt 0.021651 0.652946
vt 0.009730 0.904588
vt 0.009730 0.838399
vt 0.942766 0.838399
vt 0.966608 0.850139
vt 0.966608 0.916329
vt 0.033572 0.916329
vt 0.892429 0.733072
vt 0.033572 0.992902
vt 0.040812 0.768955
vt 0.954577 0.651076
vt 0.945039 0.940261
vt 0.000193 0.757066
vt 0.043270 0.906790
vt -0.004575 0.998267
vt 0.221580 0.761891
vt 0.954688 0.652946
vt 0.942766 0.904589
vt 0.033572 0.850139
vt 0.959132 0.877638
vt 0.040502 0.877634
vt 0.976736 0.852300
vt 0.035266 0.995853
vt 0.035266 0.669132
vt 0.945133 0.995853
vt 0.076385 0.678435
vt 0.893378 0.678436
vt 0.893378 0.972183
vt 0.061741 0.675675
vt 0.955591 0.675674
vt 0.992341 0.956351
vt 0.613511 0.926087
vt 0.133853 0.904669
vt 0.133853 0.879178
vt 0.114185 0.737657
vt 0.599415 0.715982
vt 0.114183 0.763444
vt 0.940474 0.647273
vt 0.940473 0.992016
vt 0.042978 0.647273
vt 0.122126 0.901989
vt 0.328573 0.892696
vt 0.448853 0.912960
vt 0.898088 0.990689
vt 0.898087 0.663958
vt 0.904347 0.999699
vt 0.654947 0.984052
vt 0.654947 0.670585
vt 0.775916 0.654947
vt 0.911185 0.967892
vt 0.073547 0.967892
vt 0.073547 0.641170
vt 0.181226 0.766192
vt 0.830560 0.811308
vt 0.162456 0.777387
vt 0.629811 0.853269
vt 0.101284 0.829667
vt 0.937723 0.801280
vt 0.019080 0.989094
vt 0.345797 0.989095
vt 0.012820 0.998105
vt 0.916374 0.997716
vt 0.002199 0.986899
vt 0.008333 0.645963
vt 0.897485 0.670585
vt 0.897485 0.984052
vt 0.776517 0.999690
vt 0.988340 0.970203
vt 0.032136 0.970203
vt 0.032134 0.643481
vt 1.001168 0.004077
vt 1.001168 0.638868
vt 0.001884 0.638868
vt 0.022901 0.852300
vt 0.945133 0.669132
vt 0.076385 0.972182
vt 0.024993 0.956351
vt 0.892948 0.878905
vt 0.882101 0.763708
vt 0.042978 0.992016
vt 0.122129 0.912960
vt 0.904347 0.654947
vt 0.775916 0.999690
vt 0.911185 0.641170
vt 0.847603 0.824993
vt 0.101284 0.801578
vt 0.352057 0.998106
vt 0.997678 0.657668
vt 0.776517 0.654947
vt 0.988339 0.643481
vt 0.001884 0.004077
vn -1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 1.000000 -0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
vn -0.999969 0.000000 0.000000
vn 0.786431 -0.617634 0.000000
vn 0.022523 -0.751610 -0.659200
vn 0.097201 -0.703757 -0.703726
vn 0.044496 -0.738304 -0.672964
vn 0.097201 -0.703757 0.703757
vn 0.022523 -0.751610 0.659200
vn 0.044496 -0.738304 0.672964
vn -0.016755 -0.737358 -0.675253
vn -0.040101 -0.776879 -0.628346
vn -0.026887 -0.754875 -0.655293
vn 0.833796 0.000000 0.552049
vn -0.040101 -0.776879 0.628346
vn -0.016755 -0.737388 0.675253
vn -0.026887 -0.754875 0.655293
vn 0.786431 0.617634 0.000000
vn 0.833796 0.000000 -0.552049
vn 0.000000 -0.999969 0.000000
vn 0.000000 0.999969 0.000000
vn 0.000000 -0.764550 -0.644520
vn 0.000000 -0.764550 0.644520
vn 0.000000 -0.707083 -0.707083
vn 0.000000 -0.707083 0.707083
s off
f 77/2/1 78/4/8 73/3/15
f 91/4/2 79/5/2 75/6/2
f 97/7/3 80/8/3 76/9/3
f 101/10/4 89/11/4 95/12/4
f 96/13/5 94/14/5 100/15/5
f 102/16/6 98/17/6 92/18/6
f 85/19/1 86/20/1 81/21/1
f 107/22/2 87/23/2 83/24/2
f 113/25/3 88/26/3 84/27/3
f 117/28/4 105/29/4 111/30/4
f 112/31/5 110/32/5 116/33/5
f 118/34/6 114/35/6 108/36/6
f 78/2/1 74/37/1 73/3/1
f 93/38/2 91/4/2 75/6/2
f 99/39/3 97/7/3 76/9/3
f 103/40/4 101/10/4 95/12/4
f 104/41/5 96/13/5 100/15/5
f 90/42/6 102/16/6 92/18/6
f 86/20/1 82/43/1 81/21/1
f 109/44/2 107/22/2 83/24/2
f 115/45/3 113/25/3 84/27/3
f 119/46/4 117/28/4 111/30/4
f 120/47/5 112/31/5 116/33/5
f 106/48/6 118/34/6 108/36/6
f 35/49/1 32/50/7 45/51/1
f 25/52/1 3/53/7 28/54/1
f 5/55/6 47/56/6 51/57/6
f 24/58/8 21/59/8 39/60/8
f 19/61/9 34/62/10 8/63/11
f 31/64/12 22/65/13 7/66/14
f 54/67/4 42/68/4 57/69/4
f 1/70/15 16/71/16 9/72/17
f 33/73/1 26/74/1 52/75/7
f 20/76/18 15/77/18 62/78/18
f 40/79/2 64/80/2 65/81/2
f 30/82/1 36/83/1 68/84/7
f 13/85/19 2/86/20 11/87/21
f 27/88/1 29/89/1 59/90/1
f 14/91/22 17/92/22 53/93/22
f 18/94/23 23/95/23 44/96/23
f 63/97/24 55/98/5 60/99/5
f 69/100/3 71/101/3 72/102/3
f 32/50/7 49/103/1 45/51/1
f 3/53/7 4/104/1 28/54/1
f 6/105/25 5/55/6 51/57/6
f 43/106/8 24/58/8 39/60/8
f 37/107/26 19/61/9 8/63/11
f 22/65/13 41/108/27 7/66/14
f 42/68/4 50/109/4 57/69/4
f 10/110/28 1/70/15 9/72/17
f 26/74/1 58/111/1 52/75/7
f 38/112/18 20/76/18 62/78/18
f 46/113/2 40/79/2 65/81/2
f 36/83/1 48/114/1 68/84/7
f 2/86/20 12/115/29 11/87/21
f 29/89/1 66/116/1 59/90/1
f 61/117/22 14/91/22 53/93/22
f 56/118/23 18/94/23 44/96/23
f 67/119/5 63/97/24 60/99/5
f 70/120/3 69/100/3 72/102/3

424
res/fern.obj Normal file
View File

@ -0,0 +1,424 @@
# Blender v2.67 (sub 0) OBJ File: 'fern.blend'
# www.blender.org
o Plane
v -1.668906 1.421207 -4.981303
v 1.291248 1.274556 -4.874573
v -1.681098 2.133895 -4.624559
v 1.441855 2.133895 -4.624559
v -1.716799 2.696792 -3.607163
v 1.406155 2.587040 -3.607163
v -1.561477 2.636679 -1.975693
v 1.561477 2.470482 -1.975693
v -1.347036 1.668626 -1.121537
v 1.561477 1.857010 -0.942828
v -1.561477 -0.004097 -0.036216
v 1.561477 -0.004097 -0.036216
v 4.922924 2.330723 -2.113493
v 4.930951 2.184072 0.848574
v 4.372616 2.743763 -2.092158
v 4.493601 2.743764 1.028451
v 3.455437 2.912039 -2.056599
v 3.576422 2.802288 1.064010
v 1.942091 2.636679 -1.997928
v 2.063076 2.470482 1.122681
v 1.096885 1.668625 -1.750557
v 1.030987 1.857010 1.162695
v 0.004071 -0.004097 -1.922791
v 0.125055 -0.004097 1.197818
v 5.066892 1.391006 0.895784
v 3.068532 1.226996 3.537834
v 4.896961 2.123907 0.870659
v 2.891804 2.123907 3.730312
v 4.156424 2.763720 0.489422
v 2.151268 2.640977 3.349074
v 2.614438 2.708673 -0.523145
v 0.609281 2.522805 2.336507
v 1.694611 1.626036 -0.875212
v -0.336501 1.836719 1.673335
v 0.838482 -0.244677 -1.768426
v -1.166676 -0.244677 1.091226
v 1.019397 2.313956 4.808662
v -1.755515 2.175439 4.451704
v 1.067131 2.704086 4.290682
v -1.870153 2.704086 4.020000
v 1.146687 2.863028 3.427385
v -1.790596 2.759363 3.156702
v 1.277956 2.602941 2.002943
v -1.659327 2.445963 1.732260
v 1.150299 1.688583 1.180983
v -1.569803 1.866519 0.760803
v 1.446060 0.108644 0.178775
v -1.491222 0.108645 -0.091908
v -2.841108 2.359943 5.062696
v -4.854967 2.199116 2.513874
v -2.381020 2.812909 4.671439
v -4.599705 2.812910 2.062436
v -1.614207 2.997452 4.019345
v -3.832892 2.877091 1.410342
v -0.348966 2.695474 2.943390
v -2.567650 2.513212 0.334387
v 0.212271 1.633845 2.157409
v -1.704767 1.840439 -0.399406
v 1.271327 -0.200569 1.565499
v -0.947357 -0.200569 -1.043504
v -6.274055 1.495219 2.121059
v -6.142600 1.319109 -1.433610
v -5.544260 2.263995 1.986592
v -5.540795 2.263996 -1.763698
v -4.359546 2.953154 1.726256
v -4.356080 2.821356 -2.024032
v -2.407223 2.758862 1.710761
v -2.403757 2.559280 -2.039528
v -1.381247 1.596347 1.454191
v -1.163412 1.822574 -2.038382
v -0.078146 -0.412391 1.712912
v -0.074680 -0.412391 -2.037376
v -5.393490 2.359763 -2.091071
v -3.270963 2.199023 -4.547807
v -4.922800 2.812483 -1.713156
v -2.779778 2.812484 -4.382275
v -4.138320 2.996925 -1.083301
v -1.995298 2.876630 -3.752418
v -2.843926 2.695112 -0.044037
v -0.700904 2.512949 -2.713154
v -1.966746 1.634059 0.358820
v 0.181862 1.840542 -2.004385
v -1.186299 -0.199359 1.286863
v 0.956723 -0.199359 -1.382254
v -3.411818 3.548868 0.997281
v -2.987591 3.599077 -1.523562
v -2.848599 3.707952 1.095761
v -2.444523 3.919941 -1.557639
v -2.065775 3.556531 1.202876
v -1.694590 3.680621 -1.462553
v -0.939843 2.863784 1.318995
v -0.585573 2.942669 -1.352623
v -0.520648 1.836716 1.113190
v 0.054735 2.129301 -1.320096
v -0.183668 0.144097 1.216864
v 0.220408 0.356086 -1.436535
v -2.752246 3.548868 -2.331894
v -0.428357 3.599077 -3.396862
v -2.517365 3.707952 -1.810603
v -0.095124 3.919941 -2.966700
v -2.166277 3.556531 -1.102773
v 0.247442 3.680621 -2.292838
v -1.629914 2.863784 -0.106017
v 0.779423 2.942669 -1.313553
v -1.224182 1.836715 0.125201
v 1.112171 2.129301 -0.765528
v -1.120676 0.144097 0.462233
v 1.301564 0.356086 -0.693862
v 1.179569 3.548868 -3.299581
v 3.068619 3.599077 -1.577340
v 0.791671 3.707952 -2.879523
v 2.803056 3.919941 -1.102408
v 0.345733 3.637383 -2.162762
v 2.385048 3.761473 -0.406775
v -0.430031 2.863784 -1.396071
v 1.623650 2.942669 0.349049
v -0.484141 1.836715 -0.932226
v 1.249424 2.129301 0.869633
v -0.753842 0.144098 -0.705146
v 1.257542 0.356086 1.071969
v 3.478751 3.063767 0.129736
v 2.508179 3.113976 2.494606
v 2.969543 3.472751 -0.191974
v 1.989343 3.684741 2.306629
v 2.194941 3.556531 -0.538472
v 1.244161 3.680621 1.979129
v 1.122468 2.863784 -0.900428
v 0.186821 2.942669 1.626945
v 0.668168 1.836715 -0.792301
v -0.430486 2.129301 1.453785
v 0.362412 0.144098 -0.967850
v -0.617787 0.356086 1.530752
v 1.723514 3.227772 2.919589
v -0.813319 3.277982 3.234388
v 1.606172 3.518214 2.393483
v -1.051909 3.730203 2.765519
v 1.425735 3.556531 1.529277
v -1.234463 3.680621 1.936269
v 1.214835 2.863784 0.417193
v -1.446452 2.942669 0.842165
v 0.897690 1.836715 0.074411
v -1.598496 2.129301 0.219321
v 0.900611 0.144098 -0.278144
v -1.757470 0.356086 0.093891
vt 0.261788 0.894097
vt 0.741905 0.894097
vt 0.261788 0.999931
vt 0.261788 0.750634
vt 0.741905 0.750634
vt 0.261788 0.513983
vt 0.741905 0.513983
vt 0.261788 0.307545
vt 0.741905 0.307545
vt 0.261788 0.000069
vt 0.741905 0.000069
vt 0.741905 0.999931
vn 0.012848 0.702567 -0.711478
vn 0.020722 0.682089 -0.730949
vn 0.008454 0.417798 -0.908475
vn 0.034089 0.970763 -0.237495
vn 0.028413 0.982147 -0.185919
vn -0.002197 0.931425 0.363872
vn 0.050600 0.950804 0.305551
vn -0.060060 0.579974 0.812403
vn -0.036378 0.647877 0.760857
vn 0.000000 0.544298 0.838862
vn -0.051668 0.478774 0.876400
vn 0.409406 0.911954 0.025819
vn 0.432630 0.901395 -0.016755
vn 0.762535 0.646565 -0.021699
vn -0.002838 0.999115 0.041627
vn -0.064425 0.997650 0.023103
vn -0.440352 0.897580 0.020173
vn -0.361736 0.930509 0.057314
vn -0.797571 0.600513 -0.056856
vn -0.745903 0.665731 0.019196
vn -0.861782 0.506851 -0.018891
vn -0.898312 0.437910 0.034822
vn 0.698874 0.494675 0.516556
vn 0.674551 0.550340 0.491989
vn 0.814081 0.058443 0.577746
vn 0.238380 0.950316 0.200171
vn 0.172155 0.971587 0.162389
vn -0.299814 0.931639 -0.205206
vn -0.266366 0.954711 -0.132359
vn -0.600360 0.600513 -0.528123
vn -0.605304 0.665731 -0.436293
vn -0.674459 0.506851 -0.536790
vn -0.736076 0.437910 -0.516129
vn -0.036775 0.916135 0.399121
vn -0.080782 0.901364 0.425428
vn -0.066225 0.776391 0.626728
vn -0.025605 0.999512 -0.017548
vn -0.027863 0.996460 -0.078982
vn -0.003967 0.883175 -0.468978
vn 0.045595 0.915891 -0.398785
vn 0.083438 0.617115 -0.782434
vn 0.155522 0.675375 -0.720847
vn 0.076968 0.544298 -0.835322
vn 0.131870 0.478774 -0.867946
vn -0.305338 0.916135 0.259651
vn -0.355174 0.901364 0.247688
vn -0.485519 0.776391 0.401807
vn -0.005890 0.999725 -0.022248
vn 0.027192 0.996612 -0.077395
vn 0.333567 0.880856 -0.335856
vn 0.311014 0.913816 -0.261086
vn 0.606677 0.617115 -0.501083
vn 0.615162 0.675375 -0.406659
vn 0.639058 0.544298 -0.543443
vn 0.701102 0.478774 -0.528367
vn -0.626392 0.779382 -0.011170
vn -0.616840 0.786798 -0.020203
vn -0.752464 0.658498 -0.011689
vn -0.232734 0.971923 -0.034364
vn -0.149419 0.988311 -0.029939
vn 0.432173 0.900845 -0.040376
vn 0.368816 0.929472 0.002625
vn 0.786767 0.617115 0.011994
vn 0.731986 0.675375 0.089389
vn 0.838862 0.544298 0.000763
vn 0.876339 0.478774 0.052461
vn -0.312540 0.916135 -0.250923
vn -0.310190 0.901364 -0.302133
vn -0.486099 0.776391 -0.401105
vn 0.020722 0.999725 -0.009980
vn 0.081118 0.996612 0.012116
vn 0.392682 0.880856 0.264290
vn 0.315012 0.913816 0.256233
vn 0.606433 0.617115 0.501389
vn 0.515305 0.675375 0.527512
vn 0.654134 0.544298 0.525193
vn 0.651021 0.478774 0.588977
vn -0.039766 0.997467 0.058840
vn -0.070223 0.996551 0.043672
vn -0.312082 0.949828 0.019776
vn 0.351970 0.931425 0.092380
vn 0.406476 0.907346 0.107028
vn 0.748741 0.650807 0.125645
vn 0.693106 0.701834 0.164220
vn 0.941008 0.287820 0.177740
vn 0.899045 0.355663 0.255348
vn 0.965636 0.202216 0.163182
vn 0.969817 0.123722 0.209998
vn -0.071017 0.997467 0.000122
vn -0.075594 0.996551 -0.033570
vn -0.191656 0.949828 -0.247078
vn 0.121281 0.931425 0.343089
vn 0.139744 0.907346 0.396405
vn 0.316568 0.650807 0.690054
vn 0.253426 0.701834 0.665700
vn 0.381481 0.287820 0.878384
vn 0.293710 0.355663 0.887234
vn 0.407361 0.202216 0.890561
vn 0.370983 0.123722 0.920347
vn 0.044221 0.993347 -0.106052
vn 0.014801 0.990722 -0.134922
vn 0.269295 0.877132 -0.397565
vn -0.255837 0.938749 0.230781
vn -0.302591 0.912412 0.275491
vn -0.551134 0.636799 0.539171
vn -0.469649 0.713095 0.520463
vn -0.716178 0.263527 0.646229
vn -0.648152 0.347850 0.677389
vn -0.701132 0.155553 0.695822
vn -0.664724 0.081668 0.742607
vn 0.327616 0.942656 0.063509
vn 0.362804 0.927641 0.088351
vn 0.580432 0.796350 0.169958
vn -0.204443 0.971740 -0.117893
vn -0.237220 0.959471 -0.151952
vn -0.667226 0.674642 -0.315622
vn -0.624378 0.736290 -0.260781
vn -0.852535 0.263527 -0.451338
vn -0.858486 0.347850 -0.376751
vn -0.893948 0.155553 -0.420240
vn -0.925413 0.081668 -0.369976
vn 0.088076 0.954680 0.284280
vn 0.097964 0.957030 0.272896
vn 0.140873 0.767968 0.624775
vn 0.011750 0.963805 -0.266305
vn -0.005890 0.945097 -0.326640
vn -0.052400 0.674642 -0.736229
vn -0.079134 0.736290 -0.672018
vn -0.025086 0.263527 -0.964324
vn -0.092990 0.347850 -0.932920
vn -0.072512 0.155553 -0.985137
vn -0.131748 0.081668 -0.987884
vn 0.048097 0.271249 -0.961303
vn 0.600787 0.798486 0.037904
vn 0.775353 0.200293 0.598895
vn -0.130985 0.609851 0.781579
vn -0.640095 0.609851 0.467238
vn -0.851009 0.521989 -0.057314
vn -0.579485 0.609851 -0.540574
vn -0.510666 0.856990 -0.068850
vn -0.229835 0.856990 -0.461165
vn 0.166631 0.963195 -0.210852
vn 0.670217 0.694968 0.260292
vn 0.075594 0.879971 0.468917
s 1
f 3/1/1 4/2/2 1/3/3
f 5/4/4 6/5/5 3/1/1
f 7/6/6 8/7/7 6/5/5
f 9/8/8 10/9/9 7/6/6
f 11/10/10 12/11/11 9/8/8
f 15/1/12 16/2/13 14/12/14
f 17/4/15 18/5/16 15/1/12
f 19/6/17 20/7/18 17/4/15
f 21/8/19 22/9/20 19/6/17
f 23/10/21 24/11/22 22/9/20
f 27/1/23 28/2/24 26/12/25
f 29/4/26 30/5/27 28/2/24
f 31/6/28 32/7/29 29/4/26
f 33/8/30 34/9/31 31/6/28
f 35/10/32 36/11/33 34/9/31
f 39/1/34 40/2/35 37/3/36
f 41/4/37 42/5/38 40/2/35
f 43/6/39 44/7/40 41/4/37
f 45/8/41 46/9/42 44/7/40
f 47/10/43 48/11/44 45/8/41
f 51/1/45 52/2/46 49/3/47
f 53/4/48 54/5/49 52/2/46
f 55/6/50 56/7/51 54/5/49
f 57/8/52 58/9/53 56/7/51
f 59/10/54 60/11/55 57/8/52
f 63/1/56 64/2/57 61/3/58
f 65/4/59 66/5/60 63/1/56
f 67/6/61 68/7/62 66/5/60
f 69/8/63 70/9/64 68/7/62
f 71/10/65 72/11/66 69/8/63
f 75/1/67 76/2/68 73/3/69
f 77/4/70 78/5/71 76/2/68
f 79/6/72 80/7/73 78/5/71
f 81/8/74 82/9/75 80/7/73
f 83/10/76 84/11/77 81/8/74
f 87/1/78 88/2/79 85/3/80
f 89/4/81 90/5/82 87/1/78
f 91/6/83 92/7/84 90/5/82
f 93/8/85 94/9/86 92/7/84
f 95/10/87 96/11/88 93/8/85
f 99/1/89 100/2/90 97/3/91
f 101/4/92 102/5/93 99/1/89
f 103/6/94 104/7/95 102/5/93
f 105/8/96 106/9/97 104/7/95
f 107/10/98 108/11/99 105/8/96
f 111/1/100 112/2/101 110/12/102
f 113/4/103 114/5/104 111/1/100
f 115/6/105 116/7/106 114/5/104
f 117/8/107 118/9/108 115/6/105
f 119/10/109 120/11/110 118/9/108
f 123/1/111 124/2/112 121/3/113
f 125/4/114 126/5/115 123/1/111
f 127/6/116 128/7/117 125/4/114
f 129/8/118 130/9/119 127/6/116
f 131/10/120 132/11/121 130/9/119
f 135/1/122 136/2/123 134/12/124
f 137/4/125 138/5/126 136/2/123
f 139/6/127 140/7/128 137/4/125
f 141/8/129 142/9/130 139/6/127
f 143/10/131 144/11/132 142/9/130
f 4/2/2 2/12/133 1/3/3
f 6/5/5 4/2/2 3/1/1
f 5/4/4 7/6/6 6/5/5
f 10/9/9 8/7/7 7/6/6
f 12/11/11 10/9/9 9/8/8
f 13/3/134 15/1/12 14/12/14
f 18/5/16 16/2/13 15/1/12
f 20/7/18 18/5/16 17/4/15
f 22/9/20 20/7/18 19/6/17
f 21/8/19 23/10/21 22/9/20
f 25/3/135 27/1/23 26/12/25
f 27/1/23 29/4/26 28/2/24
f 32/7/29 30/5/27 29/4/26
f 34/9/31 32/7/29 31/6/28
f 33/8/30 35/10/32 34/9/31
f 40/2/35 38/12/136 37/3/36
f 39/1/34 41/4/37 40/2/35
f 44/7/40 42/5/38 41/4/37
f 43/6/39 45/8/41 44/7/40
f 48/11/44 46/9/42 45/8/41
f 52/2/46 50/12/137 49/3/47
f 51/1/45 53/4/48 52/2/46
f 53/4/48 55/6/50 54/5/49
f 55/6/50 57/8/52 56/7/51
f 60/11/55 58/9/53 57/8/52
f 64/2/57 62/12/138 61/3/58
f 66/5/60 64/2/57 63/1/56
f 65/4/59 67/6/61 66/5/60
f 67/6/61 69/8/63 68/7/62
f 72/11/66 70/9/64 69/8/63
f 76/2/68 74/12/139 73/3/69
f 75/1/67 77/4/70 76/2/68
f 77/4/70 79/6/72 78/5/71
f 79/6/72 81/8/74 80/7/73
f 84/11/77 82/9/75 81/8/74
f 88/2/79 86/12/140 85/3/80
f 90/5/82 88/2/79 87/1/78
f 89/4/81 91/6/83 90/5/82
f 91/6/83 93/8/85 92/7/84
f 96/11/88 94/9/86 93/8/85
f 100/2/90 98/12/141 97/3/91
f 102/5/93 100/2/90 99/1/89
f 101/4/92 103/6/94 102/5/93
f 103/6/94 105/8/96 104/7/95
f 108/11/99 106/9/97 105/8/96
f 109/3/142 111/1/100 110/12/102
f 114/5/104 112/2/101 111/1/100
f 113/4/103 115/6/105 114/5/104
f 118/9/108 116/7/106 115/6/105
f 117/8/107 119/10/109 118/9/108
f 124/2/112 122/12/143 121/3/113
f 126/5/115 124/2/112 123/1/111
f 128/7/117 126/5/115 125/4/114
f 130/9/119 128/7/117 127/6/116
f 129/8/118 131/10/120 130/9/119
f 133/3/144 135/1/122 134/12/124
f 135/1/122 137/4/125 136/2/123
f 140/7/128 138/5/126 137/4/125
f 142/9/130 140/7/128 139/6/127
f 141/8/129 143/10/131 142/9/130

BIN
res/fern.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

BIN
res/fern_atlas.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 KiB

BIN
res/flower.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

346
res/grass.obj Normal file
View File

@ -0,0 +1,346 @@
# Blender v2.67 (sub 0) OBJ File: 'lowPolyPlants.blend'
# www.blender.org
mtllib grass.mtl
o Plane
v 0.063088 0.003610 -4.997082
v -1.136912 0.003610 -4.997082
v 0.063088 1.203610 -4.997082
v -1.136912 1.203610 -4.997082
v -0.536911 0.003610 -5.597082
v -0.536912 0.003610 -4.397082
v -0.536912 1.203610 -5.597083
v -0.536912 1.203610 -4.397082
v -5.427285 0.003610 -0.769423
v -6.627285 0.003610 -0.769423
v -5.427285 1.203610 -0.769424
v -6.627285 1.203610 -0.769424
v -6.027285 0.003610 -1.369424
v -6.027285 0.003610 -0.169423
v -6.027285 1.203610 -1.369424
v -6.027285 1.203610 -0.169424
v 0.627331 0.003610 1.154491
v 0.120805 0.003610 0.066634
v 0.627331 1.203610 1.154491
v 0.120805 1.203610 0.066634
v 0.917996 0.003610 0.357300
v -0.169860 0.003611 0.863825
v 0.917996 1.203610 0.357300
v -0.169860 1.203610 0.863825
v 2.736700 0.003610 -2.973755
v 1.939363 0.003610 -3.870557
v 2.736700 1.203610 -2.973755
v 1.939363 1.203610 -3.870557
v 2.786432 0.003610 -3.820825
v 1.889630 0.003610 -3.023487
v 2.786432 1.203610 -3.820825
v 1.889630 1.203610 -3.023487
v -2.374338 0.003610 -1.890785
v -3.247929 0.003610 -2.713487
v -2.374338 1.203610 -1.890785
v -3.247929 1.203610 -2.713487
v -2.399782 0.003610 -2.738931
v -3.222484 0.003611 -1.865341
v -2.399782 1.203610 -2.738931
v -3.222484 1.203610 -1.865341
v 6.729870 0.003610 2.758007
v 7.206303 0.003610 1.656639
v 6.729870 1.203610 2.758007
v 7.206303 1.203610 1.656640
v 7.518770 0.003610 2.445540
v 6.417403 0.003611 1.969108
v 7.518770 1.203610 2.445540
v 6.417403 1.203610 1.969108
v -2.949056 0.003611 6.270791
v -2.019891 0.003611 5.511415
v -2.949056 1.203610 6.270791
v -2.019891 1.203610 5.511416
v -2.104786 0.003610 6.355686
v -2.864161 0.003611 5.426521
v -2.104786 1.203610 6.355686
v -2.864161 1.203610 5.426521
v -11.257655 0.003611 -0.649311
v -12.123328 0.003610 0.181718
v -11.257655 1.203610 -0.649312
v -12.123328 1.203610 0.181718
v -12.106008 0.003611 -0.666633
v -11.274976 0.003610 0.199040
v -12.106008 1.203610 -0.666633
v -11.274976 1.203610 0.199040
v -5.115887 0.003611 6.717537
v -5.981559 0.003611 7.548567
v -5.115886 1.203610 6.717537
v -5.981559 1.203610 7.548567
v -5.964238 0.003611 6.700215
v -5.133207 0.003611 7.565888
v -5.964237 1.203610 6.700215
v -5.133207 1.203610 7.565887
v -4.044483 0.003611 4.351145
v -5.163255 0.003611 3.917153
v -4.044483 1.203610 4.351144
v -5.163255 1.203610 3.917153
v -4.386873 0.003611 3.574763
v -4.820865 0.003611 4.693535
v -4.386873 1.203610 3.574763
v -4.820865 1.203610 4.693534
v -5.924183 0.003610 -3.071747
v -6.925926 0.003611 -3.732436
v -5.924183 1.203610 -3.071747
v -6.925926 1.203610 -3.732436
v -6.094710 0.003611 -3.902963
v -6.755400 0.003611 -2.901220
v -6.094710 1.203610 -3.902963
v -6.755400 1.203610 -2.901221
v -7.753965 0.003611 1.248239
v -8.950217 0.003611 1.153468
v -7.753965 1.203610 1.248238
v -8.950217 1.203610 1.153467
v -8.304706 0.003611 0.602727
v -8.399476 0.003611 1.798979
v -8.304706 1.203610 0.602727
v -8.399476 1.203610 1.798979
v -1.912768 0.003610 0.464466
v -2.331797 0.003611 -0.659996
v -1.912768 1.203610 0.464466
v -2.331796 1.203610 -0.659996
v -1.560051 0.003611 -0.307279
v -2.684512 0.003611 0.111750
v -1.560051 1.203610 -0.307280
v -2.684513 1.203610 0.111750
v -4.742368 0.003611 1.656384
v -5.161397 0.003611 0.531922
v -4.742368 1.203610 1.656384
v -5.161397 1.203610 0.531922
v -4.389652 0.003611 0.884638
v -5.514113 0.003611 1.303667
v -4.389652 1.203610 0.884638
v -5.514114 1.203610 1.303667
v 4.391148 1.203610 0.926363
v 3.597642 1.203610 0.026169
v 4.391148 0.003611 0.926362
v 3.597642 0.003610 0.026169
v 3.544298 1.203610 0.873019
v 4.444492 1.203610 0.079513
v 3.544298 0.003610 0.873018
v 4.444492 0.003610 0.079513
v 4.806449 1.203610 3.812527
v 3.732761 1.203610 3.276623
v 4.806449 0.003611 3.812527
v 3.732761 0.003611 3.276624
v 4.001654 1.203610 4.081419
v 4.537557 1.203610 3.007731
v 4.001654 0.003611 4.081419
v 4.537557 0.003611 3.007731
v 6.609623 1.203610 -3.161592
v 7.186171 1.203610 -4.214014
v 6.609624 0.003611 -3.161592
v 7.186171 0.003610 -4.214014
v 6.371686 1.203610 -3.976077
v 7.424108 1.203610 -3.399530
v 6.371686 0.003611 -3.976076
v 7.424108 0.003610 -3.399530
v -0.487433 1.203610 1.980146
v -1.577091 1.203610 1.477509
v -0.487433 0.003611 1.980146
v -1.577091 0.003610 1.477509
v -1.283581 1.203610 2.273656
v -0.780943 1.203610 1.183998
v -1.283581 0.003610 2.273657
v -0.780943 0.003610 1.183998
v 10.179677 1.203610 0.517455
v 8.984852 1.203610 0.406136
v 10.179677 0.003611 0.517455
v 8.984852 0.003610 0.406136
v 9.526605 1.203610 1.059208
v 9.637924 1.203610 -0.135617
v 9.526605 0.003610 1.059208
v 9.637924 0.003610 -0.135617
v 5.869500 1.203610 5.422760
v 4.930470 1.203610 6.169901
v 5.869502 0.003611 5.422760
v 4.930470 0.003611 6.169903
v 5.773557 1.203610 6.265846
v 5.026414 1.203610 5.326817
v 5.773557 0.003611 6.265847
v 5.026415 0.003611 5.326817
v 0.637121 1.203610 -1.805795
v 1.213668 1.203610 -2.858217
v 0.637121 0.003611 -1.805795
v 1.213669 0.003611 -2.858217
v 0.399184 1.203610 -2.620279
v 1.451606 1.203610 -2.043732
v 0.399184 0.003611 -2.620279
v 1.451606 0.003611 -2.043732
v 1.740329 1.203610 -0.516481
v 1.336903 1.203610 -1.646635
v 1.740329 0.003611 -0.516482
v 1.336903 0.003610 -1.646635
v 0.973539 1.203610 -0.879845
v 2.103693 1.203610 -1.283271
v 0.973540 0.003611 -0.879845
v 2.103693 0.003611 -1.283271
v 3.117721 1.203610 2.883694
v 2.804810 1.203610 1.725209
v 3.117721 0.003611 2.883693
v 2.804810 0.003611 1.725209
v 2.382023 1.203610 2.460907
v 3.540508 1.203610 2.147995
v 2.382023 0.003611 2.460907
v 3.540508 0.003611 2.147995
v 1.243791 1.203610 8.964542
v 0.077800 1.203610 9.248203
v 1.243791 0.003611 8.964540
v 0.077800 0.003611 9.248203
v 0.802626 1.203610 9.689367
v 0.518964 1.203610 8.523376
v 0.802626 0.003611 9.689367
v 0.518964 0.003611 8.523376
v 4.819168 1.203610 -1.187724
v 4.506256 1.203610 -2.346208
v 4.819168 0.003611 -1.187724
v 4.506257 0.003611 -2.346208
v 4.083470 1.203610 -1.610511
v 5.241954 1.203610 -1.923421
v 4.083470 0.003611 -1.610510
v 5.241954 0.003611 -1.923421
v 0.499905 1.203610 -8.019167
v -0.210803 1.203610 -8.986067
v 0.499905 0.003610 -8.019167
v -0.210803 0.003610 -8.986066
v -0.338899 1.203610 -8.147264
v 0.628001 1.203610 -8.857970
v -0.338898 0.003610 -8.147264
v 0.628001 0.003610 -8.857970
v -2.017782 1.203610 3.719780
v -2.953916 1.203610 2.969012
v -2.017782 0.003611 3.719780
v -2.953915 0.003611 2.969012
v -2.861232 1.203610 3.812463
v -2.110465 1.203610 2.876329
v -2.861232 0.003611 3.812463
v -2.110465 0.003611 2.876329
v 1.450961 1.203610 5.045464
v 0.268659 1.203610 4.840132
v 1.450961 0.003611 5.045464
v 0.268660 0.003611 4.840132
v 0.757144 1.203610 5.533949
v 0.962477 1.203610 4.351647
v 0.757144 0.003611 5.533949
v 0.962477 0.003611 4.351646
vt 0.000100 0.000100
vt 0.999900 0.000100
vt 0.999900 0.999900
vt 0.000100 0.999900
usemtl Material.001
s off
f 2/1 1/2 3/3 4/4
f 6/1 5/2 7/3 8/4
f 10/1 9/2 11/3 12/4
f 14/1 13/2 15/3 16/4
f 18/1 17/2 19/3 20/4
f 22/1 21/2 23/3 24/4
f 26/1 25/2 27/3 28/4
f 30/1 29/2 31/3 32/4
f 34/1 33/2 35/3 36/4
f 38/1 37/2 39/3 40/4
f 42/1 41/2 43/3 44/4
f 46/1 45/2 47/3 48/4
f 50/1 49/2 51/3 52/4
f 54/1 53/2 55/3 56/4
f 58/1 57/2 59/3 60/4
f 62/1 61/2 63/3 64/4
f 66/1 65/2 67/3 68/4
f 70/1 69/2 71/3 72/4
f 74/1 73/2 75/3 76/4
f 78/1 77/2 79/3 80/4
f 82/1 81/2 83/3 84/4
f 86/1 85/2 87/3 88/4
f 90/1 89/2 91/3 92/4
f 94/1 93/2 95/3 96/4
f 98/1 97/2 99/3 100/4
f 102/1 101/2 103/3 104/4
f 106/1 105/2 107/3 108/4
f 110/1 109/2 111/3 112/4
f 115/1 116/2 114/3 113/4
f 119/1 120/2 118/3 117/4
f 123/1 124/2 122/3 121/4
f 127/1 128/2 126/3 125/4
f 131/1 132/2 130/3 129/4
f 135/1 136/2 134/3 133/4
f 139/1 140/2 138/3 137/4
f 143/1 144/2 142/3 141/4
f 147/1 148/2 146/3 145/4
f 151/1 152/2 150/3 149/4
f 155/1 156/2 154/3 153/4
f 159/1 160/2 158/3 157/4
f 163/1 164/2 162/3 161/4
f 167/1 168/2 166/3 165/4
f 171/1 172/2 170/3 169/4
f 175/1 176/2 174/3 173/4
f 179/1 180/2 178/3 177/4
f 183/1 184/2 182/3 181/4
f 187/1 188/2 186/3 185/4
f 191/1 192/2 190/3 189/4
f 195/1 196/2 194/3 193/4
f 199/1 200/2 198/3 197/4
f 203/1 204/2 202/3 201/4
f 207/1 208/2 206/3 205/4
f 211/1 212/2 210/3 209/4
f 215/1 216/2 214/3 213/4
f 219/1 220/2 218/3 217/4
f 223/1 224/2 222/3 221/4
f 1 4
f 5 8
f 9 12
f 13 16
f 180 177
f 184 181
f 17 20
f 21 24
f 25 28
f 29 32
f 33 36
f 37 40
f 41 44
f 45 48
f 49 52
f 53 56
f 57 60
f 61 64
f 65 68
f 69 72
f 196 193
f 200 197
f 73 76
f 77 80
f 81 84
f 85 88
f 89 92
f 93 96
f 97 100
f 101 104
f 105 108
f 109 112
f 204 201
f 208 205
f 188 185
f 192 189
f 120 117
f 144 141
f 152 149
f 140 137
f 164 161
f 168 165
f 136 133
f 116 113
f 148 145
f 212 209
f 216 213
f 132 129
f 124 121
f 172 169
f 176 173
f 220 217
f 224 221
f 160 157
f 128 125
f 156 153

BIN
res/grass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

BIN
res/grassFlowers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

413
res/grassModel.obj Normal file
View File

@ -0,0 +1,413 @@
# Blender v2.67 (sub 0) OBJ File: 'lowPolyPlants.blend'
# www.blender.org
o Plane
v 0.063088 0.003610 -4.997082
v -1.136912 0.003610 -4.997082
v 0.063088 1.203610 -4.997082
v -1.136912 1.203610 -4.997082
v -0.536911 0.003610 -5.597082
v -0.536912 0.003610 -4.397082
v -0.536912 1.203610 -5.597083
v -0.536912 1.203610 -4.397082
v -5.427285 0.003610 -0.769423
v -6.627285 0.003610 -0.769423
v -5.427285 1.203610 -0.769424
v -6.627285 1.203610 -0.769424
v -6.027285 0.003610 -1.369424
v -6.027285 0.003610 -0.169423
v -6.027285 1.203610 -1.369424
v -6.027285 1.203610 -0.169424
v 0.627331 0.003610 1.154491
v 0.120805 0.003610 0.066634
v 0.627331 1.203610 1.154491
v 0.120805 1.203610 0.066634
v 0.917996 0.003610 0.357300
v -0.169860 0.003611 0.863825
v 0.917996 1.203610 0.357300
v -0.169860 1.203610 0.863825
v 2.736700 0.003610 -2.973755
v 1.939363 0.003610 -3.870557
v 2.736700 1.203610 -2.973755
v 1.939363 1.203610 -3.870557
v 2.786432 0.003610 -3.820825
v 1.889630 0.003610 -3.023487
v 2.786432 1.203610 -3.820825
v 1.889630 1.203610 -3.023487
v -2.374338 0.003610 -1.890785
v -3.247929 0.003610 -2.713487
v -2.374338 1.203610 -1.890785
v -3.247929 1.203610 -2.713487
v -2.399782 0.003610 -2.738931
v -3.222484 0.003611 -1.865341
v -2.399782 1.203610 -2.738931
v -3.222484 1.203610 -1.865341
v 6.729870 0.003610 2.758007
v 7.206303 0.003610 1.656639
v 6.729870 1.203610 2.758007
v 7.206303 1.203610 1.656640
v 7.518770 0.003610 2.445540
v 6.417403 0.003611 1.969108
v 7.518770 1.203610 2.445540
v 6.417403 1.203610 1.969108
v -2.949056 0.003611 6.270791
v -2.019891 0.003611 5.511415
v -2.949056 1.203610 6.270791
v -2.019891 1.203610 5.511416
v -2.104786 0.003610 6.355686
v -2.864161 0.003611 5.426521
v -2.104786 1.203610 6.355686
v -2.864161 1.203610 5.426521
v -11.257655 0.003611 -0.649311
v -12.123328 0.003610 0.181718
v -11.257655 1.203610 -0.649312
v -12.123328 1.203610 0.181718
v -12.106008 0.003611 -0.666633
v -11.274976 0.003610 0.199040
v -12.106008 1.203610 -0.666633
v -11.274976 1.203610 0.199040
v -5.115887 0.003611 6.717537
v -5.981559 0.003611 7.548567
v -5.115886 1.203610 6.717537
v -5.981559 1.203610 7.548567
v -5.964238 0.003611 6.700215
v -5.133207 0.003611 7.565888
v -5.964237 1.203610 6.700215
v -5.133207 1.203610 7.565887
v -4.044483 0.003611 4.351145
v -5.163255 0.003611 3.917153
v -4.044483 1.203610 4.351144
v -5.163255 1.203610 3.917153
v -4.386873 0.003611 3.574763
v -4.820865 0.003611 4.693535
v -4.386873 1.203610 3.574763
v -4.820865 1.203610 4.693534
v -5.924183 0.003610 -3.071747
v -6.925926 0.003611 -3.732436
v -5.924183 1.203610 -3.071747
v -6.925926 1.203610 -3.732436
v -6.094710 0.003611 -3.902963
v -6.755400 0.003611 -2.901220
v -6.094710 1.203610 -3.902963
v -6.755400 1.203610 -2.901221
v -7.753965 0.003611 1.248239
v -8.950217 0.003611 1.153468
v -7.753965 1.203610 1.248238
v -8.950217 1.203610 1.153467
v -8.304706 0.003611 0.602727
v -8.399476 0.003611 1.798979
v -8.304706 1.203610 0.602727
v -8.399476 1.203610 1.798979
v -1.912768 0.003610 0.464466
v -2.331797 0.003611 -0.659996
v -1.912768 1.203610 0.464466
v -2.331796 1.203610 -0.659996
v -1.560051 0.003611 -0.307279
v -2.684512 0.003611 0.111750
v -1.560051 1.203610 -0.307280
v -2.684513 1.203610 0.111750
v -4.742368 0.003611 1.656384
v -5.161397 0.003611 0.531922
v -4.742368 1.203610 1.656384
v -5.161397 1.203610 0.531922
v -4.389652 0.003611 0.884638
v -5.514113 0.003611 1.303667
v -4.389652 1.203610 0.884638
v -5.514114 1.203610 1.303667
v 4.391148 1.203610 0.926363
v 3.597642 1.203610 0.026169
v 4.391148 0.003611 0.926362
v 3.597642 0.003610 0.026169
v 3.544298 1.203610 0.873019
v 4.444492 1.203610 0.079513
v 3.544298 0.003610 0.873018
v 4.444492 0.003610 0.079513
v 4.806449 1.203610 3.812527
v 3.732761 1.203610 3.276623
v 4.806449 0.003611 3.812527
v 3.732761 0.003611 3.276624
v 4.001654 1.203610 4.081419
v 4.537557 1.203610 3.007731
v 4.001654 0.003611 4.081419
v 4.537557 0.003611 3.007731
v 6.609623 1.203610 -3.161592
v 7.186171 1.203610 -4.214014
v 6.609624 0.003611 -3.161592
v 7.186171 0.003610 -4.214014
v 6.371686 1.203610 -3.976077
v 7.424108 1.203610 -3.399530
v 6.371686 0.003611 -3.976076
v 7.424108 0.003610 -3.399530
v -0.487433 1.203610 1.980146
v -1.577091 1.203610 1.477509
v -0.487433 0.003611 1.980146
v -1.577091 0.003610 1.477509
v -1.283581 1.203610 2.273656
v -0.780943 1.203610 1.183998
v -1.283581 0.003610 2.273657
v -0.780943 0.003610 1.183998
v 10.179677 1.203610 0.517455
v 8.984852 1.203610 0.406136
v 10.179677 0.003611 0.517455
v 8.984852 0.003610 0.406136
v 9.526605 1.203610 1.059208
v 9.637924 1.203610 -0.135617
v 9.526605 0.003610 1.059208
v 9.637924 0.003610 -0.135617
v 5.869500 1.203610 5.422760
v 4.930470 1.203610 6.169901
v 5.869502 0.003611 5.422760
v 4.930470 0.003611 6.169903
v 5.773557 1.203610 6.265846
v 5.026414 1.203610 5.326817
v 5.773557 0.003611 6.265847
v 5.026415 0.003611 5.326817
v 0.637121 1.203610 -1.805795
v 1.213668 1.203610 -2.858217
v 0.637121 0.003611 -1.805795
v 1.213669 0.003611 -2.858217
v 0.399184 1.203610 -2.620279
v 1.451606 1.203610 -2.043732
v 0.399184 0.003611 -2.620279
v 1.451606 0.003611 -2.043732
v 1.740329 1.203610 -0.516481
v 1.336903 1.203610 -1.646635
v 1.740329 0.003611 -0.516482
v 1.336903 0.003610 -1.646635
v 0.973539 1.203610 -0.879845
v 2.103693 1.203610 -1.283271
v 0.973540 0.003611 -0.879845
v 2.103693 0.003611 -1.283271
v 3.117721 1.203610 2.883694
v 2.804810 1.203610 1.725209
v 3.117721 0.003611 2.883693
v 2.804810 0.003611 1.725209
v 2.382023 1.203610 2.460907
v 3.540508 1.203610 2.147995
v 2.382023 0.003611 2.460907
v 3.540508 0.003611 2.147995
v 1.243791 1.203610 8.964542
v 0.077800 1.203610 9.248203
v 1.243791 0.003611 8.964540
v 0.077800 0.003611 9.248203
v 0.802626 1.203610 9.689367
v 0.518964 1.203610 8.523376
v 0.802626 0.003611 9.689367
v 0.518964 0.003611 8.523376
v 4.819168 1.203610 -1.187724
v 4.506256 1.203610 -2.346208
v 4.819168 0.003611 -1.187724
v 4.506257 0.003611 -2.346208
v 4.083470 1.203610 -1.610511
v 5.241954 1.203610 -1.923421
v 4.083470 0.003611 -1.610510
v 5.241954 0.003611 -1.923421
v 0.499905 1.203610 -8.019167
v -0.210803 1.203610 -8.986067
v 0.499905 0.003610 -8.019167
v -0.210803 0.003610 -8.986066
v -0.338899 1.203610 -8.147264
v 0.628001 1.203610 -8.857970
v -0.338898 0.003610 -8.147264
v 0.628001 0.003610 -8.857970
v -2.017782 1.203610 3.719780
v -2.953916 1.203610 2.969012
v -2.017782 0.003611 3.719780
v -2.953915 0.003611 2.969012
v -2.861232 1.203610 3.812463
v -2.110465 1.203610 2.876329
v -2.861232 0.003611 3.812463
v -2.110465 0.003611 2.876329
v 1.450961 1.203610 5.045464
v 0.268659 1.203610 4.840132
v 1.450961 0.003611 5.045464
v 0.268660 0.003611 4.840132
v 0.757144 1.203610 5.533949
v 0.962477 1.203610 4.351647
v 0.757144 0.003611 5.533949
v 0.962477 0.003611 4.351646
vt 0.000100 0.000100
vt 0.999900 0.000100
vt 0.999900 0.999900
vt 0.000100 0.999900
vn 0.000000 0.000000 1.000000
vn 1.000000 0.000000 0.000000
vn -0.906547 0.000000 0.422104
vn 0.422104 0.000000 0.906547
vn -0.747335 0.000000 0.664448
vn 0.664448 0.000000 0.747335
vn -0.685585 0.000000 0.727992
vn 0.727992 0.000000 0.685585
vn -0.917807 0.000001 -0.397027
vn -0.397027 0.000000 0.917807
vn -0.632813 0.000000 -0.774304
vn -0.774305 0.000000 0.632813
vn 0.692525 0.000000 0.721394
vn 0.721393 -0.000000 -0.692526
vn 0.721394 -0.000001 -0.692525
vn -0.361660 0.000000 0.932310
vn 0.932310 0.000000 0.361660
vn -0.550575 0.000000 0.834786
vn 0.834786 0.000000 0.550575
vn -0.078976 0.000000 0.996877
vn 0.996877 0.000000 0.078975
vn -0.937052 0.000000 0.349191
vn 0.349191 0.000001 0.937052
vn 0.349191 -0.000000 0.937052
vn 0.750161 0.000000 -0.661255
vn 0.661255 -0.000000 0.750162
vn 0.446586 -0.000000 -0.894741
vn 0.894741 -0.000000 0.446586
vn 0.877019 0.000000 0.480456
vn -0.480456 0.000001 0.877019
vn 0.418865 -0.000000 -0.908049
vn 0.908049 0.000000 0.418865
vn 0.092766 0.000000 -0.995688
vn 0.995688 0.000000 0.092766
vn -0.622618 -0.000001 -0.782526
vn 0.782526 0.000001 -0.622618
vn -0.480456 0.000000 0.877019
vn 0.941795 -0.000000 -0.336188
vn 0.336188 0.000000 0.941795
vn 0.965404 -0.000000 -0.260759
vn 0.260759 0.000000 0.965404
vn -0.236386 0.000001 -0.971659
vn 0.971659 -0.000000 -0.236386
vn 0.965404 0.000001 -0.260759
vn 0.260760 0.000000 0.965404
vn 0.805749 -0.000000 -0.592257
vn 0.592256 -0.000000 0.805750
vn 0.625641 0.000001 -0.780111
vn 0.780112 0.000000 0.625640
vn 0.171110 0.000000 -0.985252
vn 0.985252 0.000000 0.171111
vn 0.664448 0.000000 0.747334
vn -0.917807 -0.000000 -0.397028
vn -0.632813 -0.000000 -0.774305
vn -0.774304 0.000000 0.632813
vn 0.721394 -0.000000 -0.692525
vn -0.361659 0.000000 0.932310
vn 0.661254 -0.000000 0.750162
vn 0.877019 0.000001 0.480457
vn 0.092765 -0.000000 -0.995688
vn -0.622618 -0.000000 -0.782526
vn 0.782525 -0.000000 -0.622619
vn -0.236384 0.000000 -0.971660
vn 0.971659 0.000000 -0.236385
vn 0.965404 0.000000 -0.260760
vn 0.260759 0.000001 0.965404
vn 0.805750 0.000000 -0.592256
vn 0.625640 -0.000000 -0.780112
vn 0.780112 0.000000 0.625639
s off
f 2/1/1 1/2/1 3/3/1
f 6/1/2 5/2/2 7/3/2
f 10/1/1 9/2/1 11/3/1
f 14/1/2 13/2/2 15/3/2
f 18/1/3 17/2/3 20/4/3
f 22/1/4 21/2/4 23/3/4
f 26/1/5 25/2/5 28/4/5
f 30/1/6 29/2/6 31/3/6
f 34/1/7 33/2/7 36/4/7
f 38/1/8 37/2/8 39/3/8
f 42/1/9 41/2/9 44/4/9
f 46/1/10 45/2/10 48/4/10
f 50/1/11 49/2/11 52/4/11
f 54/1/12 53/2/12 56/4/12
f 58/1/13 57/2/13 59/3/13
f 62/1/14 61/2/14 63/3/14
f 66/1/13 65/2/13 67/3/13
f 70/1/15 69/2/15 71/3/15
f 74/1/16 73/2/16 76/4/16
f 78/1/17 77/2/17 79/3/17
f 82/1/18 81/2/18 84/4/18
f 86/1/19 85/2/19 87/3/19
f 90/1/20 89/2/20 92/4/20
f 94/1/21 93/2/21 95/3/21
f 98/1/22 97/2/22 100/4/22
f 102/1/23 101/2/23 103/3/23
f 106/1/22 105/2/22 108/4/22
f 110/1/24 109/2/24 111/3/24
f 115/1/25 116/2/25 114/3/25
f 119/1/26 120/2/26 118/3/26
f 123/1/27 124/2/27 122/3/27
f 127/1/28 128/2/28 126/3/28
f 131/1/29 132/2/29 130/3/29
f 135/1/30 136/2/30 133/4/30
f 139/1/31 140/2/31 138/3/31
f 143/1/32 144/2/32 142/3/32
f 147/1/33 148/2/33 146/3/33
f 151/1/34 152/2/34 150/3/34
f 155/1/35 156/2/35 153/4/35
f 159/1/36 160/2/36 158/3/36
f 163/1/29 164/2/29 162/3/29
f 167/1/37 168/2/37 165/4/37
f 171/1/38 172/2/38 170/3/38
f 175/1/39 176/2/39 174/3/39
f 179/1/40 180/2/40 178/3/40
f 183/1/41 184/2/41 182/3/41
f 187/1/42 188/2/42 185/4/42
f 191/1/43 192/2/43 190/3/43
f 195/1/44 196/2/44 194/3/44
f 199/1/45 200/2/45 198/3/45
f 203/1/46 204/2/46 202/3/46
f 207/1/47 208/2/47 206/3/47
f 211/1/48 212/2/48 210/3/48
f 215/1/49 216/2/49 214/3/49
f 219/1/50 220/2/50 218/3/50
f 223/1/51 224/2/51 222/3/51
f 4/4/1 2/1/1 3/3/1
f 8/4/2 6/1/2 7/3/2
f 12/4/1 10/1/1 11/3/1
f 16/4/2 14/1/2 15/3/2
f 17/2/3 19/3/3 20/4/3
f 24/4/4 22/1/4 23/3/4
f 25/2/5 27/3/5 28/4/5
f 32/4/52 30/1/52 31/3/52
f 33/2/7 35/3/7 36/4/7
f 40/4/8 38/1/8 39/3/8
f 41/2/53 43/3/53 44/4/53
f 45/2/10 47/3/10 48/4/10
f 49/2/54 51/3/54 52/4/54
f 53/2/55 55/3/55 56/4/55
f 60/4/13 58/1/13 59/3/13
f 64/4/14 62/1/14 63/3/14
f 68/4/13 66/1/13 67/3/13
f 72/4/56 70/1/56 71/3/56
f 73/2/57 75/3/57 76/4/57
f 80/4/17 78/1/17 79/3/17
f 81/2/18 83/3/18 84/4/18
f 88/4/19 86/1/19 87/3/19
f 89/2/20 91/3/20 92/4/20
f 96/4/21 94/1/21 95/3/21
f 97/2/22 99/3/22 100/4/22
f 104/4/24 102/1/24 103/3/24
f 105/2/22 107/3/22 108/4/22
f 112/4/24 110/1/24 111/3/24
f 113/4/25 115/1/25 114/3/25
f 117/4/58 119/1/58 118/3/58
f 121/4/27 123/1/27 122/3/27
f 125/4/28 127/1/28 126/3/28
f 129/4/59 131/1/59 130/3/59
f 136/2/37 134/3/37 133/4/37
f 137/4/31 139/1/31 138/3/31
f 141/4/32 143/1/32 142/3/32
f 145/4/60 147/1/60 146/3/60
f 149/4/34 151/1/34 150/3/34
f 156/2/61 154/3/61 153/4/61
f 157/4/62 159/1/62 158/3/62
f 161/4/29 163/1/29 162/3/29
f 168/2/37 166/3/37 165/4/37
f 169/4/38 171/1/38 170/3/38
f 173/4/39 175/1/39 174/3/39
f 177/4/40 179/1/40 178/3/40
f 181/4/45 183/1/45 182/3/45
f 188/2/63 186/3/63 185/4/63
f 189/4/64 191/1/64 190/3/64
f 193/4/65 195/1/65 194/3/65
f 197/4/66 199/1/66 198/3/66
f 201/4/67 203/1/67 202/3/67
f 205/4/47 207/1/47 206/3/47
f 209/4/68 211/1/68 210/3/68
f 213/4/69 215/1/69 214/3/69
f 217/4/50 219/1/50 218/3/50
f 221/4/51 223/1/51 222/3/51

BIN
res/grassTexture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
res/grassy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

BIN
res/health.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
res/heightmap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
res/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

11
res/lamp.mtl Normal file
View File

@ -0,0 +1,11 @@
# Blender MTL File: 'newLamp.blend'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd C:\Users\Karl\workspace\JGame\src\res\newLamp.png

1006
res/lamp.obj Normal file

File diff suppressed because it is too large Load Diff

BIN
res/lamp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

1099
res/lowPolyTree.obj Normal file

File diff suppressed because it is too large Load Diff

BIN
res/lowPolyTree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

BIN
res/mud.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
res/path.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

BIN
res/person.blend Normal file

Binary file not shown.

BIN
res/person.blend1 Normal file

Binary file not shown.

1097
res/person.obj Normal file

File diff suppressed because it is too large Load Diff

12
res/person_-xfw_zup.mtl Normal file
View File

@ -0,0 +1,12 @@
# Blender MTL File: 'person.blend'
# Material Count: 1
newmtl Material
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2

1082
res/person_-xfw_zup.obj Normal file

File diff suppressed because it is too large Load Diff

12
res/person_-yfw_zup.mtl Normal file
View File

@ -0,0 +1,12 @@
# Blender MTL File: 'person.blend'
# Material Count: 1
newmtl Material
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2

1082
res/person_-yfw_zup.obj Normal file

File diff suppressed because it is too large Load Diff

1228
res/pine.obj Normal file

File diff suppressed because it is too large Load Diff

BIN
res/pine.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB

BIN
res/playerTexture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
res/skybox/back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
res/skybox/bottom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
res/skybox/front.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 991 KiB

BIN
res/skybox/left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 KiB

BIN
res/skybox/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 KiB

BIN
res/skybox/top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

BIN
res/skybox2/back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
res/skybox2/bottom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
res/skybox2/front.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
res/skybox2/left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
res/skybox2/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
res/skybox2/top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
res/socuwan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

BIN
res/stall.blend Normal file

Binary file not shown.

1696
res/stall.obj Normal file

File diff suppressed because it is too large Load Diff

BIN
res/stallTexture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

1649
res/tree.obj Normal file

File diff suppressed because it is too large Load Diff

BIN
res/tree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
res/tree_sample.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
res/white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,117 @@
package engineTester;
import org.atriasoft.gameengine.Environement;
import org.lwjgl.*;
import org.lwjgl.glfw.*;
import org.lwjgl.opengl.*;
import org.lwjgl.system.*;
import java.nio.*;
import static org.lwjgl.glfw.Callbacks.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;
public class HelloWorld {
// The window handle
private long window;
private Environement env = new Environement();
public void run() {
System.out.println("Hello LWJGL " + Version.getVersion() + "!");
init();
loop();
// Free the window callbacks and destroy the window
glfwFreeCallbacks(window);
glfwDestroyWindow(window);
// Terminate GLFW and free the error callback
glfwTerminate();
glfwSetErrorCallback(null).free();
}
private void init() {
// Setup an error callback. The default implementation
// will print the error message in System.err.
//GLFWErrorCallback.createPrint(System.err).set();
// Initialize GLFW. Most GLFW functions will not work before doing this.
if ( !glfwInit() )
throw new IllegalStateException("Unable to initialize GLFW");
// Configure GLFW
glfwDefaultWindowHints(); // optional, the current window hints are already the default
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); // the window will stay hidden after creation
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // the window will be resizable
// Create the window
window = glfwCreateWindow(300, 300, "Hello World!", NULL, NULL);
if ( window == NULL )
throw new RuntimeException("Failed to create the GLFW window");
// Setup a key callback. It will be called every time a key is pressed, repeated or released.
glfwSetKeyCallback(window, (window, key, scancode, action, mods) -> {
if ( key == GLFW_KEY_ESCAPE && action == GLFW_RELEASE )
glfwSetWindowShouldClose(window, true); // We will detect this in the rendering loop
});
// Get the thread stack and push a new frame
try ( MemoryStack stack = stackPush() ) {
IntBuffer pWidth = stack.mallocInt(1); // int*
IntBuffer pHeight = stack.mallocInt(1); // int*
// Get the window size passed to glfwCreateWindow
glfwGetWindowSize(window, pWidth, pHeight);
// Get the resolution of the primary monitor
GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());
// Center the window
glfwSetWindowPos(
window,
(vidmode.width() - pWidth.get(0)) / 2,
(vidmode.height() - pHeight.get(0)) / 2
);
} // the stack frame is popped automatically
// Make the OpenGL context current
glfwMakeContextCurrent(window);
// Enable v-sync
glfwSwapInterval(1);
// Make the window visible
glfwShowWindow(window);
}
private void loop() {
// This line is critical for LWJGL's interoperation with GLFW's
// OpenGL context, or any context that is managed externally.
// LWJGL detects the context that is current in the current thread,
// creates the GLCapabilities instance and makes the OpenGL
// bindings available for use.
GL.createCapabilities();
// Set the clear color
glClearColor(1.0f, 0.0f, 0.0f, 0.0f);
// Run the rendering loop until the user has attempted to close
// the window or has pressed the ESCAPE key.
while ( !glfwWindowShouldClose(window) ) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear the framebuffer
glfwSwapBuffers(window); // swap the color buffers
// Poll for window events. The key callback above will only be
// invoked during this call.
glfwPollEvents();
}
}
public static void main(String[] args) {
new HelloWorld().run();
}
}

View File

@ -0,0 +1,179 @@
package engineTester;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.etk.math.Vector3f;
import entities.Camera;
import entities.Entity;
import entities.Light;
import entities.Player;
import guis.GuiRenderer;
import guis.GuiTexture;
import models.TexturedModel;
import renderEngine.DisplayManager;
import renderEngine.DisplayManagerDraw;
import renderEngine.Loader;
import renderEngine.MasterRenderer;
import renderEngine.OBJLoader;
import terrains.Terrain;
import terrains.TerrainTexture;
import terrains.TerrainTexturePack;
import textures.ModelTexture;
/**
* This class contains the main method and is used to test the engine.
*
* @author Karl
*
*/
public class MainGameLoop {
/**
* Loads up the position data for two triangles (which together make a quad)
* into a VAO. This VAO is then rendered to the screen every frame.
*
* @param args
*/
public static void main(String[] args) {
DisplayManager manager = new DisplayManager();
Loader loader = new Loader();
manager.init();
List<Entity> entities = new ArrayList<Entity>();
Random random = new Random();
TexturedModel staticModel = new TexturedModel(OBJLoader.loadObjModel("res/tree.obj", loader),
new ModelTexture(loader.loadTexture("tree")));
//ModelTexture texture = staticModel.getTexture();
//texture.setShineDamper(10);
//texture.setReflectivity(1);
TexturedModel grassModel = new TexturedModel(OBJLoader.loadObjModel("res/grassModel.obj", loader),
new ModelTexture(loader.loadTexture("grassTexture")));
grassModel.getTexture().setHasTransparency(true);
grassModel.getTexture().setUseFakeLighting(true);
TexturedModel flowerModel = new TexturedModel(OBJLoader.loadObjModel("res/grassModel.obj", loader),
new ModelTexture(loader.loadTexture("flower")));
flowerModel.getTexture().setHasTransparency(true);
flowerModel.getTexture().setUseFakeLighting(true);
TexturedModel fernModel = new TexturedModel(OBJLoader.loadObjModel("res/fern.obj", loader),
new ModelTexture(loader.loadTexture("fern_atlas")));
fernModel.getTexture().setHasTransparency(true);
fernModel.getTexture().setNumberOfRows(2);
TexturedModel lampModel = new TexturedModel(OBJLoader.loadObjModel("res/lamp.obj", loader),
new ModelTexture(loader.loadTexture("lamp")));
//lampModel.getTexture().setHasTransparency(true);
lampModel.getTexture().setUseFakeLighting(true); // this permit to the light to glow
TexturedModel pineModel = new TexturedModel(OBJLoader.loadObjModel("res/pine.obj", loader),
new ModelTexture(loader.loadTexture("pine")));
List<Light> lights = new ArrayList<Light>();
lights.add(new Light(new Vector3f(0,10000,-7000), new Vector3f(0.4f,0.4f,0.4f)));
lights.add(new Light(new Vector3f(185,10,-293), new Vector3f(2,0,0), new Vector3f(1,0.01f,0.002f)));
lights.add(new Light(new Vector3f(370,17,-300), new Vector3f(0,2,2), new Vector3f(1,0.01f,0.002f)));
lights.add(new Light(new Vector3f(293,7,-305), new Vector3f(2,2,0), new Vector3f(1,0.01f,0.002f)));
entities.add(new Entity(lampModel,
new Vector3f(185, -4.7f, -293),
new Vector3f(0,0,0),
1));
entities.add(new Entity(lampModel,
new Vector3f(370, 4.2f, -300),
new Vector3f(0,0,0),
1));
entities.add(new Entity(lampModel,
new Vector3f(293, -6.8f, -305),
new Vector3f(0,0,0),
1));
TerrainTexture backgroundTexture = new TerrainTexture(loader.loadTexture("grass"));
TerrainTexture rTexture = new TerrainTexture(loader.loadTexture("dirt"));
TerrainTexture gTexture = new TerrainTexture(loader.loadTexture("grassFlowers"));
TerrainTexture bTexture = new TerrainTexture(loader.loadTexture("path"));
TerrainTexturePack texturePack = new TerrainTexturePack(backgroundTexture, rTexture, gTexture, bTexture);
TerrainTexture blendMap = new TerrainTexture(loader.loadTexture("blendMap"));
Terrain terrain = new Terrain(0,-1,loader, texturePack, blendMap, "heightmap");
for (int iii=0; iii<250; iii++) {
float x = random.nextFloat()*800 - 400;
float z = random.nextFloat() * -600;
float y = terrain.getHeightOfTerrain(x, z);
entities.add(new Entity(staticModel,
new Vector3f(x, y, z),
new Vector3f(0,0,0),3));
}
for (int iii=0; iii<250; iii++) {
float x = random.nextFloat()*800 - 400;
float z = random.nextFloat() * -600;
float y = terrain.getHeightOfTerrain(x, z);
entities.add(new Entity(pineModel,
new Vector3f(x, y, z),
new Vector3f(0,0,0),0.5f));
}
for (int iii=0; iii<500; iii++) {
float x = random.nextFloat()*800 - 400;
float z = random.nextFloat() * -600;
float y = terrain.getHeightOfTerrain(x, z);
entities.add(new Entity(fernModel,
random.nextInt(4),
new Vector3f(x, y, z),
new Vector3f(0,0,0),0.6f));
}
TexturedModel playerModel = new TexturedModel(OBJLoader.loadObjModel("res/person.obj", loader),
new ModelTexture(loader.loadTexture("playerTexture")));
Player player = new Player(playerModel, new Vector3f(180,terrain.getHeightOfTerrain(180, -250),-250), new Vector3f(0,3.14f,0), 0.4f);
Camera camera = new Camera(player);
List<GuiTexture> guis = new ArrayList<GuiTexture>();
GuiTexture gui = new GuiTexture(loader.loadTexture("health"), new Vector2f(-0.75f, 0.9f), new Vector2f(0.25f, 0.25f));
guis.add(gui);
GuiRenderer guiRenderer = new GuiRenderer(loader);
MasterRenderer renderer = new MasterRenderer(loader);
manager.setDrawer(new DisplayManagerDraw() {
@Override
public void draw() {
//entity.increasePosition(0.0f, 0, -0.01f);
//entity.increaseRotation(0, 0, 0.01f);
//entity.increaseRotation(0.01f, 0.02f, 0.0f);
player.move(terrain);
camera.move();
renderer.processTerrain(terrain);
renderer.processEntity(player);
for (Entity entity : entities) {
entity.increaseRotation(0, 0.01f, 0.0f);
renderer.processEntity(entity);
}
renderer.render(lights, camera);
guiRenderer.render(guis);
}
});
manager.loop();
guiRenderer.cleanUp();
renderer.cleanUp();
loader.cleanUp();
manager.unInit();
}
}

92
src/entities/Camera.java Normal file
View File

@ -0,0 +1,92 @@
package entities;
import org.atriasoft.etk.math.Matrix4f;
import org.atriasoft.etk.math.Vector3f;
import renderEngine.DisplayManager;
public class Camera {
private float distanceFromPlayer = 20;
private float angleAroundPlayer = 0;
private Vector3f position = new Vector3f(0,5,0);
private float pitch = 0;// (float) Math.toRadians(10);
private float yaw = 0;
private float roll = 0;
private Player player;
public Camera(Player player) {
this.player = player;
}
public void move() {
calculateZoom();
calculatePitch();
CalculateAngleAroundPlayer();
float horinzontalDistance = calculateHorizontalDistance();
float verticalDistance = calculateVerticalDistance();
calculateCameraPosition(horinzontalDistance, verticalDistance);
this.yaw = 3.141596f - player.getRotation().y - angleAroundPlayer ;
}
private void calculateCameraPosition (float horizontalDistance, float verticalDistance) {
float theta = 3.141596f + player.getRotation().y + angleAroundPlayer;
float offsetX = (float) (horizontalDistance * Math.sin(theta));
float offsetZ = (float) (horizontalDistance * Math.cos(theta));
position.x = player.getPosition().x + offsetX;
position.z = player.getPosition().z + offsetZ;
position.y = player.getPosition().y+5 + verticalDistance;
}
private float calculateHorizontalDistance() {
return (float) (distanceFromPlayer * Math.cos(pitch));
}
private float calculateVerticalDistance() {
return (float) (distanceFromPlayer * Math.sin(pitch));
}
public Vector3f getPosition() {
return position;
}
public float getPitch() {
return pitch;
}
public float getYaw() {
return yaw;
}
public float getRoll() {
return roll;
}
private void calculateZoom() {
float zoomLevel = DisplayManager.getDWheel() * 1;
distanceFromPlayer -= zoomLevel;
}
private void calculatePitch() {
if (DisplayManager.isButtonRightDown() ) {
float pitchChange = DisplayManager.getDY() * 0.01f;
pitch += pitchChange;
if (pitch < 0) {
pitch = 0;
} else if (pitch > 3.14159f/2f) {
pitch = 3.14159f/2f;
}
}
}
private void CalculateAngleAroundPlayer() {
if (DisplayManager.isButtonLeftDown()) {
float angleChange = DisplayManager.getDX() * 0.003f;
angleAroundPlayer -= angleChange;
}
}
}

76
src/entities/Entity.java Normal file
View File

@ -0,0 +1,76 @@
package entities;
import org.atriasoft.etk.math.Vector3f;
import models.TexturedModel;
public class Entity {
private TexturedModel model;
private Vector3f position;
private Vector3f rotation;
private float scale;
private int textureIndex = 0;
public Entity(TexturedModel model, Vector3f position, Vector3f rotation, float scale) {
this.model = model;
this.position = position;
this.rotation = rotation;
this.scale = scale;
}
public Entity(TexturedModel model, int textureIndex, Vector3f position, Vector3f rotation, float scale) {
this.model = model;
this.textureIndex = textureIndex;
this.position = position;
this.rotation = rotation;
this.scale = scale;
}
public float getTextureXOffset() {
int column = textureIndex%model.getTexture().getNumberOfRows();
return (float)column/(float)model.getTexture().getNumberOfRows();
}
public float getTextureYOffset() {
int row = textureIndex/model.getTexture().getNumberOfRows();
return (float)row/(float)model.getTexture().getNumberOfRows();
}
public void increasePosition(float dx, float dy, float dz) {
this.position = new Vector3f(position.x + dx, position.y + dy, position.z + dz);
}
public void increasePosition(Vector3f delta) {
this.position = new Vector3f(position.x + delta.x, position.y + delta.y, position.z + delta.z);
}
public void increaseRotation(float dx, float dy, float dz) {
this.rotation = new Vector3f(rotation.x + dx, rotation.y + dy, rotation.z + dz);
}
public void increaseRotation(Vector3f delta) {
this.rotation = new Vector3f(rotation.x + delta.x, rotation.y + delta.y, rotation.z + delta.z);
}
public TexturedModel getModel() {
return model;
}
public void setModel(TexturedModel model) {
this.model = model;
}
public Vector3f getPosition() {
return position;
}
public void setPosition(Vector3f position) {
this.position = position;
}
public Vector3f getRotation() {
return rotation;
}
public void setRotation(Vector3f rotation) {
this.rotation = rotation;
}
public float getScale() {
return scale;
}
public void setScale(float scale) {
this.scale = scale;
}
}

37
src/entities/Light.java Normal file
View File

@ -0,0 +1,37 @@
package entities;
import org.atriasoft.etk.math.Vector3f;
public class Light {
private Vector3f position;
private Vector3f colour;
private Vector3f attenuation = new Vector3f(1, 0, 0);
public Light(Vector3f position, Vector3f colour) {
this.position = position;
this.colour = colour;
}
public Light(Vector3f position, Vector3f colour, Vector3f attenuation) {
this.position = position;
this.colour = colour;
this.setAttenuation(attenuation);
}
public Vector3f getPosition() {
return position;
}
public void setPosition(Vector3f position) {
this.position = position;
}
public Vector3f getColour() {
return colour;
}
public void setColour(Vector3f colour) {
this.colour = colour;
}
public Vector3f getAttenuation() {
return attenuation;
}
public void setAttenuation(Vector3f attenuation) {
this.attenuation = attenuation;
}
}

80
src/entities/Player.java Normal file
View File

@ -0,0 +1,80 @@
package entities;
import org.atriasoft.etk.math.Vector3f;
import models.TexturedModel;
import renderEngine.DisplayManager;
import terrains.Terrain;
public class Player extends Entity {
private static final float RUN_SPEED = 35;
private static final float TRUN_SPEED = (float) Math.toRadians(120);
private static final float GRAVITY = -50;
private static final float JUMP_POWER = 30;
private static final float TERRAIN_HEIGHT = 0;
private float currentSpeed = 0;
private float currentTurnSpeed = 0;
private float upwardSpeed = 0;
private boolean isInAir = false;
public Player(TexturedModel model, Vector3f position, Vector3f rotation, float scale) {
super(model, position, rotation, scale);
}
public void move(Terrain terrain) {
checkInputs();
if (isInAir == false) {
super.increaseRotation(0, this.currentTurnSpeed * DisplayManager.getFrameTimeSecconds(), 0);
}
float distance = currentSpeed * DisplayManager.getFrameTimeSecconds();
float dx = (float) (distance * Math.sin(super.getRotation().y));
float dz = (float) (distance * Math.cos(super.getRotation().y));
super.increasePosition(dx, 0, dz);
upwardSpeed += GRAVITY * DisplayManager.getFrameTimeSecconds();
super.increasePosition(0, upwardSpeed * DisplayManager.getFrameTimeSecconds(), 0);
float terrainHeight = terrain.getHeightOfTerrain(super.getPosition().x, super.getPosition().z);
if (super.getPosition().y < terrainHeight) {
upwardSpeed = 0;
super.getPosition().y = terrainHeight;
isInAir = false;
}
}
private void jump() {
if (isInAir == true) {
return;
}
this.upwardSpeed = JUMP_POWER;
isInAir = true;
}
public void checkInputs() {
if (DisplayManager.isKeyDown('w') && DisplayManager.isKeyDown('s')) {
this.currentSpeed = 0;
} else if (DisplayManager.isKeyDown('w')) {
this.currentSpeed = RUN_SPEED;
} else if (DisplayManager.isKeyDown('s')) {
this.currentSpeed = -RUN_SPEED;
} else {
this.currentSpeed = 0;
}
if (DisplayManager.isKeyDown('d') && DisplayManager.isKeyDown('a')) {
this.currentTurnSpeed = 0;
} else if (DisplayManager.isKeyDown('a')) {
this.currentTurnSpeed = TRUN_SPEED;
} else if (DisplayManager.isKeyDown('d')) {
this.currentTurnSpeed = -TRUN_SPEED;
} else {
this.currentTurnSpeed = 0;
}
if (DisplayManager.isKeyDown(' ')) {
this.jump();
}
}
}

58
src/guis/GuiRenderer.java Normal file
View File

@ -0,0 +1,58 @@
package guis;
import java.util.List;
import org.atriasoft.etk.math.Matrix4f;
import org.atriasoft.gale.backend3d.OpenGL;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL13;
import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL30;
import models.RawModel;
import renderEngine.Loader;
import toolbox.Maths;
public class GuiRenderer {
private final RawModel quad;
private GuiShader shader;
public GuiRenderer(Loader loader) {
float[] positions = { -1, 1, -1, -1, 1, 1, 1, -1 };
quad = loader.loadToVAO(positions, 2);
shader = new GuiShader();
}
public void render(List<GuiTexture> guis) {
shader.start();
// System.out.println("Render Gui " + guis.size());
GL30.glBindVertexArray(quad.getVaoID());
GL20.glEnableVertexAttribArray(0);
OpenGL.enable(OpenGL.Flag.flag_blend);
OpenGL.enable(OpenGL.Flag.flag_cullFace);
OpenGL.enable(OpenGL.Flag.flag_back);
for (GuiTexture gui : guis) {
GL13.glActiveTexture(GL13.GL_TEXTURE0);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, gui.getTexture());
Matrix4f matrix = Maths.createTransformationMatrix(gui.getPosition(), gui.getScale());
shader.loadTransformation(matrix);
OpenGL.updateAllFlags();
GL11.glDrawArrays(GL11.GL_TRIANGLE_STRIP, 0, quad.getVertexCount());
}
OpenGL.disable(OpenGL.Flag.flag_blend);
OpenGL.disable(OpenGL.Flag.flag_cullFace);
OpenGL.disable(OpenGL.Flag.flag_back);
GL20.glDisableVertexAttribArray(0);
GL30.glBindVertexArray(0);
shader.stop();
}
public void cleanUp() {
shader.cleanUp();
}
}

37
src/guis/GuiShader.java Normal file
View File

@ -0,0 +1,37 @@
package guis;
import org.atriasoft.etk.math.Matrix4f;
import org.atriasoft.gale.backend3d.OpenGL;
import shaders.ShaderProgram;
public class GuiShader extends ShaderProgram {
private static final String VERTEX_FILE = "src/guis/gui.vert";
private static final String FRAGMENT_FILE = "src/guis/gui.frag";
private int location_transformationMatrix;
public GuiShader() {
super(VERTEX_FILE, FRAGMENT_FILE);
}
public void loadTransformation(Matrix4f matrix){
//super.loadMatrix(location_transformationMatrix, matrix);
OpenGL.programLoadUniformMatrix(location_transformationMatrix, matrix);
}
@Override
protected void getAllUniformLocations() {
location_transformationMatrix = super.getUniformLocation("transformationMatrix");
}
@Override
protected void bindAttributes() {
super.bindAttribute(0, "position");
}
}

33
src/guis/GuiTexture.java Normal file
View File

@ -0,0 +1,33 @@
package guis;
import org.atriasoft.etk.math.Vector2f;
public class GuiTexture {
private int texture;
private Vector2f position;
private Vector2f scale;
public GuiTexture(int texture, Vector2f position, Vector2f scale) {
this.texture = texture;
this.position = position;
this.scale = scale;
}
public int getTexture() {
return texture;
}
public void setTexture(int texture) {
this.texture = texture;
}
public Vector2f getPosition() {
return position;
}
public void setPosition(Vector2f position) {
this.position = position;
}
public Vector2f getScale() {
return scale;
}
public void setScale(Vector2f scale) {
this.scale = scale;
}
}

11
src/guis/gui.frag Normal file
View File

@ -0,0 +1,11 @@
#version 400 core
in vec2 textureCoords;
out vec4 out_Color;
uniform sampler2D guiTexture;
void main(void){
out_Color = texture(guiTexture,textureCoords);
}

13
src/guis/gui.vert Normal file
View File

@ -0,0 +1,13 @@
#version 400 core
in vec2 position;
out vec2 textureCoords;
uniform mat4 transformationMatrix;
void main(void){
gl_Position = transformationMatrix * vec4(position, 0.0, 1.0);
textureCoords = vec2((position.x+1.0)/2.0, 1 - (position.y+1.0)/2.0);
}

35
src/models/RawModel.java Normal file
View File

@ -0,0 +1,35 @@
package models;
/**
* Represents a loaded model. It contains the ID of the VAO that contains the
* model's data, and holds the number of vertices in the model.
*
* @author Karl
*
*/
public class RawModel {
private int vaoID;
private int vertexCount;
public RawModel(int vaoID, int vertexCount) {
this.vaoID = vaoID;
this.vertexCount = vertexCount;
}
/**
* @return The ID of the VAO which contains the data about all the geometry
* of this model.
*/
public int getVaoID() {
return vaoID;
}
/**
* @return The number of vertices in the model.
*/
public int getVertexCount() {
return vertexCount;
}
}

View File

@ -0,0 +1,32 @@
package models;
import textures.ModelTexture;
public class TexturedModel {
private RawModel rawModel;
private ModelTexture texture;
public TexturedModel(RawModel model, ModelTexture texture) {
this.rawModel = model;
this.texture = texture;
}
public RawModel getRawModel() {
return rawModel;
}
public void setRawModel(RawModel rawModel) {
this.rawModel = rawModel;
}
public ModelTexture getTexture() {
return texture;
}
public void setTexture(ModelTexture texture) {
this.texture = texture;
}
}

17
src/module-info.java Normal file
View File

@ -0,0 +1,17 @@
/** Basic module interface.
*
* @author Edouard DUPIN */
open module org.atriasoft.gameengine {
exports org.atriasoft.gameengine;
exports org.atriasoft.gameengine.camera;
exports org.atriasoft.gameengine.components;
exports org.atriasoft.gameengine.engines;
exports org.atriasoft.gameengine.geometry;
exports org.atriasoft.gameengine.map;
exports org.atriasoft.gameengine.physics;
exports org.atriasoft.gameengine.resource;
requires transitive org.atriasoft.gale;
requires transitive org.atriasoft.etk;
}

View File

@ -0,0 +1,40 @@
package objConverter;
public class ModelData {
private float[] vertices;
private float[] textureCoords;
private float[] normals;
private int[] indices;
private float furthestPoint;
public ModelData(float[] vertices, float[] textureCoords, float[] normals, int[] indices,
float furthestPoint) {
this.vertices = vertices;
this.textureCoords = textureCoords;
this.normals = normals;
this.indices = indices;
this.furthestPoint = furthestPoint;
}
public float[] getVertices() {
return vertices;
}
public float[] getTextureCoords() {
return textureCoords;
}
public float[] getNormals() {
return normals;
}
public int[] getIndices() {
return indices;
}
public float getFurthestPoint() {
return furthestPoint;
}
}

View File

@ -0,0 +1,163 @@
package objConverter;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.etk.math.Vector3f;
public class OBJFileLoader {
private static final String RES_LOC = "res/";
public static ModelData loadOBJ(String objFileName) {
FileReader isr = null;
File objFile = new File(objFileName);
try {
isr = new FileReader(objFile);
} catch (FileNotFoundException e) {
System.err.println("File not found in res; don't use any extention");
return null;
}
BufferedReader reader = new BufferedReader(isr);
String line;
List<Vertex> vertices = new ArrayList<Vertex>();
List<Vector2f> textures = new ArrayList<Vector2f>();
List<Vector3f> normals = new ArrayList<Vector3f>();
List<Integer> indices = new ArrayList<Integer>();
try {
while (true) {
line = reader.readLine();
if (line.startsWith("v ")) {
String[] currentLine = line.split(" ");
Vector3f vertex = new Vector3f((float) Float.valueOf(currentLine[1]),
(float) Float.valueOf(currentLine[2]),
(float) Float.valueOf(currentLine[3]));
Vertex newVertex = new Vertex(vertices.size(), vertex);
vertices.add(newVertex);
} else if (line.startsWith("vt ")) {
String[] currentLine = line.split(" ");
Vector2f texture = new Vector2f((float) Float.valueOf(currentLine[1]),
(float) Float.valueOf(currentLine[2]));
textures.add(texture);
} else if (line.startsWith("vn ")) {
String[] currentLine = line.split(" ");
Vector3f normal = new Vector3f((float) Float.valueOf(currentLine[1]),
(float) Float.valueOf(currentLine[2]),
(float) Float.valueOf(currentLine[3]));
normals.add(normal);
} else if (line.startsWith("f ")) {
break;
}
}
while (line != null && line.startsWith("f ")) {
String[] currentLine = line.split(" ");
String[] vertex1 = currentLine[1].split("/");
String[] vertex2 = currentLine[2].split("/");
String[] vertex3 = currentLine[3].split("/");
processVertex(vertex1, vertices, indices);
processVertex(vertex2, vertices, indices);
processVertex(vertex3, vertices, indices);
line = reader.readLine();
}
reader.close();
} catch (IOException e) {
System.err.println("Error reading the file");
}
removeUnusedVertices(vertices);
float[] verticesArray = new float[vertices.size() * 3];
float[] texturesArray = new float[vertices.size() * 2];
float[] normalsArray = new float[vertices.size() * 3];
float furthest = convertDataToArrays(vertices, textures, normals, verticesArray,
texturesArray, normalsArray);
int[] indicesArray = convertIndicesListToArray(indices);
ModelData data = new ModelData(verticesArray, texturesArray, normalsArray, indicesArray,
furthest);
return data;
}
private static void processVertex(String[] vertex, List<Vertex> vertices, List<Integer> indices) {
int index = Integer.parseInt(vertex[0]) - 1;
Vertex currentVertex = vertices.get(index);
int textureIndex = Integer.parseInt(vertex[1]) - 1;
int normalIndex = Integer.parseInt(vertex[2]) - 1;
if (!currentVertex.isSet()) {
currentVertex.setTextureIndex(textureIndex);
currentVertex.setNormalIndex(normalIndex);
indices.add(index);
} else {
dealWithAlreadyProcessedVertex(currentVertex, textureIndex, normalIndex, indices,
vertices);
}
}
private static int[] convertIndicesListToArray(List<Integer> indices) {
int[] indicesArray = new int[indices.size()];
for (int i = 0; i < indicesArray.length; i++) {
indicesArray[i] = indices.get(i);
}
return indicesArray;
}
private static float convertDataToArrays(List<Vertex> vertices, List<Vector2f> textures,
List<Vector3f> normals, float[] verticesArray, float[] texturesArray,
float[] normalsArray) {
float furthestPoint = 0;
for (int i = 0; i < vertices.size(); i++) {
Vertex currentVertex = vertices.get(i);
if (currentVertex.getLength() > furthestPoint) {
furthestPoint = currentVertex.getLength();
}
Vector3f position = currentVertex.getPosition();
Vector2f textureCoord = textures.get(currentVertex.getTextureIndex());
Vector3f normalVector = normals.get(currentVertex.getNormalIndex());
verticesArray[i * 3] = position.x;
verticesArray[i * 3 + 1] = position.y;
verticesArray[i * 3 + 2] = position.z;
texturesArray[i * 2] = textureCoord.x;
texturesArray[i * 2 + 1] = 1 - textureCoord.y;
normalsArray[i * 3] = normalVector.x;
normalsArray[i * 3 + 1] = normalVector.y;
normalsArray[i * 3 + 2] = normalVector.z;
}
return furthestPoint;
}
private static void dealWithAlreadyProcessedVertex(Vertex previousVertex, int newTextureIndex,
int newNormalIndex, List<Integer> indices, List<Vertex> vertices) {
if (previousVertex.hasSameTextureAndNormal(newTextureIndex, newNormalIndex)) {
indices.add(previousVertex.getIndex());
} else {
Vertex anotherVertex = previousVertex.getDuplicateVertex();
if (anotherVertex != null) {
dealWithAlreadyProcessedVertex(anotherVertex, newTextureIndex, newNormalIndex,
indices, vertices);
} else {
Vertex duplicateVertex = new Vertex(vertices.size(), previousVertex.getPosition());
duplicateVertex.setTextureIndex(newTextureIndex);
duplicateVertex.setNormalIndex(newNormalIndex);
previousVertex.setDuplicateVertex(duplicateVertex);
vertices.add(duplicateVertex);
indices.add(duplicateVertex.getIndex());
}
}
}
private static void removeUnusedVertices(List<Vertex> vertices){
for(Vertex vertex:vertices){
if(!vertex.isSet()){
vertex.setTextureIndex(0);
vertex.setNormalIndex(0);
}
}
}
}

View File

@ -0,0 +1,66 @@
package objConverter;
import org.atriasoft.etk.math.Vector3f;
public class Vertex {
private static final int NO_INDEX = -1;
private Vector3f position;
private int textureIndex = NO_INDEX;
private int normalIndex = NO_INDEX;
private Vertex duplicateVertex = null;
private int index;
private float length;
public Vertex(int index,Vector3f position){
this.index = index;
this.position = position;
this.length = position.length();
}
public int getIndex(){
return index;
}
public float getLength(){
return length;
}
public boolean isSet(){
return textureIndex!=NO_INDEX && normalIndex!=NO_INDEX;
}
public boolean hasSameTextureAndNormal(int textureIndexOther,int normalIndexOther){
return textureIndexOther==textureIndex && normalIndexOther==normalIndex;
}
public void setTextureIndex(int textureIndex){
this.textureIndex = textureIndex;
}
public void setNormalIndex(int normalIndex){
this.normalIndex = normalIndex;
}
public Vector3f getPosition() {
return position;
}
public int getTextureIndex() {
return textureIndex;
}
public int getNormalIndex() {
return normalIndex;
}
public Vertex getDuplicateVertex() {
return duplicateVertex;
}
public void setDuplicateVertex(Vertex duplicateVertex) {
this.duplicateVertex = duplicateVertex;
}
}

View File

@ -0,0 +1,20 @@
package org.atriasoft.gameengine;
public abstract class Component {
public abstract String getType();
/**
* @brief Evironement notify that a new component is added on the same Element
* @param component New component added
*/
public void addFriendComponent(Component component) {
// nothing to do.
}
/**
* @brief Evironement notify that a component is removed on the same Element
* @param component Old component removed
*/
public void removeFriendComponent(Component component) {
// nothing to do.
}
}

View File

@ -0,0 +1,197 @@
package org.atriasoft.gameengine;
import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.etk.math.Vector3f;
import org.atriasoft.gale.Gale;
import org.atriasoft.gale.event.EventEntry;
import org.atriasoft.gale.event.EventInput;
import org.atriasoft.gale.event.EventTime;
import org.atriasoft.gale.key.KeyKeyboard;
import org.atriasoft.gale.key.KeyStatus;
import org.atriasoft.gameengine.camera.Camera;
import org.atriasoft.gameengine.internal.Log;
import org.atriasoft.gameengine.components.ComponentPlayer;
import org.atriasoft.gameengine.components.ComponentPosition;
import org.atriasoft.gameengine.components.ComponentPositionPlayer;
import renderEngine.DisplayManager;
public class ControlCameraPlayer implements ControlInterface {
private Camera camera;
private float distanceFromCenter = 2.5f;
private boolean fpsMode = false;
private Entity playerEntity;
private ComponentPositionPlayer playerPosition;
private ComponentPlayer player;
private boolean moveUp = false;
private boolean moveDown = false;
private boolean moveLeft = false;
private boolean moveRight = false;
private boolean walk = false;
public ControlCameraPlayer(Camera camera, Entity playerEntity) {
this.camera = camera;
this.playerEntity = playerEntity;
this.playerPosition = (ComponentPositionPlayer)this.playerEntity.getComponent("position");
this.player = (ComponentPlayer)this.playerEntity.getComponent("player");
}
private boolean getState(KeyStatus state, boolean previousState) {
if (state == KeyStatus.down) {
return true;
}
if (state == KeyStatus.up) {
return false;
}
return previousState;
}
@Override
public boolean onEventEntry(EventEntry event) {
if(event.getType() == KeyKeyboard.up
|| (event.getType() == KeyKeyboard.character && (event.getChar() == 'z' || event.getChar() == 'Z' ))) {
moveUp = getState(event.getStatus(), moveUp);
}
if(event.getType() == KeyKeyboard.left
|| (event.getType() == KeyKeyboard.character && (event.getChar() == 'q' || event.getChar() == 'Q' ))) {
moveLeft = getState(event.getStatus(), moveLeft);
}
if(event.getType() == KeyKeyboard.right
|| (event.getType() == KeyKeyboard.character && (event.getChar() == 'd' || event.getChar() == 'D' ))) {
moveRight = getState(event.getStatus(), moveRight);
}
if(event.getType() == KeyKeyboard.down
|| (event.getType() == KeyKeyboard.character && (event.getChar() == 's' || event.getChar() == 'S' ))) {
moveDown = getState(event.getStatus(), moveDown);
}
if(event.getType() == KeyKeyboard.shiftLeft || event.getType() == KeyKeyboard.shiftRight) {
walk = event.getSpecialKey().getShift();
}
if(event.getType() == KeyKeyboard.f10) {
if (event.getStatus() == KeyStatus.up) {
if (fpsMode == false) {
fpsMode = true;
distanceFromCenter = 0;
} else {
fpsMode = false;
distanceFromCenter = 2.5f;
}
}
}
return false;
}
@Override
public boolean onEventInput(EventInput event, Vector2f relativePosition) {
// Log.info("" + event);
// TODO Auto-generated method stub
if (fpsMode == false) {
if (event.getInputId() == 4) {
if (event.getStatus() == KeyStatus.down) {
distanceFromCenter -= 0.2;
}
if (distanceFromCenter < 0.0) {
distanceFromCenter = 0.0f;
}
return true;
} else if (event.getInputId() == 5) {
if (event.getStatus() == KeyStatus.down) {
distanceFromCenter += 0.2;
}
if (distanceFromCenter < 0.3) {
distanceFromCenter = 0.3f;
}
return true;
}
} else {
distanceFromCenter = 0;
}
// TODO check if grabbing is enable ...
// in grabbing mouse only:
if (Gale.getContext().isGrabPointerEvents() == false) {
return false;
}
if (event.getStatus() == KeyStatus.move) {
Vector2f delta = event.getPosition().clone();
//angleZ += delta.x;
//this.camera.setYaw(this.camera.getYaw() + (float)Math.toRadians(delta.x));
this.camera.setPitch(this.camera.getPitch() + (float)Math.toRadians(delta.y * this.player.getTurnSpeed()));
if (this.camera.getPitch()>0) {
this.camera.setPitch(0);
}
if (this.camera.getPitch()<-Math.PI) {
this.camera.setPitch((float)-Math.PI);
}
/*
this.camera.setRoll(this.camera.getRoll() - (float)Math.toRadians(delta.x * this.player.getTurnSpeed()));
Log.info("Change camera: " + this.camera.getYaw() + " " + this.camera.getPitch());
if (this.camera.getRoll()>Math.PI) {
this.camera.setRoll(this.camera.getRoll()-(float)Math.PI*2.0f);
}
if (this.camera.getRoll()<-Math.PI) {
this.camera.setRoll(this.camera.getRoll()+(float)Math.PI*2.0f);
}
this.playerPosition.setAngles(new Vector3f(0,0,-this.camera.getRoll()));
*/
float tmpAngle = this.playerPosition.getAngles().z + (float)Math.toRadians(delta.x * this.player.getTurnSpeed());
if (tmpAngle > Math.PI) {
tmpAngle -= (float)Math.PI*2.0f;
}
if (tmpAngle < -Math.PI) {
tmpAngle += (float)Math.PI*2.0f;
}
this.playerPosition.setAngles(new Vector3f(0,0,tmpAngle));
this.camera.setRoll(-this.playerPosition.getAngles().z);
Log.info("Change camera: " + this.camera.getYaw() + " " + this.camera.getPitch());
}
return false;
}
@Override
public void periodicCall(EventTime event) {
float speed = 0;
float walkFactor = 1;
if (this.walk == true) {
walkFactor = this.player.getWalkFactor();
}
//distanceFromCenter = 6;
if (moveUp != moveDown) {
if (moveUp) {
speed = this.player.getRunSpeed();
} else {
speed = -this.player.getRunSpeed();
}
}
float distance = speed * walkFactor * event.getTimeDeltaCallSecond();
float dx = -(float) (distance * Math.sin(this.playerPosition.getAngles().z));
float dy = (float) (distance * Math.cos(this.playerPosition.getAngles().z));
speed = 0;
if (moveRight != moveLeft) {
if (moveRight) {
speed = this.player.getStrafSpeed();
} else {
speed = -this.player.getStrafSpeed();
}
}
distance = speed * walkFactor * event.getTimeDeltaCallSecond();
float dxStraf = (float) (distance * Math.sin((float)Math.PI*0.5f + this.playerPosition.getAngles().z));
float dyStraf = -(float) (distance * Math.cos((float)Math.PI*0.5f + this.playerPosition.getAngles().z));
//Log.error("update position ..." + dx + " " + dy);
this.playerPosition.getTransform().getPosition().x += dx + dxStraf;
this.playerPosition.getTransform().getPosition().y += dy + dyStraf;
// here the camera is behind the player, we need to move the camera ...
//Log.info(" pitch: " + Math.toDegrees(this.camera.getPitch()) + " " + Math.toDegrees(this.playerPosition.getAngles().z));
float horinzontalDistance = (float) (distanceFromCenter * Math.sin(this.camera.getPitch()));
float verticalDistance = (float) (distanceFromCenter * Math.cos(this.camera.getPitch()));
//Log.info(" distanceFromCenter " + distanceFromCenter);
float tmp = -horinzontalDistance;
float theta = (float)Math.PI + this.playerPosition.getAngles().z;// - (float)Math.PI*0.5f;
float offsetX = (float) (tmp * Math.sin(-theta));
float offsetY = (float) (tmp * Math.cos(-theta));
//Log.info(" res" + offsetX + " " + offsetY);
this.camera.getPosition().x = this.playerPosition.getTransform().getPosition().x + offsetX;
this.camera.getPosition().y = this.playerPosition.getTransform().getPosition().y + offsetY;
this.camera.getPosition().z = this.playerPosition.getTransform().getPosition().z + 1.6f + verticalDistance;
}
}

View File

@ -0,0 +1,129 @@
package org.atriasoft.gameengine;
import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.etk.math.Vector3f;
import org.atriasoft.gale.Gale;
import org.atriasoft.gale.event.EventEntry;
import org.atriasoft.gale.event.EventInput;
import org.atriasoft.gale.event.EventTime;
import org.atriasoft.gale.key.KeyKeyboard;
import org.atriasoft.gale.key.KeyStatus;
import org.atriasoft.gameengine.internal.Log;
import org.atriasoft.gameengine.camera.Camera;
import org.atriasoft.gameengine.components.ComponentPlayer;
import org.atriasoft.gameengine.components.ComponentPosition;
import org.atriasoft.gameengine.components.ComponentPositionPlayer;
import renderEngine.DisplayManager;
public class ControlCameraPlayerFPS implements ControlInterface {
private Camera camera;
private Entity playerEntity;
private ComponentPositionPlayer playerPosition;
private ComponentPlayer player;
private boolean moveUp = false;
private boolean moveDown = false;
private boolean moveLeft = false;
private boolean moveRight = false;
public ControlCameraPlayerFPS(Camera camera, Entity playerEntity) {
this.camera = camera;
this.playerEntity = playerEntity;
this.playerPosition = (ComponentPositionPlayer)this.playerEntity.getComponent("position");
this.player = (ComponentPlayer)this.playerEntity.getComponent("player");
}
private boolean getState(KeyStatus state, boolean previousState) {
if (state == KeyStatus.down) {
return true;
}
if (state == KeyStatus.up) {
return false;
}
return previousState;
}
@Override
public boolean onEventEntry(EventEntry event) {
if(event.getType() == KeyKeyboard.up
|| (event.getType() == KeyKeyboard.character && (event.getChar() == 'z' || event.getChar() == 'z' ))) {
moveUp = getState(event.getStatus(), moveUp);
}
if(event.getType() == KeyKeyboard.left
|| (event.getType() == KeyKeyboard.character && (event.getChar() == 'q' || event.getChar() == 'Q' ))) {
moveLeft = getState(event.getStatus(), moveLeft);
}
if(event.getType() == KeyKeyboard.right
|| (event.getType() == KeyKeyboard.character && (event.getChar() == 'd' || event.getChar() == 'D' ))) {
moveRight = getState(event.getStatus(), moveRight);
}
if(event.getType() == KeyKeyboard.down
|| (event.getType() == KeyKeyboard.character && (event.getChar() == 's' || event.getChar() == 'S' ))) {
moveDown = getState(event.getStatus(), moveDown);
}
return false;
}
@Override
public boolean onEventInput(EventInput event, Vector2f relativePosition) {
// Log.info("" + event);
// in grabbing mouse only:
if (Gale.getContext().isGrabPointerEvents() == false) {
return false;
}
if (event.getStatus() == KeyStatus.move) {
Vector2f delta = event.getPosition().clone();
//angleZ += delta.x;
//this.camera.setYaw(this.camera.getYaw() + (float)Math.toRadians(delta.x));
this.camera.setPitch(this.camera.getPitch() + (float)Math.toRadians(delta.y * this.player.getTurnSpeed()));
if (this.camera.getPitch()>0) {
this.camera.setPitch(0);
}
if (this.camera.getPitch()<-Math.PI) {
this.camera.setPitch((float)-Math.PI);
}
this.camera.setRoll(this.camera.getRoll() - (float)Math.toRadians(delta.x * this.player.getTurnSpeed()));
Log.info("Change camera: " + this.camera.getYaw() + " " + this.camera.getPitch());
if (this.camera.getRoll()>Math.PI) {
this.camera.setRoll(this.camera.getRoll()-(float)Math.PI*2.0f);
}
if (this.camera.getRoll()<-Math.PI) {
this.camera.setRoll(this.camera.getRoll()+(float)Math.PI*2.0f);
}
this.playerPosition.setAngles(new Vector3f(0,0,this.camera.getRoll()));
}
return false;
}
@Override
public void periodicCall(EventTime event) {
float speed = 0;
if (moveUp != moveDown) {
if (moveUp) {
speed = this.player.getRunSpeed();
} else {
speed = -this.player.getRunSpeed();
}
}
float distance = speed * event.getTimeDeltaCallSecond();
float dx = (float) (distance * Math.sin(this.playerPosition.getAngles().z));
float dy = (float) (distance * Math.cos(this.playerPosition.getAngles().z));
speed = 0;
if (moveRight != moveLeft) {
if (moveRight) {
speed = this.player.getStrafSpeed();
} else {
speed = -this.player.getStrafSpeed();
}
}
distance = speed * event.getTimeDeltaCallSecond();
float dxStraf = (float) (distance * Math.sin((float)Math.PI*0.5f + this.playerPosition.getAngles().z));
float dyStraf = (float) (distance * Math.cos((float)Math.PI*0.5f + this.playerPosition.getAngles().z));
//Log.error("update position ..." + dx + " " + dy);
this.playerPosition.getTransform().getPosition().x += dx + dxStraf;
this.playerPosition.getTransform().getPosition().y += dy + dyStraf;
this.camera.getPosition().x = this.playerPosition.getTransform().getPosition().x;
this.camera.getPosition().y = this.playerPosition.getTransform().getPosition().y;
this.camera.getPosition().z = this.playerPosition.getTransform().getPosition().z;
}
}

View File

@ -0,0 +1,126 @@
package org.atriasoft.gameengine;
import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.gale.event.EventEntry;
import org.atriasoft.gale.event.EventInput;
import org.atriasoft.gale.event.EventTime;
import org.atriasoft.gale.key.KeyKeyboard;
import org.atriasoft.gale.key.KeyStatus;
import org.atriasoft.gameengine.internal.Log;
import org.atriasoft.gameengine.camera.Camera;
public class ControlCameraSimple implements ControlInterface {
private Camera camera;
private float distanceFromCenter = 20;
private float angleZ = 0;
private float pitch = 0;
private Vector2f lastMousePosition = null;
private boolean moveUp = false;
private boolean moveLeft = false;
private boolean moveRight = false;
private boolean moveDown = false;
private boolean ctrlIsSet = false;
public ControlCameraSimple(Camera camera) {
this.camera = camera;
}
private boolean getState(KeyStatus state, boolean previousState) {
if (state == KeyStatus.down) {
return true;
}
if (state == KeyStatus.up) {
return false;
}
return previousState;
}
@Override
public boolean onEventEntry(EventEntry event) {
if(event.getType() == KeyKeyboard.up) {
moveUp = getState(event.getStatus(), moveUp);
}
if(event.getType() == KeyKeyboard.left) {
moveLeft = getState(event.getStatus(), moveLeft);
}
if(event.getSpecialKey().getCtrl() == false
&& event.getType() == KeyKeyboard.right) {
moveRight = getState(event.getStatus(), moveRight);
}
if(event.getSpecialKey().getCtrl() == false
&& event.getType() == KeyKeyboard.down) {
moveDown = getState(event.getStatus(), moveDown);
}
ctrlIsSet = event.getSpecialKey().getCtrl();
return false;
}
@Override
public boolean onEventInput(EventInput event, Vector2f relativePosition) {
Log.info("" + event);
// TODO Auto-generated method stub
if (event.getInputId() == 4) {
if (event.getStatus() == KeyStatus.down) {
distanceFromCenter -= 1;
}
} else if (event.getInputId() == 5) {
if (event.getStatus() == KeyStatus.down) {
distanceFromCenter += 1;
}
} else if (event.getInputId() == 2) {
if (event.getStatus() == KeyStatus.down) {
lastMousePosition = event.getPosition();
} else if (event.getStatus() == KeyStatus.move) {
Vector2f delta = event.getPosition().clone();
delta.less(lastMousePosition);
lastMousePosition = event.getPosition().clone();
//angleZ += delta.x;
//this.camera.setYaw(this.camera.getYaw() + (float)Math.toRadians(delta.x));
this.camera.setPitch(this.camera.getPitch() - (float)Math.toRadians(delta.y));
if (this.camera.getPitch()>0) {
this.camera.setPitch(0);
}
if (this.camera.getPitch()<-Math.PI) {
this.camera.setPitch((float)-Math.PI);
}
this.camera.setRoll(this.camera.getRoll() + (float)Math.toRadians(delta.x));
Log.info("Change camera: " + this.camera.getYaw() + " " + this.camera.getPitch());
if (this.camera.getRoll()>Math.PI) {
this.camera.setRoll(this.camera.getRoll()-(float)Math.PI*2.0f);
}
if (this.camera.getRoll()<-Math.PI) {
this.camera.setRoll(this.camera.getRoll()+(float)Math.PI*2.0f);
}
}
}
return false;
}
@Override
public void periodicCall(EventTime event) {
if (moveLeft != moveRight) {
if (moveRight) {
camera.getPosition().x += 0.1;
} else {
camera.getPosition().x -= 0.1;
}
}
if (ctrlIsSet == false) {
if (moveUp != moveDown) {
if (moveUp) {
camera.getPosition().y += 0.1;
} else {
camera.getPosition().y -= 0.1;
}
}
} else {
if (moveUp != moveDown) {
if (moveUp) {
camera.getPosition().z += 0.1;
} else {
camera.getPosition().z -= 0.1;
}
}
}
}
}

View File

@ -0,0 +1,16 @@
package org.atriasoft.gameengine;
import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.gale.event.EventEntry;
import org.atriasoft.gale.event.EventInput;
import org.atriasoft.gale.event.EventTime;
public interface ControlInterface {
public boolean onEventEntry(EventEntry event);
public boolean onEventInput(EventInput event, Vector2f relativePosition);
/**
* @brief Periodic call to update grapgic display
* @param event Time generic event
*/
public void periodicCall(EventTime event);
}

View File

@ -0,0 +1,7 @@
package org.atriasoft.gameengine;
public interface CreatorEntity {
Entity create(Environement environement, Object value);
}

View File

@ -0,0 +1,39 @@
package org.atriasoft.gameengine;
import org.atriasoft.gameengine.camera.Camera;
public abstract class Engine {
protected Environement env;
public Engine(Environement env) {
this.env = env;
}
/**
* @brief An Entity component has been removed ==> need remove it in local if needed
* @param ref Referrence on the component
*/
public abstract void componentRemove(Component ref);
/**
* @brief An Entity component has been added ==> need add it in local if needed
* @param ref Referrence on the component
*/
public abstract void componentAdd(Component ref);
/**
* @brief Global game engine main cycle of update internal parameters
* @param deltaMili time from the last update
*/
public abstract void update(long deltaMili);
/**
* @brief Global game engine main cycle of draw
* @param deltaMili time from the last render
* @param camera Camera property to render the engine properties ...
*/
public abstract void render(long deltaMili, Camera camera);
/**
* @brief Globalgame engine main cycle of draw
* @param deltaMili time from the last render
* @param camera Camera property to render the engine properties ...
*/
public abstract void renderDebug(long deltaMili, Camera camera);
public abstract String getType();
}

View File

@ -0,0 +1,270 @@
package org.atriasoft.gameengine;
import java.util.ArrayList;
import java.util.List;
import org.atriasoft.etk.math.Vector3f;
import org.atriasoft.gameengine.internal.Log;
public class Entity {
protected Environement env = null;
protected List<Component> component = new ArrayList<Component>();
/**
* @brief Constructor (when ructer is called just add Entity that did not change.
* The objest will be stored in a pool of Entity and keep a second time if needed == > reduce memory allocation,
* when needed, the system will call the init and un-init function...
*/
public Entity(Environement env) {
this.env = env;
}
public void addComponent(Component ref) {
if (ref == null) {
Log.error("try to add an empty component");
return;
}
// Remove component with the same name.
this.removeComponent(ref.getType());
Log.print("Entity: Add New component ... [START]");
component.add(ref);
env.engineComponentAdd(ref);
for (Component it : component) {
ref.addFriendComponent(it);
it.addFriendComponent(ref);
}
Log.print("Entity: Add New component ... [END]");
}
public void removeComponent(Component ref){
if (ref == null) {
Log.error("try to remove an empty component");
return;
}
if (component.remove(ref) == false) {
Log.error("try to remove an unexisting component");
return;
}
env.engineComponentRemove(ref);
for (Component it : component) {
it.removeFriendComponent(ref);
}
}
public void removeComponent(String type) {
boolean findIt = false;
Component componentRemoved = null;
// check if not exist
for (int iii=0; iii<component.size(); ++iii) {
if (component.get(iii).getType().contentEquals(type)) {
componentRemoved = component.get(iii);
component.remove(iii);
findIt = true;
break;
}
}
if (findIt == false) {
//Log.error("try to remove an unexisting component type : '" + type + "'");
return;
}
env.engineComponentRemove(componentRemoved);
for (Component it : component) {
it.removeFriendComponent(componentRemoved);
}
}
public Component getComponent(String type) {
// check if not exist
for (int iii=0; iii<component.size(); ++iii) {
if (component.get(iii) == null) {
continue;
}
if (component.get(iii).getType().contentEquals(type)) {
return component.get(iii);
}
}
return null;
}
/**
* @brief init the Entity with the defined properties
* @param property Type of the next Entity
* @param value pointer on the value type
* @return true, the Entity is corectly initialized.
*/
public boolean init(){
Log.warning("init() not implemented: uId=" + uID);
return false;
}
public boolean init(Object description){
Log.warning("init(Object) not implemented: uId=" + uID);
return false;
}
public boolean unInit() {
return true;
}
private static int uIDGlobal = 0; //!< This is a reference on a basic Entity ID
private int uID = uIDGlobal++; //!< This is a reference on a basic Entity ID
/**
* @brief get the curent Entity Unique ID in the all Game.
* @return The requested Unique ID.
*/
public int getUID() {
return this.uID;
};
protected float life = 100; //!< Current life of the object
protected float lifeMax = 100; //!< Maximum possible life of the Entity
/**
* @brief get the curent life ratio [0..1]
* @return The proportionnal life
*/
public float getLifeRatio() {
if (0 >= life) {
return 0;
}
return life/lifeMax;
}
/*
* @brief Check if the Entity is dead.
* @return true if the Entity does not exist anymore, false otherwise.
*/
public boolean isDead() {
return (0 >= this.life)?true:false;
};
/**
* @brief Request if the Entity might be removed from the system
* @return true == > the object is removed
*/
public boolean needToRemove() {
return isDead();
}
/**
* @brief apply a fire on the Entity at a current power and a specific power.
* @param groupIdSource Source Id of the group, by default all event arrive at all group, buf some event can not be obviously apply at the ennemy like reparing ....
* @param type Type of event on the life propertied
* @param power Power of the event (can be >0 for adding life).
* @param center Some fire decrease in function of space distance...
*/
public void setFireOn(int groupIdSource, int type, float power, Vector3f center) {
float previousLife = life;
life += power;
life = Math.min(Math.max(0.0f, life), lifeMax);
if (life <= 0) {
Log.debug("[" + getUID() + "] Entity is killed ...");
}
if (life != previousLife) {
onLifeChange();
}
}
/**
* @brief Call when the Entity life change.
*/
public void onLifeChange() { };
// float lifeBorder = 0.1f;
// float lifeHeight = 0.3f;
// float lifeWidth = 2.0f;
// float lifeYPos = 1.7f;
// void Entity::drawLife(ewol::resource::Colored3DObject> draw, Camera> camera) {
// if (draw == null) {
// return;
// }
// float ratio = getLifeRatio();
// if (ratio == 1.0f) {
// return;
// }
// #if 0
// mat4 transformationMatrix = etk::matTranslate(getPosition())
// * etk::matRotate(Vector3f(0,0,1),camera.getAngleZ())
// * etk::matRotate(Vector3f(1,0,0),(MPI/2.0f-camera.getAngleTeta()));
// List<Vector3f> localVertices;
// localVertices.pushBack(Vector3f(-lifeWidth/2.0-lifeBorder,lifeYPos -lifeBorder,0));
// localVertices.pushBack(Vector3f(-lifeWidth/2.0-lifeBorder,lifeYPos+lifeHeight+lifeBorder,0));
// localVertices.pushBack(Vector3f( lifeWidth/2.0+lifeBorder,lifeYPos+lifeHeight+lifeBorder,0));
// localVertices.pushBack(Vector3f(-lifeWidth/2.0-lifeBorder,lifeYPos -lifeBorder,0));
// localVertices.pushBack(Vector3f( lifeWidth/2.0+lifeBorder,lifeYPos+lifeHeight+lifeBorder,0));
// localVertices.pushBack(Vector3f( lifeWidth/2.0+lifeBorder,lifeYPos -lifeBorder,0));
// etk::Color<float> myColor(0x0000FF99);
// draw.draw(localVertices, myColor, transformationMatrix, false, false);
// localVertices.clear();
// /** Bounding box == > model shape **/
// localVertices.pushBack(Vector3f(-lifeWidth/2.0 ,lifeYPos,0));
// localVertices.pushBack(Vector3f(-lifeWidth/2.0 ,lifeYPos + lifeHeight,0));
// localVertices.pushBack(Vector3f(-lifeWidth/2.0+lifeWidth*ratio,lifeYPos + lifeHeight,0));
// localVertices.pushBack(Vector3f(-lifeWidth/2.0 ,lifeYPos,0));
// localVertices.pushBack(Vector3f(-lifeWidth/2.0+lifeWidth*ratio,lifeYPos + lifeHeight,0));
// localVertices.pushBack(Vector3f(-lifeWidth/2.0+lifeWidth*ratio,lifeYPos,0));
// myColor =0x00FF00FF;
// if (ratio < 0.2f) {
// myColor = 0xFF0000FF;
// } else if (ratio < 0.4f) {
// myColor = 0xDA7B00FF;
// }
// draw.draw(localVertices, myColor, transformationMatrix, false, false);
// #endif
// }
private int group = 0; //!< Every Entity has a generic group
/**
* @brief get the Group of the Entity.
* @return The group ID
*/
public int getGroup() {
return this.group;
};
/**
* @brief set the group of the curent Entity
* @param newGroup The new Group ID of the Entity.
*/
public void setGroup(int newGroup) {
this.group = newGroup;
};
/**
* @brief Debug display of the current Entity
* @param[in,out] draw Basic system to draw the debug shape and informations
* @param camera Current camera for display
*/
// public void drawDebug(Colored3DObject draw, Camera camera) {
// /*
// mdebugText.clear();
// mdebugText.setColor(etk::Color<>(0x00, 0xFF, 0x00, 0xFF));
// mdebugText.setPos(Vector3f(-20,32,0));
// mdebugText.print(getType());
// mdebugText.setPos(Vector3f(-20,20,0));
// mdebugText.print("life=("+etk::toString(getLifeRatio()));
// */
// //mdebugText.print(String("Axe=(")+String(mtmpAxe.x())+String(",")+etk::UString(mtmpAxe.y())+etk::UString(",")+etk::UString(m_tmpAxe.z())+etk::UString(")"));
// /*
// // TODO Keep this it can be usefull to print something in direction of the camera ...
// mdebugText.draw( etk::matTranslate(getPosition())
// * etk::matRotate(Vector3f(0,0,1),camera.getAngleZ())
// * etk::matRotate(Vector3f(1,0,0),(MPI/2.0f-camera.getAngleTeta()))
// * etk::matScale(Vector3f(0.05,0.05,0.05)));
// */
// }
/**
* @brief Event arrive when an Entity has been remove from the system == > this permit to keep pointer of ennemy, and not search them every cycle ...
* @param removedEntity Pointer on the Entity removed.
*/
public void entityIsRemoved(Entity removedEntity) { };
protected float radius = 0; //!< Radius of the Entity (all Entity have a radius, if == 0 ==> then ghost ...
/**
* @brief get the current space needed by the Entity in the workspace
* @return The dimention needed.
*/
public float getRadius() {
return this.radius;
};
/**
* @brief, call when the Entity is removed (call only one time)
*/
public void onDestroy() {};
/**
* @brief set the elment in the physique engine
*/
public void dynamicEnable() {};
/**
* @brief remove this Entity from the physique engine
*/
public void dynamicDisable() {};
}

View File

@ -0,0 +1,36 @@
package org.atriasoft.gameengine;
import java.util.ArrayList;
import java.util.List;
import org.atriasoft.etk.math.Vector3f;
public class EntityInteraction {
protected int type;
protected int groupSource;
protected List<Integer> groupDestination = new ArrayList<Integer>();
protected Vector3f positionSource;
public int getType() {
return type;
}
public int getSourceGroup() {
return groupSource;
}
public List<Integer> getDestinationGroup() {
return groupDestination;
}
public void addGroupDestination(Integer id) {
groupDestination.add(id);
}
public Vector3f getSourcePosition() {
return positionSource;
}
public EntityInteraction(int type, int groupSource, Vector3f pos) {
this.type = type;
this.groupSource = groupSource;
this.positionSource = pos;
}
public void applyEvent(Entity entity) {
}
}

View File

@ -0,0 +1,452 @@
package org.atriasoft.gameengine;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.gale.backend3d.OpenGL;
import org.atriasoft.gale.event.EventEntry;
import org.atriasoft.gale.event.EventInput;
import org.atriasoft.gale.event.EventTime;
import org.atriasoft.gale.key.KeyKeyboard;
import org.atriasoft.gale.key.KeySpecial;
import org.atriasoft.gale.key.KeyStatus;
import org.atriasoft.gale.key.KeyType;
import org.atriasoft.gameengine.camera.Camera;
import org.atriasoft.gameengine.engines.EngineRender;
import org.atriasoft.gameengine.engines.EngineAI;
import org.atriasoft.gameengine.engines.EngineDynamicMeshs;
import org.atriasoft.gameengine.engines.EngineGravity;
import org.atriasoft.gameengine.engines.EngineLight;
import org.atriasoft.gameengine.engines.EngineParticle;
import org.atriasoft.gameengine.engines.EnginePhysics;
import org.atriasoft.gameengine.engines.EnginePlayer;
import org.atriasoft.gameengine.internal.Log;
//import org.atriasoft.gameengine.resource.Mesh;
public class Environement {
public Signal<Float> signalPlayTimeChange = new Signal<Float>();
private GameStatus propertyStatus = GameStatus.gameStop; // !< the display is running (not in pause)
public float propertyRatio = 1.0f; // !< Speed ratio
protected List<Engine> engines = new ArrayList<Engine>(); // !< EGE sub engine interface (like physique, rendering,
// audio, ...).
private List<Entity> listEntity = new ArrayList<Entity>(); // !< List of all entity added in the Game
List<ControlInterface> controls = new ArrayList<ControlInterface>();
long lastCallTime = 0;
// ! list of all camera in the world
protected Map<String, Camera> listCamera = new HashMap<String, Camera>();
protected long gameTime = 0; // !< time of the game running
private long startTime;
//protected List<Mesh> listMeshToDrawFirst = new ArrayList<Mesh>();
public Environement() {
addEngine(new EngineGravity(this));
addEngine(new EnginePlayer(this));
addEngine(new EngineAI(this));
addEngine(new EngineDynamicMeshs(this));
addEngine(new EngineRender(this));
addEngine(new EnginePhysics(this));
addEngine(new EngineParticle(this));
addEngine(new EngineLight(this));
}
public void addControlInterface(ControlInterface ref) {
controls.add(ref);
}
public void removeControlInterface(ControlInterface ref) {
controls.remove(ref);
}
public void onPointer(KeySpecial special,
KeyType type,
int pointerID,
Vector2f pos,
KeyStatus state) {
EventInput event = new EventInput(type, state, pointerID, pos, special);
for (ControlInterface elem : controls) {
elem.onEventInput(event, pos);
}
}
public void onKeyboard( KeySpecial special,
KeyKeyboard type,
Character value,
KeyStatus state) {
EventEntry event = new EventEntry(special, type, state, value);
for (ControlInterface elem : controls) {
elem.onEventEntry(event);
}
}
public void addEngine(Engine ref) {
if (ref == null) {
Log.error("try to add an empty Engine");
return;
}
// check if not exist
for (Engine it : engines) {
if (it.getType().contains(ref.getType())) {
it = ref;
return;
}
}
// add it at the end ...
engines.add(ref);
}
public void rmEngine(Engine ref) {
engines.remove(ref);
}
public void rmEngine(String type) {
for (Engine it : engines) {
if (it.getType().contains(type)) {
engines.remove(it);
return;
}
}
}
public Engine getEngine(String type) {
for (Engine it : engines) {
if (it.getType().contains(type)) {
return it;
}
}
Log.error("try to get an unexisting engine type: '" + type + "'");
return null;
}
public void engineComponentRemove(Component ref) {
for (Engine it: engines) {
if (it.getType().contentEquals(ref.getType())) {
it.componentRemove(ref);
return;
}
}
}
public void engineComponentAdd(Component ref) {
for (Engine it: engines) {
if (it.getType().contentEquals(ref.getType())) {
it.componentAdd(ref);
return;
}
}
}
public void render(long deltaMilli, String cameraName) {
Log.error("Render: " + cameraName + " time:" + deltaMilli);
// get the correct camera:
Camera camera = getCamera(cameraName);
if (camera == null) {
Log.error("Render: Can not get camera named: '" + cameraName + "'");
return;
}
OpenGL.setCameraMatrix(camera.getConvertionMatrix());
for (Engine it: engines) {
//Log.verbose(" render: " + it.getType());
it.render(deltaMilli, camera);
}
// for (Engine it: engine) {
// if(it == null) {
// continue;
// }
// Log.verbose(" render: " + it.getType());
// it.renderDebug(deltaMilli, camera);
// }
}
/**
* @brief Add a camera in the camera pool.
* @param name Name of the camera.
* @param camera Pointer on the camera to add.
*/
public void addCamera(String name, Camera camera) {
listCamera.put(name, camera);
}
/**
* @brief Get a specific camera.
* @param name Name of the camera.
* @return A pointer on the camera requested.
*/
public Camera getCamera(String name) {
return listCamera.get(name);
}
/**
* @brief Get List of all camera.
* @return All the camera registerred.
*/
public Map<String, Camera> getCameraList() {
return listCamera;
}
/**
* @brief Remove all from the current environement
*/
public void clear() {
listEntity.clear();
}
private static Map<String, CreatorEntity> creators = new HashMap<String, CreatorEntity>();
/**
* @brief add a creator entity system
* @param type Type of the entity.
* @param creator Function pointer that reference the entity creating.
*/
public static void addCreator(String type, CreatorEntity creator) {
if (creator == null) {
Log.error("Try to add an empty CREATOR ...");
return;
}
Log.debug("Add creator: " + type);
creators.put(type, creator);
Log.debug("Add creator: " + type + " (done)");
}
/**
* @brief Create an entity on the curent scene.
* @param type Type of the entity that might be created.
* @param description String that describe the content of the entity
* properties.
* @param autoAddEntity this permit to add the entity if it is created == >
* no more action ...
* @return null if an error occured OR the pointer on the entity and it is
* already added on the system.
* @note Pointer is return in case of setting properties on it...
*/
public Entity createEntity(String type, Object value, boolean autoAddEntity) {
if (creators.containsKey(type) == false) {
Log.error("Request creating of an type that is not known '" + type + "'");
return null;
}
CreatorEntity creatorPointer = creators.get(type);
if (creatorPointer == null) {
Log.error("null pointer creator == > internal error... '" + type + "'");
return null;
}
Entity tmpEntity = creatorPointer.create(this, value);
if (tmpEntity == null) {
Log.error("allocation error '" + type + "'");
return null;
}
if (autoAddEntity == true) {
addEntity(tmpEntity);
}
return tmpEntity;
}
public Entity createEntity(String type, boolean autoAddEntity) {
return this.createEntity(type, null, autoAddEntity);
}
/**
* @breif get a reference on the curent list of entity games
* @return all entity list
*/
public List<Entity> getEntity() {
return listEntity;
};
/**
* @brief add an entity on the list availlable.
* @param newEntity Entity to add.
*/
public void addEntity(Entity newEntity) {
// prevent memory allocation and un allocation ...
if (newEntity == null) {
return;
}
listEntity.add(newEntity);
newEntity.dynamicEnable();
}
/**
* @brief remove an entity on the list availlable.
* @param removeEntity Entity to remove.
*/
public void rmEntity(Entity removeEntity) {
if (removeEntity == null) {
return;
}
for (int iii=0; iii<listEntity.size() ; iii++) {
listEntity.get(iii).entityIsRemoved(removeEntity);
}
if (listEntity.remove(removeEntity) == true) {
removeEntity.onDestroy();
removeEntity.dynamicDisable();
removeEntity.unInit();
}
}
/**
* @brief generate an event on all the sub entity of the game == > usefull for
* explosion, or lazer fire ...
* @param event event that might be apply ...
*/
public void generateInteraction(EntityInteraction event) {
// inform the entity that an entity has been removed ==> this permit to keep pointer on entitys ...
for (int iii=0; iii<listEntity.size() ; iii++) {
event.applyEvent(listEntity.get(iii));
/*
Vector3f destPosition = mlistEntity[iii].getPosition();
float dist = (sourcePosition - destPosition).length;
if (dist == 0 || dist>decreasePower) {
continue;
}
float inpact = (decreasePower-dist)/decreasePower * power;
glistEntity[iii].setFireOn(groupIdSource, type, -inpact, sourcePosition);
*/
}
}
// private void onCallbackPeriodicCall(ewol::event::Time event) {
// float curentDelta = event.getDeltaCall();
// EGEVERBOSE("periodic call : " + event);
// // small hack to change speed ...
// curentDelta *= *propertyRatio;
// // check if the processing is availlable
// if (propertyStatus.get() == gameStop) {
// return;
// }
// // update game time:
// int lastGameTime = mgameTime*0.000001f;
// mgameTime += curentDelta;
// if (lastGameTime != (int)(mgameTime*0.000001f)) {
// EGEVERBOSE(" Emit Signal");
// signalPlayTimeChange.emit(mgameTime*0.000001f);
// }
//
// //EWOLDEBUG("Time: mlastCallTime=" + mlastCallTime + " deltaTime=" + deltaTime);
//
// // update camera positions:
// for (auto it : mlistCamera) {
// if (it.second != null) {
// EGEVERBOSE(" update camera : '" + it.first + "'");
// it.second.periodicCall(curentDelta);
// }
// }
// EGEVERBOSE(" step simulation : " + curentDelta);
// for (auto it: mengine) {
// if(it == null) {
// continue;
// }
// EGEVERBOSE(" update: " + it.getType());
// it.update(echrono::Duration(double(curentDelta)));
// }
//
// //EGE.debug("stepSimulation (start)");
// ///step the simulation
// // TODO mphysicEngine.update(curentDelta);
// // TODO //optional but useful: debug drawing
// // TODO mphysicEngine.debugDrawWorld();
// // TODO EGEINFO(" Update particule engine");
// // TODO mparticuleEngine.update(curentDelta);
// // remove all entity that requested it ...
// /**
// {
// int numberEnnemyKilled=0;
// int victoryPoint=0;
// auto it(mlistEntity.begin());
// while (it != mlistEntity.end()) {
// if(*it != null) {
// if ((*it).needToRemove() == true) {
// if ((*it).getGroup() > 1) {
// numberEnnemyKilled++;
// victoryPoint++;
// }
// EGEINFO("[" + (*it).getUID() + "] entity Removing ... " + (*it).getType());
// rmEntity((*it));
// it = mlistEntity.begin();
// } else {
// ++it;
// }
// } else {
// ++it;
// }
// }
// if (numberEnnemyKilled != 0) {
// //signalKillEnemy.emit(numberEnnemyKilled);
// }
// }
// */
// }
// public void addStaticMeshToDraw(Mesh mesh) {
// listMeshToDrawFirst.add(mesh);
// }
//
// public List<Mesh> getStaticMeshToDraw() {
// return listMeshToDrawFirst;
// }
public GameStatus getPropertyStatus() {
return propertyStatus;
}
public void setPropertyStatus(GameStatus propertyStatus) {
if (this.propertyStatus == propertyStatus) {
return;
}
this.propertyStatus = propertyStatus;
// if (propertyStatus == GameStatus.gameStart) {
// mperiodicCallConnection = getObjectManager().periodicCall.connect(this, Environement::onCallbackPeriodicCall);
// } else {
// mperiodicCallConnection.disconnect();
// }
}
public void periodicCall() {
if (lastCallTime == 0 ) {
startTime = System.nanoTime()/1000;
lastCallTime = startTime;
}
long lastUpdate = lastCallTime;
lastCallTime = System.nanoTime()/1000;
EventTime event = new EventTime(lastCallTime, lastCallTime-startTime, lastCallTime-lastUpdate, lastCallTime-lastUpdate);
for (ControlInterface elem : controls) {
elem.periodicCall(event);
}for (Engine engine : engines) {
engine.update((lastCallTime-lastUpdate)/100);
}
}
}
/*
* void Environement::getEntityNearest( Vector3f sourcePosition, float
* distanceMax, List<Environement::ResultNearestEntity> resultList) {
* resultList.clear(); Environement::ResultNearestEntity result; result.dist =
* 99999999999.0f; result.entity = null; for (int iii=0; iii<mlistEntity.size()
* ; iii++) { // chack null pointer result.entity = mlistEntity[iii]; if
* (result.entity == null) { continue; } // check distance ... Vector3f
* destPosition = result.entity.getPosition(); if (sourcePosition ==
* destPosition) { continue; } result.dist = (sourcePosition -
* destPosition).length(); //EGE.debug("Distance : " + distance + " >? " +
* distance + " id=" + iii); if (distanceMax>result.dist) {
* resultList.pushBack(result); } } }
*
* void Environement::getEntityNearestFixed( Vector3f sourcePosition, float
* distanceMax, List<Environement::ResultNearestEntity> resultList) {
* resultList.clear(); Environement::ResultNearestEntity result; result.dist =
* 99999999999.0f; result.entity = null; for (int iii=0; iii<mlistEntity.size()
* ; iii++) { // chack null pointer result.entity = mlistEntity[iii]; if
* (result.entity == null) { continue; } if (result.entity.isFixed() == false)
* { continue; } // check distance ... Vector3f destPosition =
* result.entity.getPositionTheoric(); result.dist = (sourcePosition -
* destPosition).length(); //EGE.debug("Distance : " + distance + " >? " +
* distance + " id=" + iii); if (distanceMax <= result.dist) { continue; } //
* try to add the entity at the best positions: int jjj; for (jjj=0;
* jjj<resultList.size(); jjj++) { if (resultList[jjj].dist>result.dist) {
* resultList.insert(resultList.begin()+jjj, result); break; } } // add entity
* at the end : if (jjj >= resultList.size()) { resultList.pushBack(result); } }
* }
*/

View File

@ -0,0 +1,7 @@
package org.atriasoft.gameengine;
public enum GameStatus {
gameStart,
gamePause,
gameStop
}

Some files were not shown because too many files have changed in this diff Show More