Compare commits
10 Commits
bf0d85ec06
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31d6c0900a | ||
|
|
835c645da4 | ||
|
|
27977c1738 | ||
|
|
bc065bc657 | ||
|
|
0acfe36118 | ||
|
|
144126ee7a | ||
|
|
d18b40a7fc | ||
|
|
6f60cc11c8 | ||
|
|
70893c083b | ||
|
|
a78be71e34 |
478
.idea/editor.xml
generated
478
.idea/editor.xml
generated
@@ -99,5 +99,483 @@
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Single" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGNMENT_TAB_FILL_STYLE/@EntryValue" value="USE_TABS_ONLY" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexRemoved" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexRemoved" />
|
||||
</component>
|
||||
</project>
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -2,8 +2,6 @@
|
||||
<project version="4">
|
||||
<component name="BackendCodeEditorMiscSettings">
|
||||
<option name="/Default/Housekeeping/GlobalSettingsUpgraded/IsUpgraded/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/Environment/Hierarchy/GeneratedFilesCacheKey/Timestamp/@EntryValue" value="69" type="long" />
|
||||
<option name="/Default/Housekeeping/OptionsDialog/SelectedPageId/@EntryValue" value="CppFormatterOtherPage" type="string" />
|
||||
</component>
|
||||
<component name="CMakePythonSetting">
|
||||
<option name="pythonIntegrationState" value="YES" />
|
||||
|
||||
457
CMakeLists.txt
457
CMakeLists.txt
@@ -9,221 +9,275 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmacro-prefix-map=${CMAKE_CURRENT_SOURC
|
||||
|
||||
add_executable(z3d main.cpp
|
||||
include/assets/components/material_components.hpp
|
||||
include/assets/components/mesh_shader_components.hpp
|
||||
include/assets/components/mesh_vertex_components.hpp
|
||||
include/assets/components/mesh_vertex_components.hpp
|
||||
include/assets/components/point_cloud_vertex_components.hpp
|
||||
include/assets/components/mesh_vertex_components.hpp
|
||||
include/assets/data/material_data.hpp
|
||||
include/assets/data/mesh_data.hpp
|
||||
include/assets/data/point_cloud_data.hpp
|
||||
include/assets/file_parsers/kitti_loader.hpp
|
||||
include/assets/file_parsers/obj_loader.hpp
|
||||
include/assets/file_parsers/stl_loader.hpp
|
||||
include/assets/file_parsers/uos_loader.hpp
|
||||
include/assets/components/mesh_vertex_components.hpp
|
||||
include/scene/camera.hpp
|
||||
include/scene/flying_camera.hpp
|
||||
include/opengl/handles/mesh_handle.hpp
|
||||
include/opengl/handles/point_cloud_handle.hpp
|
||||
include/opengl/handles/shader_program_handle.hpp
|
||||
include/opengl/handles/texture_handle.hpp
|
||||
include/opengl/data/mesh_data.hpp
|
||||
include/opengl/data/point_cloud_data.hpp
|
||||
include/opengl/data/shader_program_data.hpp
|
||||
include/scene/lighting_setup.hpp
|
||||
include/rendering/batch_renderers/mesh_batch_renderer.hpp
|
||||
include/opengl/error.hpp
|
||||
include/rendering/batches/mesh_batch.hpp
|
||||
include/rendering/batches/point_cloud_batch.hpp
|
||||
include/util/arx.hpp
|
||||
include/util/extra_arx_parsers.hpp
|
||||
include/util/for_each.hpp
|
||||
include/util/function.hpp
|
||||
include/util/image.hpp
|
||||
include/util/logger.hpp
|
||||
include/util/string_indexer.hpp
|
||||
include/util/string_literal.hpp
|
||||
include/util/uix.hpp
|
||||
source/assets/file_parsers/stl_loader.cpp
|
||||
source/assets/file_parsers/obj_loader.cpp
|
||||
source/scene/flying_camera.cpp
|
||||
source/opengl/data/point_cloud_data.cpp
|
||||
source/opengl/handles/shader_program_handle.ipp
|
||||
source/opengl/data/texture_data.ipp
|
||||
source/opengl/data/mesh_data.cpp
|
||||
include/opengl/error.hpp
|
||||
source/opengl/data/shader_program_data.cpp
|
||||
source/opengl/handles/mesh_handle.ipp
|
||||
source/opengl/handles/point_cloud_handle.ipp
|
||||
source/opengl/handles/texture_handle.ipp
|
||||
include/assets/data/surface_properties.hpp
|
||||
include/util/unroll_bool_template.hpp
|
||||
include/rendering/batch_renderers/point_cloud_batch_renderer.hpp
|
||||
source/rendering/batches/mesh_batch.ipp
|
||||
source/rendering/batches/point_cloud_batch.ipp
|
||||
include/opengl/shader_program_variable.hpp
|
||||
include/opengl/type_utils.hpp
|
||||
include/util/binary_ifstream.hpp
|
||||
source/assets/file_parsers/kitti_loader.cpp
|
||||
include/assets/file_parsers/generic/generic_3dtk_loader.hpp
|
||||
include/assets/file_parsers/uosr_loader.hpp
|
||||
include/assets/file_parsers/uos_normal_loader.hpp
|
||||
include/assets/file_parsers/uos_rgb_loader.hpp
|
||||
include/assets/data_loaders/mesh_loader.hpp
|
||||
source/assets/data_loaders/mesh_loader.cpp
|
||||
source/assets/data_loaders/mesh_loader.cpp
|
||||
include/assets/data_loaders/point_cloud_loader.hpp
|
||||
include/assets/data_loaders/generic/base_dynamic_loader.hpp
|
||||
source/assets/data_loaders/generic/base_dynamic_loader.ipp
|
||||
source/assets/data_loaders/point_cloud_loader.cpp
|
||||
include/opengl/handles/matrix_handles.hpp
|
||||
include/viewer/instance.hpp
|
||||
include/opengl/data/material_data.hpp
|
||||
include/opengl/handles/material_handle.hpp
|
||||
include/opengl/handles/surface_properties_handle.hpp
|
||||
include/opengl/handles/alpha_handle.hpp
|
||||
source/opengl/data/material_data.ipp
|
||||
include/util/specialised_lambda.hpp
|
||||
include/viewer/asset_types.hpp
|
||||
source/viewer/instance.cpp
|
||||
include/viewer/asset_loader.hpp
|
||||
source/viewer/asset_loader.cpp
|
||||
include/assets/file_parsers/glsl_loader.hpp
|
||||
include/assets/data/shader_source_data.hpp
|
||||
source/assets/file_parsers/glsl_loader.cpp
|
||||
include/viewer/settings.hpp
|
||||
include/opengl/data/shader_data.hpp
|
||||
source/opengl/data/shader_data.ipp
|
||||
source/opengl/data/point_cloud_data.ipp
|
||||
source/opengl/data/shader_data.cpp
|
||||
include/opengl/handles/shader_handle.hpp
|
||||
include/util/string_lookup.hpp
|
||||
include/viewer/dynamic_shader_program_loading.hpp
|
||||
source/viewer/dynamic_shader_program_loading.cpp
|
||||
source/opengl/handles/shader_program_handle.cpp
|
||||
include/opengl/shader_program_lookup.hpp
|
||||
source/opengl/shader_program_lookup.cpp
|
||||
include/opengl/shading/attributes/point_cloud_attributes.hpp
|
||||
include/opengl/shading/uniforms/mesh_uniforms.hpp
|
||||
include/opengl/shading/uniforms/point_cloud_uniforms.hpp
|
||||
include/opengl/shading/features/mesh_features.hpp
|
||||
include/opengl/shading/features/point_cloud_features.hpp
|
||||
include/rendering/requirements/mesh_requirements.hpp
|
||||
include/rendering/requirements/point_cloud_requirements.hpp
|
||||
include/rendering/modes/mesh_modes.hpp
|
||||
include/rendering/modes/point_cloud_modes.hpp
|
||||
source/rendering/batch_renderers/mesh_batch_renderer.cpp
|
||||
source/rendering/batch_renderers/point_cloud_batch_renderer.cpp
|
||||
include/rendering/shader_program_lookups/mesh_lookup.hpp
|
||||
include/rendering/shader_program_lookups/mesh_lookup.hpp
|
||||
source/rendering/shader_program_lookups/mesh_lookup.cpp
|
||||
source/rendering/shader_program_lookups/point_cloud_lookup.cpp
|
||||
include/rendering/shader_program_lookups/point_cloud_lookup.hpp
|
||||
include/geometry/aabb.hpp
|
||||
source/geometry/normal_estimation.cpp
|
||||
include/geometry/normal_estimation.hpp
|
||||
include/assets/components/shader_components.hpp
|
||||
include/assets/components/texture_components.hpp
|
||||
include/util/enum_bitfield_operators.hpp
|
||||
include/assets/data/texture_data.hpp
|
||||
source/assets/data/mesh_data.ipp
|
||||
source/assets/data/material_data.ipp
|
||||
include/assets/data/generic/vertex_array_data.hpp
|
||||
source/assets/data/texture_data.ipp
|
||||
source/assets/data/point_cloud_data.ipp
|
||||
include/assets/file_parsers/mtl_loader.hpp
|
||||
include/assets/data_loaders/generic/base_dynamic_loader.hpp
|
||||
include/assets/data_loaders/material_library_loader.hpp
|
||||
include/assets/data_loaders/material_loader.hpp
|
||||
include/util/id_type.hpp
|
||||
include/assets/data_loaders/mesh_loader.hpp
|
||||
include/assets/data_loaders/point_cloud_loader.hpp
|
||||
include/assets/data_loaders/texture_loader.hpp
|
||||
include/assets/data_stores.hpp
|
||||
include/assets/data_stores/generic/generic_basic_store.hpp
|
||||
source/assets/data_stores/generic/generic_basic_store.ipp
|
||||
include/assets/data_stores/generic/generic_material_store.hpp
|
||||
include/assets/data_stores/generic/generic_mesh_store.hpp
|
||||
include/assets/data_stores/generic/generic_point_cloud_store.hpp
|
||||
include/assets/data_stores/material_library_store.hpp
|
||||
include/assets/data_stores/material_store.hpp
|
||||
include/assets/data_stores/mesh_store.hpp
|
||||
include/assets/data_stores/point_cloud_store.hpp
|
||||
include/util/result.hpp
|
||||
source/assets/file_parsers/mtl_loader.cpp
|
||||
include/util/line_parser.hpp
|
||||
include/assets/data_loaders/texture_loader.hpp
|
||||
source/assets/data_loaders/texture_loader.cpp
|
||||
include/assets/data_stores/texture_store.hpp
|
||||
include/opengl/data_managers/texture_manager.hpp
|
||||
include/assets/prefetch_lookups/mesh_prefetch_lookup.hpp
|
||||
include/assets/prefetch_lookups/point_cloud_prefetch_lookup.hpp
|
||||
include/assets/prefetch_lookups/material_prefetch_lookup.hpp
|
||||
include/assets/prefetch_lookups/texture_prefetch_lookup.hpp
|
||||
include/assets/prefetch_lookups/pose_prefetch_lookup.hpp
|
||||
include/assets/data_stores/pose_list_store.hpp
|
||||
include/assets/data_stores/pose_store.hpp
|
||||
include/assets/file_parsers/kitti_pose_loader.hpp
|
||||
include/assets/file_parsers/threedtk_pose_loader.hpp
|
||||
source/assets/file_parsers/threedtk_pose_loader.cpp
|
||||
include/assets/data/pose_data.hpp
|
||||
source/assets/file_parsers/kitti_pose_loader.cpp
|
||||
include/assets/prefetch_queue.hpp
|
||||
include/util/string_list.hpp
|
||||
include/assets/data_stores/material_library_store.hpp
|
||||
include/assets/data/material_library_data.hpp
|
||||
include/assets/data_loaders/material_library_loader.hpp
|
||||
include/assets/prefetch_lookups/material_library_prefetch_lookup.hpp
|
||||
include/assets/prefetch_lookups/shader_prefetch_lookup.hpp
|
||||
include/assets/data_stores/shader_source_store.hpp
|
||||
include/assets/data_stores/texture_store.hpp
|
||||
include/assets/data_views/generic/generic_mesh_view.hpp
|
||||
include/assets/data_views/generic/generic_point_cloud_view.hpp
|
||||
include/assets/data_views/material_view.hpp
|
||||
include/assets/data_views/mesh_view.hpp
|
||||
include/assets/data_views/point_cloud_view.hpp
|
||||
include/assets/data_views/pose_list_view.hpp
|
||||
include/assets/data_views/shader_source_view.hpp
|
||||
include/assets/data_views/texture_view.hpp
|
||||
include/assets/data/generic/component_array_set.hpp
|
||||
include/assets/data/generic/component_set.hpp
|
||||
include/assets/data/material_data.hpp
|
||||
include/assets/data/material_library_data.hpp
|
||||
include/assets/data/mesh_data.hpp
|
||||
include/assets/data/point_cloud_data.hpp
|
||||
include/assets/data/pose_data.hpp
|
||||
include/assets/data/pose_list_data.hpp
|
||||
include/assets/data/shader_source_data.hpp
|
||||
include/assets/data/texture_data.hpp
|
||||
include/assets/data/uniform_surface_properties.hpp
|
||||
include/assets/fallback_data/fallback_material.hpp
|
||||
include/assets/fallback_data/fallback_texture.hpp
|
||||
include/assets/file_parsers/generic/generic_3dtk_loader.hpp
|
||||
source/assets/file_parsers/generic/generic_3dtk_loader.ipp
|
||||
include/assets/prefetch_lookup.hpp
|
||||
source/assets/prefetch_lookups/pose_prefetch_lookup.cpp
|
||||
include/assets/dynamic_data_store.hpp
|
||||
include/opengl/metadata/shader_source_metadata.hpp
|
||||
source/opengl/data_managers/shader_manager.cpp
|
||||
include/opengl/shading/model_geometry.hpp
|
||||
include/opengl/shading/shader_stage.hpp
|
||||
include/opengl/shading/requirements/shader_program_requirements.hpp
|
||||
include/opengl/shading/attributes/mesh_attributes.hpp
|
||||
include/opengl/data_managers/shader_source_manager.hpp
|
||||
source/opengl/data_managers/shader_source_manager.cpp
|
||||
include/opengl/shading/shader_metadata_language.hpp
|
||||
include/opengl/shading/features/generic_features.hpp
|
||||
include/opengl/shading/features/combined_features.hpp
|
||||
include/opengl/shading/requirements/shader_source_requirements.hpp
|
||||
include/opengl/metadata/preprocessed_shader_source_metadata.hpp
|
||||
include/opengl/shading/requirements/shader_requirements.hpp
|
||||
include/opengl/metadata/shader_metadata.hpp
|
||||
include/opengl/metadata/shader_set_metadata.hpp
|
||||
include/opengl/handles/shader_handle_set.hpp
|
||||
include/opengl/shading/requirements/shader_set_requirements.hpp
|
||||
include/opengl/data_managers/shader_program_manager.hpp
|
||||
include/opengl/metadata/shader_program_metadata.hpp
|
||||
source/opengl/data_managers/shader_program_manager.cpp
|
||||
source/opengl/data_managers/texture_manager.cpp
|
||||
include/util/reference_counter.hpp
|
||||
include/opengl/resource_management/resource_manager.hpp
|
||||
source/opengl/resource_management/resource_manager.ipp
|
||||
include/opengl/data_managers/shader_manager.hpp
|
||||
include/assets/file_parsers/generic/generic_3dtk_loader.hpp
|
||||
include/assets/file_parsers/glsl_parser.hpp
|
||||
include/assets/file_parsers/kitti_parser.hpp
|
||||
include/assets/file_parsers/kitti_pose_parser.hpp
|
||||
include/assets/file_parsers/mtl_parser.hpp
|
||||
include/assets/file_parsers/obj_parser.hpp
|
||||
include/assets/file_parsers/stl_loader.hpp
|
||||
include/assets/file_parsers/threedtk_pose_loader.hpp
|
||||
include/assets/file_parsers/uos_loader.hpp
|
||||
include/assets/file_parsers/uos_normal_loader.hpp
|
||||
include/assets/file_parsers/uos_rgb_loader.hpp
|
||||
include/assets/file_parsers/uosr_loader.hpp
|
||||
include/assets/identifiers.hpp
|
||||
include/assets/model_geometry.hpp
|
||||
include/assets/path_id_lookups.hpp
|
||||
include/config/primitives.hpp
|
||||
include/geometry/aabb.hpp
|
||||
include/geometry/normal_estimation.hpp
|
||||
include/opengl/data_managers/material_manager.hpp
|
||||
include/opengl/data_managers/mesh_index_buffer_manager.hpp
|
||||
include/opengl/data_managers/mesh_vertex_buffer_manager.hpp
|
||||
source/opengl/data_managers/mesh_vertex_buffer_manager.cpp
|
||||
include/opengl/data_managers/point_cloud_vertex_buffer_manager.hpp
|
||||
include/opengl/data_managers/shader_manager.hpp
|
||||
include/opengl/data_managers/shader_program_manager.hpp
|
||||
include/opengl/data_managers/shader_source_manager.hpp
|
||||
include/opengl/data_managers/texture_manager.hpp
|
||||
include/opengl/data/material_data.hpp
|
||||
include/opengl/data/mesh_data.hpp
|
||||
include/opengl/data/point_cloud_data.hpp
|
||||
include/opengl/data/shader_data.hpp
|
||||
include/opengl/data/shader_program_data.hpp
|
||||
include/opengl/error.hpp
|
||||
include/opengl/error.hpp
|
||||
include/opengl/handles/alpha_handle.hpp
|
||||
include/opengl/handles/index_buffer_handle.hpp
|
||||
include/opengl/handles/material_handle.hpp
|
||||
include/opengl/handles/matrix_handles.hpp
|
||||
include/opengl/handles/mesh_handle.hpp
|
||||
include/opengl/handles/point_cloud_handle.hpp
|
||||
include/opengl/handles/shader_handle_set.hpp
|
||||
include/opengl/handles/shader_handle.hpp
|
||||
include/opengl/handles/shader_program_handle.hpp
|
||||
include/opengl/handles/surface_properties_handle.hpp
|
||||
include/opengl/handles/texture_handle.hpp
|
||||
include/opengl/handles/vertex_buffer_handle.hpp
|
||||
include/opengl/metadata/index_buffer_metadata.hpp
|
||||
include/opengl/metadata/material_metadata.hpp
|
||||
include/opengl/metadata/mesh_vertex_buffer_metadata.hpp
|
||||
include/opengl/metadata/point_cloud_vertex_buffer_metadata.hpp
|
||||
include/opengl/metadata/preprocessed_shader_source_metadata.hpp
|
||||
include/opengl/metadata/shader_metadata.hpp
|
||||
include/opengl/metadata/shader_program_metadata.hpp
|
||||
include/opengl/metadata/shader_set_metadata.hpp
|
||||
include/opengl/metadata/shader_source_metadata.hpp
|
||||
include/opengl/metadata/texture_metadata.hpp
|
||||
include/opengl/metadata/uniform_buffer_alignment_metadata.hpp
|
||||
include/opengl/resource_management/reference_counter.hpp
|
||||
include/opengl/resource_management/reference_counter.hpp
|
||||
include/opengl/resource_management/resource_handle.hpp
|
||||
source/opengl/resource_management/resource_handle.ipp
|
||||
include/opengl/handles/vertex_buffer_handle.hpp
|
||||
source/opengl/handles/vertex_buffer_handle.ipp
|
||||
include/opengl/handles/index_buffer_handle.hpp
|
||||
source/opengl/handles/index_buffer_handle.ipp
|
||||
include/opengl/metadata/texture_metadata.hpp
|
||||
include/opengl/vertex_buffer_utils.hpp
|
||||
include/opengl/data_managers/mesh_index_buffer_manager.hpp
|
||||
include/opengl/metadata/index_buffer_metadata.hpp
|
||||
source/opengl/data_managers/mesh_index_buffer_manager.cpp
|
||||
include/opengl/data_managers/point_cloud_vertex_buffer_manager.hpp
|
||||
source/opengl/data_managers/point_cloud_vertex_buffer_manager.cpp
|
||||
include/assets/data_views/mesh_view.hpp
|
||||
include/assets/data_views/point_cloud_view.hpp
|
||||
include/assets/data_views/shader_source_view.hpp
|
||||
include/assets/data_stores/generic/generic_mesh_store.hpp
|
||||
source/assets/data_stores/generic/generic_mesh_store.ipp
|
||||
include/assets/data_stores/generic/generic_point_cloud_store.hpp
|
||||
source/assets/data_stores/generic/generic_point_cloud_store.ipp
|
||||
include/assets/data_views/material_view.hpp
|
||||
include/assets/data_views/texture_view.hpp
|
||||
include/assets/data_stores/generic/generic_material_store.hpp
|
||||
include/opengl/resource_management/resource_manager.hpp
|
||||
include/opengl/shader_program_lookup.hpp
|
||||
include/opengl/shading/attributes/mesh_attributes.hpp
|
||||
include/opengl/shading/attributes/point_cloud_attributes.hpp
|
||||
include/opengl/shading/features/combined_features.hpp
|
||||
include/opengl/shading/features/generic_features.hpp
|
||||
include/opengl/shading/features/mesh_features.hpp
|
||||
include/opengl/shading/features/point_cloud_features.hpp
|
||||
include/opengl/shading/model_geometry.hpp
|
||||
include/opengl/shading/requirements/shader_program_requirements.hpp
|
||||
include/opengl/shading/requirements/shader_requirements.hpp
|
||||
include/opengl/shading/sampler_uniform.hpp
|
||||
include/opengl/shading/sampler_uniforms/mesh_samplers_uniforms.hpp
|
||||
include/opengl/shading/shader_metadata_language.hpp
|
||||
include/opengl/shading/shader_stage.hpp
|
||||
include/opengl/shading/uniform_block.hpp
|
||||
include/opengl/shading/uniform_blocks/mesh_uniform_blocks.hpp
|
||||
include/opengl/shading/uniform_blocks/point_cloud_uniform_blocks.hpp
|
||||
include/opengl/shading/uniform.hpp
|
||||
include/opengl/shading/uniforms/mesh_uniforms.hpp
|
||||
include/opengl/shading/uniforms/point_cloud_uniforms.hpp
|
||||
include/opengl/type_utils.hpp
|
||||
include/opengl/types.hpp
|
||||
include/rendering/batch_renderers/mesh_batch_renderer.hpp
|
||||
include/rendering/batch_renderers/point_cloud_batch_renderer.hpp
|
||||
include/rendering/batches/mesh_batch.hpp
|
||||
include/rendering/batches/point_cloud_batch.hpp
|
||||
include/rendering/modes/mesh_modes.hpp
|
||||
include/rendering/modes/point_cloud_modes.hpp
|
||||
include/rendering/requirements/mesh_requirements.hpp
|
||||
include/rendering/requirements/point_cloud_requirements.hpp
|
||||
include/rendering/shader_program_lookups/mesh_lookup.hpp
|
||||
include/rendering/shader_program_lookups/mesh_lookup.hpp
|
||||
include/rendering/shader_program_lookups/point_cloud_lookup.hpp
|
||||
include/scene/camera.hpp
|
||||
include/scene/flying_camera.hpp
|
||||
include/scene/lighting_setup.hpp
|
||||
include/util/arx.hpp
|
||||
include/util/binary_ifstream.hpp
|
||||
include/util/enum_bitfield_operators.hpp
|
||||
include/util/extra_arx_parsers.hpp
|
||||
include/util/file_id_lookup.hpp
|
||||
include/util/for_each.hpp
|
||||
include/util/function.hpp
|
||||
include/util/id_type.hpp
|
||||
include/util/image.hpp
|
||||
include/util/line_parser.hpp
|
||||
include/util/logger.hpp
|
||||
include/util/reference_counter.hpp
|
||||
include/util/result.hpp
|
||||
include/util/specialised_lambda.hpp
|
||||
include/util/string_indexer.hpp
|
||||
include/util/string_list.hpp
|
||||
include/util/string_literal.hpp
|
||||
include/util/string_lookup.hpp
|
||||
include/util/uix.hpp
|
||||
include/util/unroll_bool_template.hpp
|
||||
include/util/vector_replace_range.hpp
|
||||
include/viewer/asset_loader.hpp
|
||||
include/viewer/asset_types.hpp
|
||||
include/viewer/dynamic_shader_program_loading.hpp
|
||||
include/viewer/instance.hpp
|
||||
include/viewer/settings.hpp
|
||||
source/assets/data_loaders/generic/base_dynamic_loader.ipp
|
||||
source/assets/data_loaders/mesh_loader.cpp
|
||||
source/assets/data_loaders/mesh_loader.cpp
|
||||
source/assets/data_loaders/point_cloud_loader.cpp
|
||||
source/assets/data_loaders/texture_loader.cpp
|
||||
source/assets/data_stores/generic/generic_basic_store.ipp
|
||||
source/assets/data_stores/generic/generic_material_store.ipp
|
||||
source/assets/data_stores/generic/generic_mesh_store.ipp
|
||||
source/assets/data_stores/generic/generic_point_cloud_store.ipp
|
||||
source/assets/data_stores/shader_source_store.ipp
|
||||
include/opengl/metadata/mesh_vertex_buffer_metadata.hpp
|
||||
include/opengl/metadata/point_cloud_vertex_buffer_metadata.hpp
|
||||
source/assets/data/material_data.ipp
|
||||
source/assets/data/mesh_data.ipp
|
||||
source/assets/data/point_cloud_data.ipp
|
||||
source/assets/data/texture_data.ipp
|
||||
source/assets/fallback_data/default_texture_data.cpp
|
||||
source/assets/fallback_data/fallback_material.cpp
|
||||
source/assets/file_parsers/generic/generic_3dtk_loader.ipp
|
||||
source/assets/file_parsers/glsl_parser.cpp
|
||||
source/assets/file_parsers/kitti_parser.cpp
|
||||
source/assets/file_parsers/kitti_pose_parser.cpp
|
||||
source/assets/file_parsers/mtl_parser.cpp
|
||||
source/assets/file_parsers/obj_parser.cpp
|
||||
include/util/array_hash.hpp
|
||||
include/util/vector_hash.hpp
|
||||
|
||||
source/assets/file_parsers/stl_loader.cpp
|
||||
|
||||
source/assets/file_parsers/threedtk_pose_loader.cpp
|
||||
|
||||
source/geometry/normal_estimation.cpp
|
||||
|
||||
source/opengl/data_managers/mesh_index_buffer_manager.cpp
|
||||
|
||||
source/opengl/data_managers/mesh_vertex_buffer_manager.cpp
|
||||
|
||||
source/opengl/data_managers/point_cloud_vertex_buffer_manager.cpp
|
||||
|
||||
source/opengl/data_managers/shader_manager.cpp
|
||||
|
||||
source/opengl/data_managers/shader_program_manager.cpp
|
||||
|
||||
source/opengl/data_managers/shader_source_manager.cpp
|
||||
|
||||
source/opengl/data_managers/texture_manager.cpp
|
||||
|
||||
source/opengl/data/material_data.ipp
|
||||
|
||||
source/opengl/data/mesh_data.cpp
|
||||
|
||||
source/opengl/data/point_cloud_data.cpp
|
||||
|
||||
source/opengl/data/point_cloud_data.ipp
|
||||
|
||||
source/opengl/data/shader_data.cpp
|
||||
|
||||
source/opengl/data/shader_data.ipp
|
||||
|
||||
source/opengl/data/shader_program_data.cpp
|
||||
|
||||
source/opengl/data/texture_data.ipp
|
||||
|
||||
source/opengl/handles/index_buffer_handle.ipp
|
||||
|
||||
source/opengl/handles/mesh_handle.ipp
|
||||
|
||||
source/opengl/handles/point_cloud_handle.ipp
|
||||
|
||||
source/opengl/handles/shader_program_handle.cpp
|
||||
|
||||
source/opengl/handles/shader_program_handle.ipp
|
||||
|
||||
source/opengl/handles/texture_handle.ipp
|
||||
|
||||
source/opengl/handles/vertex_buffer_handle.ipp
|
||||
|
||||
source/opengl/resource_management/resource_handle.ipp
|
||||
|
||||
source/opengl/resource_management/resource_manager.ipp
|
||||
|
||||
source/opengl/shader_program_lookup.cpp
|
||||
|
||||
source/rendering/batch_renderers/mesh_batch_renderer.cpp
|
||||
|
||||
source/rendering/batch_renderers/point_cloud_batch_renderer.cpp
|
||||
|
||||
source/rendering/batches/mesh_batch.ipp
|
||||
|
||||
source/rendering/batches/point_cloud_batch.ipp
|
||||
|
||||
source/rendering/shader_program_lookups/mesh_lookup.cpp
|
||||
|
||||
source/rendering/shader_program_lookups/point_cloud_lookup.cpp
|
||||
|
||||
source/scene/flying_camera.cpp
|
||||
|
||||
source/viewer/asset_loader.cpp
|
||||
|
||||
source/viewer/dynamic_shader_program_loading.cpp
|
||||
|
||||
source/viewer/instance.cpp
|
||||
)
|
||||
|
||||
target_include_directories(z3d PRIVATE include)
|
||||
@@ -233,9 +287,10 @@ add_subdirectory(libraries)
|
||||
|
||||
find_package(GLEW REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(SFML REQUIRED COMPONENTS graphics system)
|
||||
find_package(SFML REQUIRED COMPONENTS Graphics System)
|
||||
find_package(Eigen3 3.4 REQUIRED NO_MODULE)
|
||||
find_package(TBB REQUIRED NO_MODULE)
|
||||
|
||||
include_directories(${SFML_INCLUDE_DIR})
|
||||
include_directories(SYSTEM ${eigen_INCLUDE_DIR})
|
||||
target_link_libraries(z3d Eigen3::Eigen sfml-graphics sfml-system sfml-window ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES})
|
||||
target_link_libraries(z3d Eigen3::Eigen sfml-graphics sfml-system sfml-window TBB::tbb ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES})
|
||||
|
||||
@@ -2,53 +2,70 @@
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include "assets/identifiers.hpp"
|
||||
#include "assets/data_stores/texture_store.hpp"
|
||||
#include "assets/data/surface_properties.hpp"
|
||||
#include "assets/data/uniform_surface_properties.hpp"
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
|
||||
namespace assets::material_components
|
||||
{
|
||||
using surface_properties = surface_properties;
|
||||
using transparency = float;
|
||||
using ambient_color_texture = texture_store::id_type;
|
||||
using diffuse_color_texture = texture_store::id_type;
|
||||
using specular_color_texture = texture_store::id_type;
|
||||
using shininess_texture = texture_store::id_type;
|
||||
using alpha_texture = texture_store::id_type;
|
||||
using bump_texture = texture_store::id_type;
|
||||
|
||||
using ambient_filter = z3d::vec3;
|
||||
using diffuse_filter = z3d::vec3;
|
||||
using specular_filter = z3d::vec3;
|
||||
using shininess = z3d::f32;
|
||||
using alpha = z3d::f32;
|
||||
using ambient_filter_texture = texture_id;
|
||||
using diffuse_filter_texture = texture_id;
|
||||
using specular_filter_texture = texture_id;
|
||||
using shininess_texture = texture_id;
|
||||
using alpha_texture = texture_id;
|
||||
using bump_texture = texture_id;
|
||||
|
||||
namespace indices
|
||||
{
|
||||
using type = std::size_t;
|
||||
inline constexpr type surface_properties = 0;
|
||||
inline constexpr type transparency = 1;
|
||||
inline constexpr type ambient_color_texture = 2;
|
||||
inline constexpr type diffuse_color_texture = 3;
|
||||
inline constexpr type specular_color_texture = 4;
|
||||
inline constexpr type shininess_texture = 5;
|
||||
inline constexpr type alpha_texture = 6;
|
||||
inline constexpr type bump_texture = 7;
|
||||
enum : z3d::size
|
||||
{
|
||||
ambient_filter,
|
||||
diffuse_filter,
|
||||
specular_filter,
|
||||
shininess,
|
||||
alpha,
|
||||
ambient_filter_texture,
|
||||
diffuse_filter_texture,
|
||||
specular_filter_texture,
|
||||
shininess_texture,
|
||||
alpha_texture,
|
||||
bump_texture
|
||||
};
|
||||
}
|
||||
|
||||
enum class flags : std::uint8_t
|
||||
enum class flags : z3d::u16
|
||||
{
|
||||
none = 0,
|
||||
surface_properties = 1 << indices::surface_properties,
|
||||
transparency = 1 << indices::transparency,
|
||||
ambient_filter_texture = 1 << indices::ambient_color_texture,
|
||||
diffuse_filter_texture = 1 << indices::diffuse_color_texture,
|
||||
specular_filter_texture = 1 << indices::specular_color_texture,
|
||||
ambient_filter = 1 << indices::ambient_filter,
|
||||
diffuse_filter = 1 << indices::diffuse_filter,
|
||||
specular_filter = 1 << indices::specular_filter,
|
||||
shininess = 1 << indices::shininess,
|
||||
alpha = 1 << indices::alpha,
|
||||
ambient_filter_texture = 1 << indices::ambient_filter_texture,
|
||||
diffuse_filter_texture = 1 << indices::diffuse_filter_texture,
|
||||
specular_filter_texture = 1 << indices::specular_filter_texture,
|
||||
shininess_texture = 1 << indices::shininess_texture,
|
||||
alpha_texture = 1 << indices::alpha_texture,
|
||||
bump_texture = 1 << indices::bump_texture
|
||||
};
|
||||
|
||||
using all = std::tuple<
|
||||
surface_properties,
|
||||
transparency,
|
||||
ambient_color_texture,
|
||||
diffuse_color_texture,
|
||||
specular_color_texture,
|
||||
using all = z3d::structure<
|
||||
ambient_filter,
|
||||
diffuse_filter,
|
||||
specular_filter,
|
||||
shininess,
|
||||
alpha,
|
||||
ambient_filter_texture,
|
||||
diffuse_filter_texture,
|
||||
specular_filter_texture,
|
||||
shininess_texture,
|
||||
alpha_texture,
|
||||
bump_texture
|
||||
|
||||
58
include/assets/components/mesh_shader_components.hpp
Normal file
58
include/assets/components/mesh_shader_components.hpp
Normal file
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
#include <array>
|
||||
#include <string_view>
|
||||
|
||||
namespace assets::mesh_shader_components
|
||||
{
|
||||
|
||||
namespace indices
|
||||
{
|
||||
enum : z3d::size
|
||||
{
|
||||
face,
|
||||
line,
|
||||
point,
|
||||
luminance,
|
||||
color,
|
||||
alpha,
|
||||
color_texture,
|
||||
uniform_lighting,
|
||||
textured_lighting,
|
||||
uniform_color
|
||||
};
|
||||
}
|
||||
|
||||
enum class flags : std::uint16_t
|
||||
{
|
||||
none = 0,
|
||||
face = 1 << indices::face,
|
||||
line = 1 << indices::line,
|
||||
point = 1 << indices::point,
|
||||
luminance = 1 << indices::luminance,
|
||||
color = 1 << indices::color,
|
||||
alpha = 1 << indices::alpha,
|
||||
color_texture = 1 << indices::color_texture,
|
||||
uniform_lighting = 1 << indices::uniform_lighting,
|
||||
textured_lighting = 1 << indices::textured_lighting,
|
||||
uniform_color = 1 << indices::uniform_color
|
||||
};
|
||||
|
||||
constexpr inline auto names = std::array<std::string_view, 10>{
|
||||
"face",
|
||||
"line",
|
||||
"point",
|
||||
"luminance",
|
||||
"color",
|
||||
"alpha",
|
||||
"color_texture",
|
||||
"uniform_lighting",
|
||||
"textured_lighting",
|
||||
"uniform_color"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
DEFINE_ENUM_BITFIELD_OPERATORS(assets::mesh_shader_components::flags)
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
@@ -7,33 +8,49 @@
|
||||
namespace assets::mesh_vertex_components
|
||||
{
|
||||
|
||||
using position = std::array<float, 3>;
|
||||
using normal = std::array<float, 3>;
|
||||
using tex_coord = std::array<float, 2>;
|
||||
using color = std::array<float, 3>;
|
||||
using reflectance = std::array<float, 1>;
|
||||
using position = z3d::vec3;
|
||||
using normal = z3d::vec3;
|
||||
using tangent = z3d::vec3;
|
||||
using bi_tangent = z3d::vec3;
|
||||
using tex_coord = z3d::vec2;
|
||||
using color = z3d::vec3;
|
||||
using reflectance = z3d::f32;
|
||||
|
||||
namespace indices
|
||||
{
|
||||
using type = std::size_t;
|
||||
inline constexpr type position = 0;
|
||||
inline constexpr type normal = 1;
|
||||
inline constexpr type tex_coord = 2;
|
||||
inline constexpr type color = 3;
|
||||
inline constexpr type reflectance = 4;
|
||||
enum : z3d::size
|
||||
{
|
||||
position,
|
||||
normal,
|
||||
tangent,
|
||||
bi_tangent,
|
||||
tex_coord,
|
||||
color,
|
||||
reflectance
|
||||
};
|
||||
}
|
||||
|
||||
enum class flags : std::uint8_t
|
||||
enum class flags : z3d::u8
|
||||
{
|
||||
none = 0,
|
||||
position = 1 << indices::position,
|
||||
normal = 1 << indices::normal,
|
||||
tangent = 1 << indices::tangent,
|
||||
bi_tangent = 1 << indices::bi_tangent,
|
||||
tex_coord = 1 << indices::tex_coord,
|
||||
color = 1 << indices::color,
|
||||
reflectance = 1 << indices::reflectance
|
||||
};
|
||||
|
||||
using all = std::tuple<position, normal, tex_coord, color, reflectance>;
|
||||
using all = z3d::structure<
|
||||
position,
|
||||
normal,
|
||||
tangent,
|
||||
bi_tangent,
|
||||
tex_coord,
|
||||
color,
|
||||
reflectance
|
||||
>;
|
||||
constexpr inline auto count = std::tuple_size_v<all>;
|
||||
|
||||
} // namespace mesh_vertex_components
|
||||
|
||||
46
include/assets/components/point_cloud_shader_components.hpp
Normal file
46
include/assets/components/point_cloud_shader_components.hpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
#include <array>
|
||||
#include <string_view>
|
||||
|
||||
namespace assets::point_cloud_shader_components
|
||||
{
|
||||
|
||||
enum indices : z3d::size
|
||||
{
|
||||
square,
|
||||
lighting,
|
||||
luminance,
|
||||
color,
|
||||
alpha,
|
||||
uniform_color,
|
||||
rainbow
|
||||
};
|
||||
|
||||
enum class flags : std::uint16_t
|
||||
{
|
||||
none = 0,
|
||||
square = 1 << indices::square,
|
||||
lighting = 1 << indices::lighting,
|
||||
luminance = 1 << indices::luminance,
|
||||
color = 1 << indices::color,
|
||||
alpha = 1 << indices::alpha,
|
||||
uniform_color = 1 << indices::uniform_color,
|
||||
rainbow = 1 << indices::rainbow
|
||||
};
|
||||
|
||||
constexpr inline auto names = std::array<std::string_view, 7>{
|
||||
"square",
|
||||
"lighting",
|
||||
"luminance",
|
||||
"color",
|
||||
"alpha",
|
||||
"uniform_color",
|
||||
"rainbow"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
DEFINE_ENUM_BITFIELD_OPERATORS(assets::point_cloud_shader_components::flags)
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
@@ -7,21 +8,23 @@
|
||||
namespace assets::point_cloud_vertex_components
|
||||
{
|
||||
|
||||
using position = std::array<float, 3>;
|
||||
using normal = std::array<float, 3>;
|
||||
using color = std::array<float, 3>;
|
||||
using reflectance = std::array<float, 1>;
|
||||
using position = z3d::vec3;
|
||||
using normal = z3d::vec3;
|
||||
using color = z3d::vec3;
|
||||
using reflectance = z3d::f32;
|
||||
|
||||
namespace indices
|
||||
{
|
||||
using type = std::size_t;
|
||||
inline constexpr type position = 0;
|
||||
inline constexpr type normal = 1;
|
||||
inline constexpr type color = 2;
|
||||
inline constexpr type reflectance = 3;
|
||||
enum : z3d::size
|
||||
{
|
||||
position,
|
||||
normal,
|
||||
color,
|
||||
reflectance
|
||||
};
|
||||
} // namespace indices
|
||||
|
||||
enum class flags : std::uint8_t
|
||||
enum class flags : z3d::u8
|
||||
{
|
||||
none = 0,
|
||||
position = 1 << indices::position,
|
||||
@@ -30,7 +33,12 @@ enum class flags : std::uint8_t
|
||||
reflectance = 1 << indices::reflectance
|
||||
};
|
||||
|
||||
using all = std::tuple<position, normal, color, reflectance>;
|
||||
using all = z3d::structure<
|
||||
position,
|
||||
normal,
|
||||
color,
|
||||
reflectance
|
||||
>;
|
||||
constexpr inline auto count = std::tuple_size_v<all>;
|
||||
|
||||
} // namespace point_cloud_vertex_components
|
||||
|
||||
35
include/assets/components/shader_components.hpp
Normal file
35
include/assets/components/shader_components.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
#include "mesh_shader_components.hpp"
|
||||
#include "point_cloud_shader_components.hpp"
|
||||
|
||||
namespace assets::shader_components
|
||||
{
|
||||
|
||||
enum class stage : z3d::u8
|
||||
{
|
||||
vertex = 0,
|
||||
tesselation_control = 1,
|
||||
tesselation_evaluation = 2,
|
||||
geometry = 3,
|
||||
fragment = 4
|
||||
};
|
||||
|
||||
inline constexpr std::size_t count = 5;
|
||||
|
||||
inline constexpr auto stage_names = std::array<std::string_view, count>{
|
||||
"vertex",
|
||||
"tesselation_control",
|
||||
"tesselation_evaluation",
|
||||
"geometry",
|
||||
"fragment"
|
||||
};
|
||||
|
||||
|
||||
using flags = std::make_unsigned_t<std::common_type_t<
|
||||
std::underlying_type_t<mesh_shader_components::flags>,
|
||||
std::underlying_type_t<point_cloud_shader_components::flags>
|
||||
>>;
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include <tuple>
|
||||
#include <cinttypes>
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
@@ -7,10 +8,11 @@
|
||||
namespace assets::texture_components
|
||||
{
|
||||
|
||||
using red = std::uint8_t;
|
||||
using green = std::uint8_t;
|
||||
using blue = std::uint8_t;
|
||||
using luminance = std::uint8_t;
|
||||
using red = z3d::u8;
|
||||
using green = z3d::u8;
|
||||
using blue = z3d::u8;
|
||||
using alpha = z3d::u8;
|
||||
using luminance = z3d::u8;
|
||||
|
||||
enum class flags : std::uint8_t
|
||||
{
|
||||
@@ -22,7 +24,12 @@ enum class flags : std::uint8_t
|
||||
alpha = 1 << 5
|
||||
};
|
||||
|
||||
using all = std::tuple<red, green, blue, luminance>;
|
||||
using all = z3d::structure<
|
||||
red,
|
||||
green,
|
||||
blue,
|
||||
luminance
|
||||
>;
|
||||
constexpr inline auto count = std::tuple_size_v<all>;
|
||||
|
||||
} // namespace texture_components
|
||||
|
||||
37
include/assets/data/generic/component_array_set.hpp
Normal file
37
include/assets/data/generic/component_array_set.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
|
||||
namespace assets::detail
|
||||
{
|
||||
|
||||
template<typename C, typename T>
|
||||
class component_array_set {};
|
||||
|
||||
template<typename C, typename... Ts>
|
||||
class component_array_set<C, z3d::structure<Ts...>>
|
||||
{
|
||||
public:
|
||||
component_array_set() = default;
|
||||
|
||||
C component_flags;
|
||||
z3d::structure<z3d::vector<Ts>...> component_arrays{};
|
||||
|
||||
void add() {
|
||||
|
||||
}
|
||||
|
||||
protected:
|
||||
void clear_component_arrays()
|
||||
{
|
||||
std::apply(
|
||||
[](auto&... component_array)
|
||||
{
|
||||
(component_array.clear(), ...);
|
||||
},
|
||||
component_arrays
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
33
include/assets/data/generic/component_set.hpp
Normal file
33
include/assets/data/generic/component_set.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
|
||||
namespace assets::detail {
|
||||
|
||||
template<typename C, typename T>
|
||||
class component_set {};
|
||||
|
||||
|
||||
template<typename C, typename... Ts>
|
||||
class component_set<C, z3d::structure<Ts...>>
|
||||
{
|
||||
public:
|
||||
component_set() = default;
|
||||
|
||||
C component_flags{};
|
||||
z3d::structure<z3d::optional<Ts>...> components{};
|
||||
|
||||
protected:
|
||||
void clear_components()
|
||||
{
|
||||
std::apply(
|
||||
[](std::optional<Ts>&... component)
|
||||
{
|
||||
(component.reset(), ...);
|
||||
},
|
||||
components
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
template<typename C, typename... Ts>
|
||||
struct vertex_array_data
|
||||
{
|
||||
C component_flags;
|
||||
std::tuple<std::vector<Ts>...> vertices{};
|
||||
|
||||
protected:
|
||||
void clear_vertices()
|
||||
{
|
||||
std::apply(
|
||||
[](auto&... vertex_opt) {
|
||||
(vertex_opt.clear(), ...);
|
||||
},
|
||||
vertices
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -1,56 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "assets/components/material_components.hpp"
|
||||
#include "assets/data_stores/texture_store.hpp"
|
||||
#include "generic/component_set.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct material_data
|
||||
{
|
||||
struct material_data : public detail::component_set<
|
||||
material_components::flags,
|
||||
material_components::all
|
||||
> {
|
||||
|
||||
material_data() = default;
|
||||
|
||||
material_components::surface_properties& initialized_surface_properties();
|
||||
[[nodiscard]] inline z3d::optional<material_components::ambient_filter>& ambient_filter();
|
||||
[[nodiscard]] inline z3d::optional<material_components::diffuse_filter>& diffuse_filter();
|
||||
[[nodiscard]] inline z3d::optional<material_components::specular_filter>& specular_filter();
|
||||
[[nodiscard]] inline z3d::optional<material_components::shininess>& shininess();
|
||||
[[nodiscard]] inline z3d::optional<material_components::alpha>& alpha();
|
||||
[[nodiscard]] inline z3d::optional<material_components::ambient_filter_texture>& ambient_filter_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::specular_filter_texture>& specular_filter_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::diffuse_filter_texture>& diffuse_filter_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::shininess_texture>& shininess_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::alpha_texture>& alpha_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::bump_texture>& bump_texture_id();
|
||||
|
||||
[[nodiscard]] inline std::optional<material_components::surface_properties>& surface_properties();
|
||||
[[nodiscard]] inline std::optional<material_components::transparency>& transparency();
|
||||
[[nodiscard]] inline std::optional<material_components::ambient_color_texture>& ambient_color_texture_id();
|
||||
[[nodiscard]] inline std::optional<material_components::diffuse_color_texture>& diffuse_color_texture_id();
|
||||
[[nodiscard]] inline std::optional<material_components::specular_color_texture>& specular_color_texture_id();
|
||||
[[nodiscard]] inline std::optional<material_components::shininess_texture>& shininess_texture_id();
|
||||
[[nodiscard]] inline std::optional<material_components::alpha_texture>& alpha_texture_id();
|
||||
[[nodiscard]] inline std::optional<material_components::bump_texture>& bump_texture_id();
|
||||
|
||||
[[nodiscard]] inline const std::optional<material_components::surface_properties>& surface_properties() const;
|
||||
[[nodiscard]] inline const std::optional<material_components::transparency>& transparency() const;
|
||||
[[nodiscard]] inline const std::optional<material_components::ambient_color_texture>& ambient_color_texture_id() const;
|
||||
[[nodiscard]] inline const std::optional<material_components::diffuse_color_texture>& diffuse_color_texture_id() const;
|
||||
[[nodiscard]] inline const std::optional<material_components::specular_color_texture>& specular_color_texture_id() const;
|
||||
[[nodiscard]] inline const std::optional<material_components::shininess_texture>& shininess_texture_id() const;
|
||||
[[nodiscard]] inline const std::optional<material_components::alpha_texture>& alpha_texture_id() const;
|
||||
[[nodiscard]] inline const std::optional<material_components::bump_texture>& bump_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::ambient_filter>& ambient_filter() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::diffuse_filter>& diffuse_filter() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::specular_filter>& specular_filter() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::shininess>& shininess() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::alpha>& alpha() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::ambient_filter_texture>& ambient_filter_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::specular_filter_texture>& specular_filter_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::diffuse_filter_texture>& diffuse_filter_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::shininess_texture>& shininess_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::alpha_texture>& alpha_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::bump_texture>& bump_texture_id() const;
|
||||
|
||||
inline void clear();
|
||||
|
||||
std::tuple<
|
||||
std::optional<material_components::surface_properties>,
|
||||
std::optional<material_components::transparency>,
|
||||
std::optional<material_components::ambient_color_texture>,
|
||||
std::optional<material_components::diffuse_color_texture>,
|
||||
std::optional<material_components::specular_color_texture>,
|
||||
std::optional<material_components::shininess_texture>,
|
||||
std::optional<material_components::alpha_texture>,
|
||||
std::optional<material_components::bump_texture>
|
||||
> data{
|
||||
std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#define INCLUDE_DYNAMIC_MATERIAL_DATA_IMPLEMENTATION
|
||||
#define INCLUDE_MATERIAL_DATA_IMPLEMENTATION
|
||||
#include "assets/data/material_data.ipp"
|
||||
#undef INCLUDE_DYNAMIC_MATERIAL_DATA_IMPLEMENTATION
|
||||
#undef INCLUDE_MATERIAL_DATA_IMPLEMENTATION
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "util/string_lookup.hpp"
|
||||
#include "assets/data_stores/material_store.hpp"
|
||||
#include "assets/identifiers.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using material_library_data = ztu::string_lookup<material_store::id_type>;
|
||||
using material_library_data = ztu::string_lookup<material_id>;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,49 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
#include "util/uix.hpp"
|
||||
#include "assets/components/mesh_vertex_components.hpp"
|
||||
#include "generic/vertex_array_data.hpp"
|
||||
#include "assets/data_stores/material_store.hpp"
|
||||
#include "generic/component_array_set.hpp"
|
||||
#include "assets/identifiers.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
class mesh_data : public vertex_array_data<
|
||||
class mesh_data : public detail::component_array_set<
|
||||
mesh_vertex_components::flags,
|
||||
mesh_vertex_components::position,
|
||||
mesh_vertex_components::normal,
|
||||
mesh_vertex_components::tex_coord,
|
||||
mesh_vertex_components::color,
|
||||
mesh_vertex_components::reflectance
|
||||
mesh_vertex_components::all
|
||||
> {
|
||||
public:
|
||||
using index_type = ztu::u32;
|
||||
using triangle_type = std::array<index_type, 3>;
|
||||
|
||||
[[nodiscard]] inline std::vector<mesh_vertex_components::position>& positions();
|
||||
[[nodiscard]] inline std::vector<mesh_vertex_components::normal>& normals();
|
||||
[[nodiscard]] inline std::vector<mesh_vertex_components::tex_coord>& tex_coords();
|
||||
[[nodiscard]] inline std::vector<mesh_vertex_components::color>& colors();
|
||||
[[nodiscard]] inline std::vector<mesh_vertex_components::reflectance>& reflectances();
|
||||
[[nodiscard]] inline std::vector<triangle_type>& triangles();
|
||||
[[nodiscard]] inline auto& material_id();
|
||||
[[nodiscard]] inline z3d::vector<mesh_vertex_components::position>& positions();
|
||||
[[nodiscard]] inline z3d::vector<mesh_vertex_components::normal>& normals();
|
||||
[[nodiscard]] inline z3d::vector<mesh_vertex_components::tex_coord>& tex_coords();
|
||||
[[nodiscard]] inline z3d::vector<mesh_vertex_components::color>& colors();
|
||||
[[nodiscard]] inline z3d::vector<mesh_vertex_components::reflectance>& reflectances();
|
||||
[[nodiscard]] inline z3d::vector<z3d::index_triangle>& triangles();
|
||||
[[nodiscard]] inline material_id& material();
|
||||
|
||||
[[nodiscard]] inline const std::vector<mesh_vertex_components::position>& positions() const;
|
||||
[[nodiscard]] inline const std::vector<mesh_vertex_components::normal>& normals() const;
|
||||
[[nodiscard]] inline const std::vector<mesh_vertex_components::tex_coord>& tex_coords() const;
|
||||
[[nodiscard]] inline const std::vector<mesh_vertex_components::color>& colors() const;
|
||||
[[nodiscard]] inline const std::vector<mesh_vertex_components::reflectance>& reflectances() const;
|
||||
[[nodiscard]] inline const std::vector<triangle_type>& triangles() const;
|
||||
[[nodiscard]] inline const auto& material_id() const;
|
||||
[[nodiscard]] inline const z3d::vector<mesh_vertex_components::position>& positions() const;
|
||||
[[nodiscard]] inline const z3d::vector<mesh_vertex_components::normal>& normals() const;
|
||||
[[nodiscard]] inline const z3d::vector<mesh_vertex_components::tex_coord>& tex_coords() const;
|
||||
[[nodiscard]] inline const z3d::vector<mesh_vertex_components::color>& colors() const;
|
||||
[[nodiscard]] inline const z3d::vector<mesh_vertex_components::reflectance>& reflectances() const;
|
||||
[[nodiscard]] inline const z3d::vector<z3d::index_triangle>& triangles() const;
|
||||
[[nodiscard]] inline const material_id& material() const;
|
||||
|
||||
inline void clear();
|
||||
|
||||
private:
|
||||
std::vector<triangle_type> m_triangles{};
|
||||
material_store::id_type m_material_id{};
|
||||
z3d::vector<z3d::index_triangle> m_triangles{};
|
||||
material_id m_material_id{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -4,19 +4,21 @@
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include "generic/vertex_array_data.hpp"
|
||||
#include "generic/component_array_set.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
class point_cloud_data : public vertex_array_data<
|
||||
class point_cloud_data : public detail::component_array_set<
|
||||
point_cloud_vertex_components::flags,
|
||||
point_cloud_vertex_components::position,
|
||||
point_cloud_vertex_components::normal,
|
||||
point_cloud_vertex_components::color,
|
||||
point_cloud_vertex_components::reflectance
|
||||
point_cloud_vertex_components::all
|
||||
> {
|
||||
public:
|
||||
using detail::component_array_set<
|
||||
point_cloud_vertex_components::flags,
|
||||
point_cloud_vertex_components::all
|
||||
>::component_array_set;
|
||||
|
||||
[[nodiscard]] inline std::vector<point_cloud_vertex_components::position>& positions();
|
||||
[[nodiscard]] inline std::vector<point_cloud_vertex_components::normal>& normals();
|
||||
[[nodiscard]] inline std::vector<point_cloud_vertex_components::color>& colors();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "glm/mat4x4.hpp"
|
||||
#include "config/primitives.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using pose_data = glm::mat4;
|
||||
using pose_data = z3d::mat4;
|
||||
|
||||
}
|
||||
|
||||
11
include/assets/data/pose_list_data.hpp
Normal file
11
include/assets/data/pose_list_data.hpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "pose_data.hpp"
|
||||
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using pose_list_data = std::vector<pose_data>;
|
||||
|
||||
}
|
||||
@@ -1,17 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "config/primitives.hpp"
|
||||
#include "assets/components/shader_components.hpp"
|
||||
#include "assets/model_geometry.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct shader_source_data
|
||||
{
|
||||
std::vector<char> source{};
|
||||
z3d::vector<char> source{};
|
||||
|
||||
struct metadata
|
||||
{
|
||||
model_geometry::types geometry_type;
|
||||
shader_components::stage stage{};
|
||||
shader_components::flags components{};
|
||||
shader_components::flags static_enable{};
|
||||
shader_components::flags dynamic_enable{};
|
||||
|
||||
bool operator==(const metadata& meta) const = default;
|
||||
} meta;
|
||||
|
||||
void clear()
|
||||
{
|
||||
source.clear();
|
||||
meta.stage = {};
|
||||
meta.components = {};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct surface_properties
|
||||
{
|
||||
std::array<float, 3> ambient_filter{ 0.7f, 0.7f, 0.7f };
|
||||
std::array<float, 3> diffuse_filter{ 0.466f, 0.466f, 0.7922f };
|
||||
std::array<float, 3> specular_filter{ 0.5974f, 0.2084f, 0.2084f };
|
||||
float shininess{ 100.2237f };
|
||||
};
|
||||
|
||||
}
|
||||
@@ -12,21 +12,22 @@ namespace assets
|
||||
class texture_data
|
||||
{
|
||||
public:
|
||||
using value_type = std::uint8_t;
|
||||
using dim_type = std::int32_t;
|
||||
using size_type = std::make_signed_t<std::size_t>;
|
||||
using value_type = z3d::u8;
|
||||
using dim_type = z3d::i32;
|
||||
using size_type = z3d::size;
|
||||
using difference_type = size_type;
|
||||
using reference = value_type&;
|
||||
using const_reference = const value_type&;
|
||||
using pointer = std::uint8_t*;
|
||||
using const_pointer = const std::uint8_t*;
|
||||
using pointer = value_type*;
|
||||
using const_pointer = const value_type*;
|
||||
using iterator = pointer;
|
||||
using const_iterator = const_pointer;
|
||||
using container_type = std::unique_ptr<value_type[]>;
|
||||
|
||||
texture_data() = default;
|
||||
|
||||
inline texture_data(
|
||||
std::unique_ptr<value_type[]>&& data,
|
||||
container_type&& data,
|
||||
dim_type width,
|
||||
dim_type height,
|
||||
texture_components::flags components
|
||||
@@ -73,7 +74,7 @@ public:
|
||||
void inline clear();
|
||||
|
||||
private:
|
||||
std::unique_ptr<value_type[]> m_data{ nullptr };
|
||||
container_type m_data{ nullptr };
|
||||
dim_type m_width{ 0 }, m_height{ 0 };
|
||||
texture_components::flags m_components{ texture_components::flags::none };
|
||||
};
|
||||
|
||||
9
include/assets/data/uniform_surface_properties.hpp
Normal file
9
include/assets/data/uniform_surface_properties.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "util/string_list.hpp"
|
||||
|
||||
#include "assets/file_parsers/mtl_loader.hpp"
|
||||
#include "assets/file_parsers/mtl_parser.hpp"
|
||||
|
||||
// TODO not implemented?!?
|
||||
namespace assets
|
||||
@@ -17,7 +17,7 @@ namespace assets
|
||||
|
||||
class material_library_loader : public base_dynamic_loader<
|
||||
material_components::flags,
|
||||
mtl_loader
|
||||
mtl_parser
|
||||
> {
|
||||
public:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "assets/prefetch_lookups/point_cloud_prefetch_lookup.hpp"
|
||||
#include "util/string_list.hpp"
|
||||
|
||||
#include "assets/file_parsers/kitti_loader.hpp"
|
||||
#include "assets/file_parsers/kitti_parser.hpp"
|
||||
#include "assets/file_parsers/uos_loader.hpp"
|
||||
#include "assets/file_parsers/uos_normal_loader.hpp"
|
||||
#include "assets/file_parsers/uos_rgb_loader.hpp"
|
||||
@@ -21,7 +21,7 @@ namespace assets
|
||||
|
||||
class point_cloud_loader : public base_dynamic_loader<
|
||||
point_cloud_vertex_components::flags,
|
||||
kitti_loader,
|
||||
kitti_parser,
|
||||
uos_loader,
|
||||
uos_normal_loader,
|
||||
uos_rgb_loader,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "assets/components/texture_components.hpp"
|
||||
#include "assets/data/texture_data.hpp"
|
||||
#include "assets/data_stores/texture_store.hpp"
|
||||
#include "assets/dynamic_data_store.hpp"
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/prefetch_queue.hpp"
|
||||
#include "assets/prefetch_lookups/texture_prefetch_lookup.hpp"
|
||||
#include "util/string_list.hpp"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "data_stores/material_store.hpp"
|
||||
#include "data_stores/mesh_store.hpp"
|
||||
#include "data_stores/point_cloud_store.hpp"
|
||||
#include "data_stores/pose_list_store.hpp"
|
||||
#include "data_stores/pose_store.hpp"
|
||||
#include "data_stores/shader_source_store.hpp"
|
||||
#include "data_stores/texture_store.hpp"
|
||||
@@ -11,13 +12,14 @@
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct dynamic_data_store
|
||||
struct data_stores
|
||||
{
|
||||
material_library_store material_libraries;
|
||||
material_store materials;
|
||||
mesh_store meshes;
|
||||
point_cloud_store point_clouds;
|
||||
pose_store poses;
|
||||
pose_list_store pose_lists;
|
||||
shader_source_store shader_sources;
|
||||
texture_store textures;
|
||||
};
|
||||
@@ -1,40 +1,135 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <span>
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
|
||||
#include "util/uix.hpp"
|
||||
#include "util/id_type.hpp"
|
||||
namespace assets::detail {
|
||||
template<typename ID, typename T>
|
||||
class generic_basic_store;
|
||||
|
||||
template<typename T>
|
||||
|
||||
template<typename ID, typename T>
|
||||
class generic_basic_store_iterator
|
||||
{
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using id_type = ID;
|
||||
using data_type = T;
|
||||
using value_type = std::pair<id_type, data_type>;
|
||||
|
||||
using id_iterator_type = const id_type*;
|
||||
using data_iterator_type = data_type*;
|
||||
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = std::pair<id_type, data_type&>;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
private:
|
||||
friend generic_basic_store<ID, T>;
|
||||
|
||||
generic_basic_store_iterator(
|
||||
id_iterator_type ids,
|
||||
data_iterator_type data,
|
||||
std::size_t index
|
||||
);
|
||||
|
||||
public:
|
||||
constexpr generic_basic_store_iterator() noexcept = default;
|
||||
|
||||
constexpr generic_basic_store_iterator(const generic_basic_store_iterator&) noexcept = default;
|
||||
constexpr generic_basic_store_iterator(generic_basic_store_iterator&&) noexcept = default;
|
||||
|
||||
constexpr generic_basic_store_iterator& operator=(const generic_basic_store_iterator&) noexcept = default;
|
||||
constexpr generic_basic_store_iterator& operator=(generic_basic_store_iterator&&) noexcept = default;
|
||||
|
||||
reference operator*() const;
|
||||
|
||||
generic_basic_store_iterator& operator++();
|
||||
generic_basic_store_iterator operator++(int);
|
||||
generic_basic_store_iterator& operator--();
|
||||
generic_basic_store_iterator operator--(int);
|
||||
|
||||
generic_basic_store_iterator& operator+=(difference_type n);
|
||||
generic_basic_store_iterator& operator-=(difference_type n);
|
||||
generic_basic_store_iterator operator+(difference_type n) const;
|
||||
generic_basic_store_iterator operator-(difference_type n) const;
|
||||
difference_type operator-(const generic_basic_store_iterator& other) const;
|
||||
|
||||
reference operator[](difference_type n) const;
|
||||
|
||||
bool operator==(const generic_basic_store_iterator& other) const;
|
||||
bool operator!=(const generic_basic_store_iterator& other) const;
|
||||
bool operator<(const generic_basic_store_iterator& other) const;
|
||||
bool operator<=(const generic_basic_store_iterator& other) const;
|
||||
bool operator>(const generic_basic_store_iterator& other) const;
|
||||
bool operator>=(const generic_basic_store_iterator& other) const;
|
||||
|
||||
protected:
|
||||
reference dereference() const;
|
||||
|
||||
private:
|
||||
id_iterator_type m_ids{};
|
||||
data_iterator_type m_data{};
|
||||
size_type m_index{};
|
||||
};
|
||||
|
||||
template<typename ID, typename T>
|
||||
class generic_basic_store
|
||||
{
|
||||
public:
|
||||
using id_type = ztu::id_type_for<generic_basic_store, ztu::u32>;
|
||||
using id_type = ID;
|
||||
using container_type = std::vector<T>;
|
||||
using iterator_type = typename container_type::iterator;
|
||||
using const_iterator = typename container_type::const_iterator;
|
||||
using iterator = generic_basic_store_iterator<ID, T>;
|
||||
using const_iterator = generic_basic_store_iterator<ID, std::add_const_t<T>>;
|
||||
|
||||
id_type add(const T& data);
|
||||
using size_type = std::size_t;
|
||||
using data_type = T;
|
||||
|
||||
[[nodiscard]] std::pair<iterator_type, bool> find(id_type id);
|
||||
bool insert(ID id, const T& data);
|
||||
|
||||
bool insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> find(id_type id) const;
|
||||
|
||||
[[nodiscard]] std::span<T> data();
|
||||
|
||||
[[nodiscard]] std::span<const T> data() const;
|
||||
|
||||
void remove(iterator_type it);
|
||||
void remove(iterator it);
|
||||
|
||||
void clear();
|
||||
|
||||
[[nodiscard]] inline std::shared_lock<std::shared_mutex> acquire_read_lock() const;
|
||||
|
||||
[[nodiscard]] inline std::unique_lock<std::shared_mutex> acquire_write_lock();
|
||||
|
||||
iterator begin();
|
||||
|
||||
iterator end();
|
||||
|
||||
const_iterator begin() const;
|
||||
|
||||
const_iterator end() const;
|
||||
|
||||
const_iterator cbegin() const;
|
||||
|
||||
const_iterator cend() const;
|
||||
|
||||
protected:
|
||||
bool unsafe_insert(iterator it, ID id, const T& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> unsafe_find(ID id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> unsafe_find(ID id) const;
|
||||
|
||||
private:
|
||||
std::vector<ID> m_ids;
|
||||
std::vector<T> m_data;
|
||||
std::vector<id_type> m_ids;
|
||||
id_type m_next_data_id{ 1 };
|
||||
mutable std::shared_mutex m_mutex;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#define INCLUDE_GENERIC_BASIC_STORE_IMPLEMENTATION
|
||||
#include "assets/data_stores/generic/generic_basic_store.ipp"
|
||||
#undef INCLUDE_GENERIC_BASIC_STORE_IMPLEMENTATION
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
#include "assets/components/material_components.hpp"
|
||||
#include "assets/data/material_data.hpp"
|
||||
#include "assets/data_views/material_view.hpp"
|
||||
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
|
||||
namespace assets::detail
|
||||
{
|
||||
|
||||
template<typename... Ts>
|
||||
template<typename T>
|
||||
class generic_material_store;
|
||||
|
||||
template<typename... Ts>
|
||||
@@ -16,15 +17,14 @@ class generic_material_store_iterator
|
||||
{
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using count_type = ztu::u32;
|
||||
using count_type = z3d::u32;
|
||||
using component_flag_type = material_components::flags;
|
||||
using id_type = ztu::id_type_for<generic_material_store<Ts...>, ztu::u32>;
|
||||
using id_type = material_id;
|
||||
using value_type = std::pair<id_type, material_view>;
|
||||
using flag_count_type = std::tuple<component_flag_type>;
|
||||
|
||||
using id_iterator_type = id_type*;
|
||||
using component_iterator_type = std::tuple<std::add_pointer_t<Ts>...>;
|
||||
using flag_count_iterator_type = const flag_count_type*;
|
||||
using flag_iterator_type = const component_flag_type*;
|
||||
|
||||
using offsets_type = std::array<size_type, 1 + sizeof...(Ts)>;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
@@ -33,12 +33,12 @@ public:
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
private:
|
||||
friend generic_material_store<Ts...>;
|
||||
friend generic_material_store<z3d::structure<Ts...>>;
|
||||
|
||||
generic_material_store_iterator(
|
||||
id_iterator_type ids,
|
||||
const component_iterator_type& components,
|
||||
flag_count_iterator_type flag_counts,
|
||||
flag_iterator_type flags,
|
||||
std::size_t index,
|
||||
const offsets_type& offsets
|
||||
);
|
||||
@@ -87,39 +87,44 @@ protected:
|
||||
private:
|
||||
id_iterator_type m_ids{};
|
||||
component_iterator_type m_components{};
|
||||
flag_count_iterator_type m_flag_counts{};
|
||||
flag_iterator_type m_flags{};
|
||||
size_type m_index{};
|
||||
offsets_type m_offsets{};
|
||||
};
|
||||
|
||||
|
||||
template<typename... Ts>
|
||||
class generic_material_store
|
||||
class generic_material_store<z3d::structure<Ts...>>
|
||||
{
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using count_type = ztu::u32;
|
||||
using count_type = z3d::u32;
|
||||
using component_flag_type = material_components::flags;
|
||||
using data_type = material_data;
|
||||
|
||||
using iterator_type = generic_material_store_iterator<Ts...>;
|
||||
using iterator = generic_material_store_iterator<Ts...>;
|
||||
using const_iterator = generic_material_store_iterator<std::add_const_t<Ts>...>;
|
||||
using view_type = std::ranges::subrange<iterator_type>;
|
||||
using const_view_type = std::ranges::subrange<const_iterator>;
|
||||
using id_type = ztu::id_type_for<generic_material_store, ztu::u32>;
|
||||
using id_type = material_id;
|
||||
|
||||
id_type add(const material_data& material);
|
||||
bool insert(id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator_type, bool> find(id_type id);
|
||||
bool insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> find(id_type id) const;
|
||||
|
||||
void remove(const iterator_type& it);
|
||||
void remove(const iterator& it);
|
||||
|
||||
void clear();
|
||||
|
||||
iterator_type begin();
|
||||
[[nodiscard]] inline std::shared_lock<std::shared_mutex> acquire_read_lock() const;
|
||||
|
||||
iterator_type end();
|
||||
[[nodiscard]] inline std::unique_lock<std::shared_mutex> acquire_write_lock();
|
||||
|
||||
iterator begin();
|
||||
|
||||
iterator end();
|
||||
|
||||
const_iterator begin() const;
|
||||
|
||||
@@ -129,11 +134,13 @@ public:
|
||||
|
||||
const_iterator cend() const;
|
||||
|
||||
view_type view();
|
||||
|
||||
const_view_type view() const;
|
||||
|
||||
protected:
|
||||
bool unsafe_insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> unsafe_find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> unsafe_find(id_type id) const;
|
||||
|
||||
std::tuple<std::add_pointer_t<Ts>...> component_iterators();
|
||||
|
||||
std::tuple<std::add_pointer_t<std::add_const_t<Ts>>...> component_iterators() const;
|
||||
@@ -144,7 +151,7 @@ private:
|
||||
std::vector<id_type> m_ids;
|
||||
std::tuple<std::vector<Ts>...> m_component_arrays;
|
||||
std::vector<component_flag_type> m_component_flag_counts;
|
||||
id_type m_next_data_id{ 1 };
|
||||
mutable std::shared_mutex m_mutex;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
|
||||
#include "assets/components/mesh_vertex_components.hpp"
|
||||
#include "assets/data_stores/material_store.hpp"
|
||||
#include "assets/data/mesh_data.hpp"
|
||||
@@ -8,7 +11,7 @@
|
||||
namespace assets::detail
|
||||
{
|
||||
|
||||
template<typename... Ts>
|
||||
template<typename T>
|
||||
class generic_mesh_store;
|
||||
|
||||
template<typename... Ts>
|
||||
@@ -16,17 +19,17 @@ class generic_mesh_store_iterator
|
||||
{
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using count_type = ztu::u32;
|
||||
using index_type = mesh_data::index_type;
|
||||
using count_type = z3d::u32;
|
||||
using triangle_type = z3d::index_triangle;
|
||||
using material_id_type = material_store::id_type;
|
||||
using component_flag_type = mesh_vertex_components::flags;
|
||||
using id_type = ztu::id_type_for<generic_mesh_store<Ts...>, ztu::u32>;
|
||||
using id_type = mesh_id;
|
||||
using value_type = std::pair<id_type, mesh_view>;
|
||||
using flag_count_type = std::tuple<component_flag_type, count_type, count_type>;
|
||||
|
||||
using id_iterator_type = id_type*;
|
||||
using component_iterator_type = std::tuple<std::add_pointer_t<Ts>...>;
|
||||
using index_iterator_type = index_type*;
|
||||
using triangle_iterator_type = triangle_type*;
|
||||
using flag_count_iterator_type = const flag_count_type*;
|
||||
using material_id_iterator_type = material_id_type*;
|
||||
|
||||
@@ -37,11 +40,11 @@ public:
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
private:
|
||||
friend generic_mesh_store<Ts...>;
|
||||
friend generic_mesh_store<z3d::structure<Ts...>>;
|
||||
|
||||
generic_mesh_store_iterator(
|
||||
id_iterator_type ids,
|
||||
index_iterator_type indices,
|
||||
triangle_iterator_type triangles,
|
||||
const component_iterator_type& components,
|
||||
material_id_iterator_type material_ids,
|
||||
flag_count_iterator_type flag_counts,
|
||||
@@ -92,7 +95,7 @@ protected:
|
||||
|
||||
private:
|
||||
id_iterator_type m_ids{};
|
||||
index_iterator_type m_indices{};
|
||||
triangle_iterator_type m_triangles{};
|
||||
component_iterator_type m_components{};
|
||||
material_id_iterator_type m_material_ids{};
|
||||
flag_count_iterator_type m_flag_counts{};
|
||||
@@ -102,34 +105,39 @@ private:
|
||||
|
||||
|
||||
template<typename... Ts>
|
||||
class generic_mesh_store
|
||||
class generic_mesh_store<z3d::structure<Ts...>>
|
||||
{
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using count_type = ztu::u32;
|
||||
using index_type = mesh_data::index_type;
|
||||
using count_type = z3d::u32;
|
||||
using triangle_type = z3d::index_triangle;
|
||||
using component_flag_type = mesh_vertex_components::flags;
|
||||
using material_id_type = material_store::id_type;
|
||||
using material_id_type = material_id;
|
||||
using data_type = mesh_data;
|
||||
using id_type = mesh_id;
|
||||
|
||||
using iterator_type = generic_mesh_store_iterator<Ts...>;
|
||||
using iterator = generic_mesh_store_iterator<Ts...>;
|
||||
using const_iterator = generic_mesh_store_iterator<std::add_const_t<Ts>...>;
|
||||
using view_type = std::ranges::subrange<iterator_type>;
|
||||
using const_view_type = std::ranges::subrange<const_iterator>;
|
||||
using id_type = ztu::id_type_for<generic_mesh_store, ztu::u32>;
|
||||
|
||||
id_type add(const mesh_data& mesh);
|
||||
bool insert(id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator_type, bool> find(id_type id);
|
||||
bool insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> find(id_type id) const;
|
||||
|
||||
void remove(const iterator_type& it);
|
||||
void remove(const iterator& it);
|
||||
|
||||
void clear();
|
||||
|
||||
iterator_type begin();
|
||||
[[nodiscard]] inline std::shared_lock<std::shared_mutex> acquire_read_lock() const;
|
||||
|
||||
iterator_type end();
|
||||
[[nodiscard]] inline std::unique_lock<std::shared_mutex> acquire_write_lock();
|
||||
|
||||
iterator begin();
|
||||
|
||||
iterator end();
|
||||
|
||||
const_iterator begin() const;
|
||||
|
||||
@@ -139,11 +147,12 @@ public:
|
||||
|
||||
const_iterator cend() const;
|
||||
|
||||
view_type view();
|
||||
|
||||
const_view_type view() const;
|
||||
|
||||
protected:
|
||||
bool unsafe_insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> unsafe_find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> unsafe_find(id_type id) const;
|
||||
std::tuple<std::add_pointer_t<Ts>...> component_iterators();
|
||||
|
||||
std::tuple<std::add_pointer_t<std::add_const_t<Ts>>...> component_iterators() const;
|
||||
@@ -152,11 +161,11 @@ protected:
|
||||
|
||||
private:
|
||||
std::vector<id_type> m_ids;
|
||||
std::vector<index_type> m_indices;
|
||||
std::tuple<std::vector<Ts>...> m_component_arrays;
|
||||
std::vector<triangle_type> m_triangles;
|
||||
std::vector<std::tuple<component_flag_type, count_type, count_type>> m_component_flag_counts;
|
||||
std::tuple<std::vector<Ts>...> m_component_arrays;
|
||||
std::vector<material_store::id_type> m_material_ids;
|
||||
id_type m_next_data_id{ 1 };
|
||||
mutable std::shared_mutex m_mutex{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
#include "util/uix.hpp"
|
||||
#include "util/id_type.hpp"
|
||||
#include "assets/components/point_cloud_vertex_components.hpp"
|
||||
#include "assets/data/point_cloud_data.hpp"
|
||||
#include "assets/data_views/point_cloud_view.hpp"
|
||||
|
||||
namespace assets
|
||||
namespace assets::detail
|
||||
{
|
||||
|
||||
template<typename... Ts>
|
||||
template<typename T>
|
||||
class generic_point_cloud_store;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template<typename... Ts>
|
||||
class generic_point_cloud_store_iterator
|
||||
{
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using count_type = ztu::u32;
|
||||
using size_type = z3d::size;
|
||||
using count_type = z3d::u32;
|
||||
using component_flag_type = point_cloud_vertex_components::flags;
|
||||
using id_type = ztu::id_type_for<generic_point_cloud_store<Ts...>, ztu::u32>;
|
||||
using id_type = point_cloud_id;
|
||||
using value_type = std::pair<id_type, point_cloud_view>;
|
||||
using flag_count_type = std::tuple<component_flag_type, count_type, count_type>;
|
||||
|
||||
@@ -37,13 +37,13 @@ public:
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
private:
|
||||
friend generic_point_cloud_store<Ts...>;
|
||||
friend generic_point_cloud_store<z3d::structure<Ts...>>;
|
||||
|
||||
generic_point_cloud_store_iterator(
|
||||
id_iterator_type ids,
|
||||
const component_iterator_type& components,
|
||||
flag_count_iterator_type flag_counts,
|
||||
std::size_t index,
|
||||
size_type index,
|
||||
const offsets_type& offsets
|
||||
);
|
||||
|
||||
@@ -98,32 +98,37 @@ private:
|
||||
|
||||
|
||||
template<typename... Ts>
|
||||
class generic_point_cloud_store
|
||||
class generic_point_cloud_store<z3d::structure<Ts...>>
|
||||
{
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using count_type = ztu::u32;
|
||||
using component_flag_type = point_cloud_vertex_components::flags;
|
||||
using id_type = point_cloud_id;
|
||||
using data_type = point_cloud_data;
|
||||
|
||||
using iterator_type = generic_point_cloud_store_iterator<Ts...>;
|
||||
using iterator = generic_point_cloud_store_iterator<Ts...>;
|
||||
using const_iterator = generic_point_cloud_store_iterator<std::add_const_t<Ts>...>;
|
||||
using view_type = std::ranges::subrange<iterator_type>;
|
||||
using const_view_type = std::ranges::subrange<const_iterator>;
|
||||
using id_type = ztu::id_type_for<generic_point_cloud_store, ztu::u32>;
|
||||
|
||||
id_type add(const point_cloud_data& point_cloud);
|
||||
bool insert(id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator_type, bool> find(id_type id);
|
||||
bool insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> find(id_type id) const;
|
||||
|
||||
void remove(const iterator_type& it);
|
||||
void remove(const iterator& it);
|
||||
|
||||
void clear();
|
||||
|
||||
iterator_type begin();
|
||||
[[nodiscard]] inline std::shared_lock<std::shared_mutex> acquire_read_lock() const;
|
||||
|
||||
iterator_type end();
|
||||
[[nodiscard]] inline std::unique_lock<std::shared_mutex> acquire_write_lock();
|
||||
|
||||
iterator begin();
|
||||
|
||||
iterator end();
|
||||
|
||||
const_iterator begin() const;
|
||||
|
||||
@@ -133,11 +138,13 @@ public:
|
||||
|
||||
const_iterator cend() const;
|
||||
|
||||
view_type view();
|
||||
|
||||
const_view_type view() const;
|
||||
|
||||
protected:
|
||||
bool unsafe_insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> unsafe_find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> unsafe_find(id_type id) const;
|
||||
|
||||
std::tuple<std::add_pointer_t<Ts>...> component_iterators();
|
||||
|
||||
std::tuple<std::add_pointer_t<std::add_const_t<Ts>>...> component_iterators() const;
|
||||
@@ -148,12 +155,11 @@ private:
|
||||
std::vector<id_type> m_ids;
|
||||
std::tuple<std::vector<Ts>...> m_component_arrays;
|
||||
std::vector<std::pair<component_flag_type, count_type>> m_component_flag_counts;
|
||||
id_type m_next_data_id{ 1 };
|
||||
mutable std::shared_mutex m_mutex;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#define INCLUDE_GENERIC_POINT_CLOUD_STORE_IMPLEMENTATION
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "generic/generic_basic_store.hpp"
|
||||
#include "assets/identifiers.hpp"
|
||||
#include "assets/data/material_library_data.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using material_library_store = generic_basic_store<material_library_data>;
|
||||
using material_library_store = detail::generic_basic_store<material_library_id, material_library_data>;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,15 +5,6 @@
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using material_store = detail::generic_material_store<
|
||||
material_components::surface_properties,
|
||||
material_components::transparency,
|
||||
texture_store::id_type,
|
||||
texture_store::id_type,
|
||||
texture_store::id_type,
|
||||
texture_store::id_type,
|
||||
texture_store::id_type,
|
||||
texture_store::id_type
|
||||
>;
|
||||
using material_store = detail::generic_material_store<material_components::all>;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,11 +6,7 @@ namespace assets
|
||||
{
|
||||
|
||||
using mesh_store = detail::generic_mesh_store<
|
||||
mesh_vertex_components::position,
|
||||
mesh_vertex_components::normal,
|
||||
mesh_vertex_components::tex_coord,
|
||||
mesh_vertex_components::color,
|
||||
mesh_vertex_components::reflectance
|
||||
mesh_vertex_components::all
|
||||
>;
|
||||
|
||||
}
|
||||
|
||||
@@ -8,10 +8,7 @@ namespace assets
|
||||
{
|
||||
|
||||
using point_cloud_store = detail::generic_point_cloud_store<
|
||||
point_cloud_vertex_components::position,
|
||||
point_cloud_vertex_components::normal,
|
||||
point_cloud_vertex_components::color,
|
||||
point_cloud_vertex_components::reflectance
|
||||
point_cloud_vertex_components::all
|
||||
>;
|
||||
|
||||
}
|
||||
|
||||
148
include/assets/data_stores/pose_list_store.hpp
Normal file
148
include/assets/data_stores/pose_list_store.hpp
Normal file
@@ -0,0 +1,148 @@
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
|
||||
#include "assets/identifiers.hpp"
|
||||
#include "assets/data/pose_list_data.hpp"
|
||||
#include "assets/data_views/pose_list_view.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
class pose_list_store;
|
||||
|
||||
template<typename Pose>
|
||||
class pose_list_store_iterator
|
||||
{
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using length_type = ztu::u32;
|
||||
using id_type = pose_list_id;
|
||||
using value_type = std::pair<id_type, pose_list_view>;
|
||||
|
||||
using id_iterator_type = id_type const*;
|
||||
using pose_iterator_type = Pose*;
|
||||
using length_iterator_type = const length_type*;
|
||||
|
||||
using offset_type = size_type;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
private:
|
||||
friend pose_list_store;
|
||||
|
||||
pose_list_store_iterator(
|
||||
id_iterator_type ids,
|
||||
pose_iterator_type poses,
|
||||
length_iterator_type lengths,
|
||||
std::size_t index,
|
||||
const offset_type& offset
|
||||
);
|
||||
|
||||
public:
|
||||
constexpr pose_list_store_iterator() noexcept = default;
|
||||
|
||||
constexpr pose_list_store_iterator(const pose_list_store_iterator&) noexcept = default;
|
||||
constexpr pose_list_store_iterator(pose_list_store_iterator&&) noexcept = default;
|
||||
|
||||
constexpr pose_list_store_iterator& operator=(const pose_list_store_iterator&) noexcept = default;
|
||||
constexpr pose_list_store_iterator& operator=(pose_list_store_iterator&&) noexcept = default;
|
||||
|
||||
reference operator*() const;
|
||||
|
||||
pose_list_store_iterator& operator++();
|
||||
pose_list_store_iterator operator++(int);
|
||||
pose_list_store_iterator& operator--();
|
||||
pose_list_store_iterator operator--(int);
|
||||
|
||||
pose_list_store_iterator& operator+=(difference_type n);
|
||||
pose_list_store_iterator& operator-=(difference_type n);
|
||||
pose_list_store_iterator operator+(difference_type n) const;
|
||||
pose_list_store_iterator operator-(difference_type n) const;
|
||||
difference_type operator-(const pose_list_store_iterator& other) const;
|
||||
|
||||
reference operator[](difference_type n) const;
|
||||
|
||||
bool operator==(const pose_list_store_iterator& other) const;
|
||||
bool operator!=(const pose_list_store_iterator& other) const;
|
||||
bool operator<(const pose_list_store_iterator& other) const;
|
||||
bool operator<=(const pose_list_store_iterator& other) const;
|
||||
bool operator>(const pose_list_store_iterator& other) const;
|
||||
bool operator>=(const pose_list_store_iterator& other) const;
|
||||
|
||||
protected:
|
||||
|
||||
void calc_offset(difference_type n);
|
||||
|
||||
[[nodiscard]] reference dereference() const;
|
||||
|
||||
private:
|
||||
id_iterator_type m_ids{};
|
||||
pose_iterator_type m_poses{};
|
||||
length_iterator_type m_lengths{};
|
||||
size_type m_index{};
|
||||
offset_type m_offset{};
|
||||
};
|
||||
|
||||
|
||||
class pose_list_store
|
||||
{
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using count_type = ztu::u32;
|
||||
|
||||
using iterator = pose_list_store_iterator<pose_data>;
|
||||
using const_iterator = pose_list_store_iterator<const pose_data>;
|
||||
using data_type = pose_list_data;
|
||||
using id_type = pose_list_id;
|
||||
|
||||
bool insert(id_type id, const data_type& data);
|
||||
|
||||
bool insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> find(id_type id) const;
|
||||
|
||||
inline void remove(const iterator& it);
|
||||
|
||||
inline void clear();
|
||||
|
||||
[[nodiscard]] inline std::shared_lock<std::shared_mutex> acquire_read_lock() const;
|
||||
|
||||
[[nodiscard]] inline std::unique_lock<std::shared_mutex> acquire_write_lock();
|
||||
|
||||
[[nodiscard]] inline iterator begin();
|
||||
|
||||
[[nodiscard]] inline iterator end();
|
||||
|
||||
[[nodiscard]] inline const_iterator begin() const;
|
||||
|
||||
[[nodiscard]] inline const_iterator end() const;
|
||||
|
||||
[[nodiscard]] inline const_iterator cbegin() const;
|
||||
|
||||
[[nodiscard]] inline const_iterator cend() const;
|
||||
|
||||
protected:
|
||||
bool unsafe_insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] std::pair<iterator, bool> unsafe_find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> unsafe_find(id_type id) const;
|
||||
|
||||
private:
|
||||
std::vector<id_type> m_ids;
|
||||
std::vector<pose_data> m_poses;
|
||||
std::vector<count_type> m_lengths;
|
||||
mutable std::shared_mutex m_mutex;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#define INCLUDE_POSE_LIST_STORE_IMPLEMENTATION
|
||||
#include "assets/data_stores/pose_list_store.ipp"
|
||||
#undef INCLUDE_POSE_LIST_STORE_IMPLEMENTATION
|
||||
@@ -1,11 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "generic/generic_basic_store.hpp"
|
||||
#include "assets/identifiers.hpp"
|
||||
#include "assets/data/pose_data.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using pose_store = generic_basic_store<pose_data>;
|
||||
using pose_store = detail::generic_basic_store<pose_id, pose_data>;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "generic/generic_basic_store.hpp"
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
#include "assets/data/shader_source_data.hpp"
|
||||
#include "assets/data_views/shader_source_view.hpp"
|
||||
|
||||
@@ -15,12 +16,14 @@ class shader_source_store_iterator
|
||||
public:
|
||||
using size_type = std::size_t;
|
||||
using length_type = ztu::u32;
|
||||
using id_type = ztu::id_type_for<shader_source_store, ztu::u32>;
|
||||
using id_type = shader_source_id;
|
||||
using metadata_type = shader_source_data::metadata;
|
||||
using value_type = std::pair<id_type, shader_source_view>;
|
||||
|
||||
using id_iterator_type = id_type const*;
|
||||
using string_iterator_type = Char*;
|
||||
using length_iterator_type = const length_type*;
|
||||
using metadata_iterator_type = const metadata_type*;
|
||||
|
||||
using offset_type = size_type;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
@@ -35,6 +38,7 @@ private:
|
||||
id_iterator_type ids,
|
||||
string_iterator_type strings,
|
||||
length_iterator_type lengths,
|
||||
metadata_iterator_type metadata,
|
||||
std::size_t index,
|
||||
const offset_type& offset
|
||||
);
|
||||
@@ -80,6 +84,7 @@ private:
|
||||
id_iterator_type m_ids{};
|
||||
string_iterator_type m_strings{};
|
||||
length_iterator_type m_lengths{};
|
||||
metadata_iterator_type m_metadata{};
|
||||
size_type m_index{};
|
||||
offset_type m_offset{};
|
||||
};
|
||||
@@ -91,25 +96,32 @@ public:
|
||||
using size_type = std::size_t;
|
||||
using count_type = ztu::u32;
|
||||
|
||||
using iterator_type = shader_source_store_iterator<char>;
|
||||
using iterator = shader_source_store_iterator<char>;
|
||||
using const_iterator = shader_source_store_iterator<const char>;
|
||||
using view_type = std::ranges::subrange<iterator_type>;
|
||||
using view_type = std::ranges::subrange<iterator>;
|
||||
using const_view_type = std::ranges::subrange<const_iterator>;
|
||||
using id_type = ztu::id_type_for<shader_source_store, ztu::u32>;
|
||||
using id_type = shader_source_id;
|
||||
using data_type = shader_source_data;
|
||||
|
||||
inline id_type add(const shader_source_data& shader_source);
|
||||
bool insert(id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] inline std::pair<iterator_type, bool> find(id_type id);
|
||||
bool insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] inline std::pair<const_iterator, bool> find(id_type id) const;
|
||||
[[nodiscard]] std::pair<iterator, bool> find(id_type id);
|
||||
|
||||
inline void remove(const iterator_type& it);
|
||||
[[nodiscard]] std::pair<const_iterator, bool> find(id_type id) const;
|
||||
|
||||
inline void remove(const iterator& it);
|
||||
|
||||
inline void clear();
|
||||
|
||||
[[nodiscard]] inline iterator_type begin();
|
||||
[[nodiscard]] inline std::shared_lock<std::shared_mutex> acquire_read_lock() const;
|
||||
|
||||
[[nodiscard]] inline iterator_type end();
|
||||
[[nodiscard]] inline std::unique_lock<std::shared_mutex> acquire_write_lock();
|
||||
|
||||
[[nodiscard]] inline iterator begin();
|
||||
|
||||
[[nodiscard]] inline iterator end();
|
||||
|
||||
[[nodiscard]] inline const_iterator begin() const;
|
||||
|
||||
@@ -119,15 +131,19 @@ public:
|
||||
|
||||
[[nodiscard]] inline const_iterator cend() const;
|
||||
|
||||
[[nodiscard]] inline view_type view();
|
||||
protected:
|
||||
bool unsafe_insert(iterator it, id_type id, const data_type& data);
|
||||
|
||||
[[nodiscard]] inline const_view_type view() const;
|
||||
[[nodiscard]] std::pair<iterator, bool> unsafe_find(id_type id);
|
||||
|
||||
[[nodiscard]] std::pair<const_iterator, bool> unsafe_find(id_type id) const;
|
||||
|
||||
private:
|
||||
std::vector<id_type> m_ids;
|
||||
std::vector<char> m_strings;
|
||||
std::vector<count_type> m_lengths;
|
||||
id_type m_next_data_id{ 1 };
|
||||
std::vector<shader_source_data::metadata> m_metadata;
|
||||
mutable std::shared_mutex m_mutex;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "generic/generic_basic_store.hpp"
|
||||
#include "assets/identifiers.hpp"
|
||||
#include "assets/data/texture_data.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using texture_store = generic_basic_store<texture_data>;
|
||||
using texture_store = detail::generic_basic_store<texture_id, texture_data>;
|
||||
|
||||
}
|
||||
|
||||
|
||||
23
include/assets/data_views/generic/generic_mesh_view.hpp
Normal file
23
include/assets/data_views/generic/generic_mesh_view.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include "assets/components/mesh_vertex_components.hpp"
|
||||
#include "assets/data_stores/material_store.hpp"
|
||||
|
||||
namespace assets::detail
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
struct generic_mesh_view {};
|
||||
|
||||
template<typename... Ts>
|
||||
struct generic_mesh_view<z3d::structure<Ts...>>
|
||||
{
|
||||
mesh_vertex_components::flags component_flags;
|
||||
z3d::array_view<z3d::index_triangle> triangles;
|
||||
z3d::structure<z3d::array_view<Ts>...> vertex_component_arrays;
|
||||
z3d::vertex_index vertex_count;
|
||||
material_store::id_type material_id;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include "assets/components/point_cloud_vertex_components.hpp"
|
||||
|
||||
namespace assets::detail
|
||||
{
|
||||
|
||||
template<typename... Ts>
|
||||
struct generic_point_cloud_view
|
||||
{
|
||||
point_cloud_vertex_components::flags vertex_component_flags;
|
||||
z3d::structure<z3d::array_view<Ts>...> vertex_component_arrays;
|
||||
z3d::vertex_index point_count;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,34 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <span>
|
||||
#include <tuple>
|
||||
|
||||
#include "assets/components/mesh_vertex_components.hpp"
|
||||
#include "assets/data/mesh_data.hpp"
|
||||
#include "assets/data_stores/material_store.hpp"
|
||||
#include "generic/generic_mesh_view.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template<typename... Ts>
|
||||
struct generic_mesh_view
|
||||
{
|
||||
mesh_vertex_components::flags component_flags;
|
||||
std::span<mesh_data::index_type> indices;
|
||||
std::tuple<std::span<Ts>...> vertex_component_arrays;
|
||||
std::size_t vertex_count;
|
||||
material_store::id_type material_id;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
using mesh_view = detail::generic_mesh_view<
|
||||
mesh_vertex_components::position,
|
||||
mesh_vertex_components::normal,
|
||||
mesh_vertex_components::tex_coord,
|
||||
mesh_vertex_components::color,
|
||||
mesh_vertex_components::reflectance
|
||||
mesh_vertex_components::all
|
||||
>;
|
||||
|
||||
}
|
||||
@@ -1,29 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <span>
|
||||
#include <tuple>
|
||||
|
||||
#include "assets/components/point_cloud_vertex_components.hpp"
|
||||
#include "generic/generic_point_cloud_view.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template<typename... Ts>
|
||||
struct generic_point_cloud_view
|
||||
{
|
||||
point_cloud_vertex_components::flags vertex_component_flags;
|
||||
std::tuple<std::span<Ts>...> vertex_component_arrays;
|
||||
std::size_t point_count;
|
||||
};
|
||||
}
|
||||
|
||||
using point_cloud_view = detail::generic_point_cloud_view<
|
||||
point_cloud_vertex_components::position,
|
||||
point_cloud_vertex_components::normal,
|
||||
point_cloud_vertex_components::color,
|
||||
point_cloud_vertex_components::reflectance
|
||||
point_cloud_vertex_components::all
|
||||
>;
|
||||
|
||||
}
|
||||
11
include/assets/data_views/pose_list_view.hpp
Normal file
11
include/assets/data_views/pose_list_view.hpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "assets/data/pose_data.hpp"
|
||||
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using pose_list_view = std::span<pose_data>;
|
||||
|
||||
}
|
||||
@@ -1,5 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
#include "assets/data/shader_source_data.hpp"
|
||||
|
||||
using shader_source_view = std::string_view;
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct shader_source_view
|
||||
{
|
||||
std::string_view source;
|
||||
shader_source_data::metadata meta;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "assets/data/material_data.hpp"
|
||||
#include "assets/components/texture_components.hpp"
|
||||
#include <memory>
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct texture_view
|
||||
{
|
||||
std::weak_ptr<std::uint8_t[]> data;
|
||||
int width, height;
|
||||
std::weak_ptr<z3d::u8[]> data;
|
||||
z3d::i32 width, height;
|
||||
texture_components::flags component_flags;
|
||||
};
|
||||
|
||||
|
||||
10
include/assets/fallback_data/fallback_material.hpp
Normal file
10
include/assets/fallback_data/fallback_material.hpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "assets/data/material_data.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
material_data generate_fallback_material();
|
||||
|
||||
}
|
||||
28
include/assets/fallback_data/fallback_texture.hpp
Normal file
28
include/assets/fallback_data/fallback_texture.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "assets/components/texture_components.hpp"
|
||||
#include "assets/data/texture_data.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct fallback_color
|
||||
{
|
||||
static constexpr auto components = (
|
||||
texture_components::flags::red |
|
||||
texture_components::flags::green |
|
||||
texture_components::flags::blue
|
||||
);
|
||||
texture_data::value_type r, g, b;
|
||||
};
|
||||
|
||||
texture_data generate_fallback_texture(
|
||||
int width = 4,
|
||||
int height = 4,
|
||||
std::span<const fallback_color> colors = std::array{
|
||||
fallback_color{ .r = 255, .g = 0, b = 255 },
|
||||
fallback_color{ .r = 0, .g = 0, b = 0 }
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
@@ -7,52 +7,75 @@
|
||||
#include "glm/mat4x4.hpp"
|
||||
#include "util/result.hpp"
|
||||
#include "util/string_list.hpp"
|
||||
#include "assets/prefetch_queue.hpp"
|
||||
|
||||
#include "../../read_buffers"
|
||||
#include "../../data_stores"
|
||||
#include "assets/prefetch_lookup.hpp"
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/path_id_lookups.hpp"
|
||||
|
||||
#include "assets/data/point_cloud_data.hpp"
|
||||
#include "assets/data_stores/point_cloud_store.hpp"
|
||||
|
||||
namespace assets::detail
|
||||
{
|
||||
|
||||
template<bool Normal, bool Color, bool Reflectance>
|
||||
struct generic_3dtk_loader
|
||||
{
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const ztu::string_list& filenames,
|
||||
prefetch_queue& queue
|
||||
using data_type = point_cloud_data;
|
||||
using store_type = point_cloud_data;
|
||||
using lookup_type = point_cloud_id_lookup;
|
||||
|
||||
[[nodiscard]] std::error_code prefetch(
|
||||
path_id_lookups& lookups
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load(
|
||||
dynamic_point_cloud_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
dynamic_point_cloud_store& store,
|
||||
prefetch_lookup& id_lookup,
|
||||
[[nodiscard]] std::error_code load(
|
||||
path_id_lookups& lookups,
|
||||
data_stores& stores,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
protected:
|
||||
class parser_context
|
||||
{
|
||||
public:
|
||||
parser_context(
|
||||
path_id_lookups& m_id_lookups,
|
||||
data_stores& m_stores
|
||||
);
|
||||
|
||||
[[nodiscard]] static ztu::result<pose_prefetch_lookup::index_type> parse_index(
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
|
||||
private:
|
||||
path_id_lookups* m_id_lookups;
|
||||
data_stores* m_stores;
|
||||
data_type m_point_cloud{};
|
||||
std::filesystem::path m_last_pose_path{};
|
||||
pose_list_view m_last_pose_list{};
|
||||
};
|
||||
|
||||
[[nodiscard]] static ztu::result<std::size_t> parse_scan_index(
|
||||
std::string_view filename
|
||||
);
|
||||
|
||||
ztu::result<std::pair<ztu::u32, std::chars_format>> analyze_component_format(
|
||||
std::string_view line
|
||||
protected:
|
||||
[[nodiscard]] static std::error_code parse_file(
|
||||
const std::filesystem::path& filename,
|
||||
data_type& point_cloud
|
||||
);
|
||||
|
||||
void transform_point_cloud(
|
||||
std::span<point_cloud_vertex_components::position::value_type> points,
|
||||
const glm::mat4& pose
|
||||
static void transform_point_cloud(
|
||||
std::span<point_cloud_vertex_components::position> points,
|
||||
const pose_data& pose
|
||||
);
|
||||
|
||||
private:
|
||||
std::error_code read_point_file(
|
||||
const std::filesystem::path& filename,
|
||||
dynamic_point_cloud_buffer& point_cloud
|
||||
);
|
||||
std::vector<lookup_type::const_pointer> m_path_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#define INCLUDE_GENERIC_3DTK_LOADER_IMPLEMENTATION
|
||||
#include "../../data_parsers"
|
||||
#include "assets/file_parsers/generic/generic_3dtk_loader.ipp"
|
||||
#undef INCLUDE_GENERIC_3DTK_LOADER_IMPLEMENTATION
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "assets/dynamic_data_store.hpp"
|
||||
#include "assets/prefetch_lookup.hpp"
|
||||
#include "assets/prefetch_queue.hpp"
|
||||
#include "assets/prefetch_lookups/mesh_prefetch_lookup.hpp"
|
||||
#include "assets/data/shader_source_data.hpp"
|
||||
#include "util/string_list.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct glsl_loader
|
||||
{
|
||||
static constexpr auto name = std::string_view("glsl");
|
||||
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const file_dir_list& paths,
|
||||
prefetch_queue& queue
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load(
|
||||
shader_source_data& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
};
|
||||
|
||||
}
|
||||
97
include/assets/file_parsers/glsl_parser.hpp
Normal file
97
include/assets/file_parsers/glsl_parser.hpp
Normal file
@@ -0,0 +1,97 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include "assets/path_id_lookups.hpp"
|
||||
#include "assets/data_stores/shader_source_store.hpp"
|
||||
#include "assets/data/shader_source_data.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct glsl_parser
|
||||
{
|
||||
static constexpr auto name = std::string_view("glsl");
|
||||
using data_type = shader_source_data;
|
||||
using store_type = shader_source_store;
|
||||
using lookup_type = shader_source_id_lookup;
|
||||
|
||||
[[nodiscard]] std::error_code prefetch(
|
||||
path_id_lookups& lookups
|
||||
);
|
||||
|
||||
[[nodiscard]] std::error_code load(
|
||||
const path_id_lookups& lookups,
|
||||
store_type& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
protected:
|
||||
class parser_context
|
||||
{
|
||||
public:
|
||||
parser_context(store_type& m_store);
|
||||
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
|
||||
void tokenize_declarations();
|
||||
|
||||
[[nodiscard]] bool parse_metadata_from_tokens();
|
||||
|
||||
void remove_metadata_declarations();
|
||||
|
||||
private:
|
||||
store_type* m_store;
|
||||
shader_source_data m_buffer{};
|
||||
std::vector<std::string_view> m_value_buffer{};
|
||||
std::vector<std::size_t> m_declaration_value_count_buffer{};
|
||||
std::array<std::size_t, 4> m_declaration_type_index_buffer{};
|
||||
};
|
||||
|
||||
[[nodiscard]] static std::error_code read_file(
|
||||
const std::filesystem::path& filename,
|
||||
std::vector<char>& source
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_geometry_declaration(
|
||||
std::span<const std::string_view> values,
|
||||
shader_source_data::metadata& meta
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_stage_declaration(
|
||||
std::span<const std::string_view> values,
|
||||
shader_source_data::metadata& meta
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_components_declaration(
|
||||
std::span<const std::string_view> values,
|
||||
shader_source_data::metadata& meta
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_static_enable_declaration(
|
||||
std::span<const std::string_view> values,
|
||||
shader_source_data::metadata& meta
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_dynamic_enable_declaration(
|
||||
std::span<const std::string_view> values,
|
||||
shader_source_data::metadata& meta
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_component_tokens(
|
||||
std::span<const std::string_view> values,
|
||||
model_geometry::types geometry_type,
|
||||
shader_components::flags& components
|
||||
);
|
||||
|
||||
private:
|
||||
std::vector<std::string_view> m_value_token_buffer;
|
||||
std::vector<std::size_t> m_declaration_token_count_buffer;
|
||||
std::array<std::size_t, 4> m_declaration_type_index_buffer;
|
||||
std::vector<lookup_type::const_pointer> m_path_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
|
||||
|
||||
struct X {
|
||||
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const file_dir_list& paths,
|
||||
prefetch_queue& queue
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load(
|
||||
// space stuff that has to persist
|
||||
dynamic_X_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
dynamic_X_store& store,
|
||||
prefetch_lookup& id_lookup,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
#include <span>
|
||||
|
||||
#include "assets/dynamic_data_store.hpp"
|
||||
#include "assets/components/point_cloud_vertex_components.hpp"
|
||||
#include "assets/data/point_cloud_data.hpp"
|
||||
#include "assets/data_stores/point_cloud_store.hpp"
|
||||
#include "assets/prefetch_lookup.hpp"
|
||||
#include "assets/prefetch_queue.hpp"
|
||||
#include "glm/mat4x4.hpp"
|
||||
#include "util/result.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct kitti_loader
|
||||
{
|
||||
static constexpr auto name = std::string_view("kitti");
|
||||
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const file_dir_list& paths,
|
||||
prefetch_queue& queue
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load(
|
||||
point_cloud_data& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
private:
|
||||
inline static constexpr auto frame_folder = "frames";
|
||||
|
||||
[[nodiscard]] static ztu::result<std::size_t> frame_id_from_filename(
|
||||
std::string_view filename
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load_point_file(
|
||||
const std::filesystem::path& filename,
|
||||
dynamic_point_cloud_buffer& point_cloud
|
||||
);
|
||||
|
||||
static void transform_point_cloud(
|
||||
std::span<point_cloud_vertex_components::position> points,
|
||||
const glm::mat4& pose
|
||||
);
|
||||
|
||||
[[nodiscard]] static ztu::result<std::string_view> parent_directory(std::string_view path);
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
93
include/assets/file_parsers/kitti_parser.hpp
Normal file
93
include/assets/file_parsers/kitti_parser.hpp
Normal file
@@ -0,0 +1,93 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/path_id_lookups.hpp"
|
||||
#include "assets/components/point_cloud_vertex_components.hpp"
|
||||
#include "assets/data/point_cloud_data.hpp"
|
||||
#include "assets/data/pose_data.hpp"
|
||||
#include "assets/data_stores/point_cloud_store.hpp"
|
||||
#include "assets/data_stores/pose_list_store.hpp"
|
||||
#include "assets/data_views/pose_list_view.hpp"
|
||||
#include "util/result.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct kitti_parser
|
||||
{
|
||||
static constexpr auto name = std::string_view("kitti");
|
||||
using data_type = point_cloud_data;
|
||||
using store_type = point_cloud_store;
|
||||
using lookup_type = point_cloud_id_lookup;
|
||||
|
||||
[[nodiscard]] std::error_code prefetch(
|
||||
path_id_lookups& lookups
|
||||
);
|
||||
|
||||
[[nodiscard]] std::error_code load(
|
||||
path_id_lookups& lookups,
|
||||
data_stores& stores,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
protected:
|
||||
static constexpr auto frame_folder = "frames";
|
||||
|
||||
class parser_context
|
||||
{
|
||||
public:
|
||||
parser_context(
|
||||
path_id_lookups& pose_list_lookup,
|
||||
data_stores& stores
|
||||
);
|
||||
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
|
||||
void tokenize_declarations();
|
||||
|
||||
[[nodiscard]] bool parse_metadata_from_tokens();
|
||||
|
||||
void remove_metadata_declarations();
|
||||
|
||||
private:
|
||||
path_id_lookups* m_pose_list_lookup;
|
||||
data_stores* m_stores;
|
||||
data_type m_buffer{};
|
||||
std::filesystem::path m_last_pose_path{};
|
||||
pose_list_view m_last_pose_list{};
|
||||
};
|
||||
|
||||
|
||||
[[nodiscard]] static ztu::result<std::size_t> frame_id_from_filename(
|
||||
std::string_view filename
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code parse_file(
|
||||
const std::filesystem::path& filename,
|
||||
data_type& point_cloud
|
||||
);
|
||||
|
||||
static void transform_point_cloud(
|
||||
z3d::array_view<point_cloud_vertex_components::position> points,
|
||||
const pose_data& pose
|
||||
);
|
||||
|
||||
[[nodiscard]] static ztu::result<std::filesystem::path> parent_directory(
|
||||
const std::filesystem::path& path
|
||||
);
|
||||
#
|
||||
|
||||
[[nodiscard]] static ztu::result<std::filesystem::path> get_pose_path(
|
||||
const std::filesystem::path& path
|
||||
);
|
||||
|
||||
private:
|
||||
std::vector<lookup_type::const_pointer> m_path_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include "assets/dynamic_data_store.hpp"
|
||||
#include "assets/prefetch_lookup.hpp"
|
||||
#include "assets/prefetch_queue.hpp"
|
||||
#include "util/string_list.hpp"
|
||||
#include "../data_stores"
|
||||
#include "assets/data"
|
||||
#include "assets/prefetch_lookups/pose_prefetch_lookup.hpp"
|
||||
|
||||
struct kitti_pose_loader
|
||||
{
|
||||
static constexpr auto name = std::string_view("kitti_pose");
|
||||
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const file_dir_list& paths,
|
||||
prefetch_queue& queue
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load(
|
||||
dynamic_pose_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
private:
|
||||
static constexpr auto pose_filename = std::string_view{ "pose.txt" };
|
||||
|
||||
static std::error_code parse_pose(
|
||||
std::ifstream& in,
|
||||
dynamic_pose_buffer& pose
|
||||
);
|
||||
};
|
||||
62
include/assets/file_parsers/kitti_pose_parser.hpp
Normal file
62
include/assets/file_parsers/kitti_pose_parser.hpp
Normal file
@@ -0,0 +1,62 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include "assets/path_id_lookups.hpp"
|
||||
#include "assets/data_stores/pose_list_store.hpp"
|
||||
#include "assets/data/pose_list_data.hpp"
|
||||
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct kitti_pose_parser
|
||||
{
|
||||
static constexpr auto name = std::string_view("kitti_pose");
|
||||
using data_type = pose_list_data;
|
||||
using store_type = pose_list_store;
|
||||
using lookup_type = pose_list_id_lookup;
|
||||
|
||||
[[nodiscard]] std::error_code prefetch(
|
||||
path_id_lookups& lookups
|
||||
);
|
||||
|
||||
[[nodiscard]] std::error_code parse(
|
||||
const path_id_lookups& lookups,
|
||||
store_type& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
private:
|
||||
static constexpr auto pose_filename = std::string_view{ "pose.txt" };
|
||||
|
||||
class parser_context
|
||||
{
|
||||
public:
|
||||
parser_context(store_type& m_store);
|
||||
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
|
||||
private:
|
||||
store_type* m_store;
|
||||
data_type m_buffer{};
|
||||
};
|
||||
|
||||
static std::error_code parse_file(
|
||||
const std::filesystem::path& filename,
|
||||
data_type &poses
|
||||
);
|
||||
|
||||
static std::error_code parse_pose(
|
||||
std::ifstream& in,
|
||||
pose_data& pose
|
||||
);
|
||||
|
||||
private:
|
||||
std::vector<lookup_type::const_pointer> m_path_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <system_error>
|
||||
|
||||
#include "assets/dynamic_data_store.hpp"
|
||||
#include "assets/prefetch_lookup.hpp"
|
||||
#include "assets/prefetch_queue.hpp"
|
||||
#include "assets/data"
|
||||
#include "../data_stores"
|
||||
#include "../data_stores"
|
||||
#include "util/string_lookup.hpp"
|
||||
#include "util/result.hpp"
|
||||
|
||||
namespace mtl_loader_error
|
||||
{
|
||||
enum class codes {
|
||||
ok = 0,
|
||||
cannot_open_file,
|
||||
cannot_open_texture,
|
||||
malformed_ambient_color,
|
||||
malformed_diffuse_color,
|
||||
malformed_specular_color,
|
||||
malformed_specular_exponent,
|
||||
malformed_dissolve,
|
||||
unknown_line_begin
|
||||
};
|
||||
} // namespace mtl_loader_error
|
||||
|
||||
struct mtl_loader
|
||||
{
|
||||
static constexpr auto name = std::string_view("mtl");
|
||||
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const file_dir_list& paths,
|
||||
prefetch_queue& queue
|
||||
);
|
||||
|
||||
// THis is not very elegant, but right now I do not see a better solution...
|
||||
[[nodiscard]] static std::error_code load(
|
||||
dynamic_material_library_buffer& material_library_buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
protected:
|
||||
static void find_textures(
|
||||
std::span<char> buffer,
|
||||
std::filesystem::path& path_buffer,
|
||||
const std::filesystem::path& base_directory,
|
||||
std::ifstream& in,
|
||||
ztu::string_list& texture_filenames
|
||||
);
|
||||
};
|
||||
103
include/assets/file_parsers/mtl_parser.hpp
Normal file
103
include/assets/file_parsers/mtl_parser.hpp
Normal file
@@ -0,0 +1,103 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <system_error>
|
||||
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/path_id_lookups.hpp"
|
||||
#include "assets/data/material_data.hpp"
|
||||
#include "assets/data/material_library_data.hpp"
|
||||
#include "assets/data_stores/material_store.hpp"
|
||||
#include "assets/data_stores/material_library_store.hpp"
|
||||
#include "util/result.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
namespace mtl_parser_error
|
||||
{
|
||||
enum class codes {
|
||||
ok = 0,
|
||||
cannot_open_file,
|
||||
// TODO these are incomplete
|
||||
cannot_open_texture,
|
||||
malformed_ambient_color,
|
||||
malformed_diffuse_color,
|
||||
malformed_specular_color,
|
||||
malformed_specular_exponent,
|
||||
malformed_dissolve,
|
||||
unknown_line_begin
|
||||
};
|
||||
} // namespace mtl_loader_error
|
||||
|
||||
struct mtl_parser
|
||||
{
|
||||
static constexpr auto name = std::string_view("mtl");
|
||||
using data_type = material_library_data;
|
||||
using store_type = material_library_store;
|
||||
using lookup_type = material_library_id_lookup;
|
||||
|
||||
[[nodiscard]] std::error_code prefetch(
|
||||
path_id_lookups& lookups
|
||||
);
|
||||
|
||||
[[nodiscard]] std::error_code load(
|
||||
path_id_lookups& lookups,
|
||||
data_stores& stores,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
protected:
|
||||
class prefetcher_context
|
||||
{
|
||||
public:
|
||||
prefetcher_context(
|
||||
path_id_lookups& lookups
|
||||
);
|
||||
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
protected:
|
||||
|
||||
[[nodiscard]] std::optional<texture_id> fetch_texture_id(
|
||||
const std::filesystem::path& mtl_dir,
|
||||
std::string_view filename,
|
||||
std::string_view texture_type_name
|
||||
);
|
||||
|
||||
private:
|
||||
path_id_lookups* m_lookups;
|
||||
std::vector<char> m_buffer{};
|
||||
};
|
||||
|
||||
|
||||
class parser_context
|
||||
{
|
||||
public:
|
||||
parser_context(
|
||||
path_id_lookups& lookups,
|
||||
data_stores& stores
|
||||
);
|
||||
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
|
||||
[[nodiscard]] std::optional<texture_id> fetch_texture_id(
|
||||
const std::filesystem::path& mtl_dir,
|
||||
std::string_view filename,
|
||||
std::string_view texture_type_name
|
||||
);
|
||||
|
||||
private:
|
||||
path_id_lookups* m_lookups;
|
||||
data_stores* m_stores;
|
||||
data_type m_buffer{};
|
||||
};
|
||||
|
||||
private:
|
||||
std::vector<lookup_type::const_pointer> m_path_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <system_error>
|
||||
#include <string_view>
|
||||
#include "../data_loaders"
|
||||
#include "../data_stores"
|
||||
#include "assets/prefetch_lookup.hpp"
|
||||
#include <set>
|
||||
|
||||
namespace obj_loader_error {
|
||||
|
||||
enum class codes {
|
||||
ok = 0,
|
||||
cannot_open_file,
|
||||
malformed_vertex,
|
||||
malformed_texture_coordinate,
|
||||
malformed_normal,
|
||||
malformed_face,
|
||||
face_index_out_of_range,
|
||||
unknown_line_begin,
|
||||
use_material_without_material_library,
|
||||
unknown_material_name
|
||||
};
|
||||
|
||||
} // namespace obj_loader_error
|
||||
|
||||
struct obj_loader {
|
||||
|
||||
static constexpr auto name = std::string_view("obj");
|
||||
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const file_dir_list& paths,
|
||||
prefetch_queue& queue
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load(
|
||||
dynamic_mesh_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
protected:
|
||||
using index_type = dynamic_mesh_buffer::index_type;
|
||||
using vertex_type = std::array<index_type, 3>;
|
||||
|
||||
struct indexed_vertex_type
|
||||
{
|
||||
vertex_type vertex;
|
||||
index_type buffer_index;
|
||||
|
||||
friend auto operator<=>(const indexed_vertex_type& a, const indexed_vertex_type& b) {
|
||||
return a.vertex <=> b.vertex;
|
||||
}
|
||||
|
||||
bool operator==(const indexed_vertex_type& other) const noexcept {
|
||||
return other.vertex == vertex;
|
||||
}
|
||||
};
|
||||
|
||||
static void find_materials(
|
||||
std::span<char> buffer,
|
||||
std::filesystem::path& path_buffer,
|
||||
const std::filesystem::path& base_directory,
|
||||
std::ifstream& in,
|
||||
ztu::string_list& material_filenames
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code obj_loader::parse_file(
|
||||
dynamic_mesh_buffer& read_buffer,
|
||||
dynamic_mesh_buffer& mesh_buffer,
|
||||
std::filesystem::path& path_buffer,
|
||||
const std::filesystem::path& base_directory,
|
||||
std::set<indexed_vertex_type>& vertex_ids,
|
||||
std::ifstream& in,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic
|
||||
);
|
||||
};
|
||||
100
include/assets/file_parsers/obj_parser.hpp
Executable file
100
include/assets/file_parsers/obj_parser.hpp
Executable file
@@ -0,0 +1,100 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <system_error>
|
||||
#include <string_view>
|
||||
#include "assets/data/mesh_data.hpp"
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/path_id_lookups.hpp"
|
||||
#include <unordered_map>
|
||||
#include "util/array_hash.hpp"
|
||||
|
||||
namespace assets::obj_parser_error
|
||||
{
|
||||
enum class codes {
|
||||
ok = 0,
|
||||
cannot_open_file,
|
||||
malformed_vertex,
|
||||
malformed_texture_coordinate,
|
||||
malformed_normal,
|
||||
malformed_face,
|
||||
face_index_out_of_range,
|
||||
unknown_line_begin,
|
||||
use_material_without_material_library,
|
||||
unknown_material_name
|
||||
};
|
||||
} // namespace obj_loader_error
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct obj_parser
|
||||
{
|
||||
static constexpr auto name = std::string_view("obj");
|
||||
using data_type = mesh_data;
|
||||
using store_type = mesh_store;
|
||||
using lookup_type = mesh_id_lookup;
|
||||
|
||||
// TODO port this mess to the new interface
|
||||
[[nodiscard]] std::error_code prefetch(
|
||||
path_id_lookups& lookups
|
||||
);
|
||||
|
||||
[[nodiscard]] std::error_code load(
|
||||
path_id_lookups& lookups,
|
||||
data_stores& stores,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
protected:
|
||||
using component_indices = std::array<z3d::vertex_index, 3>;
|
||||
|
||||
class prefetcher_context
|
||||
{
|
||||
public:
|
||||
prefetcher_context(
|
||||
path_id_lookups& id_lookups
|
||||
);
|
||||
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
private:
|
||||
path_id_lookups* m_id_lookups;
|
||||
std::vector<char> m_buffer{};
|
||||
};
|
||||
|
||||
class parser_context
|
||||
{
|
||||
public:
|
||||
parser_context(
|
||||
path_id_lookups& m_id_lookups,
|
||||
data_stores& m_stores
|
||||
);
|
||||
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
|
||||
z3d::vertex_index find_or_push_vertex(const component_indices& vertex_comp_indices);
|
||||
|
||||
[[nodiscard]] std::optional<texture_id> fetch_texture_id(
|
||||
const std::filesystem::path& mtl_dir,
|
||||
std::string_view filename,
|
||||
std::string_view texture_type_name
|
||||
);
|
||||
|
||||
private:
|
||||
path_id_lookups* m_id_lookups;
|
||||
data_stores* m_stores;
|
||||
data_type m_mesh{};
|
||||
std::vector<mesh_vertex_components::position> m_position_buffer{};
|
||||
std::vector<mesh_vertex_components::normal> m_normal_buffer{};
|
||||
std::vector<mesh_vertex_components::tex_coord> m_tex_coord_buffer{};
|
||||
std::unordered_map<component_indices, z3d::vertex_index> m_vertex_comp_indices_to_vertex_index{};
|
||||
};
|
||||
|
||||
private:
|
||||
std::vector<lookup_type::const_pointer> m_path_buffer;
|
||||
};
|
||||
}
|
||||
@@ -3,28 +3,65 @@
|
||||
#include <filesystem>
|
||||
#include <system_error>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "assets/dynamic_data_store.hpp"
|
||||
#include "assets/data"
|
||||
#include "../data_stores"
|
||||
#include "assets/prefetch_lookup.hpp"
|
||||
#include "assets/prefetch_queue.hpp"
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/data/mesh_data.hpp"
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/path_id_lookups.hpp"
|
||||
#include "util/vector_hash.hpp"
|
||||
|
||||
struct stl_loader {
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct stl_loader
|
||||
{
|
||||
static constexpr auto name = std::string_view("stl");
|
||||
using data_type = mesh_data;
|
||||
using store_type = mesh_store;
|
||||
using lookup_type = mesh_id_lookup;
|
||||
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const file_dir_list& paths,
|
||||
prefetch_queue& queue
|
||||
[[nodiscard]] std::error_code prefetch(
|
||||
path_id_lookups& lookups
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load(
|
||||
// space stuff that has to persist
|
||||
dynamic_mesh_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
shader_source_store& store,
|
||||
[[nodiscard]] std::error_code load(
|
||||
path_id_lookups& lookups,
|
||||
data_stores& stores,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
protected:
|
||||
class parser_context
|
||||
{
|
||||
public:
|
||||
parser_context(
|
||||
path_id_lookups& m_id_lookups,
|
||||
data_stores& m_stores
|
||||
);
|
||||
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
|
||||
z3d::vertex_index find_or_push_vertex(const component_indices& vertex_comp_indices);
|
||||
|
||||
[[nodiscard]] std::optional<texture_id> fetch_texture_id(
|
||||
const std::filesystem::path& mtl_dir,
|
||||
std::string_view filename,
|
||||
std::string_view texture_type_name
|
||||
);
|
||||
|
||||
private:
|
||||
path_id_lookups* m_id_lookups;
|
||||
data_stores* m_stores;
|
||||
data_type m_mesh{};
|
||||
std::unordered_map<mesh_vertex_components::position, z3d::vertex_index> m_vertex_index_lookup{};
|
||||
};
|
||||
|
||||
private:
|
||||
std::vector<lookup_type::const_pointer> m_path_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -2,39 +2,56 @@
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include "assets/dynamic_data_store.hpp"
|
||||
#include "assets/prefetch_lookup.hpp"
|
||||
#include "assets/prefetch_queue.hpp"
|
||||
#include "assets/data"
|
||||
#include "util/string_list.hpp"
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/path_id_lookups.hpp"
|
||||
#include "assets/data/pose_data.hpp"
|
||||
#include "util/result.hpp"
|
||||
#include "assets/prefetch_lookups/pose_prefetch_lookup.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct threedtk_pose_loader
|
||||
{
|
||||
static constexpr auto name = std::string_view("3dtk_pose");
|
||||
using data_type = pose_list_data;
|
||||
using store_type = pose_list_store;
|
||||
using lookup_type = pose_list_id_lookup;
|
||||
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const file_dir_list& paths,
|
||||
prefetch_queue& queue
|
||||
[[nodiscard]] std::error_code prefetch(
|
||||
path_id_lookups& lookups
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load(
|
||||
dynamic_pose_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
shader_source_store& store,
|
||||
[[nodiscard]] std::error_code load(
|
||||
path_id_lookups& lookups,
|
||||
data_stores& stores,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
protected:
|
||||
static std::error_code parse_transform_info(
|
||||
std::ifstream& in,
|
||||
std::string& line,
|
||||
std::array<glm::vec3, 2>& transform_info
|
||||
class parser_context
|
||||
{
|
||||
public:
|
||||
parser_context(
|
||||
path_id_lookups& pose_list_lookup,
|
||||
data_stores& stores
|
||||
);
|
||||
|
||||
static ztu::result<pose_prefetch_lookup::index_type> parse_index(
|
||||
std::string_view filename
|
||||
);
|
||||
void operator()(lookup_type::const_pointer entry) noexcept;
|
||||
|
||||
private:
|
||||
path_id_lookups* m_id_lookups;
|
||||
data_stores* m_stores;
|
||||
data_type m_pose{};
|
||||
std::string m_line_buffer{};
|
||||
};
|
||||
|
||||
static ztu::result<pose_data> parse_file(
|
||||
const std::filesystem::path& filename,
|
||||
std::string& line_buffer
|
||||
);
|
||||
|
||||
private:
|
||||
std::vector<lookup_type::const_pointer> m_path_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
|
||||
#include "generic/generic_3dtk_loader.hpp"
|
||||
|
||||
struct uos_loader : generic_3dtk_loader<false, false, false>
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct uos_loader : detail::generic_3dtk_loader<false, false, false>
|
||||
{
|
||||
static constexpr auto name = std::string_view("uos");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
|
||||
#include "generic/generic_3dtk_loader.hpp"
|
||||
|
||||
struct uos_normal_loader : generic_3dtk_loader<true, false, false>
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct uos_normal_loader : detail::generic_3dtk_loader<true, false, false>
|
||||
{
|
||||
static constexpr auto name = std::string_view("uos_normal");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
|
||||
#include "generic/generic_3dtk_loader.hpp"
|
||||
|
||||
struct uos_rgb_loader : generic_3dtk_loader<false, true, false>
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct uos_rgb_loader : detail::generic_3dtk_loader<false, true, false>
|
||||
{
|
||||
static constexpr auto name = std::string_view("uos_rgb");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
|
||||
#include "generic/generic_3dtk_loader.hpp"
|
||||
|
||||
struct uosr_loader : generic_3dtk_loader<false, false, true>
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct uosr_loader : detail::generic_3dtk_loader<false, false, true>
|
||||
{
|
||||
static constexpr auto name = std::string_view("uosr");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
31
include/assets/identifiers.hpp
Normal file
31
include/assets/identifiers.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
namespace identifier_uuids
|
||||
{
|
||||
enum : int {
|
||||
material,
|
||||
material_library,
|
||||
mesh,
|
||||
point_cloud,
|
||||
pose,
|
||||
pose_list,
|
||||
shader_source,
|
||||
texture
|
||||
};
|
||||
}
|
||||
|
||||
using material_id = z3d::identifier<identifier_uuids::material>;
|
||||
using material_library_id = z3d::identifier<identifier_uuids::material_library>;
|
||||
using mesh_id = z3d::identifier<identifier_uuids::mesh>;
|
||||
using point_cloud_id = z3d::identifier<identifier_uuids::point_cloud>;
|
||||
using pose_id = z3d::identifier<identifier_uuids::pose>;
|
||||
using pose_list_id = z3d::identifier<identifier_uuids::pose_list>;
|
||||
using shader_source_id = z3d::identifier<identifier_uuids::shader_source>;
|
||||
using texture_id = z3d::identifier<identifier_uuids::texture>;
|
||||
|
||||
}
|
||||
22
include/assets/model_geometry.hpp
Normal file
22
include/assets/model_geometry.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
|
||||
namespace assets::model_geometry
|
||||
{
|
||||
|
||||
enum class types : z3d::u8
|
||||
{
|
||||
mesh = 0,
|
||||
point_cloud = 1
|
||||
};
|
||||
|
||||
inline constexpr z3d::size count = 2;
|
||||
|
||||
inline constexpr auto names = z3d::array<z3d::string_view, 2>{
|
||||
"mesh",
|
||||
"point_cloud"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
30
include/assets/path_id_lookups.hpp
Normal file
30
include/assets/path_id_lookups.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "identifiers.hpp"
|
||||
#include "util/file_id_lookup.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using material_id_lookup = file_id_lookup<material_id>;
|
||||
using material_library_id_lookup = file_id_lookup<material_library_id>;
|
||||
using mesh_id_lookup = file_id_lookup<mesh_id>;
|
||||
using point_cloud_id_lookup = file_id_lookup<point_cloud_id>;
|
||||
using pose_id_lookup = file_id_lookup<pose_id>;
|
||||
using pose_list_id_lookup = file_id_lookup<pose_id>;
|
||||
using shader_source_id_lookup = file_id_lookup<shader_source_id>;
|
||||
using texture_id_lookup = file_id_lookup<texture_id>;
|
||||
|
||||
struct path_id_lookups
|
||||
{
|
||||
material_id_lookup materials;
|
||||
material_library_id_lookup material_libraries;
|
||||
mesh_id_lookup meshes;
|
||||
point_cloud_id_lookup point_clouds;
|
||||
pose_id_lookup poses;
|
||||
pose_list_id_lookup pose_lists;
|
||||
shader_source_id_lookup shader_sources;
|
||||
texture_id_lookup textures;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "prefetch_lookups/material_library_prefetch_lookup.hpp"
|
||||
#include "prefetch_lookups/material_prefetch_lookup.hpp"
|
||||
#include "prefetch_lookups/mesh_prefetch_lookup.hpp"
|
||||
#include "prefetch_lookups/point_cloud_prefetch_lookup.hpp"
|
||||
#include "prefetch_lookups/pose_prefetch_lookup.hpp"
|
||||
#include "prefetch_lookups/shader_prefetch_lookup.hpp"
|
||||
#include "prefetch_lookups/texture_prefetch_lookup.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct prefetch_lookup
|
||||
{
|
||||
texture_prefetch_lookup textures;
|
||||
material_library_prefetch_lookup material_libraries;
|
||||
material_prefetch_lookup materials;
|
||||
mesh_prefetch_lookup meshes;
|
||||
pose_prefetch_lookup poses;
|
||||
point_cloud_prefetch_lookup point_clouds;
|
||||
shader_source_prefetch_lookup shader_sources;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/data_stores/material_library_store.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using material_library_prefetch_lookup = std::unordered_map<std::filesystem::path, material_library_store::id_type>;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/data_stores/material_store.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using material_prefetch_lookup = std::unordered_map<std::filesystem::path, material_store::id_type>;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/data_stores/mesh_store.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using mesh_prefetch_lookup = std::unordered_map<std::filesystem::path, mesh_store::id_type>;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/data_stores/point_cloud_store.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using point_cloud_prefetch_lookup = std::unordered_map<std::filesystem::path, point_cloud_store::id_type>;
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "util/uix.hpp"
|
||||
#include "assets/data_stores/pose_store.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
class pose_prefetch_lookup
|
||||
{
|
||||
public:
|
||||
using index_type = ztu::u32;
|
||||
using directory_lookup = std::unordered_map<std::filesystem::path, index_type>;
|
||||
using directory_iterator = std::pair<directory_lookup::iterator, index_type>;
|
||||
using index_lookup = std::vector<index_type>;
|
||||
using index_iterator = index_lookup::iterator;
|
||||
using lookup_type = std::vector<pose_store::id_type>;
|
||||
using iterator = lookup_type::iterator;
|
||||
|
||||
void emplace(
|
||||
const std::filesystem::path& directory,
|
||||
index_type index,
|
||||
pose_store::id_type id
|
||||
);
|
||||
|
||||
void emplace_hint_dir(
|
||||
directory_iterator directory_it,
|
||||
index_type index,
|
||||
pose_store::id_type id
|
||||
);
|
||||
|
||||
void emplace_hint_dir_index(
|
||||
directory_iterator directory_it,
|
||||
index_iterator index_it,
|
||||
index_type index,
|
||||
pose_store::id_type id
|
||||
);
|
||||
|
||||
std::pair<directory_iterator, bool> find_directory(
|
||||
const std::filesystem::path& directory
|
||||
);
|
||||
|
||||
std::pair<index_iterator, pose_store::id_type> find_index(
|
||||
directory_iterator directory_it,
|
||||
index_type index
|
||||
);
|
||||
|
||||
directory_iterator emplace_dir(
|
||||
directory_iterator directory_it,
|
||||
const std::filesystem::path& directory
|
||||
);
|
||||
|
||||
private:
|
||||
directory_lookup m_directory_lookup;
|
||||
index_lookup m_directory_indices; // count before indices, indices sorted per dir
|
||||
lookup_type m_pose_ids; // offset by 1
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/data_stores/shader_source_store.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using shader_source_prefetch_lookup = std::unordered_map<std::filesystem::path, shader_source_store::id_type>;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
#include "assets/data_stores/texture_store.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using texture_prefetch_lookup = std::unordered_map<std::filesystem::path, texture_store::id_type>;
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "util/string_list.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct file_dir_list
|
||||
{
|
||||
ztu::string_list files;
|
||||
ztu::string_list directories;
|
||||
};
|
||||
|
||||
|
||||
struct prefetch_queue
|
||||
{
|
||||
file_dir_list obj_queue;
|
||||
file_dir_list stl_queue;
|
||||
|
||||
file_dir_list mtl_queue;
|
||||
|
||||
file_dir_list uosr_queue;
|
||||
file_dir_list uos_rgb_queue;
|
||||
file_dir_list uos_normal_queue;
|
||||
file_dir_list uos_queue;
|
||||
file_dir_list kitti_queue;
|
||||
|
||||
file_dir_list threedtk_pose_queue;
|
||||
file_dir_list kitti_pose_queue;
|
||||
|
||||
file_dir_list glsl_queue;
|
||||
};
|
||||
|
||||
}
|
||||
74
include/config/primitives.hpp
Normal file
74
include/config/primitives.hpp
Normal file
@@ -0,0 +1,74 @@
|
||||
#pragma once
|
||||
|
||||
#include <tuple>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <string_view>
|
||||
#include <expected>
|
||||
#include <system_error>
|
||||
|
||||
#include "glm/glm.hpp"
|
||||
#include "util/id_type.hpp"
|
||||
|
||||
namespace z3d
|
||||
{
|
||||
|
||||
using u8 = std::uint8_t;
|
||||
using u16 = std::uint16_t;
|
||||
using u32 = std::uint32_t;
|
||||
using u64 = std::uint64_t;
|
||||
|
||||
using i8 = std::int8_t;
|
||||
using i16 = std::int16_t;
|
||||
using i32 = std::int32_t;
|
||||
using i64 = std::int64_t;
|
||||
|
||||
using size = ssize_t;
|
||||
|
||||
using f32 = float;
|
||||
using f64 = double;
|
||||
|
||||
template<glm::length_t L, typename T>
|
||||
using vec = glm::vec<L, T, glm::packed_highp>;
|
||||
|
||||
using vec2 = vec<2, f32>;
|
||||
using vec3 = vec<3, f32>;
|
||||
using vec4 = vec<4, f32>;
|
||||
|
||||
template<glm::length_t C, glm::length_t R, typename T>
|
||||
using mat = glm::mat<C, R, T, glm::packed_highp>;
|
||||
|
||||
using mat3 = mat<4, 4, f32>;
|
||||
using mat4 = mat<4, 4, f32>;
|
||||
|
||||
template<typename T>
|
||||
using optional = std::optional<T>;
|
||||
|
||||
template<typename T, std::size_t Count>
|
||||
using array = std::array<T, Count>;
|
||||
|
||||
template<typename T>
|
||||
using vector = std::vector<T>;
|
||||
|
||||
template<class T, std::size_t Extent = std::dynamic_extent>
|
||||
using array_view = std::span<T, Extent>;
|
||||
|
||||
template<typename... Ts>
|
||||
using structure = std::tuple<Ts...>;
|
||||
|
||||
using string_view = std::string_view;
|
||||
|
||||
template<typename T>
|
||||
using result = std::expected<T, std::error_code>;
|
||||
|
||||
using vertex_index = u32;
|
||||
using index_triangle = array<vertex_index, 3>;
|
||||
|
||||
template<int ID>
|
||||
using identifier = ztu::id_type<u32, ID>;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "assets/data/texture.hpp"
|
||||
#include "assets/data/surface_properties.hpp"
|
||||
#include "assets/data/uniform_surface_properties.hpp"
|
||||
#include "assets/components/material_components.hpp"
|
||||
|
||||
#include "opengl/handles/material_handle.hpp"
|
||||
|
||||
41
include/opengl/data_managers/material_manager.hpp
Normal file
41
include/opengl/data_managers/material_manager.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include "assets/data/material_data.hpp"
|
||||
#include "assets/data_stores/material_store.hpp"
|
||||
#include "opengl/handles/material_handle.hpp"
|
||||
#include <vector>
|
||||
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "opengl/metadata/material_metadata.hpp"
|
||||
#include "opengl/resource_management/resource_manager.hpp"
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
class material_manager
|
||||
{
|
||||
public:
|
||||
using store_type = assets::material_store;
|
||||
using store_id_type = store_type::id_type;
|
||||
using metadata_type = material_metadata;
|
||||
using handle_type = material_handle;
|
||||
using resource_manager_type = resource_manager<store_id_type, metadata_type>;
|
||||
// TODO add reference and const_reference
|
||||
using entry_type = std::pair<const handle_type&, const metadata_type&>;
|
||||
|
||||
static constexpr std::size_t min_garbage_collection_count = 4;
|
||||
|
||||
void process(const store_type& materials);
|
||||
|
||||
std::optional<entry_type> get_handle(store_id_type id);
|
||||
|
||||
void collect_garbage(bool force = false);
|
||||
|
||||
protected:
|
||||
resource_manager_type m_resource_manager;
|
||||
|
||||
private:
|
||||
std::vector<std::pair<store_id_type, const assets::material_data&>> m_material_buffer;
|
||||
std::vector<GLuint> m_material_id_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../assets/data_stores"
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/data_stores/mesh_store.hpp"
|
||||
#include "opengl/resource_management/resource_manager.hpp"
|
||||
#include "opengl/handles/index_buffer_handle.hpp"
|
||||
#include "opengl/metadata/index_buffer_metadata.hpp"
|
||||
@@ -10,7 +11,7 @@ namespace zgl
|
||||
class mesh_index_buffer_manager
|
||||
{
|
||||
public:
|
||||
using store_type = dynamic_mesh_store;
|
||||
using store_type = assets::mesh_store;
|
||||
using store_id_type = store_type::id_type;
|
||||
using metadata_type = index_buffer_metadata;
|
||||
using handle_type = index_buffer_handle;
|
||||
@@ -19,7 +20,7 @@ public:
|
||||
|
||||
static constexpr std::size_t min_garbage_collection_count = 4;
|
||||
|
||||
void process(store_type& store);
|
||||
void process(const store_type& meshes);
|
||||
|
||||
std::optional<entry_type> get_handle(store_id_type id);
|
||||
|
||||
@@ -29,7 +30,7 @@ protected:
|
||||
resource_manager_type m_resource_manager;
|
||||
|
||||
private:
|
||||
std::vector<store_type::iterator_type::value_type> m_mesh_buffer;
|
||||
std::vector<store_type::iterator::value_type> m_mesh_buffer;
|
||||
std::vector<GLuint> m_buffer_id_buffer;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/data_stores/mesh_store.hpp"
|
||||
#include "opengl/resource_management/resource_manager.hpp"
|
||||
#include "opengl/handles/vertex_buffer_handle.hpp"
|
||||
@@ -20,7 +21,7 @@ public:
|
||||
|
||||
static constexpr std::size_t min_garbage_collection_count = 4;
|
||||
|
||||
void process(store_type& store);
|
||||
void process(const store_type& meshes);
|
||||
|
||||
std::optional<entry_type> get_handle(store_id_type id);
|
||||
|
||||
@@ -30,7 +31,7 @@ protected:
|
||||
resource_manager_type m_resource_manager;
|
||||
|
||||
private:
|
||||
std::vector<store_type::iterator_type::value_type> m_mesh_buffer;
|
||||
std::vector<store_type::iterator::value_type> m_mesh_buffer;
|
||||
std::vector<GLuint> m_buffer_id_buffer;
|
||||
|
||||
std::vector<ztu::u8> m_byte_buffer;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "assets/data_stores/point_cloud_store.hpp"
|
||||
#include "opengl/resource_management/resource_manager.hpp"
|
||||
#include "opengl/handles/vertex_buffer_handle.hpp"
|
||||
@@ -20,7 +21,7 @@ public:
|
||||
|
||||
static constexpr std::size_t min_garbage_collection_count = 4;
|
||||
|
||||
void process(store_type& store);
|
||||
void process(const store_type& point_clouds);
|
||||
|
||||
std::optional<entry_type> get_handle(store_id_type id);
|
||||
|
||||
@@ -30,7 +31,7 @@ protected:
|
||||
resource_manager_type m_resource_manager;
|
||||
|
||||
private:
|
||||
std::vector<store_type::iterator_type::value_type> m_point_cloud_buffer;
|
||||
std::vector<store_type::iterator::value_type> m_point_cloud_buffer;
|
||||
std::vector<GLuint> m_buffer_id_buffer;
|
||||
std::vector<ztu::u8> m_byte_buffer;
|
||||
};
|
||||
|
||||
@@ -11,33 +11,37 @@
|
||||
#include "opengl/handles/shader_handle.hpp"
|
||||
#include "util/string_lookup.hpp"
|
||||
#include "shader_source_manager.hpp"
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "opengl/metadata/shader_metadata.hpp"
|
||||
#include "opengl/data/shader_data.hpp"
|
||||
#include "opengl/handles/shader_handle_set.hpp"
|
||||
#include "opengl/shading/requirements/shader_requirements.hpp"
|
||||
#include "opengl/metadata/shader_set_metadata.hpp"
|
||||
#include "opengl/shading/requirements/shader_set_requirements.hpp"
|
||||
#include "opengl/shading/requirements/shader_program_requirements.hpp"
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
class shader_manager
|
||||
{
|
||||
using shader_lookup_entry_type = std::pair<shader_metadata, shader_data>;
|
||||
public:
|
||||
using store_type = shader_source_manager::store_type;
|
||||
using metadata_type = shader_metadata;
|
||||
using data_type = shader_data;
|
||||
using handle_type = shader_handle;
|
||||
using entry_type = std::pair<metadata_type, data_type>;
|
||||
using entry_view_type = std::pair<metadata_type, handle_type>;
|
||||
|
||||
void process(
|
||||
const assets::shader_source_store& shader_sources
|
||||
);
|
||||
void process(const store_type& shader_sources);
|
||||
|
||||
void get_handles(
|
||||
void fetch(
|
||||
const assets::shader_source_store& shader_sources,
|
||||
std::span<const shading::shader_set_requirements> requirements,
|
||||
std::span<const shading::shader_program_requirements> requirements,
|
||||
std::span<shader_set_metadata> metadata,
|
||||
std::span<shader_handle_set> shader_sets
|
||||
);
|
||||
|
||||
protected:
|
||||
std::optional<std::pair<shader_metadata, shader_handle>> find_shader(
|
||||
std::optional<entry_view_type> find_shader(
|
||||
const shading::shader_requirements& requirements
|
||||
);
|
||||
|
||||
@@ -47,12 +51,13 @@ protected:
|
||||
shader_data& shader
|
||||
);
|
||||
|
||||
private:
|
||||
shader_source_manager m_preprocessor{};
|
||||
|
||||
std::vector<shading::shader_source_requirements> m_source_requirement_buffer{};
|
||||
shader_source_manager m_preprocessor{};
|
||||
std::vector<entry_type> m_shader_lookup{};
|
||||
|
||||
private:
|
||||
std::vector<shading::shader_requirements> m_source_requirement_buffer{};
|
||||
std::vector<preprocessed_shader_source_metadata> m_preprocessed_shader_source_metadata_buffer{};
|
||||
std::vector<const char*> m_source_strings_buffer{};
|
||||
std::vector<shader_lookup_entry_type> m_shader_lookup{};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,17 +11,17 @@ namespace zgl
|
||||
|
||||
class shader_program_manager
|
||||
{
|
||||
using shader_program_lookup_entry_type = std::pair<
|
||||
shader_program_metadata,
|
||||
shader_program_data
|
||||
>;
|
||||
|
||||
public:
|
||||
void process(
|
||||
const assets::shader_source_store& shader_sources
|
||||
);
|
||||
using store_type = shader_manager::store_type;
|
||||
using metadata_type = shader_program_metadata;
|
||||
using data_type = shader_program_data;
|
||||
using handle_type = shader_program_handle;
|
||||
using entry_type = std::pair<metadata_type, data_type>;
|
||||
using entry_view_type = std::pair<metadata_type, handle_type>;
|
||||
|
||||
void get_handles(
|
||||
void process(const store_type& shader_sources);
|
||||
|
||||
void fetch(
|
||||
const assets::shader_source_store& shader_sources,
|
||||
std::span<const shading::shader_program_requirements> requirements,
|
||||
std::span<shader_program_metadata> metadata,
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
);
|
||||
|
||||
protected:
|
||||
std::optional<std::pair<shader_program_metadata, shader_program_handle>> find_shader_program(
|
||||
std::optional<entry_view_type> find_shader_program(
|
||||
const shading::shader_program_requirements& requirements
|
||||
);
|
||||
|
||||
@@ -38,11 +38,10 @@ protected:
|
||||
);
|
||||
|
||||
shader_manager m_shader_manager;
|
||||
std::vector<shader_program_lookup_entry_type> m_shader_program_lookup;
|
||||
std::vector<entry_type> m_shader_program_lookup;
|
||||
|
||||
private:
|
||||
|
||||
std::vector<shading::shader_set_requirements> m_shader_requirements_buffer;
|
||||
std::vector<shading::shader_program_requirements> m_shader_requirements_buffer;
|
||||
std::vector<shader_set_metadata> m_shader_metadata_buffer;
|
||||
std::vector<shader_handle_set> shader_set_buffer;
|
||||
};
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "util/string_lookup.hpp"
|
||||
|
||||
#include "opengl/metadata/shader_source_metadata.hpp"
|
||||
#include "opengl/shading/requirements/shader_source_requirements.hpp"
|
||||
#include "opengl/shading/requirements/shader_requirements.hpp"
|
||||
#include "opengl/metadata/preprocessed_shader_source_metadata.hpp"
|
||||
|
||||
#include "assets/data_stores/shader_source_store.hpp"
|
||||
@@ -18,70 +20,31 @@ namespace zgl {
|
||||
class shader_source_manager {
|
||||
|
||||
public:
|
||||
void process(
|
||||
const assets::shader_source_store& shader_sources
|
||||
);
|
||||
using store_type = assets::shader_source_store;
|
||||
using store_id_type = store_type::id_type;
|
||||
using metadata_type = shader_source_metadata;
|
||||
using data_type = char*;
|
||||
using handle_type = const char*;
|
||||
using entry_type = std::pair<metadata_type, store_id_type>;
|
||||
using entry_view_type = std::pair<preprocessed_shader_source_metadata, handle_type>;
|
||||
|
||||
void get_shader_sources(
|
||||
void process(const store_type& shader_sources);
|
||||
|
||||
void fetch(
|
||||
const assets::shader_source_store& shader_sources,
|
||||
std::span<const shading::shader_source_requirements> requirements,
|
||||
std::span<const shading::shader_requirements> requirements,
|
||||
std::span<preprocessed_shader_source_metadata> metadata,
|
||||
std::vector<const char*>& shader_strings
|
||||
);
|
||||
|
||||
protected:
|
||||
|
||||
void tokenize_declarations(std::string_view source);
|
||||
|
||||
std::optional<shader_source_metadata> parse_metadata_from_tokens();
|
||||
|
||||
[[nodiscard]] static bool parse_stage_declaration(
|
||||
std::span<const std::string_view> values,
|
||||
shader_source_metadata& metadata
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_geometry_declaration(
|
||||
std::span<const std::string_view> tokens,
|
||||
shader_source_metadata& metadata
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_features_declaration(
|
||||
std::span<const std::string_view> values,
|
||||
shader_source_metadata& metadata
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_static_enable_declaration(
|
||||
std::span<const std::string_view> values,
|
||||
shader_source_metadata& metadata
|
||||
);
|
||||
|
||||
[[nodiscard]] static bool parse_dynamic_enable_declaration(
|
||||
std::span<const std::string_view> values,
|
||||
shader_source_metadata& metadata
|
||||
);
|
||||
|
||||
template<typename T>
|
||||
static void parse_feature_tokens(
|
||||
std::span<const std::string_view> values,
|
||||
const ztu::string_lookup<T>& feature_lookup,
|
||||
T& features
|
||||
);
|
||||
|
||||
static void get_define_strings(
|
||||
shading::model_geometry::types geometry,
|
||||
shading::features::generic::type features,
|
||||
shading::features::generic::type& feature_count,
|
||||
assets::model_geometry::types geometry_type,
|
||||
assets::shader_components::flags components,
|
||||
assets::shader_components::flags& component_count,
|
||||
std::vector<const char*>& defines
|
||||
);
|
||||
|
||||
private:
|
||||
std::vector<std::string_view> m_value_token_buffer;
|
||||
std::vector<std::size_t> m_declaration_token_count_buffer;
|
||||
std::array<std::size_t, 4> m_declaration_type_index_buffer;
|
||||
|
||||
using source_lookup_entry_type = std::pair<shader_source_metadata, assets::shader_source_store::id_type>;
|
||||
using source_lookup_type = std::vector<source_lookup_entry_type>;
|
||||
|
||||
source_lookup_type m_shader_source_lookup;
|
||||
std::vector<entry_type> m_shader_source_lookup;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "../../assets/read_buffers"
|
||||
#include "../../assets/data_stores"
|
||||
#include "assets/data/texture_data.hpp"
|
||||
#include "assets/data_stores/texture_store.hpp"
|
||||
#include "opengl/handles/texture_handle.hpp"
|
||||
#include <vector>
|
||||
|
||||
#include "assets/data_stores.hpp"
|
||||
#include "opengl/metadata/texture_metadata.hpp"
|
||||
#include "opengl/resource_management/resource_manager.hpp"
|
||||
|
||||
@@ -15,7 +16,7 @@ namespace zgl
|
||||
class texture_manager
|
||||
{
|
||||
public:
|
||||
using store_type = dynamic_texture_store;
|
||||
using store_type = assets::texture_store;
|
||||
using store_id_type = store_type::id_type;
|
||||
using metadata_type = texture_metadata;
|
||||
using handle_type = texture_handle;
|
||||
@@ -24,7 +25,7 @@ public:
|
||||
|
||||
static constexpr std::size_t min_garbage_collection_count = 4;
|
||||
|
||||
void process(store_type& store);
|
||||
void process(const store_type& textures);
|
||||
|
||||
std::optional<entry_type> get_handle(store_id_type id);
|
||||
|
||||
@@ -34,7 +35,7 @@ protected:
|
||||
resource_manager_type m_resource_manager;
|
||||
|
||||
private:
|
||||
std::vector<std::pair<dynamic_texture_store::id_type, const dynamic_texture_buffer&>> m_texture_buffer;
|
||||
std::vector<std::pair<store_id_type, const assets::texture_data&>> m_texture_buffer;
|
||||
std::vector<GLuint> m_texture_id_buffer;
|
||||
};
|
||||
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
struct material_handle
|
||||
// TODO implement
|
||||
struct material_handle : resource_handle
|
||||
{
|
||||
std::optional<texture_handle> texture{ std::nullopt };
|
||||
std::optional<surface_properties_handle> surface_properties{ std::nullopt };
|
||||
std::optional<alpha_handle> alpha{ std::nullopt };
|
||||
inline void bind() const;
|
||||
inline static void unbind();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "GL/glew.h"
|
||||
#include "opengl/shader_program_variable.hpp"
|
||||
|
||||
#include "opengl/shader_program_variable.hpp"
|
||||
#include "opengl/shading/uniform.hpp"
|
||||
#include "util/uix.hpp"
|
||||
#include <span>
|
||||
|
||||
@@ -17,12 +15,12 @@ struct shader_program_handle
|
||||
inline void bind() const;
|
||||
static void unbind();
|
||||
|
||||
template<shader_program_variable::info_type VariableInfo, typename T>
|
||||
template<shading::uniform U, typename T>
|
||||
void set_uniform(const T& value) const;
|
||||
|
||||
[[nodiscard]] attribute_support_type check_attribute_support(std::span<const shader_program_variable> attributes) const;
|
||||
/*[[nodiscard]] attribute_support_type check_attribute_support(std::span<const shader_uniform> attributes) const;
|
||||
|
||||
[[nodiscard]] uniform_support_type check_uniform_support(std::span<const shader_program_variable> uniforms) const;
|
||||
[[nodiscard]] uniform_support_type check_uniform_support(std::span<const shader_uniform> uniforms) const;*/
|
||||
|
||||
[[nodiscard]] bool valid() const;
|
||||
|
||||
|
||||
18
include/opengl/metadata/material_metadata.hpp
Normal file
18
include/opengl/metadata/material_metadata.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "opengl/handles/texture_handle.hpp"
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
|
||||
struct material_metadata
|
||||
{
|
||||
texture_handle specular_filter_texture_handle;
|
||||
texture_handle diffuse_filter_texture_handle;
|
||||
texture_handle specular_filter_texture_handle;
|
||||
texture_handle shininess_texture_handle;
|
||||
texture_handle alpha_texture_handle;
|
||||
texture_handle bump_texture_handle;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "assets/components/mesh_vertex_components.hpp"
|
||||
#include "assets/data_stores/material_store.hpp"
|
||||
#include "opengl/handles/material_handle.hpp"
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
@@ -9,7 +10,7 @@ namespace zgl
|
||||
struct mesh_vertex_buffer_metadata
|
||||
{
|
||||
assets::mesh_vertex_components::flags component_flags;
|
||||
assets::material_store::id_type material_id{};
|
||||
material_handle material{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "opengl/shading/features/generic_features.hpp"
|
||||
#include "assets/components/shader_components.hpp"
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
struct preprocessed_shader_source_metadata
|
||||
{
|
||||
shading::features::generic::type static_enabled{};
|
||||
shading::features::generic::type dynamic_enable{};
|
||||
shading::features::generic::type string_count{};
|
||||
assets::shader_components::flags static_enabled{};
|
||||
assets::shader_components::flags dynamic_enable{};
|
||||
// Use same integer type as it guarantees good alignment.
|
||||
// (even an unsigned byte should hold the maximum number of defines.)
|
||||
assets::shader_components::flags string_count{};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "opengl/shading/model_geometry.hpp"
|
||||
#include "opengl/shading/shader_stage.hpp"
|
||||
#include "opengl/shading/features/generic_features.hpp"
|
||||
#include "assets/model_geometry.hpp"
|
||||
#include "assets/components/shader_components.hpp"
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
|
||||
struct shader_metadata
|
||||
{
|
||||
shading::model_geometry::types geometry;
|
||||
shading::stage::types stage;
|
||||
shading::features::generic::type static_enabled{};
|
||||
shading::features::generic::type dynamic_enable{};
|
||||
assets::model_geometry::types geometry_type;
|
||||
assets::shader_components::stage stage;
|
||||
assets::shader_components::flags static_enabled{};
|
||||
assets::shader_components::flags dynamic_enable{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "opengl/shading/model_geometry.hpp"
|
||||
#include "opengl/shading/features/generic_features.hpp"
|
||||
#include "assets/model_geometry.hpp"
|
||||
#include "assets/components/shader_components.hpp"
|
||||
|
||||
namespace zgl {
|
||||
namespace zgl
|
||||
{
|
||||
|
||||
struct shader_program_metadata
|
||||
{
|
||||
shading::model_geometry::types geometry;
|
||||
shading::features::generic::type static_enabled{};
|
||||
shading::features::generic::type dynamic_enable{};
|
||||
assets::model_geometry::types geometry_type;
|
||||
assets::shader_components::stage static_enabled{};
|
||||
assets::shader_components::stage dynamic_enable{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "opengl/shading/features/generic_features.hpp"
|
||||
#include "assets/components/shader_components.hpp"
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
struct shader_set_metadata
|
||||
{
|
||||
shading::features::generic::type static_enabled{};
|
||||
shading::features::generic::type dynamic_enable{};
|
||||
assets::shader_components::flags static_enabled{};
|
||||
assets::shader_components::flags dynamic_enable{};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,91 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
#include "assets/data/shader_source_data.hpp"
|
||||
|
||||
#include "../shading/model_geometry.hpp"
|
||||
#include "../shading/shader_stage.hpp"
|
||||
#include "../shading/features/mesh_features.hpp"
|
||||
#include "../shading/features/point_cloud_features.hpp"
|
||||
#include "../shading/features/generic_features.hpp"
|
||||
#include <algorithm>
|
||||
|
||||
// TODO move implementation to .ipp file
|
||||
namespace zgl
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
struct shader_features_set
|
||||
{
|
||||
T features, static_enable, dynamic_enable;
|
||||
|
||||
template<typename U>
|
||||
[[nodiscard]] shader_features_set<U> cast() const noexcept
|
||||
{
|
||||
return {
|
||||
.features = static_cast<U>(features),
|
||||
.static_enable = static_cast<U>(static_enable),
|
||||
.dynamic_enable = static_cast<U>(dynamic_enable)
|
||||
};
|
||||
}
|
||||
|
||||
// TODO this may not compile
|
||||
[[nodiscard]] bool operator==(const shader_features_set& other) const noexcept = default;
|
||||
};
|
||||
|
||||
|
||||
struct shader_source_metadata
|
||||
{
|
||||
union combined_feature_set_type {
|
||||
shader_features_set<shading::features::mesh::flags> mesh;
|
||||
shader_features_set<shading::features::point_cloud::flags> point_cloud;
|
||||
};
|
||||
|
||||
using generic_feature_set_type = shader_features_set<shading::features::generic::type>;
|
||||
|
||||
shading::model_geometry::types geometry;
|
||||
combined_feature_set_type feature_set;
|
||||
shading::stage::types stage;
|
||||
|
||||
[[nodiscard]] generic_feature_set_type generic_feature_set() const noexcept
|
||||
{
|
||||
switch (geometry)
|
||||
{
|
||||
case shading::model_geometry::types::mesh:
|
||||
return feature_set.mesh.cast<shading::features::generic::type>();
|
||||
case shading::model_geometry::types::point_cloud:
|
||||
return feature_set.point_cloud.cast<shading::features::generic::type>();
|
||||
default:
|
||||
std::unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
void from_generic_feature_set(const generic_feature_set_type& generic_feature_set) noexcept
|
||||
{
|
||||
switch (geometry)
|
||||
{
|
||||
case shading::model_geometry::types::mesh:
|
||||
feature_set.mesh = generic_feature_set.cast<shading::features::mesh::flags>();
|
||||
case shading::model_geometry::types::point_cloud:
|
||||
feature_set.point_cloud = generic_feature_set.cast<shading::features::point_cloud::flags>();
|
||||
}
|
||||
std::unreachable();
|
||||
}
|
||||
|
||||
bool operator==(const shader_source_metadata& other) const noexcept
|
||||
{
|
||||
if (this->stage != other.stage)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->geometry != other.geometry)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return this->generic_feature_set() == other.generic_feature_set();
|
||||
}
|
||||
};
|
||||
using shader_source_metadata = assets::shader_source_data::metadata;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <cinttypes>
|
||||
#include <array>
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
|
||||
template<std::size_t Count>
|
||||
struct uniform_buffer_alignment_metadata
|
||||
{
|
||||
std::array<std::size_t, Count> byte_offsets{};
|
||||
std::size_t byte_size{};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
@@ -10,14 +10,14 @@ class shader_program_lookup
|
||||
public:
|
||||
void add(
|
||||
const shader_program_handle& shader_program_handle,
|
||||
std::span<const shader_program_variable> all_attributes,
|
||||
std::span<const shader_program_variable> all_uniforms
|
||||
std::span<const shader_uniform> all_attributes,
|
||||
std::span<const shader_uniform> all_uniforms
|
||||
);
|
||||
|
||||
[[nodiscard]] std::optional<shader_program_handle> find(
|
||||
shader_program_handle::attribute_support_type attributes,
|
||||
shader_program_handle::uniform_support_type uniforms,
|
||||
std::span<const shader_program_variable> all_attributes
|
||||
std::span<const shader_uniform> all_attributes
|
||||
) const;
|
||||
|
||||
void print();
|
||||
@@ -27,7 +27,7 @@ private:
|
||||
|
||||
[[nodiscard]] static attribute_locations_type attribute_location_flags(
|
||||
shader_program_handle::attribute_support_type attributes,
|
||||
std::span<const shader_program_variable> all_attributes
|
||||
std::span<const shader_uniform> all_attributes
|
||||
);
|
||||
|
||||
struct attribute_entry_type
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
struct shader_program_variable
|
||||
{
|
||||
struct info_type
|
||||
{
|
||||
GLenum type;
|
||||
GLint location;
|
||||
} info;
|
||||
const char* name;
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user