diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 3caf6acd..00000000 --- a/.clang-format +++ /dev/null @@ -1,163 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -AccessModifierOffset: -4 -AlignAfterOpenBracket: AlwaysBreak -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlines: Left -AlignOperands: true -AlignTrailingComments: false -AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: Never -AllowShortCaseLabelsOnASingleLine: true -AllowShortEnumsOnASingleLine: false -AllowShortFunctionsOnASingleLine: Inline -AllowShortIfStatementsOnASingleLine: true -AllowShortLambdasOnASingleLine: All -AllowShortLoopsOnASingleLine: true -AllowAllArgumentsOnNextLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakAfterReturnType: None -AlwaysBreakTemplateDeclarations: true -## @TODO: when update to clang-format 19, use BreakTemplateDeclarations -#BreakTemplateDeclarations: Yes -BinPackArguments: false -BinPackParameters: false -BraceWrapping: - AfterCaseLabel: true - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - AfterExternBlock: false - BeforeCatch: false - BeforeElse: true - BeforeLambdaBody: true - BeforeWhile: true - IndentBraces: false - SplitEmptyFunction: false - SplitEmptyRecord: false - SplitEmptyNamespace: false -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Custom -BreakBeforeConceptDeclarations: false -BreakBeforeInheritanceComma: false -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: true -BreakConstructorInitializers: BeforeColon -BreakStringLiterals: true -ColumnLimit: 120 -CompactNamespaces: false -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DeriveLineEnding: true -DerivePointerAlignment: false -DisableFormat: false -EmptyLineBeforeAccessModifier: Never -EmptyLineAfterAccessModifier: Never -ExperimentalAutoDetectBinPacking: false -IndentCaseLabels: true -IndentGotoLabels: true -IndentPPDirectives: None -IndentWidth: 4 -IndentWrappedFunctionNames: false -InsertTrailingCommas: None -KeepEmptyLinesAtTheStartOfBlocks: false -LambdaBodyIndentation: Signature -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 2 -NamespaceIndentation: None -ObjCBinPackProtocolList: Auto -ObjCBlockIndentWidth: 4 -ObjCBreakBeforeNestedBlockParam: true -ObjCSpaceAfterProperty: true -ObjCSpaceBeforeProtocolList: true -PenaltyBreakBeforeFirstCallParameter: 19 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyExcessCharacter: 1000000 -PenaltyIndentedWhitespace: 0 -PenaltyReturnTypeOnItsOwnLine: 60 -PointerAlignment: Left -PPIndentWidth: 2 -QualifierAlignment: Leave -ReferenceAlignment: Left -ReflowComments: true -SortUsingDeclarations: true -SpaceAfterCStyleCast: false -SpaceAfterLogicalNot: false -SpaceAfterTemplateKeyword: false -SpaceAroundPointerQualifiers: Default -SpaceBeforeAssignmentOperators: true -SpaceBeforeCaseColon: false -SpaceBeforeCpp11BracedList: false -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeParens: ControlStatements -SpaceBeforeParensOptions: - AfterControlStatements: true - AfterForeachMacros: false - AfterFunctionDefinitionName: false - AfterFunctionDeclarationName: false - AfterIfMacros: false -SpaceBeforeRangeBasedForLoopColon: true -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: false -SpacesInContainerLiterals: false -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -TabWidth: 4 -LineEnding: LF -UseTab: Never -CommentPragmas: "\/*(.*)*\/" -PackConstructorInitializers: CurrentLine -FixNamespaceComments: true -# Include settings -IncludeBlocks: Preserve -IncludeCategories: - # Main Module Header automatically gets a priority of 0 - # Local/Private Headers - - Regex: '^"[^\/"]*"$' - Priority: 200 - # Project/subproject headers - - Regex: '^"[^"]*"$' - Priority: 300 - # standard library headers - - Regex: '^<[^>\.\/]+>$' - Priority: 500 - # standard library headers - experimental - - Regex: '^"(llvm|llvm-c|clang|clang-c)/' - Priority: 550 - - Regex: '^\.]+>$' - Priority: 600 - # third party libraries - - Regex: '^(<|"(gtest|gmock|isl|json)/)' - Priority: 450 - - Regex: '^<[^>]+>$' - Priority: 400 - # Everything that didn't match - - Regex: '.*' - Priority: 1000 -IncludeIsMainRegex: (Test)?$ -SortIncludes: CaseSensitive -# Custom style rules -ForEachMacros: - - foreach - - Q_FOREACH - - BOOST_FOREACH -Standard: c++11 ---- -Language: JavaScript -IndentWidth: 2 -ColumnLimit: 100 \ No newline at end of file diff --git a/.clang-tidy b/.clang-tidy deleted file mode 100644 index 16a9960d..00000000 --- a/.clang-tidy +++ /dev/null @@ -1,94 +0,0 @@ ---- -Checks: "*,-fuchsia-*,-google-*,-zircon-*,-abseil-*,-linuxkernel*,-llvm*,-android-*, - -modernize-use-trailing-return-type, - -readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-readability-else-after-return, - -readability-static-accessed-through-instance, - -readability-avoid-const-params-in-decls, - -cppcoreguidelines-non-private-member-variables-in-classes, - -misc-non-private-member-variables-in-classes, - -altera-struct-pack-align, - -altera-unroll-loops, - -altera-id-dependent-backward-branch, - -readability-identifier-length, - readability-identifier-naming, - llvm-include-order, - -llvm-header-guard, - bugprone-*, - cert-*, - modernize-* - -modernize-use-trailing-return-type, - -readability-else-after-return, - -readability-static-accessed-through-instance, - -readability-avoid-const-params-in-decls, - -readability-uppercase-literal-suffix, - -cppcoreguidelines-non-private-member-variables-in-classes, - -misc-non-private-member-variables-in-classes, - *-uppercase-literal-suffix, -" -WarningsAsErrors: '' -HeaderFilterRegex: '' -FormatStyle: file - -CheckOptions: - - key: readability-identifier-naming.NamespaceCase - value: lower_case - - key: readability-identifier-naming.ClassCase - value: CamelCase - - key: readability-identifier-naming.EnumCase - value: CamelCase - - key: readability-identifier-naming.StructCase - value: CamelCase - - key: readability-identifier-naming.EnumConstantCase - value: CamelCase - - key: readability-identifier-naming.ScopedEnumConstantCase - value: CamelCase - - key: readability-identifier-naming.ClassMemberCase - value: camelBack - - key: readability-identifier-naming.PrivateMemberCase - value: camelBack - - key: readability-identifier-naming.ProtectedMemberCase - value: camelBack - - key: readability-identifier-naming.PublicMemberCase - value: camelBack - - key: readability-identifier-naming.StaticConstantCase - value: CamelCase - - key: readability-identifier-naming.ClassConstantCase - value: CamelCase - - key: readability-identifier-naming.ConstexprMethodCase - value: CamelCase - - key: readability-identifier-naming.ClassMethodCase - value: CamelCase - - key: readability-identifier-naming.PublicMethodCase - value: CamelCase - - key: readability-identifier-naming.PrivateMethodCase - value: CamelCase - - key: readability-identifier-naming.ProtectedMethodCase - value: CamelCase - - key: readability-identifier-naming.ConstexprMethodCase - value: CamelCase - - key: readability-identifier-naming.VariableCase - value: camelBack - - key: readability-identifier-naming.LocalVariableCase - value: camelBack - - key: readability-identifier-naming.ConstantParameterCase - value: camelBack - - key: readability-identifier-naming.ParameterPackCase - value: camelBack - - key: readability-identifier-naming.LocalConstantCase - value: camelBack - - key: readability-identifier-naming.ConstexprVariableCase - value: CamelCase - - key: readability-identifier-naming.TypedefCase - value: CamelCase - - key: readability-identifier-naming.TemplateParameterCase - value: CamelCase - - key: readability-identifier-naming.TemplateTemplateParameterCase - value: CamelCase - - key: readability-identifier-naming.MacroDefinitionCase - value: UPPER_CASE - - key: readability-identifier-naming.PrivateMemberPrefix - value: 'm_' - - key: readability-identifier-length.IgnoredVariableNames - value: 'i|j|k|x|y|z' - - key: readability-identifier-length.IgnoredParameterNames - value: 'i|j|k|x|y|z' \ No newline at end of file diff --git a/.cmake-format.yaml b/.cmake-format.yaml deleted file mode 100644 index f8bf3463..00000000 --- a/.cmake-format.yaml +++ /dev/null @@ -1,219 +0,0 @@ -_help_parse: Options affecting listfile parsing -parse: - _help_additional_commands: - - Specify structure for custom cmake functions - additional_commands: - foo: - flags: - - BAR - - BAZ - kwargs: - HEADERS: '*' - SOURCES: '*' - DEPENDS: '*' - _help_vartags: - - Specify variable tags. - vartags: [] - _help_proptags: - - Specify property tags. - proptags: [] -_help_format: Options affecting formatting. -format: - _help_line_width: - - How wide to allow formatted cmake files - line_width: 140 - _help_tab_size: - - How many spaces to tab for indent - tab_size: 2 - _help_max_subgroups_hwrap: - - If an argument group contains more than this many sub-groups - - (parg or kwarg groups) then force it to a vertical layout. - max_subgroups_hwrap: 2 - _help_max_pargs_hwrap: - - If a positional argument group contains more than this many - - arguments, then force it to a vertical layout. - max_pargs_hwrap: 6 - _help_max_rows_cmdline: - - If a cmdline positional group consumes more than this many - - lines without nesting, then invalidate the layout (and nest) - max_rows_cmdline: 2 - _help_separate_ctrl_name_with_space: - - If true, separate flow control names from their parentheses - - with a space - separate_ctrl_name_with_space: false - _help_separate_fn_name_with_space: - - If true, separate function names from parentheses with a - - space - separate_fn_name_with_space: false - _help_dangle_parens: - - If a statement is wrapped to more than one line, than dangle - - the closing parenthesis on its own line. - dangle_parens: false - _help_dangle_align: - - If the trailing parenthesis must be 'dangled' on its on - - 'line, then align it to this reference: `prefix`: the start' - - 'of the statement, `prefix-indent`: the start of the' - - 'statement, plus one indentation level, `child`: align to' - - the column of the arguments - dangle_align: prefix - _help_min_prefix_chars: - - If the statement spelling length (including space and - - parenthesis) is smaller than this amount, then force reject - - nested layouts. - min_prefix_chars: 4 - _help_max_prefix_chars: - - If the statement spelling length (including space and - - parenthesis) is larger than the tab width by more than this - - amount, then force reject un-nested layouts. - max_prefix_chars: 10 - _help_max_lines_hwrap: - - If a candidate layout is wrapped horizontally but it exceeds - - this many lines, then reject the layout. - max_lines_hwrap: 2 - _help_line_ending: - - What style line endings to use in the output. - line_ending: unix - _help_command_case: - - Format command names consistently as 'lower' or 'upper' case - command_case: canonical - _help_keyword_case: - - Format keywords consistently as 'lower' or 'upper' case - keyword_case: unchanged - _help_always_wrap: - - A list of command names which should always be wrapped - always_wrap: [] - _help_enable_sort: - - If true, the argument lists which are known to be sortable - - will be sorted lexicographicall - enable_sort: true - _help_autosort: - - If true, the parsers may infer whether or not an argument - - list is sortable (without annotation). - autosort: false - _help_require_valid_layout: - - By default, if cmake-format cannot successfully fit - - everything into the desired linewidth it will apply the - - last, most agressive attempt that it made. If this flag is - - True, however, cmake-format will print error, exit with non- - - zero status code, and write-out nothing - require_valid_layout: false - _help_layout_passes: - - A dictionary mapping layout nodes to a list of wrap - - decisions. See the documentation for more information. - layout_passes: {} -_help_markup: Options affecting comment reflow and formatting. -markup: - _help_bullet_char: - - What character to use for bulleted lists - bullet_char: '*' - _help_enum_char: - - What character to use as punctuation after numerals in an - - enumerated list - enum_char: . - _help_first_comment_is_literal: - - If comment markup is enabled, don't reflow the first comment - - block in each listfile. Use this to preserve formatting of - - your copyright/license statements. - first_comment_is_literal: false - _help_literal_comment_pattern: - - If comment markup is enabled, don't reflow any comment block - - which matches this (regex) pattern. Default is `None` - - (disabled). - literal_comment_pattern: null - _help_fence_pattern: - - Regular expression to match preformat fences in comments - - default= ``r'^\s*([`~]{3}[`~]*)(.*)$'`` - fence_pattern: ^\s*([`~]{3}[`~]*)(.*)$ - _help_ruler_pattern: - - Regular expression to match rulers in comments default= - - '``r''^\s*[^\w\s]{3}.*[^\w\s]{3}$''``' - ruler_pattern: ^\s*[^\w\s]{3}.*[^\w\s]{3}$ - _help_explicit_trailing_pattern: - - If a comment line matches starts with this pattern then it - - is explicitly a trailing comment for the preceeding - - argument. Default is '#<' - explicit_trailing_pattern: '#<' - _help_hashruler_min_length: - - If a comment line starts with at least this many consecutive - - hash characters, then don't lstrip() them off. This allows - - for lazy hash rulers where the first hash char is not - - separated by space - hashruler_min_length: 10 - _help_canonicalize_hashrulers: - - If true, then insert a space between the first hash char and - - remaining hash chars in a hash ruler, and normalize its - - length to fill the column - canonicalize_hashrulers: true - _help_enable_markup: - - enable comment markup parsing and reflow - enable_markup: true -_help_lint: Options affecting the linter -lint: - _help_disabled_codes: - - a list of lint codes to disable - disabled_codes: [] - _help_function_pattern: - - regular expression pattern describing valid function names - function_pattern: '[0-9a-z_]+' - _help_macro_pattern: - - regular expression pattern describing valid macro names - macro_pattern: '[0-9A-Z_]+' - _help_global_var_pattern: - - regular expression pattern describing valid names for - - variables with global scope - global_var_pattern: '[0-9A-Z][0-9A-Z_]+' - _help_internal_var_pattern: - - regular expression pattern describing valid names for - - variables with global scope (but internal semantic) - internal_var_pattern: _[0-9A-Z][0-9A-Z_]+ - _help_local_var_pattern: - - regular expression pattern describing valid names for - - variables with local scope - local_var_pattern: '[0-9a-z_]+' - _help_private_var_pattern: - - regular expression pattern describing valid names for - - privatedirectory variables - private_var_pattern: _[0-9a-z_]+ - _help_public_var_pattern: - - regular expression pattern describing valid names for - - publicdirectory variables - public_var_pattern: '[0-9A-Z][0-9A-Z_]+' - _help_keyword_pattern: - - regular expression pattern describing valid names for - - keywords used in functions or macros - keyword_pattern: '[0-9A-Z_]+' - _help_max_conditionals_custom_parser: - - In the heuristic for C0201, how many conditionals to match - - within a loop in before considering the loop a parser. - max_conditionals_custom_parser: 2 - _help_min_statement_spacing: - - Require at least this many newlines between statements - min_statement_spacing: 1 - _help_max_statement_spacing: - - Require no more than this many newlines between statements - max_statement_spacing: 1 - max_returns: 6 - max_branches: 12 - max_arguments: 5 - max_localvars: 15 - max_statements: 50 -_help_encode: Options affecting file encoding -encode: - _help_emit_byteorder_mark: - - If true, emit the unicode byte-order mark (BOM) at the start - - of the file - emit_byteorder_mark: false - _help_input_encoding: - - Specify the encoding of the input file. Defaults to utf-8 - input_encoding: utf-8 - _help_output_encoding: - - Specify the encoding of the output file. Defaults to utf-8. - - Note that cmake only claims to support utf-8 so be careful - - when using anything else - output_encoding: utf-8 -_help_misc: Miscellaneous configurations options. -misc: - _help_per_command: - - A dictionary containing any per-command configuration - - overrides. Currently only `command_case` is supported. - per_command: {} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 246213d6..00000000 --- a/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*] -indent_style = space -charset = utf-8 -end_of_line = lf -indent_size = 4 -insert_final_newline = true -trim_trailing_whitespace = true - -[Makefile] -indent_style = tab \ No newline at end of file diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml deleted file mode 100644 index dd02215e..00000000 --- a/.github/workflows/Tests.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build and tests - -on: - push: - branches: - - '*' - paths-ignore: - - '**/README.md' - pull_request: - branches: - - '*' - workflow_dispatch: - -jobs: - build: - name: ${{ matrix.platform.os }} ${{ matrix.config.name }} ${{ matrix.type.name }} - runs-on: ${{ matrix.platform.os }} - - strategy: - fail-fast: false - matrix: - platform: - # - { name: Windows VS2019, os: windows-2019 } - # - { name: Windows VS2022, os: windows-2022 } - - { name: Linux GCC, os: ubuntu-22.04, flags: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_STANDARD=17 } - - { name: Linux Clang, os: ubuntu-22.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=17 } - #- { name: Linux GCC, os: ubuntu-18.04, flags: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_STANDARD=14 } - #- { name: Linux Clang, os: ubuntu-18.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=14 } - # - { name: MacOS XCode, os: macos-latest } - config: - - { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE } - - { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE } - type: - - { name: Release, flags: -DCMAKE_BUILD_TYPE=Release } - - { name: Debug, flags: -DCMAKE_BUILD_TYPE=Debug } - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Install Linux Dependencies - if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get install -y libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev - - - name: Configure - run: cmake -B build -S . -DGLFW_BUILD_WAYLAND=OFF -DBUILD_TESTING=ON -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic" ${{ matrix.platform.flags }} ${{ matrix.type.flags }} ${{ matrix.config.flags }} - - - name: Build - run: cmake --build build - - - name: Test - run: ctest --verbose --test-dir build diff --git a/.gitignore b/.gitignore deleted file mode 100644 index dfcbe19a..00000000 --- a/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -build -/.vscode -package-lock.json -node_modules -cmake-build-debug -.idea -docs diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index aa4c25b0..00000000 --- a/.gitmodules +++ /dev/null @@ -1,5 +0,0 @@ -[submodule "projects/Doxygen/doxygen-awesome-css"] - path = projects/Doxygen/doxygen-awesome-css - url = https://github.com/jothepro/doxygen-awesome-css.git - branch = main - ignore = dirty diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 8dfa16bd..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -cmake_minimum_required(VERSION 3.11) -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -project (raylib_cpp - VERSION 5.5.0 - DESCRIPTION "raylib-cpp C++ Object Oriented Wrapper for raylib" - HOMEPAGE_URL "https://github.com/robloach/raylib-cpp" - LANGUAGES C CXX -) - -# Options -if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - set(RAYLIB_CPP_IS_MAIN TRUE) -else() - set(RAYLIB_CPP_IS_MAIN FALSE) -endif() -option(BUILD_RAYLIB_CPP_EXAMPLES "Examples" ${RAYLIB_CPP_IS_MAIN}) - -# Include Directory -add_subdirectory(include) - -# Modules -option(BUILD_RAYLIB_CPP_MODULES "Build C++ modules support" OFF) - -if(BUILD_RAYLIB_CPP_MODULES) - if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.28) - message(STATUS "Building raylib-cpp C++ modules (CMake ${CMAKE_VERSION} supports modules)") - add_subdirectory(modules) - else() - message(WARNING "Skipping raylib-cpp C++ modules (requires CMake 3.28+, found ${CMAKE_VERSION})") - endif() -else() - message(STATUS "raylib-cpp C++ modules support is disabled. Enable with -BUILD_RAYLIB_CPP_MODULES=ON") -endif() - -# Examples -if(BUILD_RAYLIB_CPP_EXAMPLES) - add_subdirectory(examples) - set(BUILD_RAYLIB_CPP_STATIC ON) - - # Testing - include(CTest) - enable_testing() - if(BUILD_TESTING) - set(CTEST_CUSTOM_TESTS_IGNORE - pkg-config--static - ) - add_subdirectory(tests) - endif() - - if (RAYLIB_CPP_IS_MAIN) - # @TODO: add examples files - add_custom_target(format-tests - COMMAND clang-format - -i - ${CMAKE_CURRENT_SOURCE_DIR}/tests/raylib_cpp_test.cpp - ) - endif() -endif() diff --git a/CPPLINT.cfg b/CPPLINT.cfg deleted file mode 100644 index b95edeec..00000000 --- a/CPPLINT.cfg +++ /dev/null @@ -1,7 +0,0 @@ -set noparent -root=.. -linelength=120 -exclude_files=vendor -exclude_files=docs -filter=-runtime/explicit -filter=-legal/copyright diff --git a/LICENSE b/LICENSE deleted file mode 100644 index a663e982..00000000 --- a/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -Copyright (c) 2019-2021 Rob Loach (@RobLoach) - -This software is provided "as-is", without any express or implied warranty. In no event -will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial -applications, and to alter it and redistribute it freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not claim that you - wrote the original software. If you use this software in a product, an acknowledgment - in the product documentation would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be misrepresented - as being the original software. - - 3. This notice may not be removed or altered from any source distribution. diff --git a/README.md b/README.md deleted file mode 100644 index dd5b59f3..00000000 --- a/README.md +++ /dev/null @@ -1,368 +0,0 @@ -![raylib-cpp Logo](projects/Doxygen/raylib-cpp_256x256.png) - -# raylib-cpp ![Targeting raylib 5.0](https://img.shields.io/badge/for_raylib-5.0-blue) [![Tests](https://github.com/RobLoach/raylib-cpp/workflows/Tests/badge.svg)](https://github.com/RobLoach/raylib-cpp/actions?query=workflow%3ATests+branch%3Amaster) [![License](https://img.shields.io/badge/license-zlib%2Flibpng-blue.svg)](LICENSE) - -[raylib-cpp](https://github.com/robloach/raylib-cpp) is a C++ wrapper library for [raylib](https://www.raylib.com), a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around *raylib*'s struct interfaces. *raylib-cpp* is not required to use *raylib* in C++, but the classes do bring using the raylib API more inline with C++'s language paradigm. - -## Example - -``` cpp -#include "raylib-cpp.hpp" - -int main() { - int screenWidth = 800; - int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib-cpp - basic window"); - raylib::Texture logo("raylib_logo.png"); - - SetTargetFPS(60); - - while (!window.ShouldClose()) - { - BeginDrawing(); - - window.ClearBackground(RAYWHITE); - - DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); - - // Object methods. - logo.Draw( - screenWidth / 2 - logo.GetWidth() / 2, - screenHeight / 2 - logo.GetHeight() / 2); - - EndDrawing(); - } - - // UnloadTexture() and CloseWindow() are called automatically. - - return 0; -} -``` - -See the [examples folder](examples) for more of the raylib examples that have been ported over to *raylib-cpp*. - -## Features - -There are a few conventions that raylib-cpp takes on when adopting raylib. See the [raylib-cpp documentation](https://robloach.github.io/raylib-cpp/index.html) for details on the entire API. - -### Constructors - -Object constructors load raylib objects. - -``` cpp -// raylib -Texture2D texture = LoadTexture("texture.png"); - -// raylib-cpp -raylib::Texture2D texture("texture.png"); -``` - -### Object Methods - -When a raylib method has an object as one of its arguments, you can call the method on the object itself. - -``` cpp -// raylib -Vector2 position(50, 50); -DrawPixelV(position, PURPLE); - -// raylib-cpp -raylib::Vector2 position(50, 50); -position.DrawPixel(PURPLE); -``` - -### Method Names - -If a method's name contains an object's name, it is removed from its name to shorten the method name. - -``` cpp -// raylib -DrawTexture(texture, 50, 50, WHITE); - -// raylib-cpp -texture.Draw(50, 50, WHITE); -``` - -### Optional Parameters - -Many methods have optional parameters with sane defaults. - -``` cpp -// raylib -DrawTexture(texture, 50, 50, WHITE); - -// raylib-cpp -texture.Draw(50, 50); // WHITE is provided as the default tint. -``` - -### Object Destructors - -Objects will attempt to unload their respective raylib resources on destruction. This means that there is no need to call Unload or Close methods. This applies to the window, textures, images, sounds, etc. - -``` cpp -// raylib -InitWindow(640, 480, "Hello World"); -CloseWindow(); - -// raylib-cpp -raylib::Window window(640, 480, "Hello World"); -// window.Close() will be called automatically when the object is destructed. -``` - -### Property Get/Set - -Properties can be assigned through getter and setter methods. However, you still have access to the internal properties. - -``` cpp -// raylib -Vector2 position; -position.x = 50; -position.y = 100; - -// raylib-cpp -raylib::Vector2 position; -position.SetX(50); -position.SetY(100); - -// ... or -position.x = 50; -position.y = 100; -``` - -### Function Overloading - -Many similar raylib method names have different name suffixes based on what arguments they take. With raylib-cpp, these cases use [function overloading](https://en.wikipedia.org/wiki/Function_overloading) to allow using the same method names. - -``` cpp -// raylib -Color color = GRAY; -DrawPixel(50, 50, color); -Vector2 position = {50.0f, 50.0f}; -DrawPixelV(position, color); // Extra V in method name. - -// raylib-cpp -raylib::Color color = raylib::Color::Gray(); -color.DrawPixel(50, 50); -Vector2 position(50.0f, 50.0f); -color.DrawPixel(position); // No V in method name. -position.DrawPixel(color); // Alternatively -``` - -### Method Chaining - -When there's a method that doesn't return anything, in most cases it'll return the object itself, allowing [method chaining](https://en.wikipedia.org/wiki/Method_chaining). - -``` cpp -// raylib -Image cat = ImageLoad("cat.png"); -ImageCrop(&cat, (Rectangle){ 100, 10, 280, 380 }); -ImageFlipHorizontal(&cat); -ImageResize(&cat, 150, 200); - -// raylib-cpp -raylib::Image cat("cat.png"); -cat.Crop(100, 10, 280, 380) - .FlipHorizontal() - .Resize(150, 200); -``` - -### Operators - -There are [operator overloads](https://en.wikipedia.org/wiki/Operator_overloading) implemented for objects. - -``` cpp -// raylib -Vector2 position = {50, 50}; -Vector2 speed = {10, 10}; -position.x += speed.x; -position.y += speed.y; - -// raylib-cpp -raylib::Vector2 position(50, 50); -raylib::Vector2 speed(10, 10); -position += speed; // Addition assignment operator override. -``` - -### Vector-Based Returns - -When there is a function that would return a pointer-array, there is a wrapper that allows returning a [vector](https://www.cplusplus.com/reference/vector/vector/) of objects instead. - -``` cpp -// raylib -FilePathList files = LoadDirectoryFiles("."); -TraceLog(LOG_INFO, "Count: %i", files.count); -for (int i = 0; i < files.count; i++) { - TraceLog(LOG_INFO, "File: %s", files.paths[i]); -} -UnloadDirectoryFiles(files); - -// raylib-cpp -std::vector files = raylib::GetDirectoryFiles("."); -TraceLog(LOG_INFO, "Count: %i", files.size()); -for (auto& file : files) { - TraceLog(LOG_INFO, "File: %s", file.c_str()); -} -``` - -### String Functions - -Many of the raylib functions have `std::string`-related overrides to allow calling them directly with `std::string`s and avoid having to use the `.c_str()` method. - -``` cpp -// raylib -const char* url = "https://raylib.com"; -OpenURL(url); - -// raylib-cpp -std::string url = "https://raylib.com"; -raylib::OpenURL(url); -``` - -### Exceptions - -When loading an asset fails, raylib will log a warning, but provide no other feedback for you to act upon. raylib-cpp will throw a [`RaylibException`](include/RaylibException.hpp) [runtime exception](https://en.cppreference.com/w/cpp/error/runtime_error), allowing to provide a safe method for catching failed loads. - -``` cpp -// raylib -Texture texture = LoadTexture("FileNotFound.png"); -if (texture.width == 0) { - TraceLog(LOG_ERROR, "Texture failed to load!"); -} - -// raylib-cpp -try { - raylib::Texture texture("FileNotFound.png"); -} -catch (raylib::RaylibException& error) { - TraceLog(LOG_ERROR, "Texture failed to load!"); -} -``` - -### RayMath - -The [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) methods are included. - -``` cpp -// raylib -Vector2 direction = {50, 50}; -Vector2 newDirection = Vector2Rotate(direction, 30); - -// raylib-cpp -raylib::Vector2 direction(50, 50); -raylib::Vector2 newDirection = direction.Rotate(30); -``` - -### Modules - -If using C++20 or later, by passing `BUILD_RAYLIB_CPP_MODULES` to the build system the library may be imported as a module by using `import raylib;`. - -```cpp -import raylib; - -using raylib::Texture; -using raylib::Window; - -int main() { - int screenWidth = 800; - int screenHeight = 450; - - Window window(screenWidth, screenHeight, "raylib-cpp - basic window"); - Texture logo("raylib_logo.png"); - - // ... -} -``` - -## Getting Started - -*raylib-cpp* is a header-only library. This means in order to use it, you must link your project to [raylib](https://www.raylib.com/), and then include [`raylib-cpp.hpp`](raylib-cpp/include/raylib-cpp.hpp). - -1. Set up a *raylib* project using the [build and install instructions](https://github.com/raysan5/raylib#build-and-installation) -2. Ensure `.cpp` files are compiled with C++ -3. Download *raylib-cpp* -4. Include [`include/raylib-cpp.hpp`](include/raylib-cpp.hpp) - ``` cpp - #include "path/to/raylib-cpp.hpp" - ``` - -### Starter Projects - -The [projects directory](projects) includes some starter templates... - -- [CMake template](projects/CMake) -- [Make template](projects/Make) -- [VSCode template](projects/VSCode) - -If there's a project template you would like to see added, feel free to [make an issue](https://github.com/RobLoach/raylib-cpp/issues) and we can add it in. - -### Applications - -- [Ian Pan's Raylib Games](https://github.com/ianpan870102/raylib-practices) - -## Development - -The following are some tools in order to build and contribute to *raylib-cpp*... - -### Compiling - -Since *raylib-cpp* is a header only library, the build process is the same as raylib's, except you will use C++ to compile instead of C. The following are some specific instructions on local development. - -#### Desktop - -*raylib-cpp* uses [CMake](https://cmake.org) as a primary target for development. To build it, and run the tests or examples, use... - -``` bash -git clone https://github.com/RobLoach/raylib-cpp.git -cd raylib-cpp -mkdir build -cd build -cmake .. -make -make test -./examples/core_basic_window -``` - -#### Web - -Use [emscripten](https://emscripten.org/) to build and test [core_basic_window_web.cpp](examples/core/core_basic_window_web.cpp). - -``` -mkdir build -cd build -emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-s USE_GLFW=3" -emmake make -``` - -See [`core_basic_window_web.html`](examples/core/resources/core_basic_window_web.html) for an example HTML canvas you can you. - -### Documentation - -To build the document with [Doxygen](http://www.doxygen.nl/), use... - -``` -git submodule update --init -doxygen projects/Doxygen/Doxyfile -``` - -To publish the documentation to GitHub Pages, use... - -``` -npm run deploy -``` - -### Coding Standards - -This uses cpplint to adopt coding standards. - -``` -cpplint --recursive include -``` - -### Defines - -- `RAYLIB_CPP_NO_MATH` - When set, will skip adding the `raymath.h` integrations - -## License - -*raylib-cpp* is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details. diff --git a/_audio_device_8hpp_source.html b/_audio_device_8hpp_source.html new file mode 100644 index 00000000..ed50949b --- /dev/null +++ b/_audio_device_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + + +raylib-cpp: AudioDevice.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
AudioDevice.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
+
3 
+
4 #include "./RaylibException.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./raylib.hpp"
+
7 
+
8 namespace raylib {
+
12 class AudioDevice {
+
13 public:
+
21  AudioDevice(bool lateInit = false) {
+
22  if (!lateInit) {
+
23  Init();
+
24  }
+
25  }
+
26 
+ +
31 
+
37  void Init() {
+
38  ::InitAudioDevice();
+
39  if (!IsReady()) {
+
40  throw RaylibException("Failed to initialize AudioDevice");
+
41  }
+
42  }
+
43 
+
47  void Close() { ::CloseAudioDevice(); }
+
48 
+
52  bool IsReady() const { return ::IsAudioDeviceReady(); }
+
53 
+
59  AudioDevice& SetVolume(float volume) {
+
60  ::SetMasterVolume(volume);
+
61  return *this;
+
62  }
+
63 };
+
64 } // namespace raylib
+
65 
+ +
67 
+
68 #endif // RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
+
Audio device management functions.
Definition: AudioDevice.hpp:12
+
void Close()
Close the audio device and context.
Definition: AudioDevice.hpp:47
+
bool IsReady() const
Check if audio device has been initialized successfully.
Definition: AudioDevice.hpp:52
+
void Init()
Initialize audio device and context.
Definition: AudioDevice.hpp:37
+
~AudioDevice()
Close the audio device and context.
Definition: AudioDevice.hpp:30
+
AudioDevice(bool lateInit=false)
Initialize audio device and context.
Definition: AudioDevice.hpp:21
+
AudioDevice & SetVolume(float volume)
Set master volume (listener).
Definition: AudioDevice.hpp:59
+
Exception used for most raylib-related exceptions.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_audio_stream_8hpp_source.html b/_audio_stream_8hpp_source.html new file mode 100644 index 00000000..7b6fb6c4 --- /dev/null +++ b/_audio_stream_8hpp_source.html @@ -0,0 +1,253 @@ + + + + + + + +raylib-cpp: AudioStream.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
AudioStream.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
+
3 
+
4 #include "./RaylibException.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./raylib.hpp"
+
7 
+
8 namespace raylib {
+
12 class AudioStream : public ::AudioStream {
+
13 public:
+
14  AudioStream(const ::AudioStream& music) { set(music); }
+
15 
+ +
17  rAudioBuffer* buffer = nullptr,
+
18  rAudioProcessor* processor = nullptr,
+
19  unsigned int sampleRate = 0,
+
20  unsigned int sampleSize = 0,
+
21  unsigned int channels = 0)
+
22  : ::AudioStream{buffer, processor, sampleRate, sampleSize, channels} {
+
23  // Nothing.
+
24  }
+
25 
+
31  AudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels = 2) {
+
32  Load(sampleRate, sampleSize, channels);
+
33  }
+
34 
+
35  AudioStream(const AudioStream&) = delete;
+
36 
+
37  AudioStream(AudioStream&& other) {
+
38  set(other);
+
39 
+
40  other.buffer = nullptr;
+
41  other.processor = nullptr;
+
42  other.sampleRate = 0;
+
43  other.sampleSize = 0;
+
44  other.channels = 0;
+
45  }
+
46 
+
47  ~AudioStream() { Unload(); }
+
48 
+
49  GETTER(rAudioBuffer*, Buffer, buffer)
+
50  GETTER(rAudioProcessor*, Processor, processor)
+
51  GETTER(unsigned int, SampleRate, sampleRate)
+
52  GETTER(unsigned int, SampleSize, sampleSize)
+
53  GETTER(unsigned int, Channels, channels)
+
54 
+
55  AudioStream& operator=(const ::AudioStream& stream) {
+
56  set(stream);
+
57  return *this;
+
58  }
+
59 
+
60  AudioStream& operator=(const AudioStream&) = delete;
+
61 
+
62  AudioStream& operator=(AudioStream&& other) noexcept {
+
63  if (this == &other) {
+
64  return *this;
+
65  }
+
66 
+
67  Unload();
+
68  set(other);
+
69 
+
70  other.buffer = nullptr;
+
71  other.processor = nullptr;
+
72  other.sampleRate = 0;
+
73  other.sampleSize = 0;
+
74  other.channels = 0;
+
75 
+
76  return *this;
+
77  }
+
78 
+
82  AudioStream& Update(const void* data, int samplesCount) {
+
83  ::UpdateAudioStream(*this, data, samplesCount);
+
84  return *this;
+
85  }
+
86 
+
90  void Unload() {
+
91  if (IsValid()) {
+
92  ::UnloadAudioStream(*this);
+
93  }
+
94  }
+
95 
+
99  bool IsProcessed() const { return ::IsAudioStreamProcessed(*this); }
+
100 
+ +
105  ::PlayAudioStream(*this);
+
106  return *this;
+
107  }
+
108 
+ +
113  ::PauseAudioStream(*this);
+
114  return *this;
+
115  }
+
116 
+ +
121  ::ResumeAudioStream(*this);
+
122  return *this;
+
123  }
+
124 
+
128  bool IsPlaying() const { return ::IsAudioStreamPlaying(*this); }
+
129 
+ +
134  ::StopAudioStream(*this);
+
135  return *this;
+
136  }
+
137 
+
141  AudioStream& SetVolume(float volume = 1.0f) {
+
142  ::SetAudioStreamVolume(*this, volume);
+
143  return *this;
+
144  }
+
145 
+
149  AudioStream& SetPitch(float pitch) {
+
150  ::SetAudioStreamPitch(*this, pitch);
+
151  return *this;
+
152  }
+
153 
+
157  AudioStream& SetPan(float pan = 0.5f) {
+
158  ::SetAudioStreamPan(*this, pan);
+
159  return *this;
+
160  }
+
161 
+
165  static void SetBufferSizeDefault(int size) { ::SetAudioStreamBufferSizeDefault(size); }
+
166 
+
170  void SetCallback(::AudioCallback callback) { ::SetAudioStreamCallback(*this, callback); }
+
171 
+
175  void AttachProcessor(::AudioCallback processor) { ::AttachAudioStreamProcessor(*this, processor); }
+
176 
+
180  void DetachProcessor(::AudioCallback processor) { ::DetachAudioStreamProcessor(*this, processor); }
+
181 
+
185  bool IsValid() const { return ::IsAudioStreamValid(*this); }
+
186 
+
192  void Load(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels = 2) {
+
193  Unload();
+
194  set(::LoadAudioStream(SampleRate, SampleSize, Channels));
+
195  if (!IsValid()) {
+
196  throw RaylibException("Failed to load audio stream");
+
197  }
+
198  }
+
199 protected:
+
200  void set(const ::AudioStream& stream) {
+
201  buffer = stream.buffer;
+
202  processor = stream.processor;
+
203  sampleRate = stream.sampleRate;
+
204  sampleSize = stream.sampleSize;
+
205  channels = stream.channels;
+
206  }
+
207 };
+
208 } // namespace raylib
+
209 
+ +
211 
+
212 #endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
+
AudioStream management functions.
Definition: AudioStream.hpp:12
+
void SetCallback(::AudioCallback callback)
Audio thread callback to request new data.
+
bool IsValid() const
Retrieve whether or not the audio stream is ready.
+
bool IsProcessed() const
Check if any audio stream buffers requires refill.
Definition: AudioStream.hpp:99
+
AudioStream & Stop()
Stop audio stream.
+
AudioStream & SetPitch(float pitch)
Set pitch for audio stream (1.0 is base level)
+
bool IsPlaying() const
Check if audio stream is playing.
+
void AttachProcessor(::AudioCallback processor)
Attach audio stream processor to stream.
+
AudioStream & SetVolume(float volume=1.0f)
Set volume for audio stream (1.0 is max level)
+
AudioStream & Play()
Play audio stream.
+
void Load(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels=2)
Load audio stream (to stream raw audio pcm data)
+
void Unload()
Unload audio stream and free memory.
Definition: AudioStream.hpp:90
+
static void SetBufferSizeDefault(int size)
Default size for new audio streams.
+
AudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels=2)
Init audio stream (to stream raw audio pcm data)
Definition: AudioStream.hpp:31
+
AudioStream & Pause()
Pause audio stream.
+
AudioStream & Resume()
Resume audio stream.
+
AudioStream & SetPan(float pan=0.5f)
Set pan for audio stream (0.5 is centered)
+
AudioStream & Update(const void *data, int samplesCount)
Update audio stream buffers with data.
Definition: AudioStream.hpp:82
+
void DetachProcessor(::AudioCallback processor)
Detach audio stream processor from stream.
+
Exception used for most raylib-related exceptions.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_automation_event_list_8hpp_source.html b/_automation_event_list_8hpp_source.html new file mode 100644 index 00000000..82c423c4 --- /dev/null +++ b/_automation_event_list_8hpp_source.html @@ -0,0 +1,208 @@ + + + + + + + +raylib-cpp: AutomationEventList.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
AutomationEventList.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_AUTOMATIONEVENTLIST_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_AUTOMATIONEVENTLIST_HPP_
+
3 
+
4 #include "./RaylibException.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./raylib.hpp"
+
7 
+
8 namespace raylib {
+ +
13 public:
+
14  AutomationEventList(const ::AutomationEventList& automationEventList) { set(automationEventList); }
+
15 
+
19  AutomationEventList() { set(::LoadAutomationEventList(0)); }
+
20 
+
26  AutomationEventList(const char* fileName) { Load(fileName); }
+
27 
+ +
29 
+ +
31  set(other);
+
32 
+
33  other.capacity = 0;
+
34  other.count = 0;
+
35  other.events = nullptr;
+
36  }
+
37 
+
38  ~AutomationEventList() { Unload(); }
+
39 
+
40  GETTER(unsigned int, Capacity, capacity)
+
41  GETTER(unsigned int, Count, count)
+
42  GETTER(AutomationEvent*, Events, events)
+
43 
+
44  AutomationEventList& operator=(const ::AutomationEventList& other) {
+
45  set(other);
+
46  return *this;
+
47  }
+
48 
+
49  AutomationEventList& operator=(const AutomationEventList&) = delete;
+
50 
+
51  AutomationEventList& operator=(AutomationEventList&& other) noexcept {
+
52  if (this == &other) {
+
53  return *this;
+
54  }
+
55 
+
56  Unload();
+
57  set(other);
+
58 
+
59  other.capacity = 0;
+
60  other.count = 0;
+
61  other.events = nullptr;
+
62 
+
63  return *this;
+
64  }
+
65 
+
71  void Load(const char* fileName) {
+
72  Unload();
+
73  set(::LoadAutomationEventList(fileName));
+
74  if (!IsValid()) {
+
75  throw RaylibException("Failed to load automation event list");
+
76  }
+
77  }
+
78 
+
82  void Unload() {
+
83  if (!IsValid()) {
+
84  return;
+
85  }
+
86 
+
87 // The function signature of UnloadAutomationEventList() changes from raylib 5.0.
+
88 #if RAYLIB_VERSION_MAJOR == 5
+
89 #if RAYLIB_VERSION_MINOR == 0
+
90  ::UnloadAutomationEventList(this);
+
91 #elif RAYLIB_VERSION_MINOR >= 1
+
92  ::UnloadAutomationEventList(*this);
+
93 #endif
+
94 #else
+
95  ::UnloadAutomationEventList(*this);
+
96 #endif
+
97  }
+
98 
+
99  bool IsValid() { return events != nullptr; }
+
100 
+
101  bool Export(const char* fileName) { return ::ExportAutomationEventList(*this, fileName); }
+
102 
+
103  void Set() { ::SetAutomationEventList(this); }
+
104 
+
105  void SetBaseFrame(int frame) {
+
106  Set();
+
107  ::SetAutomationEventBaseFrame(frame);
+
108  }
+
109 
+
110  void StartRecording() {
+
111  Set();
+
112  ::StartAutomationEventRecording();
+
113  }
+
114 
+
115  void StopRecording() {
+
116  Set();
+
117  ::StopAutomationEventRecording();
+
118  }
+
119 
+
120  void Play(int index) {
+
121  if (index < 0 || static_cast<unsigned int>(index) >= this->count) {
+
122  return;
+
123  }
+
124 
+
125  Set();
+
126  ::PlayAutomationEvent(this->events[index]);
+
127  }
+
128 protected:
+
129  void set(const ::AutomationEventList& other) {
+
130  capacity = other.capacity;
+
131  count = other.count;
+
132  events = other.events;
+
133  }
+
134 };
+
135 } // namespace raylib
+
136 
+ +
138 
+
139 #endif // RAYLIB_CPP_INCLUDE_AUTOMATIONEVENTLIST_HPP_
+
AutomationEventList management functions.
+
void Load(const char *fileName)
Load audio stream (to stream raw audio pcm data)
+
AutomationEventList(const char *fileName)
Load automation events list from file.
+
AutomationEventList()
Load an empty automation events list.
+
void Unload()
Update audio stream buffers with data.
+
Exception used for most raylib-related exceptions.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_bounding_box_8hpp_source.html b/_bounding_box_8hpp_source.html new file mode 100644 index 00000000..36291c18 --- /dev/null +++ b/_bounding_box_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + + +raylib-cpp: BoundingBox.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
BoundingBox.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
+
3 
+
4 #include "./raylib-cpp-utils.hpp"
+
5 #include "./raylib.hpp"
+
6 
+
7 namespace raylib {
+
11 class BoundingBox : public ::BoundingBox {
+
12 public:
+
13  /*
+
14  * Copy a bounding box from another bounding box.
+
15  */
+
16  BoundingBox(const ::BoundingBox& box) : ::BoundingBox{box.min, box.max} {
+
17  // Nothing.
+
18  }
+
19 
+
23  BoundingBox(const ::Mesh& mesh) { set(::GetMeshBoundingBox(mesh)); }
+
24 
+
25  BoundingBox(::Vector3 minMax = ::Vector3{0.0f, 0.0f, 0.0f}) : ::BoundingBox{minMax, minMax} {}
+
26  BoundingBox(::Vector3 min, ::Vector3 max) : ::BoundingBox{min, max} {}
+
27 
+
28  GETTERSETTER(::Vector3, Min, min)
+
29  GETTERSETTER(::Vector3, Max, max)
+
30 
+
31  BoundingBox& operator=(const ::BoundingBox& box) {
+
32  set(box);
+
33  return *this;
+
34  }
+
35 
+
39  void Draw(::Color color = {255, 255, 255, 255}) const { ::DrawBoundingBox(*this, color); }
+
40 
+
44  bool CheckCollision(const ::BoundingBox& box2) const { return CheckCollisionBoxes(*this, box2); }
+
45 
+
49  bool CheckCollision(::Vector3 center, float radius) const { return CheckCollisionBoxSphere(*this, center, radius); }
+
50 
+
54  bool CheckCollision(const ::Ray& ray) const { return GetRayCollisionBox(ray, *this).hit; }
+
55 
+
59  RayCollision GetCollision(const ::Ray& ray) const { return GetRayCollisionBox(ray, *this); }
+
60 protected:
+
61  void set(const ::BoundingBox& box) {
+
62  min = box.min;
+
63  max = box.max;
+
64  }
+
65  void set(const ::Vector3& _min, const ::Vector3& _max) {
+
66  min = _min;
+
67  max = _max;
+
68  }
+
69 };
+
70 } // namespace raylib
+
71 
+ +
73 
+
74 #endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
+
Bounding box type.
Definition: BoundingBox.hpp:11
+
bool CheckCollision(::Vector3 center, float radius) const
Detect collision between box and sphere.
Definition: BoundingBox.hpp:49
+
RayCollision GetCollision(const ::Ray &ray) const
Get collision information between ray and bounding box.
Definition: BoundingBox.hpp:59
+
BoundingBox(const ::Mesh &mesh)
Compute mesh bounding box limits.
Definition: BoundingBox.hpp:23
+
void Draw(::Color color={255, 255, 255, 255}) const
Draw a bounding box with wires.
Definition: BoundingBox.hpp:39
+
bool CheckCollision(const ::BoundingBox &box2) const
Detect collision between two boxes.
Definition: BoundingBox.hpp:44
+
bool CheckCollision(const ::Ray &ray) const
Detect collision between ray and bounding box.
Definition: BoundingBox.hpp:54
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Raycast hit information.
+
Vector3 type.
Definition: Vector3.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_camera2_d_8hpp_source.html b/_camera2_d_8hpp_source.html new file mode 100644 index 00000000..16943d72 --- /dev/null +++ b/_camera2_d_8hpp_source.html @@ -0,0 +1,142 @@ + + + + + + + +raylib-cpp: Camera2D.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Camera2D.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
+
3 
+
4 #include "./Vector2.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./raylib.hpp"
+
7 
+
8 namespace raylib {
+
12 class Camera2D : public ::Camera2D {
+
13 public:
+
14  Camera2D(const ::Camera2D& camera) { set(camera); }
+
15 
+
16  Camera2D() {}
+
17  Camera2D(::Vector2 offset, ::Vector2 target, float rotation = 0.0f, float zoom = 1.0f)
+
18  : ::Camera2D{offset, target, rotation, zoom} {}
+
19 
+
20  Camera2D& BeginMode() {
+
21  ::BeginMode2D(*this);
+
22  return *this;
+
23  }
+
24 
+
25  Camera2D& EndMode() {
+
26  ::EndMode2D();
+
27  return *this;
+
28  }
+
29 
+
30  GETTERSETTER(::Vector2, Offset, offset)
+
31  GETTERSETTER(::Vector2, Target, target)
+
32  GETTERSETTER(float, Rotation, rotation)
+
33  GETTERSETTER(float, Zoom, zoom)
+
34 
+
35  Camera2D& operator=(const ::Camera2D& camera) {
+
36  set(camera);
+
37  return *this;
+
38  }
+
39 
+
43  Matrix GetMatrix() const { return ::GetCameraMatrix2D(*this); }
+
44 
+
48  Vector2 GetScreenToWorld(::Vector2 position) const { return ::GetScreenToWorld2D(position, *this); }
+
49 
+
53  Vector2 GetWorldToScreen(::Vector2 position) const { return ::GetWorldToScreen2D(position, *this); }
+
54 protected:
+
55  void set(const ::Camera2D& camera) {
+
56  offset = camera.offset;
+
57  target = camera.target;
+
58  rotation = camera.rotation;
+
59  zoom = camera.zoom;
+
60  }
+
61 };
+
62 } // namespace raylib
+
63 
+ +
65 
+
66 #endif // RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
+
Camera2D type, defines a 2d camera.
Definition: Camera2D.hpp:12
+
Vector2 GetScreenToWorld(::Vector2 position) const
Returns the world space position for a 2d camera screen space position.
Definition: Camera2D.hpp:48
+
Matrix GetMatrix() const
Returns camera 2d transform matrix.
Definition: Camera2D.hpp:43
+
Vector2 GetWorldToScreen(::Vector2 position) const
Returns the screen space position for a 2d world space position.
Definition: Camera2D.hpp:53
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Vector2 type.
Definition: Vector2.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_camera3_d_8hpp_source.html b/_camera3_d_8hpp_source.html new file mode 100644 index 00000000..f3528cdf --- /dev/null +++ b/_camera3_d_8hpp_source.html @@ -0,0 +1,194 @@ + + + + + + + +raylib-cpp: Camera3D.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Camera3D.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
+
3 
+
4 #include "./Vector3.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./raylib.hpp"
+
7 
+
8 namespace raylib {
+
12 class Camera3D : public ::Camera3D {
+
13 public:
+
14  Camera3D(const ::Camera3D& camera) { set(camera); }
+
15 
+ +
27  ::Vector3 position,
+
28  ::Vector3 target = ::Vector3{0.0f, 0.0f, 0.0f},
+
29  ::Vector3 up = ::Vector3{0.0f, 1.0f, 0.0f},
+
30  float fovy = 0,
+
31  int projection = CAMERA_PERSPECTIVE)
+
32  : ::Camera3D{position, target, up, fovy, projection} {}
+
33 
+
34  Camera3D() {}
+
35 
+
36  GETTERSETTER(::Vector3, Position, position)
+
37  GETTERSETTER(::Vector3, Target, target)
+
38  GETTERSETTER(::Vector3, Up, up)
+
39  GETTERSETTER(float, Fovy, fovy)
+
40  GETTERSETTER(int, Projection, projection)
+
41 
+
42  Camera3D& operator=(const ::Camera3D& camera) {
+
43  set(camera);
+
44  return *this;
+
45  }
+
46 
+ +
51  ::BeginMode3D(*this);
+
52  return *this;
+
53  }
+
54 
+ +
59  ::EndMode3D();
+
60  return *this;
+
61  }
+
62 
+
66  Matrix GetMatrix() const { return ::GetCameraMatrix(*this); }
+
67 
+
71  Camera3D& Update(int mode) {
+
72  ::UpdateCamera(this, mode);
+
73  return *this;
+
74  }
+
75 
+
79  Camera3D& Update(::Vector3 movement, ::Vector3 rotation, float zoom = 1.0f) {
+
80  ::UpdateCameraPro(this, movement, rotation, zoom);
+
81  return *this;
+
82  }
+
83 
+
87  Ray GetMouseRay(::Vector2 mousePosition) const { return ::GetMouseRay(mousePosition, *this); }
+
88 
+
92  Vector2 GetWorldToScreen(::Vector3 position) const { return ::GetWorldToScreen(position, *this); }
+
93 
+
97  Ray GetScreenToWorldRay(::Vector2 position, int width, int height) {
+
98  return ::GetScreenToWorldRayEx(position, *this, width, height);
+
99  }
+
100 
+
104  void
+
105  DrawBillboard(const ::Texture2D& texture, ::Vector3 center, float size, ::Color tint = {255, 255, 255, 255}) const {
+
106  ::DrawBillboard(*this, texture, center, size, tint);
+
107  }
+
108 
+ +
113  const ::Texture2D& texture,
+
114  ::Rectangle sourceRec,
+
115  ::Vector3 center,
+
116  ::Vector2 size,
+
117  ::Color tint = {255, 255, 255, 255}) const {
+
118  ::DrawBillboardRec(*this, texture, sourceRec, center, size, tint);
+
119  }
+
120 protected:
+
121  void set(const ::Camera3D& camera) {
+
122  position = camera.position;
+
123  target = camera.target;
+
124  up = camera.up;
+
125  fovy = camera.fovy;
+
126  projection = camera.projection;
+
127  }
+
128 };
+
129 
+
130 using Camera = Camera3D;
+
131 
+
132 } // namespace raylib
+
133 
+
134 using RCamera = raylib::Camera;
+ +
136 
+
137 #endif // RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
+
Camera type, defines a camera position/orientation in 3d space.
Definition: Camera3D.hpp:12
+
Camera3D & BeginMode()
Initializes 3D mode with custom camera (3D)
Definition: Camera3D.hpp:50
+
Matrix GetMatrix() const
Get camera transform matrix (view matrix)
Definition: Camera3D.hpp:66
+
Vector2 GetWorldToScreen(::Vector3 position) const
Returns the screen space position for a 3d world space position.
Definition: Camera3D.hpp:92
+
Camera3D & Update(int mode)
Update camera position for selected mode.
Definition: Camera3D.hpp:71
+
Camera3D & EndMode()
Ends 3D mode and returns to default 2D orthographic mode.
Definition: Camera3D.hpp:58
+
void DrawBillboard(const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255}) const
Draw a billboard texture.
Definition: Camera3D.hpp:105
+
Ray GetScreenToWorldRay(::Vector2 position, int width, int height)
Get a ray trace from screen position (i.e mouse) in a viewport.
Definition: Camera3D.hpp:97
+
Camera3D & Update(::Vector3 movement, ::Vector3 rotation, float zoom=1.0f)
Update camera movement/rotation.
Definition: Camera3D.hpp:79
+
Camera3D(::Vector3 position, ::Vector3 target=::Vector3{0.0f, 0.0f, 0.0f}, ::Vector3 up=::Vector3{0.0f, 1.0f, 0.0f}, float fovy=0, int projection=CAMERA_PERSPECTIVE)
Create a new Camera3D.
Definition: Camera3D.hpp:26
+
Ray GetMouseRay(::Vector2 mousePosition) const
Returns a ray trace from mouse position.
Definition: Camera3D.hpp:87
+
void DrawBillboard(const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, ::Vector2 size, ::Color tint={255, 255, 255, 255}) const
Draw a billboard texture defined by source.
Definition: Camera3D.hpp:112
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Ray type (useful for raycast)
Definition: Ray.hpp:12
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:18
+
Vector3 type.
Definition: Vector3.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_color_8hpp_source.html b/_color_8hpp_source.html new file mode 100644 index 00000000..48a90278 --- /dev/null +++ b/_color_8hpp_source.html @@ -0,0 +1,303 @@ + + + + + + + +raylib-cpp: Color.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Color.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_COLOR_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_COLOR_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./Vector4.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
14 class Color : public ::Color {
+
15 public:
+
16  Color(const ::Color& color) : ::Color{color.r, color.g, color.b, color.a} {}
+
17 
+
18  Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = 255)
+
19  : ::Color{red, green, blue, alpha} {};
+
20 
+
24  Color() : ::Color{0, 0, 0, 255} {};
+
25 
+
29  Color(::Vector3 hsv) { set(::ColorFromHSV(hsv.x, hsv.y, hsv.z)); }
+
30 
+
34  static ::Color FromHSV(float hue, float saturation, float value) { return ::ColorFromHSV(hue, saturation, value); }
+
35 
+
39  Color(unsigned int hexValue) { set(::GetColor(hexValue)); }
+
40 
+
41  Color(void* srcPtr, int format) { set(::GetPixelColor(srcPtr, format)); }
+
42 
+
46  int ToInt() const { return ::ColorToInt(*this); }
+
47 
+
51  operator int() const { return ::ColorToInt(*this); }
+
52 
+
53  std::string ToString() const { return TextFormat("Color(%d, %d, %d, %d)", r, g, b, a); }
+
54 
+
55  operator std::string() const { return ToString(); }
+
56 
+
60  Color Fade(float alpha) const { return ::Fade(*this, alpha); }
+
61 
+
65  Vector4 Normalize() const { return ::ColorNormalize(*this); }
+
66 
+
70  Color(::Vector4 normalized) { set(::ColorFromNormalized(normalized)); }
+
71 
+
75  Vector3 ToHSV() const { return ::ColorToHSV(*this); }
+
76 
+
77  GETTERSETTER(unsigned char, R, r)
+
78  GETTERSETTER(unsigned char, G, g)
+
79  GETTERSETTER(unsigned char, B, b)
+
80  GETTERSETTER(unsigned char, A, a)
+
81 
+
82  Color& operator=(const ::Color& color) {
+
83  set(color);
+
84  return *this;
+
85  }
+
86 
+ +
91  ::ClearBackground(*this);
+
92  return *this;
+
93  }
+
94 
+
95  void DrawPixel(int x, int y) const { ::DrawPixel(x, y, *this); }
+
96 
+
100  void DrawPixel(::Vector2 pos) const { ::DrawPixelV(pos, *this); }
+
101 
+
105  void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY) const {
+
106  ::DrawLine(startPosX, startPosY, endPosX, endPosY, *this);
+
107  }
+
108 
+
112  void DrawLine(::Vector2 startPos, ::Vector2 endPos) const { ::DrawLineV(startPos, endPos, *this); }
+
113 
+
117  void DrawLine(::Vector2 startPos, ::Vector2 endPos, float thick) const {
+
118  ::DrawLineEx(startPos, endPos, thick, *this);
+
119  }
+
120 
+
121  void DrawLineBezier(::Vector2 startPos, ::Vector2 endPos, float thick = 1.0f) const {
+
122  ::DrawLineBezier(startPos, endPos, thick, *this);
+
123  }
+
124 
+
125  void DrawLineStrip(::Vector2* points, int numPoints) const { ::DrawLineStrip(points, numPoints, *this); }
+
126 
+
127  void DrawText(const char* text, int posX = 0, int posY = 0, int fontSize = 10.0f) const {
+
128  ::DrawText(text, posX, posY, fontSize, *this);
+
129  }
+
130 
+
131  void DrawText(const std::string& text, int posX = 0, int posY = 0, int fontSize = 10.0f) const {
+
132  ::DrawText(text.c_str(), posX, posY, fontSize, *this);
+
133  }
+
134 
+
135  void DrawText(const ::Font& font, const char* text, ::Vector2 position, float fontSize, float spacing) const {
+
136  ::DrawTextEx(font, text, position, fontSize, spacing, *this);
+
137  }
+
138 
+
139  void
+
140  DrawText(const ::Font& font, const std::string& text, ::Vector2 position, float fontSize, float spacing) const {
+
141  ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, *this);
+
142  }
+
143 
+
144  void DrawText(
+
145  const ::Font& font,
+
146  const char* text,
+
147  ::Vector2 position,
+
148  ::Vector2 origin,
+
149  float rotation,
+
150  float fontSize,
+
151  float spacing) const {
+
152  ::DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, *this);
+
153  }
+
154 
+
155  void DrawText(
+
156  const ::Font& font,
+
157  const std::string& text,
+
158  ::Vector2 position,
+
159  ::Vector2 origin,
+
160  float rotation,
+
161  float fontSize,
+
162  float spacing) const {
+
163  ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, *this);
+
164  }
+
165 
+
166  void DrawRectangle(int posX, int posY, int width, int height) const {
+
167  ::DrawRectangle(posX, posY, width, height, *this);
+
168  }
+
169 
+
170  void DrawRectangle(::Vector2 position, ::Vector2 size) const { ::DrawRectangleV(position, size, *this); }
+
171 
+
172  void DrawRectangle(::Rectangle rec) const { ::DrawRectangleRec(rec, *this); }
+
173 
+
174  void DrawRectangle(::Rectangle rec, ::Vector2 origin, float rotation) const {
+
175  ::DrawRectanglePro(rec, origin, rotation, *this);
+
176  }
+
177 
+
178  void DrawRectangleLines(int posX, int posY, int width, int height) const {
+
179  ::DrawRectangleLines(posX, posY, width, height, *this);
+
180  }
+
181 
+
182  void DrawRectangleLines(::Rectangle rec, float lineThick) const { ::DrawRectangleLinesEx(rec, lineThick, *this); }
+
183 
+
184  bool IsEqual(::Color color) {
+
185  return ::ColorIsEqual(*this, color);
+
186  }
+
187 
+
188  bool operator==(const ::Color& other) const { return ::ColorIsEqual(*this, other); }
+
189  bool operator!=(const ::Color& other) const { return !::ColorIsEqual(*this, other); }
+
190 
+
194  Color Tint(::Color tint) { return ::ColorTint(*this, tint); }
+
195 
+
199  Color Brightness(float factor) { return ::ColorBrightness(*this, factor); }
+
200 
+
204  Color Contrast(float contrast) { return ::ColorContrast(*this, contrast); }
+
205 
+
209  Color Alpha(float alpha) const { return ::ColorAlpha(*this, alpha); }
+
210 
+
211  Color Lerp(::Color color2, float factor) {
+
212  return ::ColorLerp(*this, color2, factor);
+
213  }
+
214 
+
218  Color AlphaBlend(::Color dst, ::Color tint) const { return ::ColorAlphaBlend(dst, *this, tint); }
+
219 
+
220  static Color LightGray() { return LIGHTGRAY; }
+
221  static Color Gray() { return GRAY; }
+
222  static Color DarkGray() { return DARKGRAY; }
+
223  static Color Yellow() { return YELLOW; }
+
224  static Color Gold() { return GOLD; }
+
225  static Color Orange() { return ORANGE; }
+
226  static Color Pink() { return PINK; }
+
227  static Color Red() { return RED; }
+
228  static Color Maroon() { return MAROON; }
+
229  static Color Green() { return GREEN; }
+
230  static Color Lime() { return LIME; }
+
231  static Color DarkGreen() { return DARKGREEN; }
+
232  static Color SkyBlue() { return SKYBLUE; }
+
233  static Color Blue() { return BLUE; }
+
234  static Color DarkBlue() { return DARKBLUE; }
+
235  static Color Purple() { return PURPLE; }
+
236  static Color Violet() { return VIOLET; }
+
237  static Color DarkPurple() { return DARKPURPLE; }
+
238  static Color Beige() { return BEIGE; }
+
239  static Color Brown() { return BROWN; }
+
240  static Color DarkBrown() { return DARKBROWN; }
+
241  static Color White() { return WHITE; }
+
242  static Color Black() { return BLACK; }
+
243  static Color Blank() { return BLANK; }
+
244  static Color Magenta() { return MAGENTA; }
+
245  static Color RayWhite() { return RAYWHITE; }
+
246 protected:
+
247  void set(const ::Color& color) {
+
248  r = color.r;
+
249  g = color.g;
+
250  b = color.b;
+
251  a = color.a;
+
252  }
+
253 };
+
254 
+
255 } // namespace raylib
+
256 
+
257 using RColor = raylib::Color;
+
258 
+
259 #endif // RAYLIB_CPP_INCLUDE_COLOR_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Color AlphaBlend(::Color dst, ::Color tint) const
Returns src alpha-blended into dst color with tint.
Definition: Color.hpp:218
+
Color(::Vector3 hsv)
Returns a Color from HSV values.
Definition: Color.hpp:29
+
Color Contrast(float contrast)
Get color with contrast correction, contrast values between -1.0f and 1.0f.
Definition: Color.hpp:204
+
Color Tint(::Color tint)
Get color multiplied with another color.
Definition: Color.hpp:194
+
void DrawLine(::Vector2 startPos, ::Vector2 endPos) const
Draw a line using Vector points.
Definition: Color.hpp:112
+
void DrawPixel(::Vector2 pos) const
Draw a pixel.
Definition: Color.hpp:100
+
::Color FromHSV(float hue, float saturation, float value)
Returns a Color from HSV values.
Definition: Color.hpp:34
+
Vector4 Normalize() const
Returns Color normalized as float [0..1].
Definition: Color.hpp:65
+
Color Fade(float alpha) const
Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
Definition: Color.hpp:60
+
int ToInt() const
Returns hexadecimal value for a Color.
Definition: Color.hpp:46
+
Color(::Vector4 normalized)
Returns Color from normalized values [0..1].
Definition: Color.hpp:70
+
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY) const
Draw a line.
Definition: Color.hpp:105
+
Vector3 ToHSV() const
Returns HSV values for a Color.
Definition: Color.hpp:75
+
Color()
Black.
Definition: Color.hpp:24
+
void DrawLine(::Vector2 startPos, ::Vector2 endPos, float thick) const
Draw a line using Vector points, with a given thickness.
Definition: Color.hpp:117
+
Color & ClearBackground()
Set background color (framebuffer clear color)
Definition: Color.hpp:90
+
Color Alpha(float alpha) const
Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
Definition: Color.hpp:209
+
Color(unsigned int hexValue)
Get Color structure from hexadecimal value.
Definition: Color.hpp:39
+
Color Brightness(float factor)
Get color with brightness correction, brightness factor goes from -1.0f to 1.0f.
Definition: Color.hpp:199
+
Vector2 type.
Definition: Vector2.hpp:18
+
Vector3 type.
Definition: Vector3.hpp:18
+
Vector4 type.
Definition: Vector4.hpp:19
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
static void DrawTextPro(const Font &font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint)
Draw text using Font and pro parameters (rotation)
Definition: Functions.hpp:272
+
static void DrawTextEx(const Font &font, char *text, Vector2 position, float fontSize, float spacing, ::Color tint)
Draw text using font and additional parameters.
Definition: Functions.hpp:257
+
+ + + + diff --git a/_file_data_8hpp_source.html b/_file_data_8hpp_source.html new file mode 100644 index 00000000..1bdc6316 --- /dev/null +++ b/_file_data_8hpp_source.html @@ -0,0 +1,133 @@ + + + + + + + +raylib-cpp: FileData.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
FileData.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_FILEDATA_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_FILEDATA_HPP_
+
3 
+
4 #include <string>
+
5 #include <utility>
+
6 
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
11 
+
12 class FileData {
+
13 public:
+
14  FileData() = default;
+
15  FileData(const FileData&) = delete;
+
16  FileData(FileData&& other) noexcept : data(other.data), bytesRead(other.bytesRead) {
+
17  other.data = nullptr;
+
18  other.bytesRead = 0;
+
19  }
+
20  FileData& operator=(const FileData&) = delete;
+
21  FileData& operator=(FileData&& other) noexcept {
+
22  std::swap(data, other.data);
+
23  std::swap(bytesRead, other.bytesRead);
+
24  return *this;
+
25  }
+
26  ~FileData() { Unload(); }
+
27 
+
28  explicit FileData(const std::string& fileName) { Load(fileName); }
+
29 
+
30  GETTER(const unsigned char*, Data, data)
+
31  GETTER(int, BytesRead, bytesRead)
+
32 
+
33  void Load(const std::string& fileName) { Load(fileName.c_str()); }
+
34  void Load(const char* fileName) { data = ::LoadFileData(fileName, &bytesRead); }
+
35 
+
36  void Unload() {
+
37  if (data != nullptr) {
+
38  ::UnloadFileData(data);
+
39  data = nullptr;
+
40  }
+
41  }
+
42 private:
+
43  unsigned char* data{nullptr};
+
44  int bytesRead{0};
+
45 };
+
46 
+
47 } // namespace raylib
+
48 
+
49 using RFileData = raylib::FileData;
+
50 
+
51 #endif // RAYLIB_CPP_INCLUDE_FILEDATA_HPP_
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_file_text_8hpp_source.html b/_file_text_8hpp_source.html new file mode 100644 index 00000000..80748b43 --- /dev/null +++ b/_file_text_8hpp_source.html @@ -0,0 +1,144 @@ + + + + + + + +raylib-cpp: FileText.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
FileText.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_FILETEXT_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_FILETEXT_HPP_
+
3 
+
4 #include <string>
+
5 #include <utility>
+
6 
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
11 
+
12 class FileText {
+
13 public:
+
14  FileText() = default;
+
15  FileText(const FileText&) = delete;
+
16  FileText(FileText&& other) noexcept : data(other.data), length(other.length) {
+
17  other.data = nullptr;
+
18  other.length = 0;
+
19  }
+
20  FileText& operator=(const FileText&) = delete;
+
21  FileText& operator=(FileText&& other) noexcept {
+
22  std::swap(data, other.data);
+
23  std::swap(length, other.length);
+
24  return *this;
+
25  }
+
26  ~FileText() { Unload(); }
+
27 
+
28  explicit FileText(const std::string& fileName) { Load(fileName); }
+
29 
+
30  GETTER(const char*, Data, data)
+
31  GETTER(unsigned int, Length, length)
+
32 
+
33  [[nodiscard]] const char* c_str() const { return data; }
+
34 
+
35  [[nodiscard]] std::string ToString() const { return data; }
+
36  explicit operator std::string() const { return data; }
+
37 
+
38  void Load(const std::string& fileName) { Load(fileName.c_str()); }
+
39  void Load(const char* fileName) {
+
40  data = ::LoadFileText(fileName);
+
41  length = ::TextLength(data);
+
42  }
+
43 
+
44  void Unload() {
+
45  if (data != nullptr) {
+
46  ::UnloadFileText(data);
+
47  data = nullptr;
+
48  length = 0;
+
49  }
+
50  }
+
51 private:
+
52  char* data{nullptr};
+
53  unsigned int length{0};
+
54 };
+
55 
+
56 } // namespace raylib
+
57 
+
58 using RFileText = raylib::FileText;
+
59 
+
60 #endif // RAYLIB_CPP_INCLUDE_FILETEXT_HPP_
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
static unsigned int TextLength(const char *text)
Check if two text string are equal.
Definition: Functions.hpp:345
+
static std::string LoadFileText(const std::string &fileName)
Load text data from file (read)
Definition: Functions.hpp:73
+
+ + + + diff --git a/_font_8hpp_source.html b/_font_8hpp_source.html new file mode 100644 index 00000000..d035ea6a --- /dev/null +++ b/_font_8hpp_source.html @@ -0,0 +1,348 @@ + + + + + + + +raylib-cpp: Font.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Font.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_FONT_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_FONT_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./RaylibException.hpp"
+
7 #include "./TextureUnmanaged.hpp"
+
8 #include "./raylib-cpp-utils.hpp"
+
9 #include "./raylib.hpp"
+
10 
+
11 namespace raylib {
+
15 class Font : public ::Font {
+
16 public:
+
17  Font(
+
18  int baseSize,
+
19  int glyphCount,
+
20  int glyphPadding,
+
21  ::Texture2D texture,
+
22  ::Rectangle* recs = nullptr,
+
23  ::GlyphInfo* glyphs = nullptr)
+
24  : ::Font{baseSize, glyphCount, glyphPadding, texture, recs, glyphs} {
+
25  // Nothing.
+
26  }
+
27 
+
31  Font() { set(::GetFontDefault()); }
+
32 
+
33  Font(const ::Font& font) { set(font); }
+
34 
+
42  Font(const std::string& fileName) { Load(fileName); }
+
43 
+
53  Font(const std::string& fileName, int fontSize, int* fontChars = 0, int charCount = 0) {
+
54  Load(fileName, fontSize, fontChars, charCount);
+
55  }
+
56 
+
66  Font(const ::Image& image, ::Color key, int firstChar) { Load(image, key, firstChar); }
+
67 
+ +
76  const std::string& fileType,
+
77  const unsigned char* fileData,
+
78  int dataSize,
+
79  int fontSize,
+
80  int* fontChars,
+
81  int charsCount) {
+
82  Load(fileType, fileData, dataSize, fontSize, fontChars, charsCount);
+
83  }
+
84 
+
85  Font(const Font&) = delete;
+
86 
+
87  Font(Font&& other) {
+
88  set(other);
+
89 
+
90  other.baseSize = 0;
+
91  other.glyphCount = 0;
+
92  other.glyphPadding = 0;
+
93  other.texture = {};
+
94  other.recs = nullptr;
+
95  other.glyphs = nullptr;
+
96  }
+
97 
+
98  ~Font() { Unload(); }
+
99 
+
100  void Unload() {
+
101  // Protect against calling UnloadFont() twice.
+
102  if (baseSize != 0) {
+
103  UnloadFont(*this);
+
104  baseSize = 0;
+
105  }
+
106  }
+
107 
+
108  GETTER(int, BaseSize, baseSize)
+
109  GETTER(int, GlyphCount, glyphCount)
+
110  GETTER(int, GlyphPadding, glyphPadding)
+
111  GETTER(::Rectangle*, Recs, recs)
+
112  GETTER(::GlyphInfo*, Glyphs, glyphs)
+
113 
+
117  TextureUnmanaged GetTexture() { return texture; }
+
118 
+
122  void SetTexture(const ::Texture& newTexture) { texture = newTexture; }
+
123 
+
124  Font& operator=(const ::Font& font) {
+
125  Unload();
+
126  set(font);
+
127  return *this;
+
128  }
+
129 
+
130  Font& operator=(const Font&) = delete;
+
131 
+
132  Font& operator=(Font&& other) noexcept {
+
133  if (this == &other) {
+
134  return *this;
+
135  }
+
136 
+
137  Unload();
+
138  set(other);
+
139 
+
140  other.baseSize = 0;
+
141  other.glyphCount = 0;
+
142  other.glyphPadding = 0;
+
143  other.texture = {};
+
144  other.recs = nullptr;
+
145  other.glyphs = nullptr;
+
146 
+
147  return *this;
+
148  }
+
149 
+
159  void Load(const std::string& fileName) {
+
160  set(::LoadFont(fileName.c_str()));
+
161  if (!IsValid()) {
+
162  throw RaylibException("Failed to load Font with from file: " + fileName);
+
163  }
+
164  }
+
165 
+
176  void Load(const std::string& fileName, int fontSize, int* fontChars, int charCount) {
+
177  set(::LoadFontEx(fileName.c_str(), fontSize, fontChars, charCount));
+
178  if (!IsValid()) {
+
179  throw RaylibException("Failed to load Font with from file with font size: " + fileName);
+
180  }
+
181  }
+
182 
+
183  void Load(const ::Image& image, ::Color key, int firstChar) {
+
184  set(::LoadFontFromImage(image, key, firstChar));
+
185  if (!IsValid()) {
+
186  throw RaylibException("Failed to load Font with from image");
+
187  }
+
188  }
+
189 
+
190  void Load(
+
191  const std::string& fileType,
+
192  const unsigned char* fileData,
+
193  int dataSize,
+
194  int fontSize,
+
195  int* fontChars,
+
196  int charsCount) {
+
197  set(::LoadFontFromMemory(fileType.c_str(), fileData, dataSize, fontSize, fontChars, charsCount));
+
198  if (!IsValid()) {
+
199  throw RaylibException("Failed to load Font " + fileType + " with from file data");
+
200  }
+
201  }
+
202 
+
206  bool IsValid() const { return ::IsFontValid(*this); }
+
207 
+
211  void DrawText(const char* text, ::Vector2 position, float fontSize, float spacing, ::Color tint = WHITE) const {
+
212  ::DrawTextEx(*this, text, position, fontSize, spacing, tint);
+
213  }
+
214 
+
218  void
+
219  DrawText(const std::string& text, ::Vector2 position, float fontSize, float spacing, ::Color tint = WHITE) const {
+
220  ::DrawTextEx(*this, text.c_str(), position, fontSize, spacing, tint);
+
221  }
+
222 
+
226  void DrawText(const char* text, int posX, int posY, float fontSize, float spacing, ::Color tint = WHITE) const {
+
227  ::DrawTextEx(*this, text, {static_cast<float>(posX), static_cast<float>(posY)}, fontSize, spacing, tint);
+
228  }
+
229 
+
233  void
+
234  DrawText(const std::string& text, int posX, int posY, float fontSize, float spacing, ::Color tint = WHITE) const {
+
235  ::DrawTextEx(
+
236  *this,
+
237  text.c_str(),
+
238  {static_cast<float>(posX), static_cast<float>(posY)},
+
239  fontSize,
+
240  spacing,
+
241  tint);
+
242  }
+
243 
+
244  void DrawText(
+
245  const char* text,
+
246  ::Vector2 position,
+
247  ::Vector2 origin,
+
248  float rotation,
+
249  float fontSize,
+
250  float spacing,
+
251  ::Color tint = WHITE) const {
+
252  ::DrawTextPro(*this, text, position, origin, rotation, fontSize, spacing, tint);
+
253  }
+
254 
+
255  void DrawText(
+
256  const std::string& text,
+
257  ::Vector2 position,
+
258  ::Vector2 origin,
+
259  float rotation,
+
260  float fontSize,
+
261  float spacing,
+
262  ::Color tint = WHITE) const {
+
263  ::DrawTextPro(*this, text.c_str(), position, origin, rotation, fontSize, spacing, tint);
+
264  }
+
265 
+
269  void DrawText(int codepoint, ::Vector2 position, float fontSize, ::Color tint = {255, 255, 255, 255}) const {
+
270  ::DrawTextCodepoint(*this, codepoint, position, fontSize, tint);
+
271  }
+
272 
+
276  void DrawText(
+
277  const int* codepoints,
+
278  int count,
+
279  ::Vector2 position,
+
280  float fontSize,
+
281  float spacing,
+
282  ::Color tint = {255, 255, 255, 255}) const {
+
283  ::DrawTextCodepoints(*this, codepoints, count, position, fontSize, spacing, tint);
+
284  }
+
285 
+
289  Vector2 MeasureText(const char* text, float fontSize, float spacing) const {
+
290  return ::MeasureTextEx(*this, text, fontSize, spacing);
+
291  }
+
292 
+
296  Vector2 MeasureText(const std::string& text, float fontSize, float spacing) const {
+
297  return ::MeasureTextEx(*this, text.c_str(), fontSize, spacing);
+
298  }
+
299 
+
303  int GetGlyphIndex(int character) const { return ::GetGlyphIndex(*this, character); }
+
304 
+
308  ::Image ImageText(const char* text, float fontSize, float spacing, ::Color tint) const {
+
309  return ::ImageTextEx(*this, text, fontSize, spacing, tint);
+
310  }
+
311 
+
315  ::Image ImageText(const std::string& text, float fontSize, float spacing, ::Color tint) const {
+
316  return ::ImageTextEx(*this, text.c_str(), fontSize, spacing, tint);
+
317  }
+
318 protected:
+
319  void set(const ::Font& font) {
+
320  baseSize = font.baseSize;
+
321  glyphCount = font.glyphCount;
+
322  glyphPadding = font.glyphPadding;
+
323  texture = font.texture;
+
324  recs = font.recs;
+
325  glyphs = font.glyphs;
+
326  }
+
327 };
+
328 } // namespace raylib
+
329 
+
330 using RFont = raylib::Font;
+
331 
+
332 #endif // RAYLIB_CPP_INCLUDE_FONT_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Font type, includes texture and charSet array data.
Definition: Font.hpp:15
+
Font(const std::string &fileName, int fontSize, int *fontChars=0, int charCount=0)
Loads a Font from the given file, with generation parameters.
Definition: Font.hpp:53
+
void DrawText(const int *codepoints, int count, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) const
Draw multiple character (codepoint)
Definition: Font.hpp:276
+
void SetTexture(const ::Texture &newTexture)
Set the texture atlas containing the glyphs.
Definition: Font.hpp:122
+
Vector2 MeasureText(const std::string &text, float fontSize, float spacing) const
Measure string size for Font.
Definition: Font.hpp:296
+
void Load(const std::string &fileName, int fontSize, int *fontChars, int charCount)
Loads a font from a given file with generation parameters.
Definition: Font.hpp:176
+
void Load(const std::string &fileName)
Loads a font from a given file.
Definition: Font.hpp:159
+
Font(const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
Loads a font from memory, based on the given file type and file data.
Definition: Font.hpp:75
+
int GetGlyphIndex(int character) const
Get index position for a unicode character on font.
Definition: Font.hpp:303
+
::Image ImageText(const std::string &text, float fontSize, float spacing, ::Color tint) const
Create an image from text (custom sprite font)
Definition: Font.hpp:315
+
Font()
Retrieves the default Font.
Definition: Font.hpp:31
+
Vector2 MeasureText(const char *text, float fontSize, float spacing) const
Measure string size for Font.
Definition: Font.hpp:289
+
Font(const std::string &fileName)
Loads a Font from the given file.
Definition: Font.hpp:42
+
void DrawText(int codepoint, ::Vector2 position, float fontSize, ::Color tint={255, 255, 255, 255}) const
Draw one character (codepoint)
Definition: Font.hpp:269
+
void DrawText(const char *text, int posX, int posY, float fontSize, float spacing, ::Color tint=WHITE) const
Draw text using font and additional parameters.
Definition: Font.hpp:226
+
bool IsValid() const
Returns if the font is ready to be used.
Definition: Font.hpp:206
+
void DrawText(const char *text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE) const
Draw text using font and additional parameters.
Definition: Font.hpp:211
+
TextureUnmanaged GetTexture()
Get the texture atlas containing the glyphs.
Definition: Font.hpp:117
+
Font(const ::Image &image, ::Color key, int firstChar)
Loads a Font from the given image with a color key.
Definition: Font.hpp:66
+
void DrawText(const std::string &text, int posX, int posY, float fontSize, float spacing, ::Color tint=WHITE) const
Draw text using font and additional parameters.
Definition: Font.hpp:234
+
::Image ImageText(const char *text, float fontSize, float spacing, ::Color tint) const
Create an image from text (custom sprite font)
Definition: Font.hpp:308
+
void DrawText(const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE) const
Draw text using font and additional parameters.
Definition: Font.hpp:219
+
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:17
+
Exception used for most raylib-related exceptions.
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Texture type.
Definition: Texture.hpp:14
+
A Texture that is not managed by C++ RAII.
+
Vector2 type.
Definition: Vector2.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
static void DrawTextPro(const Font &font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint)
Draw text using Font and pro parameters (rotation)
Definition: Functions.hpp:272
+
static inline ::Font LoadFontEx(const std::string &fileName, int fontSize, int *fontChars, int charsCount)
Load font from file (filename must include file extension)
Definition: Functions.hpp:310
+
static inline ::Font LoadFont(const std::string &fileName)
Load font from file (filename must include file extension)
Definition: Functions.hpp:302
+
static void DrawTextEx(const Font &font, char *text, Vector2 position, float fontSize, float spacing, ::Color tint)
Draw text using font and additional parameters.
Definition: Functions.hpp:257
+
+ + + + diff --git a/_functions_8hpp_source.html b/_functions_8hpp_source.html new file mode 100644 index 00000000..32e509b4 --- /dev/null +++ b/_functions_8hpp_source.html @@ -0,0 +1,408 @@ + + + + + + + +raylib-cpp: Functions.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Functions.hpp
+
+
+
1 
+
4 #ifndef RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
+
5 #define RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
+
6 
+
7 #include <string>
+
8 #include <vector>
+
9 
+
10 #include "./raylib.hpp"
+
11 
+
15 #ifndef RLCPPAPI
+
16 #define RLCPPAPI static
+
17 #endif
+
18 
+
19 namespace raylib {
+
20 
+
24 [[maybe_unused]] RLCPPAPI inline void InitWindow(int width, int height, const std::string& title = "raylib") {
+
25  ::InitWindow(width, height, title.c_str());
+
26 }
+
27 
+
31 [[maybe_unused]] RLCPPAPI inline void SetWindowTitle(const std::string& title) {
+
32  ::SetWindowTitle(title.c_str());
+
33 }
+
34 
+
38 [[maybe_unused]] RLCPPAPI inline std::string GetMonitorName(int monitor = 0) {
+
39  return ::GetMonitorName(monitor);
+
40 }
+
41 
+
45 [[maybe_unused]] RLCPPAPI inline void SetClipboardText(const std::string& text) {
+
46  ::SetClipboardText(text.c_str());
+
47 }
+
48 
+
52 [[maybe_unused]] RLCPPAPI inline std::string GetClipboardText() {
+
53  return ::GetClipboardText();
+
54 }
+
55 
+
59 [[maybe_unused]] RLCPPAPI inline void TakeScreenshot(const std::string& fileName) {
+
60  ::TakeScreenshot(fileName.c_str());
+
61 }
+
62 
+
66 [[maybe_unused]] RLCPPAPI inline std::string GetGamepadName(int gamepad) {
+
67  return ::GetGamepadName(gamepad);
+
68 }
+
69 
+
73 [[maybe_unused]] RLCPPAPI std::string LoadFileText(const std::string& fileName) {
+
74  char* text = ::LoadFileText(fileName.c_str());
+
75  std::string output(text);
+
76  ::UnloadFileText(text);
+
77  return output;
+
78 }
+
79 
+
83 [[maybe_unused]] RLCPPAPI inline bool SaveFileText(const std::string& fileName, const std::string& text) {
+
84  return ::SaveFileText(fileName.c_str(), const_cast<char*>(text.c_str()));
+
85 }
+
86 
+
90 [[maybe_unused]] RLCPPAPI inline bool FileExists(const std::string& fileName) {
+
91  return ::FileExists(fileName.c_str());
+
92 }
+
93 
+
97 [[maybe_unused]] RLCPPAPI inline bool DirectoryExists(const std::string& dirPath) {
+
98  return ::DirectoryExists(dirPath.c_str());
+
99 }
+
100 
+
104 [[maybe_unused]] RLCPPAPI inline bool IsFileExtension(const std::string& fileName, const std::string& ext) {
+
105  return ::IsFileExtension(fileName.c_str(), ext.c_str());
+
106 }
+
107 
+
111 [[maybe_unused]] RLCPPAPI inline std::string GetFileExtension(const std::string& fileName) {
+
112  return ::GetFileExtension(fileName.c_str());
+
113 }
+
114 
+
118 [[maybe_unused]] RLCPPAPI inline std::string GetFileName(const std::string& filePath) {
+
119  return ::GetFileName(filePath.c_str());
+
120 }
+
121 
+
125 [[maybe_unused]] RLCPPAPI inline std::string GetFileNameWithoutExt(const std::string& filePath) {
+
126  return ::GetFileNameWithoutExt(filePath.c_str());
+
127 }
+
128 
+
132 [[maybe_unused]] RLCPPAPI inline std::string GetDirectoryPath(const std::string& filePath) {
+
133  return ::GetDirectoryPath(filePath.c_str());
+
134 }
+
135 
+
139 [[maybe_unused]] RLCPPAPI inline std::string GetPrevDirectoryPath(const std::string& dirPath) {
+
140  return ::GetPrevDirectoryPath(dirPath.c_str());
+
141 }
+
142 
+
146 [[maybe_unused]] RLCPPAPI inline std::string GetWorkingDirectory() {
+
147  return ::GetWorkingDirectory();
+
148 }
+
149 
+
153 [[maybe_unused]] RLCPPAPI std::vector<std::string> LoadDirectoryFiles(const std::string& dirPath) {
+
154  FilePathList files = ::LoadDirectoryFiles(dirPath.c_str());
+
155  std::vector<std::string> output(files.paths, files.paths + files.count);
+
156  ::UnloadDirectoryFiles(files);
+
157  return output;
+
158 }
+
159 
+
163 [[maybe_unused]] RLCPPAPI inline bool ChangeDirectory(const std::string& dir) {
+
164  return ::ChangeDirectory(dir.c_str());
+
165 }
+
166 
+
170 [[maybe_unused]] RLCPPAPI std::vector<std::string> LoadDroppedFiles() {
+
171  if (!::IsFileDropped()) {
+
172  return std::vector<std::string>();
+
173  }
+
174  FilePathList files = ::LoadDroppedFiles();
+
175  std::vector<std::string> output(files.paths, files.paths + files.count);
+
176  ::UnloadDroppedFiles(files);
+
177  return output;
+
178 }
+
179 
+
183 [[maybe_unused]] RLCPPAPI inline long GetFileModTime(const std::string& fileName) { // NOLINT
+
184  return ::GetFileModTime(fileName.c_str());
+
185 }
+
186 
+
190 [[maybe_unused]] RLCPPAPI inline void OpenURL(const std::string& url) {
+
191  return ::OpenURL(url.c_str());
+
192 }
+
193 
+
197 [[maybe_unused]] RLCPPAPI inline ::Image LoadImage(const std::string& fileName) {
+
198  return ::LoadImage(fileName.c_str());
+
199 }
+
200 
+
204 [[maybe_unused]] RLCPPAPI inline ::Image
+
205 LoadImageRaw(const std::string& fileName, int width, int height, int format, int headerSize) {
+
206  return ::LoadImageRaw(fileName.c_str(), width, height, format, headerSize);
+
207 }
+
208 
+
212 [[maybe_unused]] RLCPPAPI inline ::Image LoadImageAnim(const std::string& fileName, int* frames) {
+
213  return ::LoadImageAnim(fileName.c_str(), frames);
+
214 }
+
215 
+
219 [[maybe_unused]] RLCPPAPI inline ::Image
+
220 LoadImageFromMemory(const std::string& fileType, const unsigned char* fileData, int dataSize) {
+
221  return ::LoadImageFromMemory(fileType.c_str(), fileData, dataSize);
+
222 }
+
223 
+
227 [[maybe_unused]] RLCPPAPI inline bool ExportImage(const Image& image, const std::string& fileName) {
+
228  return ::ExportImage(image, fileName.c_str());
+
229 }
+
230 
+
234 [[maybe_unused]] RLCPPAPI inline bool ExportImageAsCode(const Image& image, const std::string& fileName) {
+
235  return ::ExportImageAsCode(image, fileName.c_str());
+
236 }
+
237 
+
241 [[maybe_unused]] RLCPPAPI inline void DrawText(const char* text, int posX, int posY, int fontSize, ::Color color) {
+
242  ::DrawText(text, posX, posY, fontSize, color);
+
243 }
+
244 
+
248 [[maybe_unused]] RLCPPAPI inline void
+
249 DrawText(const std::string& text, int posX, int posY, int fontSize, ::Color color) {
+
250  ::DrawText(text.c_str(), posX, posY, fontSize, color);
+
251 }
+
252 
+
256 [[maybe_unused]] RLCPPAPI inline void
+
257 DrawTextEx(const Font& font, char* text, Vector2 position, float fontSize, float spacing, ::Color tint) {
+
258  ::DrawTextEx(font, text, position, fontSize, spacing, tint);
+
259 }
+
260 
+
264 [[maybe_unused]] RLCPPAPI inline void
+
265 DrawTextEx(const Font& font, const std::string& text, Vector2 position, float fontSize, float spacing, ::Color tint) {
+
266  ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, tint);
+
267 }
+
268 
+
272 [[maybe_unused]] RLCPPAPI inline void DrawTextPro(
+
273  const Font& font,
+
274  const char* text,
+
275  Vector2 position,
+
276  Vector2 origin,
+
277  float rotation,
+
278  float fontSize,
+
279  float spacing,
+
280  ::Color tint) {
+
281  ::DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint);
+
282 }
+
283 
+
287 [[maybe_unused]] RLCPPAPI inline void DrawTextPro(
+
288  const Font& font,
+
289  const std::string& text,
+
290  Vector2 position,
+
291  Vector2 origin,
+
292  float rotation,
+
293  float fontSize,
+
294  float spacing,
+
295  ::Color tint) {
+
296  ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, tint);
+
297 }
+
298 
+
302 [[maybe_unused]] RLCPPAPI inline ::Font LoadFont(const std::string& fileName) {
+
303  return ::LoadFont(fileName.c_str());
+
304 }
+
305 
+
309 [[maybe_unused]] RLCPPAPI inline ::Font
+
310 LoadFontEx(const std::string& fileName, int fontSize, int* fontChars, int charsCount) {
+
311  return ::LoadFontEx(fileName.c_str(), fontSize, fontChars, charsCount);
+
312 }
+
313 
+
317 [[maybe_unused]] RLCPPAPI inline int MeasureText(const char* text, int fontSize) {
+
318  return ::MeasureText(text, fontSize);
+
319 }
+
320 
+
324 [[maybe_unused]] RLCPPAPI inline int MeasureText(const std::string& text, int fontSize) {
+
325  return ::MeasureText(text.c_str(), fontSize);
+
326 }
+
327 
+
331 [[maybe_unused]] RLCPPAPI inline bool TextIsEqual(const char* text1, const char* text2) {
+
332  return ::TextIsEqual(text1, text2);
+
333 }
+
334 
+
338 [[maybe_unused]] RLCPPAPI inline bool TextIsEqual(const std::string& text1, const std::string& text2) {
+
339  return ::TextIsEqual(text1.c_str(), text2.c_str());
+
340 }
+
341 
+
345 [[maybe_unused]] RLCPPAPI inline unsigned int TextLength(const char* text) {
+
346  return ::TextLength(text);
+
347 }
+
348 
+
352 [[maybe_unused]] RLCPPAPI inline unsigned int TextLength(const std::string& text) {
+
353  return ::TextLength(text.c_str());
+
354 }
+
355 
+
359 [[maybe_unused]] RLCPPAPI inline std::string TextSubtext(const std::string& text, int position, int length) {
+
360  return ::TextSubtext(text.c_str(), position, length);
+
361 }
+
362 
+
366 [[maybe_unused]] RLCPPAPI std::string
+
367 TextReplace(const std::string& text, const std::string& replace, const std::string& by) {
+
368  const char* input = text.c_str();
+
369  char* output = ::TextReplace(const_cast<char*>(input), replace.c_str(), by.c_str());
+
370  if (output != NULL) {
+
371  std::string stringOutput(output);
+
372  free(output);
+
373  return stringOutput;
+
374  }
+
375  return "";
+
376 }
+
377 
+
381 [[maybe_unused]] RLCPPAPI std::string TextInsert(const std::string& text, const std::string& insert, int position) {
+
382  char* output = ::TextInsert(text.c_str(), insert.c_str(), position);
+
383  if (output != NULL) {
+
384  std::string stringOutput(output);
+
385  free(output);
+
386  return stringOutput;
+
387  }
+
388  return "";
+
389 }
+
390 
+
394 [[maybe_unused]] RLCPPAPI std::vector<std::string> TextSplit(const std::string& text, char delimiter) {
+
395  int count;
+
396  const char** split = ::TextSplit(text.c_str(), delimiter, &count);
+
397  return std::vector<std::string>(split, split + count);
+
398 }
+
399 
+
403 [[maybe_unused]] RLCPPAPI inline int TextFindIndex(const std::string& text, const std::string& find) {
+
404  return ::TextFindIndex(text.c_str(), find.c_str());
+
405 }
+
406 
+
410 [[maybe_unused]] RLCPPAPI inline std::string TextToUpper(const std::string& text) {
+
411  return ::TextToUpper(text.c_str());
+
412 }
+
413 
+
417 [[maybe_unused]] RLCPPAPI inline std::string TextToLower(const std::string& text) {
+
418  return ::TextToLower(text.c_str());
+
419 }
+
420 
+
424 [[maybe_unused]] RLCPPAPI inline std::string TextToPascal(const std::string& text) {
+
425  return ::TextToPascal(text.c_str());
+
426 }
+
427 
+
431 [[maybe_unused]] RLCPPAPI inline int TextToInteger(const std::string& text) {
+
432  return ::TextToInteger(text.c_str());
+
433 }
+
434 
+
435 } // namespace raylib
+
436 
+
437 #endif // RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Font type, includes texture and charSet array data.
Definition: Font.hpp:15
+
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:17
+
Vector2 type.
Definition: Vector2.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
static std::vector< std::string > TextSplit(const std::string &text, char delimiter)
Split text into multiple strings.
Definition: Functions.hpp:394
+
static std::string TextToLower(const std::string &text)
Get lower case version of provided string.
Definition: Functions.hpp:417
+
static bool ExportImageAsCode(const Image &image, const std::string &fileName)
Export image as code file (.h) defining an array of bytes.
Definition: Functions.hpp:234
+
static void DrawTextPro(const Font &font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint)
Draw text using Font and pro parameters (rotation)
Definition: Functions.hpp:272
+
static bool DirectoryExists(const std::string &dirPath)
Check if directory path exists.
Definition: Functions.hpp:97
+
static int TextFindIndex(const std::string &text, const std::string &find)
Find first text occurrence within a string.
Definition: Functions.hpp:403
+
static inline ::Image LoadImage(const std::string &fileName)
Load an image.
Definition: Functions.hpp:197
+
static std::string GetWorkingDirectory()
Get current working directory.
Definition: Functions.hpp:146
+
static std::string GetGamepadName(int gamepad)
Get gamepad internal name id.
Definition: Functions.hpp:66
+
static inline ::Font LoadFontEx(const std::string &fileName, int fontSize, int *fontChars, int charsCount)
Load font from file (filename must include file extension)
Definition: Functions.hpp:310
+
static void DrawText(const char *text, int posX, int posY, int fontSize, ::Color color)
Draw text (using default font)
Definition: Functions.hpp:241
+
static inline ::Font LoadFont(const std::string &fileName)
Load font from file (filename must include file extension)
Definition: Functions.hpp:302
+
static bool ExportImage(const Image &image, const std::string &fileName)
Export image data to file.
Definition: Functions.hpp:227
+
static bool SaveFileText(const std::string &fileName, const std::string &text)
Save text data to file (write)
Definition: Functions.hpp:83
+
static bool IsFileExtension(const std::string &fileName, const std::string &ext)
Check file extension (including point: .png, .wav)
Definition: Functions.hpp:104
+
static std::vector< std::string > LoadDirectoryFiles(const std::string &dirPath)
Get filenames in a directory path.
Definition: Functions.hpp:153
+
static bool TextIsEqual(const char *text1, const char *text2)
Check if two text string are equal.
Definition: Functions.hpp:331
+
static std::string TextInsert(const std::string &text, const std::string &insert, int position)
Insert text in a position.
Definition: Functions.hpp:381
+
static std::string GetFileName(const std::string &filePath)
Get pointer to filename for a path string.
Definition: Functions.hpp:118
+
static inline ::Image LoadImageFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load image from memory buffer, fileType refers to extension like "png".
Definition: Functions.hpp:220
+
static std::string GetMonitorName(int monitor=0)
Get the human-readable, UTF-8 encoded name of the primary monitor.
Definition: Functions.hpp:38
+
static void TakeScreenshot(const std::string &fileName)
Takes a screenshot of current screen (saved a .png)
Definition: Functions.hpp:59
+
static unsigned int TextLength(const char *text)
Check if two text string are equal.
Definition: Functions.hpp:345
+
static void SetClipboardText(const std::string &text)
Set clipboard text content.
Definition: Functions.hpp:45
+
static void SetWindowTitle(const std::string &title)
Set title for window.
Definition: Functions.hpp:31
+
static bool FileExists(const std::string &fileName)
Check if file exists.
Definition: Functions.hpp:90
+
static std::string TextToUpper(const std::string &text)
Get upper case version of provided string.
Definition: Functions.hpp:410
+
static void InitWindow(int width, int height, const std::string &title="raylib")
Initialize window and OpenGL context.
Definition: Functions.hpp:24
+
static inline ::Image LoadImageAnim(const std::string &fileName, int *frames)
Load animated image data.
Definition: Functions.hpp:212
+
static std::string LoadFileText(const std::string &fileName)
Load text data from file (read)
Definition: Functions.hpp:73
+
static long GetFileModTime(const std::string &fileName)
Get file modification time (last write time)
Definition: Functions.hpp:183
+
static std::string GetFileExtension(const std::string &fileName)
Get pointer to extension for a filename string (including point: ".png")
Definition: Functions.hpp:111
+
static void OpenURL(const std::string &url)
Open URL with default system browser (if available)
Definition: Functions.hpp:190
+
static int TextToInteger(const std::string &text)
Get integer value from text (negative values not supported)
Definition: Functions.hpp:431
+
static std::vector< std::string > LoadDroppedFiles()
Get dropped files names.
Definition: Functions.hpp:170
+
static std::string GetFileNameWithoutExt(const std::string &filePath)
Get filename string without extension.
Definition: Functions.hpp:125
+
static inline ::Image LoadImageRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Load an image from RAW file data.
Definition: Functions.hpp:205
+
static std::string GetPrevDirectoryPath(const std::string &dirPath)
Get previous directory path for a given path.
Definition: Functions.hpp:139
+
static bool ChangeDirectory(const std::string &dir)
Change working directory, return true on success.
Definition: Functions.hpp:163
+
static std::string TextReplace(const std::string &text, const std::string &replace, const std::string &by)
Replace text string.
Definition: Functions.hpp:367
+
static std::string GetDirectoryPath(const std::string &filePath)
Get full path for a given fileName with path.
Definition: Functions.hpp:132
+
static void DrawTextEx(const Font &font, char *text, Vector2 position, float fontSize, float spacing, ::Color tint)
Draw text using font and additional parameters.
Definition: Functions.hpp:257
+
static std::string TextSubtext(const std::string &text, int position, int length)
Get text length, checks for '\0' ending.
Definition: Functions.hpp:359
+
static int MeasureText(const char *text, int fontSize)
Measure string width for default font.
Definition: Functions.hpp:317
+
static std::string TextToPascal(const std::string &text)
Get Pascal case notation version of provided string.
Definition: Functions.hpp:424
+
static std::string GetClipboardText()
Get clipboard text content.
Definition: Functions.hpp:52
+
+ + + + diff --git a/_gamepad_8hpp_source.html b/_gamepad_8hpp_source.html new file mode 100644 index 00000000..ef19b60b --- /dev/null +++ b/_gamepad_8hpp_source.html @@ -0,0 +1,157 @@ + + + + + + + +raylib-cpp: Gamepad.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Gamepad.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./raylib-cpp-utils.hpp"
+
7 #include "./raylib.hpp"
+
8 
+
9 namespace raylib {
+
13 class Gamepad {
+
14 public:
+
15  Gamepad(int gamepadNumber = 0) { set(gamepadNumber); }
+
16  int number;
+
17 
+
18  GETTERSETTER(int, Number, number)
+
19 
+
20  Gamepad& operator=(const Gamepad& gamepad) {
+
21  set(gamepad);
+
22  return *this;
+
23  }
+
24 
+
25  Gamepad& operator=(int gamepadNumber) {
+
26  set(gamepadNumber);
+
27  return *this;
+
28  }
+
29 
+
30  operator int() const { return number; }
+
31 
+
35  bool IsAvailable() const { return ::IsGamepadAvailable(number); }
+
36 
+
40  static bool IsAvailable(int number) { return ::IsGamepadAvailable(number); }
+
41 
+
45  std::string GetName() const { return ::GetGamepadName(number); }
+
46 
+
50  operator std::string() const { return GetName(); }
+
51 
+
55  bool IsButtonPressed(int button) const { return ::IsGamepadButtonPressed(number, button); }
+
56 
+
60  bool IsButtonDown(int button) const { return ::IsGamepadButtonDown(number, button); }
+
61 
+
65  bool IsButtonReleased(int button) const { return ::IsGamepadButtonReleased(number, button); }
+
66 
+
70  bool IsButtonUp(int button) const { return ::IsGamepadButtonUp(number, button); }
+
71 
+
75  int GetButtonPressed() const { return ::GetGamepadButtonPressed(); }
+
76 
+
80  int GetAxisCount() const { return ::GetGamepadAxisCount(number); }
+
81 
+
85  float GetAxisMovement(int axis) const { return ::GetGamepadAxisMovement(number, axis); }
+
86 
+
87  int SetMappings(const std::string& mappings) { return SetGamepadMappings(mappings.c_str()); }
+
88 
+
92  void SetVibration(float leftMotor, float rightMotor, float duration) {
+
93  ::SetGamepadVibration(number, leftMotor, rightMotor, duration);
+
94  }
+
95 protected:
+
96  void set(int gamepadNumber) { number = gamepadNumber; }
+
97 };
+
98 } // namespace raylib
+
99 
+
100 using RGamepad = raylib::Gamepad;
+
101 
+
102 #endif // RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
+
Input-related functions: gamepads.
Definition: Gamepad.hpp:13
+
void SetVibration(float leftMotor, float rightMotor, float duration)
Set gamepad vibration for both motors (duration in seconds)
Definition: Gamepad.hpp:92
+
bool IsButtonReleased(int button) const
Detect if a gamepad button has been released once.
Definition: Gamepad.hpp:65
+
int GetAxisCount() const
Return gamepad axis count for a gamepad.
Definition: Gamepad.hpp:80
+
static bool IsAvailable(int number)
Detect if a gamepad is available.
Definition: Gamepad.hpp:40
+
bool IsAvailable() const
Detect if a gamepad is available.
Definition: Gamepad.hpp:35
+
int GetButtonPressed() const
Get the last gamepad button pressed.
Definition: Gamepad.hpp:75
+
bool IsButtonDown(int button) const
Detect if a gamepad button is being pressed.
Definition: Gamepad.hpp:60
+
std::string GetName() const
Return gamepad internal name id.
Definition: Gamepad.hpp:45
+
bool IsButtonUp(int button) const
Detect if a gamepad button is NOT being pressed.
Definition: Gamepad.hpp:70
+
bool IsButtonPressed(int button) const
Detect if a gamepad button has been pressed once.
Definition: Gamepad.hpp:55
+
float GetAxisMovement(int axis) const
Return axis movement value for a gamepad axis.
Definition: Gamepad.hpp:85
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_image_8hpp_source.html b/_image_8hpp_source.html new file mode 100644 index 00000000..fa774563 --- /dev/null +++ b/_image_8hpp_source.html @@ -0,0 +1,663 @@ + + + + + + + +raylib-cpp: Image.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Image.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_IMAGE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_IMAGE_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./Color.hpp"
+
7 #include "./RaylibException.hpp"
+
8 #include "./raylib-cpp-utils.hpp"
+
9 #include "./raylib.hpp"
+
10 
+
11 namespace raylib {
+
17 class Image : public ::Image {
+
18 public:
+
19  Image(
+
20  void* data = nullptr,
+
21  int width = 0,
+
22  int height = 0,
+
23  int mipmaps = 1,
+
24  int format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
+
25  : ::Image{data, width, height, mipmaps, format} {
+
26  // Nothing.
+
27  }
+
28 
+
29  Image(const ::Image& image) { set(image); }
+
30 
+
38  Image(const std::string& fileName) { Load(fileName); }
+
39 
+
47  Image(const std::string& fileName, int width, int height, int format, int headerSize = 0) {
+
48  Load(fileName, width, height, format, headerSize);
+
49  }
+
50 
+
58  Image(const std::string& fileName, int* frames) { Load(fileName, frames); }
+
59 
+
65  Image(const std::string& fileType, const unsigned char* fileData, int dataSize) {
+
66  Load(fileType, fileData, dataSize);
+
67  }
+
68 
+
74  Image(const ::Texture2D& texture) { Load(texture); }
+
75 
+
76  Image(int width, int height, ::Color color = {255, 255, 255, 255}) { set(::GenImageColor(width, height, color)); }
+
77 
+
78  Image(const std::string& text, int fontSize, ::Color color = {255, 255, 255, 255}) {
+
79  set(::ImageText(text.c_str(), fontSize, color));
+
80  }
+
81 
+
82  Image(
+
83  const ::Font& font,
+
84  const std::string& text,
+
85  float fontSize,
+
86  float spacing,
+
87  ::Color tint = {255, 255, 255, 255}) {
+
88  set(::ImageTextEx(font, text.c_str(), fontSize, spacing, tint));
+
89  }
+
90 
+
91  Image(const Image& other) { set(other.Copy()); }
+
92 
+
93  Image(Image&& other) {
+
94  set(other);
+
95 
+
96  other.data = nullptr;
+
97  other.width = 0;
+
98  other.height = 0;
+
99  other.mipmaps = 0;
+
100  other.format = 0;
+
101  }
+
102 
+
103  static ::Image Text(const std::string& text, int fontSize, ::Color color = {255, 255, 255, 255}) {
+
104  return ::ImageText(text.c_str(), fontSize, color);
+
105  }
+
106 
+
107  static ::Image Text(
+
108  const ::Font& font,
+
109  const std::string& text,
+
110  float fontSize,
+
111  float spacing,
+
112  ::Color tint = {255, 255, 255, 255}) {
+
113  return ::ImageTextEx(font, text.c_str(), fontSize, spacing, tint);
+
114  }
+
115 
+
119  static ::Image LoadFromScreen() { return ::LoadImageFromScreen(); }
+
120 
+
124  static ::Image Color(int width, int height, ::Color color = {255, 255, 255, 255}) {
+
125  return ::GenImageColor(width, height, color);
+
126  }
+
127 
+
131  static ::Image GradientLinear(int width, int height, int direction, ::Color start, ::Color end) {
+
132  return ::GenImageGradientLinear(width, height, direction, start, end);
+
133  }
+
134 
+
138  static ::Image GradientRadial(int width, int height, float density, ::Color inner, ::Color outer) {
+
139  return ::GenImageGradientRadial(width, height, density, inner, outer);
+
140  }
+
141 
+
145  static ::Image Checked(
+
146  int width,
+
147  int height,
+
148  int checksX,
+
149  int checksY,
+
150  ::Color col1 = {255, 255, 255, 255},
+
151  ::Color col2 = {0, 0, 0, 255}) {
+
152  return ::GenImageChecked(width, height, checksX, checksY, col1, col2);
+
153  }
+
154 
+
158  static ::Image WhiteNoise(int width, int height, float factor) {
+
159  return ::GenImageWhiteNoise(width, height, factor);
+
160  }
+
161 
+
165  static ::Image Cellular(int width, int height, int tileSize) { return ::GenImageCellular(width, height, tileSize); }
+
166 
+
170  static ::Image GetClipboard() { return ::GetClipboardImage(); }
+
171 
+
172  ~Image() { Unload(); }
+
173 
+
174  Image& operator=(const ::Image& image) {
+
175  set(image);
+
176  return *this;
+
177  }
+
178 
+
179  Image& operator=(const Image& other) {
+
180  if (this == &other) {
+
181  return *this;
+
182  }
+
183 
+
184  Unload();
+
185  set(other.Copy());
+
186 
+
187  return *this;
+
188  }
+
189 
+
190  Image& operator=(Image&& other) noexcept {
+
191  if (this == &other) {
+
192  return *this;
+
193  }
+
194 
+
195  Unload();
+
196  set(other);
+
197 
+
198  other.data = nullptr;
+
199  other.width = 0;
+
200  other.height = 0;
+
201  other.mipmaps = 0;
+
202  other.format = 0;
+
203 
+
204  return *this;
+
205  }
+
206 
+
214  void Load(const std::string& fileName) {
+
215  set(::LoadImage(fileName.c_str()));
+
216  if (!IsValid()) {
+
217  throw RaylibException("Failed to load Image from file: " + fileName);
+
218  }
+
219  }
+
220 
+
228  void Load(const std::string& fileName, int width, int height, int format, int headerSize) {
+
229  set(::LoadImageRaw(fileName.c_str(), width, height, format, headerSize));
+
230  if (!IsValid()) {
+
231  throw RaylibException("Failed to load Image from file: " + fileName);
+
232  }
+
233  }
+
234 
+
242  void Load(const std::string& fileName, int* frames) {
+
243  set(::LoadImageAnim(fileName.c_str(), frames));
+
244  if (!IsValid()) {
+
245  throw RaylibException("Failed to load Image from file: " + fileName);
+
246  }
+
247  }
+
248 
+
256  void Load(const std::string& fileType, const unsigned char* fileData, int dataSize) {
+
257  set(::LoadImageFromMemory(fileType.c_str(), fileData, dataSize));
+
258  if (!IsValid()) {
+
259  throw RaylibException("Failed to load Image data with file type: " + fileType);
+
260  }
+
261  }
+
262 
+
270  void Load(const ::Texture2D& texture) {
+
271  set(::LoadImageFromTexture(texture));
+
272  if (!IsValid()) {
+
273  throw RaylibException("Failed to load Image from texture.");
+
274  }
+
275  }
+
276 
+
280  void Unload() {
+
281  if (data != nullptr) {
+
282  ::UnloadImage(*this);
+
283  data = nullptr;
+
284  }
+
285  }
+
286 
+
292  void Export(const std::string& fileName) const {
+
293  if (!::ExportImage(*this, fileName.c_str())) {
+
294  throw RaylibException(TextFormat("Failed to export Image to file: %s", fileName.c_str()));
+
295  }
+
296  }
+
297 
+
301  unsigned char* ExportToMemory(const char* fileType, int* fileSize) {
+
302  return ::ExportImageToMemory(*this, fileType, fileSize);
+
303  }
+
304 
+
310  void ExportAsCode(const std::string& fileName) const {
+
311  if (!::ExportImageAsCode(*this, fileName.c_str())) {
+
312  throw RaylibException(TextFormat("Failed to export Image code to file: %s", fileName.c_str()));
+
313  }
+
314  }
+
315 
+
316  GETTER(void*, Data, data)
+
317  GETTER(int, Width, width)
+
318  GETTER(int, Height, height)
+
319  GETTER(int, Mipmaps, mipmaps)
+
320  GETTER(int, Format, format)
+
321 
+
327  void SetWidth(int width, int offsetX = 0, int offsetY = 0, ::Color fill = {255, 255, 255, 255}) {
+
328  ResizeCanvas(width, height, offsetX, offsetY, fill);
+
329  }
+
330 
+
336  void SetHeight(int height, int offsetX = 0, int offsetY = 0, ::Color fill = {255, 255, 255, 255}) {
+
337  ResizeCanvas(width, height, offsetX, offsetY, fill);
+
338  }
+
339 
+
343  ::Vector2 GetSize() const { return {static_cast<float>(width), static_cast<float>(height)}; }
+
344 
+
348  ::Image Copy() const { return ::ImageCopy(*this); }
+
349 
+
353  ::Image FromImage(::Rectangle rec) const { return ::ImageFromImage(*this, rec); }
+
354 
+
358  Image& Format(int newFormat) {
+
359  ::ImageFormat(this, newFormat);
+
360  return *this;
+
361  }
+
362 
+
366  Image& ToPOT(::Color fillColor) {
+
367  ::ImageToPOT(this, fillColor);
+
368  return *this;
+
369  }
+
370 
+
374  Image& Crop(::Rectangle crop) {
+
375  ::ImageCrop(this, crop);
+
376  return *this;
+
377  }
+
378 
+
382  Image& AlphaCrop(float threshold) {
+
383  ::ImageAlphaCrop(this, threshold);
+
384  return *this;
+
385  }
+
386 
+
390  Image& AlphaClear(::Color color, float threshold) {
+
391  ::ImageAlphaClear(this, color, threshold);
+
392  return *this;
+
393  }
+
394 
+
398  Image& AlphaMask(const ::Image& alphaMask) {
+
399  ::ImageAlphaMask(this, alphaMask);
+
400  return *this;
+
401  }
+
402 
+ +
407  ::ImageAlphaPremultiply(this);
+
408  return *this;
+
409  }
+
410 
+
414  Image& Crop(int newWidth, int newHeight) { return Crop(0, 0, newWidth, newHeight); }
+
415 
+
419  Image& Crop(::Vector2 size) { return Crop(0, 0, static_cast<int>(size.x), static_cast<int>(size.y)); }
+
420 
+
424  Image& Crop(int offsetX, int offsetY, int newWidth, int newHeight) {
+
425  ::Rectangle rect{
+
426  static_cast<float>(offsetX),
+
427  static_cast<float>(offsetY),
+
428  static_cast<float>(newWidth),
+
429  static_cast<float>(newHeight)};
+
430  ::ImageCrop(this, rect);
+
431  return *this;
+
432  }
+
433 
+
437  Image& Resize(int newWidth, int newHeight) {
+
438  ::ImageResize(this, newWidth, newHeight);
+
439  return *this;
+
440  }
+
441 
+
445  Image& ResizeNN(int newWidth, int newHeight) {
+
446  ::ImageResizeNN(this, newWidth, newHeight);
+
447  return *this;
+
448  }
+
449 
+
453  Image&
+
454  ResizeCanvas(int newWidth, int newHeight, int offsetX = 0, int offsetY = 0, ::Color color = {255, 255, 255, 255}) {
+
455  ::ImageResizeCanvas(this, newWidth, newHeight, offsetX, offsetY, color);
+
456  return *this;
+
457  }
+
458 
+ +
463  ::ImageMipmaps(this);
+
464  return *this;
+
465  }
+
466 
+
470  Image& Dither(int rBpp, int gBpp, int bBpp, int aBpp) {
+
471  ::ImageDither(this, rBpp, gBpp, bBpp, aBpp);
+
472  return *this;
+
473  }
+
474 
+ +
479  ::ImageFlipVertical(this);
+
480  return *this;
+
481  }
+
482 
+ +
487  ::ImageFlipHorizontal(this);
+
488  return *this;
+
489  }
+
490 
+
494  Image& Rotate(int degrees) {
+
495  ::ImageRotate(this, degrees);
+
496  return *this;
+
497  }
+
498 
+ +
503  ::ImageRotateCW(this);
+
504  return *this;
+
505  }
+
506 
+ +
511  ::ImageRotateCCW(this);
+
512  return *this;
+
513  }
+
514 
+
518  Image& ColorTint(::Color color = {255, 255, 255, 255}) {
+
519  ::ImageColorTint(this, color);
+
520  return *this;
+
521  }
+
522 
+ +
527  ::ImageColorInvert(this);
+
528  return *this;
+
529  }
+
530 
+ +
535  ::ImageColorGrayscale(this);
+
536  return *this;
+
537  }
+
538 
+
544  Image& ColorContrast(float contrast) {
+
545  ::ImageColorContrast(this, contrast);
+
546  return *this;
+
547  }
+
548 
+
554  Image& ColorBrightness(int brightness) {
+
555  ::ImageColorBrightness(this, brightness);
+
556  return *this;
+
557  }
+
558 
+
562  Image& ColorReplace(::Color color, ::Color replace) {
+
563  ::ImageColorReplace(this, color, replace);
+
564  return *this;
+
565  }
+
566 
+
572  Rectangle GetAlphaBorder(float threshold) const { return ::GetImageAlphaBorder(*this, threshold); }
+
573 
+
577  raylib::Color GetColor(int x = 0, int y = 0) const { return ::GetImageColor(*this, x, y); }
+
578 
+
582  raylib::Color GetColor(::Vector2 position) const {
+
583  return ::GetImageColor(*this, static_cast<int>(position.x), static_cast<int>(position.y));
+
584  }
+
585 
+
589  Image& ClearBackground(::Color color = {0, 0, 0, 255}) {
+
590  ::ImageClearBackground(this, color);
+
591  return *this;
+
592  }
+
593 
+
597  void DrawPixel(int posX, int posY, ::Color color = {255, 255, 255, 255}) {
+
598  ::ImageDrawPixel(this, posX, posY, color);
+
599  }
+
600 
+
601  void DrawPixel(::Vector2 position, ::Color color = {255, 255, 255, 255}) {
+
602  ::ImageDrawPixelV(this, position, color);
+
603  }
+
604 
+
605  void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, ::Color color = {255, 255, 255, 255}) {
+
606  ::ImageDrawLine(this, startPosX, startPosY, endPosX, endPosY, color);
+
607  }
+
608 
+
609  void DrawLine(::Vector2 start, ::Vector2 end, ::Color color = {255, 255, 255, 255}) {
+
610  ::ImageDrawLineV(this, start, end, color);
+
611  }
+
612 
+
616  void DrawLine(::Vector2 start, ::Vector2 end, int thick, ::Color color = {255, 255, 255, 255}) {
+
617  ImageDrawLineEx(this, start, end, thick, color);
+
618  }
+
619 
+
620  void DrawCircle(int centerX, int centerY, int radius, ::Color color = {255, 255, 255, 255}) {
+
621  ::ImageDrawCircle(this, centerX, centerY, radius, color);
+
622  }
+
623 
+
624  void DrawCircle(::Vector2 center, int radius, ::Color color = {255, 255, 255, 255}) {
+
625  ::ImageDrawCircleV(this, center, radius, color);
+
626  }
+
627 
+
628  void DrawRectangle(int posX, int posY, int width, int height, ::Color color = {255, 255, 255, 255}) {
+
629  ::ImageDrawRectangle(this, posX, posY, width, height, color);
+
630  }
+
631 
+
632  void DrawRectangle(Vector2 position, Vector2 size, ::Color color = {255, 255, 255, 255}) {
+
633  ::ImageDrawRectangleV(this, position, size, color);
+
634  }
+
635 
+
636  void DrawRectangle(::Rectangle rec, ::Color color = {255, 255, 255, 255}) {
+
637  ::ImageDrawRectangleRec(this, rec, color);
+
638  }
+
639 
+
640  void DrawRectangleLines(::Rectangle rec, int thick = 1, ::Color color = {255, 255, 255, 255}) {
+
641  ::ImageDrawRectangleLines(this, rec, thick, color);
+
642  }
+
643 
+
644  // TODO: Add ImageDrawTriangle()
+
645 
+
646  void Draw(const ::Image& src, ::Rectangle srcRec, ::Rectangle dstRec, ::Color tint = {255, 255, 255, 255}) {
+
647  ::ImageDraw(this, src, srcRec, dstRec, tint);
+
648  }
+
649 
+
650  void DrawText(const char* text, ::Vector2 position, int fontSize, ::Color color = {255, 255, 255, 255}) {
+
651  ::ImageDrawText(this, text, static_cast<int>(position.x), static_cast<int>(position.y), fontSize, color);
+
652  }
+
653 
+
654  void DrawText(const std::string& text, ::Vector2 position, int fontSize, ::Color color = {255, 255, 255, 255}) {
+
655  ::ImageDrawText(
+
656  this,
+
657  text.c_str(),
+
658  static_cast<int>(position.x),
+
659  static_cast<int>(position.y),
+
660  fontSize,
+
661  color);
+
662  }
+
663 
+
664  void DrawText(const std::string& text, int x, int y, int fontSize, ::Color color = {255, 255, 255, 255}) {
+
665  ::ImageDrawText(this, text.c_str(), x, y, fontSize, color);
+
666  }
+
667 
+
668  void DrawText(const char* text, int x, int y, int fontSize, ::Color color = {255, 255, 255, 255}) {
+
669  ::ImageDrawText(this, text, x, y, fontSize, color);
+
670  }
+
671 
+
672  void DrawText(
+
673  const ::Font& font,
+
674  const std::string& text,
+
675  ::Vector2 position,
+
676  float fontSize,
+
677  float spacing,
+
678  ::Color tint = {255, 255, 255, 255}) {
+
679  ::ImageDrawTextEx(this, font, text.c_str(), position, fontSize, spacing, tint);
+
680  }
+
681 
+
682  void DrawText(
+
683  const ::Font& font,
+
684  const char* text,
+
685  ::Vector2 position,
+
686  float fontSize,
+
687  float spacing,
+
688  ::Color tint = {255, 255, 255, 255}) {
+
689  ::ImageDrawTextEx(this, font, text, position, fontSize, spacing, tint);
+
690  }
+
691 
+
695  ::Color* LoadColors() const { return ::LoadImageColors(*this); }
+
696 
+
700  ::Color* LoadPalette(int maxPaletteSize, int* colorsCount) const {
+
701  return ::LoadImagePalette(*this, maxPaletteSize, colorsCount);
+
702  }
+
703 
+
707  void UnloadColors(::Color* colors) const { ::UnloadImageColors(colors); }
+
708 
+
712  void UnloadPalette(::Color* colors) const { ::UnloadImagePalette(colors); }
+
713 
+
717  ::Texture2D LoadTexture() const { return ::LoadTextureFromImage(*this); }
+
718 
+
724  operator ::Texture2D() { return LoadTexture(); }
+
725 
+
729  static int GetPixelDataSize(int width, int height, int format = PIXELFORMAT_UNCOMPRESSED_R32G32B32A32) {
+
730  return ::GetPixelDataSize(width, height, format);
+
731  }
+
732 
+
738  int GetPixelDataSize() const { return ::GetPixelDataSize(width, height, format); }
+
739 
+
745  bool IsValid() const { return ::IsImageValid(*this); }
+
746 
+
750  ::Image Channel(int selectedChannel) { return ::ImageFromChannel(*this, selectedChannel); }
+
751 
+
755  void KernelConvolution(const float* kernel, int kernelSize) {
+
756  ::ImageKernelConvolution(this, kernel, kernelSize);
+
757  }
+
758 protected:
+
759  void set(const ::Image& image) {
+
760  data = image.data;
+
761  width = image.width;
+
762  height = image.height;
+
763  mipmaps = image.mipmaps;
+
764  format = image.format;
+
765  }
+
766 };
+
767 } // namespace raylib
+
768 
+
769 using RImage = raylib::Image;
+
770 
+
771 #endif // RAYLIB_CPP_INCLUDE_IMAGE_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:17
+
Image & ResizeCanvas(int newWidth, int newHeight, int offsetX=0, int offsetY=0, ::Color color={255, 255, 255, 255})
Resize canvas and fill with color.
Definition: Image.hpp:454
+
Image & Format(int newFormat)
Convert image data to desired format.
Definition: Image.hpp:358
+
Image & ColorTint(::Color color={255, 255, 255, 255})
Modify image color: tint.
Definition: Image.hpp:518
+
void Load(const std::string &fileName, int *frames)
Load image sequence from file (frames appended to image.data).
Definition: Image.hpp:242
+
Image & Dither(int rBpp, int gBpp, int bBpp, int aBpp)
Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
Definition: Image.hpp:470
+
Image & FlipVertical()
Flip image vertically.
Definition: Image.hpp:478
+
::Image WhiteNoise(int width, int height, float factor)
Generate image: white noise.
Definition: Image.hpp:158
+
Image & ResizeNN(int newWidth, int newHeight)
Resize and image to new size using Nearest-Neighbor scaling algorithm.
Definition: Image.hpp:445
+
Image(const std::string &fileName, int width, int height, int format, int headerSize=0)
Load a raw image from the given file, with the provided width, height, and formats.
Definition: Image.hpp:47
+
Image & Crop(int newWidth, int newHeight)
Crop an image to a new given width and height.
Definition: Image.hpp:414
+
unsigned char * ExportToMemory(const char *fileType, int *fileSize)
Export image to memory buffer.
Definition: Image.hpp:301
+
void Load(const std::string &fileName, int width, int height, int format, int headerSize)
Load image from RAW file data.
Definition: Image.hpp:228
+
Image & Crop(int offsetX, int offsetY, int newWidth, int newHeight)
Crop an image to area defined by a rectangle.
Definition: Image.hpp:424
+
Image & ColorBrightness(int brightness)
Modify image color: brightness.
Definition: Image.hpp:554
+
Image & ColorGrayscale()
Modify image color: grayscale.
Definition: Image.hpp:534
+
Image & Crop(::Vector2 size)
Crop an image to a new given width and height based on a vector.
Definition: Image.hpp:419
+
::Image Checked(int width, int height, int checksX, int checksY, ::Color col1={255, 255, 255, 255}, ::Color col2={0, 0, 0, 255})
Generate image: checked.
Definition: Image.hpp:145
+
void Load(const ::Texture2D &texture)
Load an image from the given file.
Definition: Image.hpp:270
+
::Image Cellular(int width, int height, int tileSize)
Generate image: cellular algorithm.
Definition: Image.hpp:165
+
Image(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load an image from the given file.
Definition: Image.hpp:65
+
void Load(const std::string &fileName)
Load image from file into CPU memory (RAM)
Definition: Image.hpp:214
+
Image & AlphaClear(::Color color, float threshold)
Clear alpha channel to desired color.
Definition: Image.hpp:390
+
Image & AlphaMask(const ::Image &alphaMask)
Apply alpha mask to image.
Definition: Image.hpp:398
+
Image(const ::Texture2D &texture)
Load an image from the given file.
Definition: Image.hpp:74
+
Rectangle GetAlphaBorder(float threshold) const
Get image alpha border rectangle.
Definition: Image.hpp:572
+
::Image FromImage(::Rectangle rec) const
Create an image from another image piece.
Definition: Image.hpp:353
+
int GetPixelDataSize() const
Returns the pixel data size based on the current image.
Definition: Image.hpp:738
+
Image & Crop(::Rectangle crop)
Crop an image to area defined by a rectangle.
Definition: Image.hpp:374
+
void KernelConvolution(const float *kernel, int kernelSize)
Apply custom square convolution kernel to image.
Definition: Image.hpp:755
+
Image & AlphaCrop(float threshold)
Crop image depending on alpha value.
Definition: Image.hpp:382
+
raylib::Color GetColor(::Vector2 position) const
Get image pixel color at vector position.
Definition: Image.hpp:582
+
void SetHeight(int height, int offsetX=0, int offsetY=0, ::Color fill={255, 255, 255, 255})
Set the height of the image canvas.
Definition: Image.hpp:336
+
::Texture2D LoadTexture() const
Load texture from image data.
Definition: Image.hpp:717
+
Image & FlipHorizontal()
Flip image horizontally.
Definition: Image.hpp:486
+
Image & Resize(int newWidth, int newHeight)
Resize and image to new size.
Definition: Image.hpp:437
+
void DrawLine(::Vector2 start, ::Vector2 end, int thick, ::Color color={255, 255, 255, 255})
Description: Draw a line defining thickness within an image.
Definition: Image.hpp:616
+
Image(const std::string &fileName, int *frames)
Load an animation image from the given file.
Definition: Image.hpp:58
+
Image(const std::string &fileName)
Load an image from the given file.
Definition: Image.hpp:38
+
bool IsValid() const
Retrieve whether or not the Image has been loaded.
Definition: Image.hpp:745
+
::Image Color(int width, int height, ::Color color={255, 255, 255, 255})
Generate image: plain color.
Definition: Image.hpp:124
+
Image & Rotate(int degrees)
Rotate image by input angle in degrees (-359 to 359)
Definition: Image.hpp:494
+
::Image Copy() const
Create an image duplicate (useful for transformations)
Definition: Image.hpp:348
+
raylib::Color GetColor(int x=0, int y=0) const
Get image pixel color at (x, y) position.
Definition: Image.hpp:577
+
void Load(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load image from memory buffer, fileType refers to extension: i.e.
Definition: Image.hpp:256
+
::Vector2 GetSize() const
Retrieve the width and height of the image.
Definition: Image.hpp:343
+
Image & RotateCCW()
Rotate image counter-clockwise 90deg.
Definition: Image.hpp:510
+
static int GetPixelDataSize(int width, int height, int format=PIXELFORMAT_UNCOMPRESSED_R32G32B32A32)
Get pixel data size in bytes for certain format.
Definition: Image.hpp:729
+
::Color * LoadPalette(int maxPaletteSize, int *colorsCount) const
Load colors palette from image as a Color array (RGBA - 32bit)
Definition: Image.hpp:700
+
::Image GradientRadial(int width, int height, float density, ::Color inner, ::Color outer)
Generate image: radial gradient.
Definition: Image.hpp:138
+
Image & Mipmaps()
Generate all mipmap levels for a provided image.
Definition: Image.hpp:462
+
::Color * LoadColors() const
Load color data from image as a Color array (RGBA - 32bit)
Definition: Image.hpp:695
+
::Image LoadFromScreen()
Get pixel data from screen buffer and return an Image (screenshot)
Definition: Image.hpp:119
+
void Unload()
Unload image from CPU memory (RAM)
Definition: Image.hpp:280
+
void UnloadColors(::Color *colors) const
Unload color data loaded with LoadImageColors()
Definition: Image.hpp:707
+
::Image Channel(int selectedChannel)
Create an image from a selected channel of another image (GRAYSCALE)
Definition: Image.hpp:750
+
void SetWidth(int width, int offsetX=0, int offsetY=0, ::Color fill={255, 255, 255, 255})
Set the width of the image canvas.
Definition: Image.hpp:327
+
::Image GradientLinear(int width, int height, int direction, ::Color start, ::Color end)
Generate image: linear gradient.
Definition: Image.hpp:131
+
void Export(const std::string &fileName) const
Export image data to file, returns true on success.
Definition: Image.hpp:292
+
Image & AlphaPremultiply()
Premultiply alpha channel.
Definition: Image.hpp:406
+
void ExportAsCode(const std::string &fileName) const
Export image as code file defining an array of bytes, returns true on success.
Definition: Image.hpp:310
+
void DrawPixel(int posX, int posY, ::Color color={255, 255, 255, 255})
Draw pixel within an image.
Definition: Image.hpp:597
+
::Image GetClipboard()
Get clipboard image content.
Definition: Image.hpp:170
+
void UnloadPalette(::Color *colors) const
Unload colors palette loaded with LoadImagePalette()
Definition: Image.hpp:712
+
Image & ToPOT(::Color fillColor)
Convert image to POT (power-of-two)
Definition: Image.hpp:366
+
Image & RotateCW()
Rotate image clockwise 90deg.
Definition: Image.hpp:502
+
Image & ClearBackground(::Color color={0, 0, 0, 255})
Clear image background with given color.
Definition: Image.hpp:589
+
Image & ColorContrast(float contrast)
Modify image color: contrast.
Definition: Image.hpp:544
+
Image & ColorInvert()
Modify image color: invert.
Definition: Image.hpp:526
+
Image & ColorReplace(::Color color, ::Color replace)
Modify image color: replace color.
Definition: Image.hpp:562
+
Exception used for most raylib-related exceptions.
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Texture type.
Definition: Texture.hpp:14
+
Vector2 type.
Definition: Vector2.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
static bool ExportImageAsCode(const Image &image, const std::string &fileName)
Export image as code file (.h) defining an array of bytes.
Definition: Functions.hpp:234
+
static inline ::Image LoadImage(const std::string &fileName)
Load an image.
Definition: Functions.hpp:197
+
static bool ExportImage(const Image &image, const std::string &fileName)
Export image data to file.
Definition: Functions.hpp:227
+
static inline ::Image LoadImageFromMemory(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load image from memory buffer, fileType refers to extension like "png".
Definition: Functions.hpp:220
+
static inline ::Image LoadImageAnim(const std::string &fileName, int *frames)
Load animated image data.
Definition: Functions.hpp:212
+
static inline ::Image LoadImageRaw(const std::string &fileName, int width, int height, int format, int headerSize)
Load an image from RAW file data.
Definition: Functions.hpp:205
+
+ + + + diff --git a/_keyboard_8hpp_source.html b/_keyboard_8hpp_source.html new file mode 100644 index 00000000..25c5993c --- /dev/null +++ b/_keyboard_8hpp_source.html @@ -0,0 +1,129 @@ + + + + + + + +raylib-cpp: Keyboard.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Keyboard.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_KEYBOARD_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_KEYBOARD_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 
+
6 namespace raylib {
+
10 namespace Keyboard {
+
14 [[maybe_unused]] RLCPPAPI inline bool IsKeyPressed(int key) {
+
15  return ::IsKeyPressed(key);
+
16 }
+
17 
+
21 [[maybe_unused]] RLCPPAPI inline bool IsKeyPressedRepeat(int key) {
+
22  return ::IsKeyPressedRepeat(key);
+
23 }
+
24 
+
28 [[maybe_unused]] RLCPPAPI inline bool IsKeyDown(int key) {
+
29  return ::IsKeyDown(key);
+
30 }
+
31 
+
35 [[maybe_unused]] RLCPPAPI inline bool IsKeyReleased(int key) {
+
36  return ::IsKeyReleased(key);
+
37 }
+
38 
+
42 [[maybe_unused]] RLCPPAPI inline bool IsKeyUp(int key) {
+
43  return ::IsKeyUp(key);
+
44 }
+
45 
+
50 [[maybe_unused]] RLCPPAPI inline int GetKeyPressed() {
+
51  return ::GetKeyPressed();
+
52 }
+
53 
+
57 [[maybe_unused]] RLCPPAPI inline int GetCharPressed() {
+
58  return ::GetCharPressed();
+
59 }
+
60 } // namespace Keyboard
+
61 } // namespace raylib
+
62 namespace RKeyboard = raylib::Keyboard;
+
63 
+
64 #endif // RAYLIB_CPP_INCLUDE_KEYBOARD_HPP_
+
Input-related functions: keyboard.
Definition: Keyboard.hpp:10
+
RLCPPAPI bool IsKeyPressedRepeat(int key)
Detect if a key has been pressed again (Only PLATFORM_DESKTOP)
Definition: Keyboard.hpp:21
+
RLCPPAPI bool IsKeyDown(int key)
Detect if a key is being pressed.
Definition: Keyboard.hpp:28
+
RLCPPAPI int GetCharPressed()
Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empt...
Definition: Keyboard.hpp:57
+
RLCPPAPI bool IsKeyUp(int key)
Detect if a key is NOT being pressed.
Definition: Keyboard.hpp:42
+
RLCPPAPI bool IsKeyReleased(int key)
Detect if a key has been released once.
Definition: Keyboard.hpp:35
+
RLCPPAPI bool IsKeyPressed(int key)
Detect if a key has been pressed once.
Definition: Keyboard.hpp:14
+
RLCPPAPI int GetKeyPressed()
Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty.
Definition: Keyboard.hpp:50
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_material_8hpp_source.html b/_material_8hpp_source.html new file mode 100644 index 00000000..e587b13f --- /dev/null +++ b/_material_8hpp_source.html @@ -0,0 +1,190 @@ + + + + + + + +raylib-cpp: Material.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Material.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
+
3 
+
4 #include <string>
+
5 #include <vector>
+
6 
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
14 class Material : public ::Material {
+
15 public:
+
16  Material(const ::Material& material) { set(material); }
+
17 
+
21  Material() { set(LoadMaterialDefault()); }
+
22 
+
23  Material(const Material&) = delete;
+
24 
+
25  Material(Material&& other) {
+
26  set(other);
+
27 
+
28  other.maps = nullptr;
+
29  other.shader = {};
+
30  other.params[0] = 0.0f;
+
31  other.params[1] = 0.0f;
+
32  other.params[2] = 0.0f;
+
33  other.params[3] = 0.0f;
+
34  }
+
35 
+
36  ~Material() { Unload(); }
+
37 
+
41  static std::vector<Material> Load(const std::string& fileName) {
+
42  int count = 0;
+
43  // TODO(RobLoach): Material::Load() possibly leaks the materials array.
+
44  ::Material* materials = ::LoadMaterials(fileName.c_str(), &count);
+
45  return std::vector<Material>(materials, materials + count);
+
46  }
+
47 
+
48  GETTERSETTER(::Shader, Shader, shader)
+
49  GETTERSETTER(::MaterialMap*, Maps, maps)
+
50  // TODO(RobLoach): Resolve the Material params being a float[4].
+
51  // GETTERSETTER(float[4], Params, params)
+
52 
+
53  Material& operator=(const ::Material& material) {
+
54  set(material);
+
55  return *this;
+
56  }
+
57 
+
58  Material& operator=(const Material&) = delete;
+
59 
+
60  Material& operator=(Material&& other) noexcept {
+
61  if (this == &other) {
+
62  return *this;
+
63  }
+
64 
+
65  Unload();
+
66  set(other);
+
67 
+
68  other.maps = nullptr;
+
69  other.shader = {};
+
70 
+
71  return *this;
+
72  }
+
73 
+
77  void Unload() {
+
78  if (maps != nullptr) {
+
79  ::UnloadMaterial(*this);
+
80  maps = nullptr;
+
81  }
+
82  }
+
83 
+
87  Material& SetTexture(int mapType, const ::Texture2D& texture) {
+
88  ::SetMaterialTexture(this, mapType, texture);
+
89  return *this;
+
90  }
+
91 
+
95  void DrawMesh(const ::Mesh& mesh, ::Matrix transform) const { ::DrawMesh(mesh, *this, transform); }
+
96 
+
100  void DrawMesh(const ::Mesh& mesh, ::Matrix* transforms, int instances) const {
+
101  ::DrawMeshInstanced(mesh, *this, transforms, instances);
+
102  }
+
103 
+
107  bool IsValid() const { return ::IsMaterialValid(*this); }
+
108 protected:
+
109  void set(const ::Material& material) {
+
110  shader = material.shader;
+
111  maps = material.maps;
+
112  params[0] = material.params[0];
+
113  params[1] = material.params[1];
+
114  params[2] = material.params[2];
+
115  params[3] = material.params[3];
+
116  }
+
117 };
+
118 } // namespace raylib
+
119 
+ +
121 
+
122 #endif // RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
+
Material type (generic)
Definition: Material.hpp:14
+
bool IsValid() const
Check if material is ready.
Definition: Material.hpp:107
+
Material & SetTexture(int mapType, const ::Texture2D &texture)
Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
Definition: Material.hpp:87
+
void Unload()
Unload material from memory.
Definition: Material.hpp:77
+
Material()
Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
Definition: Material.hpp:21
+
void DrawMesh(const ::Mesh &mesh, ::Matrix *transforms, int instances) const
Draw multiple mesh instances with material and different transforms.
Definition: Material.hpp:100
+
void DrawMesh(const ::Mesh &mesh, ::Matrix transform) const
Draw a 3d mesh with material and transform.
Definition: Material.hpp:95
+
static std::vector< Material > Load(const std::string &fileName)
Load materials from model file.
Definition: Material.hpp:41
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Shader type (generic)
Definition: Shader.hpp:15
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_matrix_8hpp_source.html b/_matrix_8hpp_source.html new file mode 100644 index 00000000..08b4dbc3 --- /dev/null +++ b/_matrix_8hpp_source.html @@ -0,0 +1,266 @@ + + + + + + + +raylib-cpp: Matrix.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Matrix.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_MATRIX_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MATRIX_HPP_
+
3 
+
4 #include "./raylib-cpp-utils.hpp"
+
5 #include "./raylib.hpp"
+
6 #include "./raymath.hpp"
+
7 
+
8 #ifndef RAYLIB_CPP_NO_MATH
+
9 #include <cmath>
+
10 #endif
+
11 
+
12 namespace raylib {
+
16 class Matrix : public ::Matrix {
+
17 public:
+
18  Matrix(const ::Matrix& mat)
+
19  : ::Matrix{
+
20  mat.m0,
+
21  mat.m4,
+
22  mat.m8,
+
23  mat.m12,
+
24  mat.m1,
+
25  mat.m5,
+
26  mat.m9,
+
27  mat.m13,
+
28  mat.m2,
+
29  mat.m6,
+
30  mat.m10,
+
31  mat.m14,
+
32  mat.m3,
+
33  mat.m7,
+
34  mat.m11,
+
35  mat.m15} {
+
36  // Nothing.
+
37  }
+
38 
+
39  Matrix(
+
40  float m0 = 0,
+
41  float m4 = 0,
+
42  float m8 = 0,
+
43  float m12 = 0,
+
44  float m1 = 0,
+
45  float m5 = 0,
+
46  float m9 = 0,
+
47  float m13 = 0,
+
48  float m2 = 0,
+
49  float m6 = 0,
+
50  float m10 = 0,
+
51  float m14 = 0,
+
52  float m3 = 0,
+
53  float m7 = 0,
+
54  float m11 = 0,
+
55  float m15 = 0)
+
56  : ::Matrix{m0, m4, m8, m12, m1, m5, m9, m13, m2, m6, m10, m14, m3, m7, m11, m15} {
+
57  // Nothing.
+
58  }
+
59 
+
60  GETTERSETTER(float, M0, m0)
+
61  GETTERSETTER(float, M1, m1)
+
62  GETTERSETTER(float, M2, m2)
+
63  GETTERSETTER(float, M3, m3)
+
64  GETTERSETTER(float, M4, m4)
+
65  GETTERSETTER(float, M5, m5)
+
66  GETTERSETTER(float, M6, m6)
+
67  GETTERSETTER(float, M7, m7)
+
68  GETTERSETTER(float, M8, m8)
+
69  GETTERSETTER(float, M9, m9)
+
70  GETTERSETTER(float, M10, m10)
+
71  GETTERSETTER(float, M11, m11)
+
72  GETTERSETTER(float, M12, m12)
+
73  GETTERSETTER(float, M13, m13)
+
74  GETTERSETTER(float, M14, m14)
+
75  GETTERSETTER(float, M15, m15)
+
76 
+
77  Matrix& operator=(const ::Matrix& matrix) {
+
78  set(matrix);
+
79  return *this;
+
80  }
+
81 
+
82  Matrix& operator=(const Matrix& matrix) {
+
83  set(matrix);
+
84  return *this;
+
85  }
+
86 
+
87  bool operator==(const ::Matrix& other) {
+
88  return m0 == other.m0 && m1 == other.m1 && m2 == other.m2 && m3 == other.m3 && m4 == other.m4 &&
+
89  m5 == other.m5 && m6 == other.m6 && m7 == other.m7 && m8 == other.m8 && m9 == other.m9 &&
+
90  m10 == other.m10 && m11 == other.m11 && m12 == other.m12 && m13 == other.m13 && m14 == other.m14 &&
+
91  m15 == other.m15;
+
92  }
+
93 
+
94  bool operator!=(const ::Matrix& other) { return !(*this == other); }
+
95 
+
96 #ifndef RAYLIB_CPP_NO_MATH
+
100  float Trace() const { return ::MatrixTrace(*this); }
+
101 
+
105  Matrix Transpose() const { return ::MatrixTranspose(*this); }
+
106 
+
107  Matrix Invert() const { return ::MatrixInvert(*this); }
+
108 
+
109  static Matrix Identity() { return ::MatrixIdentity(); }
+
110 
+
111  Matrix Add(const ::Matrix& right) { return ::MatrixAdd(*this, right); }
+
112 
+
113  Matrix operator+(const ::Matrix& matrix) { return ::MatrixAdd(*this, matrix); }
+
114 
+
115  Matrix Subtract(const ::Matrix& right) { return ::MatrixSubtract(*this, right); }
+
116 
+
117  Matrix operator-(const ::Matrix& matrix) { return ::MatrixSubtract(*this, matrix); }
+
118 
+
119  static Matrix Translate(float x, float y, float z) { return ::MatrixTranslate(x, y, z); }
+
120 
+
121  static Matrix Rotate(Vector3 axis, float angle) { return ::MatrixRotate(axis, angle); }
+
122 
+
123  static Matrix RotateXYZ(Vector3 angle) { return ::MatrixRotateXYZ(angle); }
+
124 
+
125  static Matrix RotateX(float angle) { return ::MatrixRotateX(angle); }
+
126 
+
127  static Matrix RotateY(float angle) { return ::MatrixRotateY(angle); }
+
128 
+
129  static Matrix RotateZ(float angle) { return ::MatrixRotateZ(angle); }
+
130 
+
131  static Matrix Scale(float x, float y, float z) { return ::MatrixScale(x, y, z); }
+
132 
+
133  Matrix Multiply(const ::Matrix& right) const { return ::MatrixMultiply(*this, right); }
+
134 
+
135  Matrix operator*(const ::Matrix& matrix) { return ::MatrixMultiply(*this, matrix); }
+
136 
+
137  static Matrix Frustum(double left, double right, double bottom, double top, double near, double far) {
+
138  return ::MatrixFrustum(left, right, bottom, top, near, far);
+
139  }
+
140 
+
141  static Matrix Perspective(double fovy, double aspect, double near, double far) {
+
142  return ::MatrixPerspective(fovy, aspect, near, far);
+
143  }
+
144 
+
145  static Matrix Ortho(double left, double right, double bottom, double top, double near, double far) {
+
146  return ::MatrixOrtho(left, right, bottom, top, near, far);
+
147  }
+
148 
+
149  static Matrix LookAt(Vector3 eye, Vector3 target, Vector3 up) { return ::MatrixLookAt(eye, target, up); }
+
150 
+
151  float16 ToFloatV() const { return ::MatrixToFloatV(*this); }
+
152 
+
153  operator float16() { return ToFloatV(); }
+
154 
+
158  Matrix& SetShaderValue(const ::Shader& shader, int uniformLoc) {
+
159  ::SetShaderValueMatrix(shader, uniformLoc, *this);
+
160  return *this;
+
161  }
+
162 
+
163  static Matrix GetCamera(const ::Camera& camera) { return ::GetCameraMatrix(camera); }
+
164 
+
165  static Matrix GetCamera(const ::Camera2D& camera) { return ::GetCameraMatrix2D(camera); }
+
166 
+
167 #endif
+
168 protected:
+
169  void set(const ::Matrix& mat) {
+
170  m0 = mat.m0;
+
171  m1 = mat.m1;
+
172  m2 = mat.m2;
+
173  m3 = mat.m3;
+
174  m4 = mat.m4;
+
175  m5 = mat.m5;
+
176  m6 = mat.m6;
+
177  m7 = mat.m7;
+
178  m8 = mat.m8;
+
179  m9 = mat.m9;
+
180  m10 = mat.m10;
+
181  m11 = mat.m11;
+
182  m12 = mat.m12;
+
183  m13 = mat.m13;
+
184  m14 = mat.m14;
+
185  m15 = mat.m15;
+
186  }
+
187 };
+
188 } // namespace raylib
+
189 
+
190 using RMatrix = raylib::Matrix;
+
191 
+
192 #endif // RAYLIB_CPP_INCLUDE_MATRIX_HPP_
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Matrix & SetShaderValue(const ::Shader &shader, int uniformLoc)
Set shader uniform value (matrix 4x4)
Definition: Matrix.hpp:158
+
float Trace() const
Returns the trace of the matrix (sum of the values along the diagonal)
Definition: Matrix.hpp:100
+
Matrix Transpose() const
Transposes provided matrix.
Definition: Matrix.hpp:105
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_mesh_8hpp_source.html b/_mesh_8hpp_source.html new file mode 100644 index 00000000..21cfd07a --- /dev/null +++ b/_mesh_8hpp_source.html @@ -0,0 +1,164 @@ + + + + + + + +raylib-cpp: Mesh.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Mesh.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_MESH_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MESH_HPP_
+
3 
+
4 #include <string>
+
5 #include <vector>
+
6 
+
7 #include "./BoundingBox.hpp"
+
8 #include "./MeshUnmanaged.hpp"
+
9 #include "./Model.hpp"
+
10 #include "./raylib-cpp-utils.hpp"
+
11 #include "./raylib.hpp"
+
12 
+
13 namespace raylib {
+
21 class Mesh : public MeshUnmanaged {
+
22 public:
+ +
24 
+
28  Mesh(const Mesh&) = delete;
+
29 
+
33  Mesh& operator=(const Mesh&) = delete;
+
34 
+
38  Mesh(Mesh&& other) {
+
39  set(other);
+
40 
+
41  other.vertexCount = 0;
+
42  other.triangleCount = 0;
+
43  other.vertices = nullptr;
+
44  other.texcoords = nullptr;
+
45  other.texcoords2 = nullptr;
+
46  other.normals = nullptr;
+
47  other.tangents = nullptr;
+
48  other.colors = nullptr;
+
49  other.indices = nullptr;
+
50  other.animVertices = nullptr;
+
51  other.animNormals = nullptr;
+
52  other.boneIds = nullptr;
+
53  other.boneWeights = nullptr;
+
54  other.vaoId = 0;
+
55  other.vboId = nullptr;
+
56  }
+
57 
+
58  Mesh& operator=(Mesh&& other) noexcept {
+
59  if (this == &other) {
+
60  return *this;
+
61  }
+
62 
+
63  Unload();
+
64  set(other);
+
65 
+
66  other.vertexCount = 0;
+
67  other.triangleCount = 0;
+
68  other.vertices = nullptr;
+
69  other.texcoords = nullptr;
+
70  other.texcoords2 = nullptr;
+
71  other.normals = nullptr;
+
72  other.tangents = nullptr;
+
73  other.colors = nullptr;
+
74  other.indices = nullptr;
+
75  other.animVertices = nullptr;
+
76  other.animNormals = nullptr;
+
77  other.boneIds = nullptr;
+
78  other.boneWeights = nullptr;
+
79  other.vaoId = 0;
+
80  other.vboId = nullptr;
+
81 
+
82  return *this;
+
83  }
+
84 
+
85  ~Mesh() { Unload(); }
+
86 };
+
87 } // namespace raylib
+
88 
+
89 using RMesh = raylib::Mesh;
+
90 
+
91 #endif // RAYLIB_CPP_INCLUDE_MESH_HPP_
+
Vertex data defining a mesh.
Definition: Mesh.hpp:21
+
Mesh(const Mesh &)=delete
Explicitly forbid the copy constructor.
+
Mesh(Mesh &&other)
Move constructor.
Definition: Mesh.hpp:38
+
Mesh & operator=(const Mesh &)=delete
Explicitly forbid copy assignment.
+
Vertex data defining a mesh, not managed by C++ RAII.
+
MeshUnmanaged()
Default texture constructor.
+
void Unload()
Unload mesh from memory (RAM and/or VRAM)
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_mesh_unmanaged_8hpp_source.html b/_mesh_unmanaged_8hpp_source.html new file mode 100644 index 00000000..c357a442 --- /dev/null +++ b/_mesh_unmanaged_8hpp_source.html @@ -0,0 +1,277 @@ + + + + + + + +raylib-cpp: MeshUnmanaged.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
MeshUnmanaged.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_MESHUNMANAGED_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MESHUNMANAGED_HPP_
+
3 
+
4 #include <string>
+
5 #include <vector>
+
6 
+
7 #include "./BoundingBox.hpp"
+
8 #include "./Model.hpp"
+
9 #include "./raylib-cpp-utils.hpp"
+
10 #include "./raylib.hpp"
+
11 
+
12 namespace raylib {
+
13 
+
21 class MeshUnmanaged : public ::Mesh {
+
22 public:
+ +
27  vertexCount = 0;
+
28  triangleCount = 0;
+
29  vertices = nullptr;
+
30  texcoords = nullptr;
+
31  texcoords2 = nullptr;
+
32  normals = nullptr;
+
33  tangents = nullptr;
+
34  colors = nullptr;
+
35  indices = nullptr;
+
36  animVertices = nullptr;
+
37  animNormals = nullptr;
+
38  boneIds = nullptr;
+
39  boneWeights = nullptr;
+
40  vaoId = 0;
+
41  vboId = nullptr;
+
42  }
+
43 
+
44  MeshUnmanaged(const ::Mesh& mesh) { set(mesh); }
+
45 
+
46  MeshUnmanaged(::Mesh&& mesh) { set(mesh); }
+
47 
+
51  // static std::vector<Mesh> Load(const std::string& fileName) {
+
52  // int count = 0;
+
53  // ::Mesh* meshes = LoadMeshes(fileName.c_str(), &count);
+
54  // return std::vector<Mesh>(meshes, meshes + count);
+
55  // }
+
56 
+
60  static ::Mesh Poly(int sides, float radius) { return ::GenMeshPoly(sides, radius); }
+
61 
+
65  static ::Mesh Plane(float width, float length, int resX, int resZ) {
+
66  return ::GenMeshPlane(width, length, resX, resZ);
+
67  }
+
68 
+
72  static ::Mesh Cube(float width, float height, float length) { return ::GenMeshCube(width, height, length); }
+
73 
+
77  static ::Mesh Sphere(float radius, int rings, int slices) { return ::GenMeshSphere(radius, rings, slices); }
+
78 
+
82  static ::Mesh HemiSphere(float radius, int rings, int slices) { return ::GenMeshHemiSphere(radius, rings, slices); }
+
83 
+
87  static ::Mesh Cylinder(float radius, float height, int slices) { return ::GenMeshCylinder(radius, height, slices); }
+
88 
+
92  static ::Mesh Cone(float radius, float height, int slices) { return ::GenMeshCone(radius, height, slices); }
+
93 
+
97  static ::Mesh Torus(float radius, float size, int radSeg, int sides) {
+
98  return ::GenMeshTorus(radius, size, radSeg, sides);
+
99  }
+
100 
+
104  static ::Mesh Knot(float radius, float size, int radSeg, int sides) {
+
105  return ::GenMeshKnot(radius, size, radSeg, sides);
+
106  }
+
107 
+
111  static ::Mesh Heightmap(const ::Image& heightmap, ::Vector3 size) { return ::GenMeshHeightmap(heightmap, size); }
+
112 
+
116  static ::Mesh Cubicmap(const ::Image& cubicmap, ::Vector3 cubeSize) {
+
117  return ::GenMeshCubicmap(cubicmap, cubeSize);
+
118  }
+
119 
+
120  GETTERSETTER(int, VertexCount, vertexCount)
+
121  GETTERSETTER(int, TriangleCount, triangleCount)
+
122  GETTERSETTER(float*, Vertices, vertices)
+
123  GETTERSETTER(float*, TexCoords, texcoords)
+
124  GETTERSETTER(float*, TexCoords2, texcoords2)
+
125  GETTERSETTER(float*, Normals, normals)
+
126  GETTERSETTER(float*, Tangents, tangents)
+
127  GETTERSETTER(unsigned char*, Colors, colors)
+
128  GETTERSETTER(unsigned short*, Indices, indices) // NOLINT
+
129  GETTERSETTER(float*, AnimVertices, animVertices)
+
130  GETTERSETTER(float*, AnimNormals, animNormals)
+
131  GETTERSETTER(unsigned char*, BoneIds, boneIds)
+
132  GETTERSETTER(float*, BoneWeights, boneWeights)
+
133  GETTERSETTER(unsigned int, VaoId, vaoId)
+
134  GETTERSETTER(unsigned int*, VboId, vboId)
+
135 
+
136  MeshUnmanaged& operator=(const ::Mesh& mesh) {
+
137  set(mesh);
+
138  return *this;
+
139  }
+
140 
+
144  void Unload() {
+
145  if (vboId != nullptr) {
+
146  ::UnloadMesh(*this);
+
147  vboId = nullptr;
+
148  }
+
149  }
+
150 
+
154  void Upload(bool dynamic = false) { ::UploadMesh(this, dynamic); }
+
155 
+
159  void UpdateBuffer(int index, void* data, int dataSize, int offset = 0) {
+
160  ::UpdateMeshBuffer(*this, index, data, dataSize, offset);
+
161  }
+
162 
+
166  void Draw(const ::Material& material, const ::Matrix& transform) const { ::DrawMesh(*this, material, transform); }
+
167 
+
171  void Draw(const ::Material& material, ::Matrix* transforms, int instances) const {
+
172  ::DrawMeshInstanced(*this, material, transforms, instances);
+
173  }
+
174 
+
180  void Export(const std::string& fileName) {
+
181  if (!::ExportMesh(*this, fileName.c_str())) {
+
182  throw RaylibException("Failed to export the Mesh");
+
183  }
+
184  }
+
185 
+
191  void ExportCode(const std::string& fileName) {
+
192  if (!::ExportMeshAsCode(*this, fileName.c_str())) {
+
193  throw RaylibException("Failed to export the Mesh");
+
194  }
+
195  }
+
196 
+
200  raylib::BoundingBox BoundingBox() const { return ::GetMeshBoundingBox(*this); }
+
201 
+
205  operator raylib::BoundingBox() { return BoundingBox(); }
+
206 
+ +
211  ::GenMeshTangents(this);
+
212  return *this;
+
213  }
+
214 
+
218  raylib::Model LoadModelFrom() const { return ::LoadModelFromMesh(*this); }
+
219 
+
223  operator raylib::Model() { return ::LoadModelFromMesh(*this); }
+
224 
+
228  bool IsValid() { return ::IsModelValid(*this); }
+
229 
+
230 protected:
+
231  void set(const ::Mesh& mesh) {
+
232  vertexCount = mesh.vertexCount;
+
233  triangleCount = mesh.triangleCount;
+
234  vertices = mesh.vertices;
+
235  texcoords = mesh.texcoords;
+
236  texcoords2 = mesh.texcoords2;
+
237  normals = mesh.normals;
+
238  tangents = mesh.tangents;
+
239  colors = mesh.colors;
+
240  indices = mesh.indices;
+
241  animVertices = mesh.animVertices;
+
242  animNormals = mesh.animNormals;
+
243  boneIds = mesh.boneIds;
+
244  boneWeights = mesh.boneWeights;
+
245  vaoId = mesh.vaoId;
+
246  vboId = mesh.vboId;
+
247  }
+
248 };
+
249 } // namespace raylib
+
250 
+ +
252 
+
253 #endif // RAYLIB_CPP_INCLUDE_MESHUNMANAGED_HPP_
+
Bounding box type.
Definition: BoundingBox.hpp:11
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Vertex data defining a mesh.
Definition: Mesh.hpp:21
+
Vertex data defining a mesh, not managed by C++ RAII.
+
::Mesh Cone(float radius, float height, int slices)
Generate cone/pyramid mesh.
+
::Mesh Sphere(float radius, int rings, int slices)
Generate sphere mesh (standard sphere)
+
operator raylib::BoundingBox()
Compute mesh bounding box limits.
+
::Mesh Cubicmap(const ::Image &cubicmap, ::Vector3 cubeSize)
Generate cubes-based map mesh from image data.
+
::Mesh Cube(float width, float height, float length)
Generate cuboid mesh.
+
void Export(const std::string &fileName)
Export mesh data to file.
+
raylib::Model LoadModelFrom() const
Load model from generated mesh.
+
void Upload(bool dynamic=false)
Upload mesh vertex data to GPU (VRAM)
+
bool IsValid()
Returns whether or not the Mesh is valid.
+
Mesh & GenTangents()
Compute mesh tangents.
+
::Mesh Heightmap(const ::Image &heightmap, ::Vector3 size)
Generate heightmap mesh from image data.
+
::Mesh Poly(int sides, float radius)
Load meshes from model file.
+
raylib::BoundingBox BoundingBox() const
Compute mesh bounding box limits.
+
MeshUnmanaged()
Default texture constructor.
+
void Unload()
Unload mesh from memory (RAM and/or VRAM)
+
::Mesh Knot(float radius, float size, int radSeg, int sides)
Generate trefoil knot mesh.
+
void ExportCode(const std::string &fileName)
Export mesh as code file (.h) defining multiple arrays of vertex attributes.
+
void UpdateBuffer(int index, void *data, int dataSize, int offset=0)
Upload mesh vertex data to GPU (VRAM)
+
void Draw(const ::Material &material, const ::Matrix &transform) const
Draw a 3d mesh with material and transform.
+
::Mesh Cylinder(float radius, float height, int slices)
Generate cylinder mesh.
+
::Mesh HemiSphere(float radius, int rings, int slices)
Generate half-sphere mesh (no bottom cap)
+
::Mesh Torus(float radius, float size, int radSeg, int sides)
Generate torus mesh.
+
::Mesh Plane(float width, float length, int resX, int resZ)
Generate plane mesh (with subdivisions)
+
void Draw(const ::Material &material, ::Matrix *transforms, int instances) const
Draw multiple mesh instances with material and different transforms.
+
Model type.
Definition: Model.hpp:15
+
Exception used for most raylib-related exceptions.
+
Vector3 type.
Definition: Vector3.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_model_8hpp_source.html b/_model_8hpp_source.html new file mode 100644 index 00000000..826254d1 --- /dev/null +++ b/_model_8hpp_source.html @@ -0,0 +1,297 @@ + + + + + + + +raylib-cpp: Model.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Model.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_MODEL_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MODEL_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./RaylibException.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
11 class Mesh;
+
15 class Model : public ::Model {
+
16 public:
+
17  Model() {
+
18  // Nothing.
+
19  }
+
20 
+
21  /*
+
22  * Copy a model from another model.
+
23  */
+
24  Model(const ::Model& model) { set(model); }
+
25 
+
26  /*
+
27  * Load a model from a file.
+
28  *
+
29  * @throws raylib::RaylibException Throws if failed to load the Modal.
+
30  */
+
31  Model(const std::string& fileName) { Load(fileName); }
+
32 
+
33  /*
+
34  * Load a model from a mesh.
+
35  *
+
36  * @throws raylib::RaylibException Throws if failed to load the Modal.
+
37  */
+
38  Model(const ::Mesh& mesh) { Load(mesh); }
+
39 
+
47  Model(const raylib::Mesh& mesh) = delete;
+
48 
+
49  ~Model() { Unload(); }
+
50 
+
51  Model(const Model&) = delete;
+
52 
+
53  Model(Model&& other) {
+
54  set(other);
+
55 
+
56  other.meshCount = 0;
+
57  other.materialCount = 0;
+
58  other.meshes = nullptr;
+
59  other.materials = nullptr;
+
60  other.meshMaterial = nullptr;
+
61  other.boneCount = 0;
+
62  other.bones = nullptr;
+
63  other.bindPose = nullptr;
+
64  }
+
65 
+
66  GETTERSETTER(::Matrix, Transform, transform)
+
67  GETTERSETTER(int, MeshCount, meshCount)
+
68  GETTERSETTER(int, MaterialCount, materialCount)
+
69  GETTERSETTER(::Mesh*, Meshes, meshes)
+
70  GETTERSETTER(::Material*, Materials, materials)
+
71  GETTERSETTER(int*, MeshMaterial, meshMaterial)
+
72  GETTERSETTER(int, BoneCount, boneCount)
+
73  GETTERSETTER(::BoneInfo*, Bones, bones)
+
74  GETTERSETTER(::Transform*, BindPose, bindPose)
+
75 
+
76  Model& operator=(const ::Model& model) {
+
77  set(model);
+
78  return *this;
+
79  }
+
80 
+
81  Model& operator=(const Model&) = delete;
+
82 
+
83  Model& operator=(Model&& other) noexcept {
+
84  if (this == &other) {
+
85  return *this;
+
86  }
+
87 
+
88  Unload();
+
89  set(other);
+
90 
+
91  other.meshCount = 0;
+
92  other.materialCount = 0;
+
93  other.meshes = nullptr;
+
94  other.materials = nullptr;
+
95  other.meshMaterial = nullptr;
+
96  other.boneCount = 0;
+
97  other.bones = nullptr;
+
98  other.bindPose = nullptr;
+
99 
+
100  return *this;
+
101  }
+
102 
+
106  void Unload() {
+
107  if (meshes != nullptr || materials != nullptr) {
+
108  ::UnloadModel(*this);
+
109  meshes = nullptr;
+
110  materials = nullptr;
+
111  }
+
112  }
+
113 
+
117  Model& SetMeshMaterial(int meshId, int materialId) {
+
118  ::SetModelMeshMaterial(this, meshId, materialId);
+
119  return *this;
+
120  }
+
121 
+
125  Model& UpdateAnimation(const ::ModelAnimation& anim, int frame) {
+
126  ::UpdateModelAnimation(*this, anim, frame);
+
127  return *this;
+
128  }
+
129 
+
133  Model& UpdateAnimationBones(const ::ModelAnimation& anim, int frame) {
+
134  ::UpdateModelAnimationBones(*this, anim, frame);
+
135  return *this;
+
136  }
+
137 
+
141  bool IsModelAnimationValid(const ::ModelAnimation& anim) const { return ::IsModelAnimationValid(*this, anim); }
+
142 
+
146  void Draw(::Vector3 position, float scale = 1.0f, ::Color tint = {255, 255, 255, 255}) const {
+
147  ::DrawModel(*this, position, scale, tint);
+
148  }
+
149 
+
153  void Draw(
+
154  ::Vector3 position,
+
155  ::Vector3 rotationAxis,
+
156  float rotationAngle = 0.0f,
+
157  ::Vector3 scale = {1.0f, 1.0f, 1.0f},
+
158  ::Color tint = {255, 255, 255, 255}) const {
+
159  ::DrawModelEx(*this, position, rotationAxis, rotationAngle, scale, tint);
+
160  }
+
161 
+
165  void DrawWires(::Vector3 position, float scale = 1.0f, ::Color tint = {255, 255, 255, 255}) const {
+
166  ::DrawModelWires(*this, position, scale, tint);
+
167  }
+
168 
+
172  void DrawWires(
+
173  ::Vector3 position,
+
174  ::Vector3 rotationAxis,
+
175  float rotationAngle = 0.0f,
+
176  ::Vector3 scale = {1.0f, 1.0f, 1.0f},
+
177  ::Color tint = {255, 255, 255, 255}) const {
+
178  ::DrawModelWiresEx(*this, position, rotationAxis, rotationAngle, scale, tint);
+
179  }
+
180 
+
184  void DrawPoints(::Vector3 position, float scale = 1.0f, ::Color tint = {255, 255, 255, 255}) {
+
185  ::DrawModelPoints(*this, position, scale, tint);
+
186  }
+
187 
+
191  void DrawPoints(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle = 0.0f, ::Vector3 scale = {1.0f, 1.0f, 1.0f}, ::Color tint = {255, 255, 255, 255}) {
+
192  ::DrawModelPointsEx(*this, position, rotationAxis, rotationAngle, scale, tint);
+
193  }
+
194 
+
198  BoundingBox GetBoundingBox() const { return ::GetModelBoundingBox(*this); }
+
199 
+
203  operator BoundingBox() const { return ::GetModelBoundingBox(*this); }
+
204 
+
208  bool IsValid() const { return ::IsModelValid(*this); }
+
209 
+
215  void Load(const std::string& fileName) {
+
216  set(::LoadModel(fileName.c_str()));
+
217  if (!IsValid()) {
+
218  throw RaylibException("Failed to load Model from " + fileName);
+
219  }
+
220  }
+
221 
+
227  void Load(const ::Mesh& mesh) {
+
228  set(::LoadModelFromMesh(mesh));
+
229  if (!IsValid()) {
+
230  throw RaylibException("Failed to load Model from Mesh");
+
231  }
+
232  }
+
233 protected:
+
234  void set(const ::Model& model) {
+
235  transform = model.transform;
+
236 
+
237  meshCount = model.meshCount;
+
238  materialCount = model.materialCount;
+
239  meshes = model.meshes;
+
240  materials = model.materials;
+
241  meshMaterial = model.meshMaterial;
+
242 
+
243  boneCount = model.boneCount;
+
244  bones = model.bones;
+
245  bindPose = model.bindPose;
+
246  }
+
247 };
+
248 
+
249 } // namespace raylib
+
250 
+
251 using RModel = raylib::Model;
+
252 
+
253 #endif // RAYLIB_CPP_INCLUDE_MODEL_HPP_
+
Bounding box type.
Definition: BoundingBox.hpp:11
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Material type (generic)
Definition: Material.hpp:14
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Vertex data defining a mesh.
Definition: Mesh.hpp:21
+
Model type.
Definition: Model.hpp:15
+
void Load(const std::string &fileName)
Loads a Model from the given file.
Definition: Model.hpp:215
+
void Draw(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255}) const
Draw a model (with texture if set)
Definition: Model.hpp:146
+
void DrawPoints(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
Draw a model as points.
Definition: Model.hpp:184
+
void Draw(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255}) const
Draw a model with extended parameters.
Definition: Model.hpp:153
+
void Load(const ::Mesh &mesh)
Loads a Model from the given Mesh.
Definition: Model.hpp:227
+
void Unload()
Unload model (including meshes) from memory (RAM and/or VRAM)
Definition: Model.hpp:106
+
bool IsModelAnimationValid(const ::ModelAnimation &anim) const
Check model animation skeleton match.
Definition: Model.hpp:141
+
Model & UpdateAnimationBones(const ::ModelAnimation &anim, int frame)
Update model animation pose.
Definition: Model.hpp:133
+
void DrawWires(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255}) const
Draw a model wires (with texture if set) with extended parameters.
Definition: Model.hpp:172
+
Model & UpdateAnimation(const ::ModelAnimation &anim, int frame)
Update model animation pose.
Definition: Model.hpp:125
+
bool IsValid() const
Determines whether or not the Model has data in it.
Definition: Model.hpp:208
+
void DrawPoints(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
Draw a model as points.
Definition: Model.hpp:191
+
Model & SetMeshMaterial(int meshId, int materialId)
Set material for a mesh.
Definition: Model.hpp:117
+
void DrawWires(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255}) const
Draw a model wires (with texture if set)
Definition: Model.hpp:165
+
Model(const raylib::Mesh &mesh)=delete
The Model constructor with a Mesh() is removed.
+
BoundingBox GetBoundingBox() const
Compute model bounding box limits (considers all meshes)
Definition: Model.hpp:198
+
Exception used for most raylib-related exceptions.
+
Vector3 type.
Definition: Vector3.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_model_animation_8hpp_source.html b/_model_animation_8hpp_source.html new file mode 100644 index 00000000..7de08afb --- /dev/null +++ b/_model_animation_8hpp_source.html @@ -0,0 +1,185 @@ + + + + + + + +raylib-cpp: ModelAnimation.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ModelAnimation.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
+
3 
+
4 #include <string>
+
5 #include <vector>
+
6 
+
7 #include "./Mesh.hpp"
+
8 #include "./raylib-cpp-utils.hpp"
+
9 #include "./raylib.hpp"
+
10 
+
11 namespace raylib {
+ +
16 public:
+
17  ModelAnimation(const ::ModelAnimation& model) { set(model); }
+
18 
+
19  ModelAnimation(const ModelAnimation&) = delete;
+
20 
+ +
22  set(other);
+
23 
+
24  other.boneCount = 0;
+
25  other.frameCount = 0;
+
26  other.bones = nullptr;
+
27  other.framePoses = nullptr;
+
28  }
+
29 
+
30  ~ModelAnimation() { Unload(); }
+
31 
+
35  static std::vector<ModelAnimation> Load(const std::string& fileName) {
+
36  int count = 0;
+
37  ::ModelAnimation* modelAnimations = ::LoadModelAnimations(fileName.c_str(), &count);
+
38  std::vector<ModelAnimation> mats(modelAnimations, modelAnimations + count);
+
39 
+
40  RL_FREE(modelAnimations);
+
41 
+
42  return mats;
+
43  }
+
44 
+
45  GETTERSETTER(int, BoneCount, boneCount)
+
46  GETTERSETTER(::BoneInfo*, Bones, bones)
+
47  GETTERSETTER(int, FrameCount, frameCount)
+
48  GETTERSETTER(::Transform**, FramePoses, framePoses)
+
49 
+
50  ModelAnimation& operator=(const ::ModelAnimation& model) {
+
51  set(model);
+
52  return *this;
+
53  }
+
54 
+
55  ModelAnimation& operator=(const ModelAnimation&) = delete;
+
56 
+
57  ModelAnimation& operator=(ModelAnimation&& other) noexcept {
+
58  if (this == &other) {
+
59  return *this;
+
60  }
+
61 
+
62  Unload();
+
63  set(other);
+
64 
+
65  other.boneCount = 0;
+
66  other.frameCount = 0;
+
67  other.bones = nullptr;
+
68  other.framePoses = nullptr;
+
69 
+
70  return *this;
+
71  }
+
72 
+
76  void Unload() { ::UnloadModelAnimation(*this); }
+
77 
+
81  ModelAnimation& Update(const ::Model& model, int frame) {
+
82  ::UpdateModelAnimation(model, *this, frame);
+
83  return *this;
+
84  }
+
85 
+
89  ModelAnimation& UpdateBones(const ::Model& model, int frame) {
+
90  ::UpdateModelAnimationBones(model, *this, frame);
+
91  return *this;
+
92  }
+
93 
+
97  bool IsValid(const ::Model& model) const { return ::IsModelAnimationValid(model, *this); }
+
98 protected:
+
99  void set(const ::ModelAnimation& model) {
+
100  boneCount = model.boneCount;
+
101  frameCount = model.frameCount;
+
102  bones = model.bones;
+
103  framePoses = model.framePoses;
+
104 
+
105  // Duplicate the name. TextCopy() uses the null terminator, which we ignore here.
+
106  for (int i = 0; i < 32; i++) {
+
107  name[i] = model.name[i];
+
108  }
+
109  }
+
110 };
+
111 } // namespace raylib
+
112 
+ +
114 
+
115 #endif // RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
+ +
bool IsValid(const ::Model &model) const
Check model animation skeleton match.
+
ModelAnimation & Update(const ::Model &model, int frame)
Update model animation pose.
+
ModelAnimation & UpdateBones(const ::Model &model, int frame)
Update model animation mesh bone matrices (GPU skinning)
+
static std::vector< ModelAnimation > Load(const std::string &fileName)
Load model animations from file.
+
void Unload()
Unload animation data.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_mouse_8hpp_source.html b/_mouse_8hpp_source.html new file mode 100644 index 00000000..48ffe420 --- /dev/null +++ b/_mouse_8hpp_source.html @@ -0,0 +1,205 @@ + + + + + + + +raylib-cpp: Mouse.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Mouse.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_MOUSE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MOUSE_HPP_
+
3 
+
4 #include "./Vector2.hpp"
+
5 #include "./raylib.hpp"
+
6 
+
7 namespace raylib {
+
11 namespace Mouse {
+
15 [[maybe_unused]] RLCPPAPI inline bool IsButtonPressed(int button) {
+
16  return ::IsMouseButtonPressed(button);
+
17 }
+
18 
+
22 [[maybe_unused]] RLCPPAPI inline bool IsButtonDown(int button) {
+
23  return ::IsMouseButtonDown(button);
+
24 }
+
25 
+
29 [[maybe_unused]] RLCPPAPI inline bool IsButtonReleased(int button) {
+
30  return ::IsMouseButtonReleased(button);
+
31 }
+
32 
+
33 [[maybe_unused]] RLCPPAPI inline bool IsButtonUp(int button) {
+
34  return ::IsMouseButtonUp(button);
+
35 }
+
36 
+
37 [[maybe_unused]] RLCPPAPI inline int GetX() {
+
38  return ::GetMouseX();
+
39 }
+
40 
+
41 [[maybe_unused]] RLCPPAPI inline int GetY() {
+
42  return ::GetMouseY();
+
43 }
+
44 
+
45 [[maybe_unused]] RLCPPAPI inline void SetX(int x) {
+
46  ::SetMousePosition(x, GetY());
+
47 }
+
48 
+
49 [[maybe_unused]] RLCPPAPI inline void SetY(int y) {
+
50  ::SetMousePosition(GetX(), y);
+
51 }
+
52 
+
53 [[maybe_unused]] RLCPPAPI inline Vector2 GetPosition() {
+
54  return ::GetMousePosition();
+
55 }
+
56 
+
57 [[maybe_unused]] RLCPPAPI inline void SetPosition(int x, int y) {
+
58  ::SetMousePosition(x, y);
+
59 }
+
60 
+
61 [[maybe_unused]] RLCPPAPI inline void SetPosition(::Vector2 position) {
+
62  ::SetMousePosition(static_cast<int>(position.x), static_cast<int>(position.y));
+
63 }
+
64 
+
68 [[maybe_unused]] RLCPPAPI inline Vector2 GetDelta() {
+
69  return ::GetMouseDelta();
+
70 }
+
71 
+
72 [[maybe_unused]] RLCPPAPI inline void SetOffset(int offsetX = 0, int offsetY = 0) {
+
73  ::SetMouseOffset(offsetX, offsetY);
+
74 }
+
75 
+
76 [[maybe_unused]] RLCPPAPI inline void SetOffset(::Vector2 offset) {
+
77  ::SetMouseOffset(static_cast<int>(offset.x), static_cast<int>(offset.y));
+
78 }
+
79 
+
80 [[maybe_unused]] RLCPPAPI inline void SetScale(float scaleX = 1.0f, float scaleY = 1.0f) {
+
81  ::SetMouseScale(scaleX, scaleY);
+
82 }
+
83 
+
84 [[maybe_unused]] RLCPPAPI inline void SetScale(::Vector2 scale) {
+
85  ::SetMouseScale(scale.x, scale.y);
+
86 }
+
87 
+
91 [[maybe_unused]] RLCPPAPI inline float GetWheelMove() {
+
92  return ::GetMouseWheelMove();
+
93 }
+
94 
+
100 [[maybe_unused]] RLCPPAPI inline Vector2 GetWheelMoveV() {
+
101  return GetMouseWheelMoveV();
+
102 }
+
103 
+
109 [[maybe_unused]] RLCPPAPI inline void SetCursor(int cursor = MOUSE_CURSOR_DEFAULT) {
+
110  ::SetMouseCursor(cursor);
+
111 }
+
112 
+
116 [[maybe_unused]] RLCPPAPI inline int GetTouchX() {
+
117  return ::GetTouchX();
+
118 }
+
119 
+
123 [[maybe_unused]] RLCPPAPI inline int GetTouchY() {
+
124  return ::GetTouchY();
+
125 }
+
126 
+
130 [[maybe_unused]] RLCPPAPI inline Vector2 GetTouchPosition(int index) {
+
131  return ::GetTouchPosition(index);
+
132 }
+
133 
+
137 [[maybe_unused]] RLCPPAPI inline Ray GetRay(::Vector2 mousePosition, const ::Camera& camera) {
+
138  return ::GetMouseRay(mousePosition, camera);
+
139 }
+
140 
+
144 [[maybe_unused]] RLCPPAPI inline Ray GetRay(const ::Camera& camera) {
+
145  return ::GetMouseRay(::GetMousePosition(), camera);
+
146 }
+
147 } // namespace Mouse
+
148 } // namespace raylib
+
149 
+
150 namespace RMouse = raylib::Mouse;
+
151 
+
152 #endif // RAYLIB_CPP_INCLUDE_MOUSE_HPP_
+
Ray type (useful for raycast)
Definition: Ray.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:18
+
Input-related functions: mouse.
Definition: Mouse.hpp:11
+
RLCPPAPI Ray GetRay(::Vector2 mousePosition, const ::Camera &camera)
Get a ray trace from mouse position.
Definition: Mouse.hpp:137
+
RLCPPAPI void SetCursor(int cursor=MOUSE_CURSOR_DEFAULT)
Sets the current mouse cursor icon.
Definition: Mouse.hpp:109
+
RLCPPAPI Vector2 GetWheelMoveV()
Get mouse wheel movement for both X and Y.
Definition: Mouse.hpp:100
+
RLCPPAPI int GetTouchX()
Get touch position X for touch point 0 (relative to screen size)
Definition: Mouse.hpp:116
+
RLCPPAPI bool IsButtonDown(int button)
Detect if a mouse button is being pressed.
Definition: Mouse.hpp:22
+
RLCPPAPI float GetWheelMove()
Get mouse wheel movement for X or Y, whichever is larger.
Definition: Mouse.hpp:91
+
RLCPPAPI bool IsButtonReleased(int button)
Detect if a mouse button has been released once.
Definition: Mouse.hpp:29
+
RLCPPAPI int GetTouchY()
Get touch position Y for touch point 0 (relative to screen size)
Definition: Mouse.hpp:123
+
RLCPPAPI Vector2 GetDelta()
Get mouse delta between frames.
Definition: Mouse.hpp:68
+
RLCPPAPI bool IsButtonPressed(int button)
Detect if a mouse button has been pressed once.
Definition: Mouse.hpp:15
+
RLCPPAPI Vector2 GetTouchPosition(int index)
Get touch position XY for a touch point index (relative to screen size)
Definition: Mouse.hpp:130
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_music_8hpp_source.html b/_music_8hpp_source.html new file mode 100644 index 00000000..a88da4a7 --- /dev/null +++ b/_music_8hpp_source.html @@ -0,0 +1,256 @@ + + + + + + + +raylib-cpp: Music.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Music.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_MUSIC_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_MUSIC_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./RaylibException.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
14 class Music : public ::Music {
+
15 public:
+
16  Music(
+
17  ::AudioStream stream = {nullptr, nullptr, 0, 0, 0},
+
18  unsigned int frameCount = 0,
+
19  bool looping = false,
+
20  int ctxType = 0,
+
21  void* ctxData = nullptr)
+
22  : ::Music{stream, frameCount, looping, ctxType, ctxData} {}
+
23 
+
24  Music(const ::Music& music) { set(music); }
+
25 
+
31  Music(const std::string& fileName) { Load(fileName); }
+
32 
+
38  Music(const std::string& fileType, unsigned char* data, int dataSize) { Load(fileType, data, dataSize); }
+
39 
+
40  Music(const Music&) = delete;
+
41 
+
42  Music(Music&& other) {
+
43  set(other);
+
44 
+
45  other.stream = {};
+
46  other.frameCount = 0;
+
47  other.looping = false;
+
48  other.ctxType = 0;
+
49  other.ctxData = nullptr;
+
50  }
+
51 
+
55  ~Music() { Unload(); }
+
56 
+
57  GETTER(::AudioStream, Stream, stream)
+
58  GETTER(unsigned int, FrameCount, frameCount)
+
59  GETTERSETTER(bool, Looping, looping)
+
60  GETTER(int, CtxType, ctxType)
+
61  GETTER(void*, CtxData, ctxData)
+
62 
+
63  Music& operator=(const ::Music& music) {
+
64  set(music);
+
65  return *this;
+
66  }
+
67 
+
68  Music& operator=(const Music&) = delete;
+
69 
+
70  Music& operator=(Music&& other) noexcept {
+
71  if (this == &other) {
+
72  return *this;
+
73  }
+
74 
+
75  Unload();
+
76  set(other);
+
77 
+
78  other.ctxType = 0;
+
79  other.ctxData = nullptr;
+
80  other.looping = false;
+
81  other.frameCount = 0;
+
82  other.stream = {};
+
83 
+
84  return *this;
+
85  }
+
86 
+
90  void Unload() { ::UnloadMusicStream(*this); }
+
91 
+
95  Music& Play() {
+
96  ::PlayMusicStream(*this);
+
97  return *this;
+
98  }
+
99 
+ +
104  ::UpdateMusicStream(*this);
+
105  return *this;
+
106  }
+
107 
+
111  Music& Stop() {
+
112  ::StopMusicStream(*this);
+
113  return *this;
+
114  }
+
115 
+ +
120  ::PauseMusicStream(*this);
+
121  return *this;
+
122  }
+
123 
+ +
128  ::ResumeMusicStream(*this);
+
129  return *this;
+
130  }
+
131 
+
135  Music& Seek(float position) {
+
136  SeekMusicStream(*this, position);
+
137  return *this;
+
138  }
+
139 
+
143  bool IsPlaying() const { return ::IsMusicStreamPlaying(*this); }
+
144 
+
148  Music& SetVolume(float volume) {
+
149  ::SetMusicVolume(*this, volume);
+
150  return *this;
+
151  }
+
152 
+
156  Music& SetPitch(float pitch) {
+
157  ::SetMusicPitch(*this, pitch);
+
158  return *this;
+
159  }
+
160 
+
164  Music& SetPan(float pan = 0.5f) {
+
165  ::SetMusicPan(*this, pan);
+
166  return *this;
+
167  }
+
168 
+
172  float GetTimeLength() const { return ::GetMusicTimeLength(*this); }
+
173 
+
177  float GetTimePlayed() const { return ::GetMusicTimePlayed(*this); }
+
178 
+
184  void Load(const std::string& fileName) {
+
185  set(::LoadMusicStream(fileName.c_str()));
+
186  if (!IsValid()) {
+
187  throw RaylibException(TextFormat("Failed to load Music from file: %s", fileName.c_str()));
+
188  }
+
189  }
+
190 
+
196  void Load(const std::string& fileType, unsigned char* data, int dataSize) {
+
197  set(::LoadMusicStreamFromMemory(fileType.c_str(), data, dataSize));
+
198  if (!IsValid()) {
+
199  throw RaylibException(TextFormat("Failed to load Music from %s file dat", fileType.c_str()));
+
200  }
+
201  }
+
202 
+
208  bool IsValid() const { return ::IsMusicValid(*this); }
+
209 protected:
+
210  void set(const ::Music& music) {
+
211  stream = music.stream;
+
212  frameCount = music.frameCount;
+
213  looping = music.looping;
+
214  ctxType = music.ctxType;
+
215  ctxData = music.ctxData;
+
216  }
+
217 };
+
218 } // namespace raylib
+
219 
+
220 using RMusic = raylib::Music;
+
221 
+
222 #endif // RAYLIB_CPP_INCLUDE_MUSIC_HPP_
+
AudioStream management functions.
Definition: AudioStream.hpp:12
+
Music stream type (audio file streaming from memory)
Definition: Music.hpp:14
+
bool IsPlaying() const
Check if music is playing.
Definition: Music.hpp:143
+
Music & Update()
Updates buffers for music streaming.
Definition: Music.hpp:103
+
void Load(const std::string &fileType, unsigned char *data, int dataSize)
Load music stream from memory.
Definition: Music.hpp:196
+
Music(const std::string &fileName)
Load music stream from file.
Definition: Music.hpp:31
+
float GetTimePlayed() const
Get current music time played (in seconds)
Definition: Music.hpp:177
+
bool IsValid() const
Retrieve whether or not the Music has been loaded.
Definition: Music.hpp:208
+
Music & Resume()
Resume music playing.
Definition: Music.hpp:127
+
Music & Stop()
Stop music playing.
Definition: Music.hpp:111
+
~Music()
Unload music stream.
Definition: Music.hpp:55
+
Music & Pause()
Pause music playing.
Definition: Music.hpp:119
+
Music & SetPitch(float pitch)
Set pitch for music.
Definition: Music.hpp:156
+
Music(const std::string &fileType, unsigned char *data, int dataSize)
Load music stream from memory.
Definition: Music.hpp:38
+
Music & Play()
Start music playing.
Definition: Music.hpp:95
+
Music & Seek(float position)
Seek music to a position (in seconds)
Definition: Music.hpp:135
+
void Load(const std::string &fileName)
Load music stream from file.
Definition: Music.hpp:184
+
Music & SetVolume(float volume)
Set volume for music.
Definition: Music.hpp:148
+
float GetTimeLength() const
Get music time length (in seconds)
Definition: Music.hpp:172
+
Music & SetPan(float pan=0.5f)
Set pan for a music (0.5 is center)
Definition: Music.hpp:164
+
void Unload()
Unload music stream.
Definition: Music.hpp:90
+
Exception used for most raylib-related exceptions.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_ray_8hpp_source.html b/_ray_8hpp_source.html new file mode 100644 index 00000000..a4a6f576 --- /dev/null +++ b/_ray_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + + +raylib-cpp: Ray.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Ray.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_RAY_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_RAY_HPP_
+
3 
+
4 #include "./RayCollision.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./raylib.hpp"
+
7 
+
8 namespace raylib {
+
12 class Ray : public ::Ray {
+
13 public:
+
14  Ray(const ::Ray& ray) { set(ray); }
+
15 
+
16  Ray(::Vector3 position = {0.0f, 0.0f, 0.0f}, ::Vector3 direction = {0.0f, 0.0f, 0.0f})
+
17  : ::Ray{position, direction} {
+
18  // Nothing.
+
19  }
+
20 
+
21  Ray(::Vector2 mousePosition, const ::Camera& camera) { set(::GetMouseRay(mousePosition, camera)); }
+
22 
+
23  Ray& operator=(const ::Ray& ray) {
+
24  set(ray);
+
25  return *this;
+
26  }
+
27 
+
28  GETTERSETTER(::Vector3, Position, position)
+
29  GETTERSETTER(::Vector3, Direction, direction)
+
30 
+
34  void Draw(::Color color) const { DrawRay(*this, color); }
+
35 
+
39  RayCollision GetCollision(::Vector3 center, float radius) const {
+
40  return ::GetRayCollisionSphere(*this, center, radius);
+
41  }
+
42 
+
46  RayCollision GetCollision(const ::BoundingBox& box) const { return ::GetRayCollisionBox(*this, box); }
+
47 
+
51  RayCollision GetCollision(const ::Mesh& mesh, const ::Matrix& transform) const {
+
52  return ::GetRayCollisionMesh(*this, mesh, transform);
+
53  }
+
54 
+
58  RayCollision GetCollision(::Vector3 p1, ::Vector3 p2, ::Vector3 p3) const {
+
59  return ::GetRayCollisionTriangle(*this, p1, p2, p3);
+
60  }
+
61 
+
65  RayCollision GetCollision(::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4) const {
+
66  return ::GetRayCollisionQuad(*this, p1, p2, p3, p4);
+
67  }
+
68 
+
72  static Ray GetMouse(::Vector2 mousePosition, const ::Camera& camera) {
+
73  return ::GetMouseRay(mousePosition, camera);
+
74  }
+
75 
+
79  static Ray GetMouse(const ::Camera& camera) { return ::GetMouseRay(::GetMousePosition(), camera); }
+
80 protected:
+
81  void set(const ::Ray& ray) {
+
82  position = ray.position;
+
83  direction = ray.direction;
+
84  }
+
85 };
+
86 } // namespace raylib
+
87 
+
88 using RRay = raylib::Ray;
+
89 
+
90 #endif // RAYLIB_CPP_INCLUDE_RAY_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Raycast hit information.
+
Ray type (useful for raycast)
Definition: Ray.hpp:12
+
RayCollision GetCollision(::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4) const
Get collision info between ray and quad.
Definition: Ray.hpp:65
+
static Ray GetMouse(::Vector2 mousePosition, const ::Camera &camera)
Get a ray trace from mouse position.
Definition: Ray.hpp:72
+
RayCollision GetCollision(::Vector3 center, float radius) const
Get collision information between ray and sphere.
Definition: Ray.hpp:39
+
RayCollision GetCollision(::Vector3 p1, ::Vector3 p2, ::Vector3 p3) const
Get collision info between ray and triangle.
Definition: Ray.hpp:58
+
void Draw(::Color color) const
Draw a ray line.
Definition: Ray.hpp:34
+
static Ray GetMouse(const ::Camera &camera)
Get a ray trace from mouse position.
Definition: Ray.hpp:79
+
RayCollision GetCollision(const ::Mesh &mesh, const ::Matrix &transform) const
Get collision information between ray and mesh.
Definition: Ray.hpp:51
+
RayCollision GetCollision(const ::BoundingBox &box) const
Detect collision between ray and box.
Definition: Ray.hpp:46
+
Vector2 type.
Definition: Vector2.hpp:18
+
Vector3 type.
Definition: Vector3.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_ray_collision_8hpp_source.html b/_ray_collision_8hpp_source.html new file mode 100644 index 00000000..94078fbd --- /dev/null +++ b/_ray_collision_8hpp_source.html @@ -0,0 +1,145 @@ + + + + + + + +raylib-cpp: RayCollision.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
RayCollision.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_RAYCOLLISION_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_RAYCOLLISION_HPP_
+
3 
+
4 #include "./raylib-cpp-utils.hpp"
+
5 #include "./raylib.hpp"
+
6 
+
7 namespace raylib {
+
11 class RayCollision : public ::RayCollision {
+
12 public:
+
13  RayCollision(const ::RayCollision& ray) { set(ray); }
+
14 
+
15  RayCollision(bool hit, float distance, ::Vector3 point, ::Vector3 normal)
+
16  : ::RayCollision{hit, distance, point, normal} {
+
17  // Nothing.
+
18  }
+
19 
+
23  RayCollision(const ::Ray& ray, const ::BoundingBox& box) { set(::GetRayCollisionBox(ray, box)); }
+
24 
+
28  RayCollision(const ::Ray& ray, const ::Mesh& mesh, const ::Matrix& transform) {
+
29  set(::GetRayCollisionMesh(ray, mesh, transform));
+
30  }
+
31 
+
35  RayCollision(const ::Ray& ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4) {
+
36  set(::GetRayCollisionQuad(ray, p1, p2, p3, p4));
+
37  }
+
38 
+
42  RayCollision(const ::Ray& ray, ::Vector3 center, float radius) {
+
43  set(::GetRayCollisionSphere(ray, center, radius));
+
44  }
+
45 
+
49  RayCollision(const ::Ray& ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3) {
+
50  set(::GetRayCollisionTriangle(ray, p1, p2, p3));
+
51  }
+
52 
+
53  RayCollision& operator=(const ::RayCollision& ray) {
+
54  set(ray);
+
55  return *this;
+
56  }
+
57 
+
58  GETTERSETTER(bool, Hit, hit)
+
59  GETTERSETTER(float, Distance, distance)
+
60  GETTERSETTER(::Vector3, Position, point)
+
61  GETTERSETTER(::Vector3, Normal, normal)
+
62 protected:
+
63  void set(const ::RayCollision& ray) {
+
64  hit = ray.hit;
+
65  distance = ray.distance;
+
66  point = ray.point;
+
67  normal = ray.normal;
+
68  }
+
69 };
+
70 } // namespace raylib
+
71 
+ +
73 
+
74 #endif // RAYLIB_CPP_INCLUDE_RAYCOLLISION_HPP_
+
Raycast hit information.
+
RayCollision(const ::Ray &ray, const ::Mesh &mesh, const ::Matrix &transform)
Get collision info between ray and mesh.
+
RayCollision(const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)
Get collision info between ray and triangle.
+
RayCollision(const ::Ray &ray, const ::BoundingBox &box)
Get collision info between ray and bounding box.
+
RayCollision(const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4)
Get collision info between ray and quad.
+
RayCollision(const ::Ray &ray, ::Vector3 center, float radius)
Get collision info between ray and sphere.
+
Vector3 type.
Definition: Vector3.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_raylib_exception_8hpp_source.html b/_raylib_exception_8hpp_source.html new file mode 100644 index 00000000..b0c5d169 --- /dev/null +++ b/_raylib_exception_8hpp_source.html @@ -0,0 +1,108 @@ + + + + + + + +raylib-cpp: RaylibException.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
RaylibException.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_RAYLIBEXCEPTION_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_RAYLIBEXCEPTION_HPP_
+
3 
+
4 #include <stdexcept>
+
5 #include <string>
+
6 
+
7 #include "./raylib.hpp"
+
8 
+
9 namespace raylib {
+
13 class RaylibException : public std::runtime_error {
+
14 public:
+
20  RaylibException(std::string message) throw() : std::runtime_error(message) {
+
21  // Nothing
+
22  }
+
23 
+
29  void TraceLog(int logLevel = LOG_ERROR) { ::TraceLog(logLevel, std::runtime_error::what()); }
+
30 };
+
31 
+
32 } // namespace raylib
+
33 
+ +
35 
+
36 #endif // RAYLIB_CPP_INCLUDE_RAYLIBEXCEPTION_HPP_
+
Exception used for most raylib-related exceptions.
+
RaylibException(std::string message)
Construct a runtime exception with the given message.
+
void TraceLog(int logLevel=LOG_ERROR)
Outputs the exception message to TraceLog().
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_rectangle_8hpp_source.html b/_rectangle_8hpp_source.html new file mode 100644 index 00000000..3e26bbf8 --- /dev/null +++ b/_rectangle_8hpp_source.html @@ -0,0 +1,227 @@ + + + + + + + +raylib-cpp: Rectangle.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Rectangle.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
+
3 
+
4 #include "./Vector2.hpp"
+
5 #include "./raylib-cpp-utils.hpp"
+
6 #include "./raylib.hpp"
+
7 
+
8 namespace raylib {
+
12 class Rectangle : public ::Rectangle {
+
13 public:
+
14  Rectangle(const ::Rectangle& rect) : ::Rectangle{rect.x, rect.y, rect.width, rect.height} {}
+
15 
+
16  Rectangle(float x, float y, float width, float height) : ::Rectangle{x, y, width, height} {}
+
17  Rectangle(float x, float y, float width) : ::Rectangle{x, y, width, 0} {}
+
18  Rectangle(float x, float y) : ::Rectangle{x, y, 0, 0} {}
+
19  Rectangle(float x) : ::Rectangle{x, 0, 0, 0} {}
+
20  Rectangle() : ::Rectangle{0, 0, 0, 0} {}
+
21 
+
22  Rectangle(::Vector2 position, ::Vector2 size) : ::Rectangle{position.x, position.y, size.x, size.y} {}
+
23  Rectangle(::Vector2 size) : ::Rectangle{0, 0, size.x, size.y} {}
+
24  Rectangle(::Vector4 rect) : ::Rectangle{rect.x, rect.y, rect.z, rect.w} {}
+
25 
+
26  GETTERSETTER(float, X, x)
+
27  GETTERSETTER(float, Y, y)
+
28  GETTERSETTER(float, Width, width)
+
29  GETTERSETTER(float, Height, height)
+
30 
+
31  Rectangle& operator=(const ::Rectangle& rect) {
+
32  set(rect);
+
33  return *this;
+
34  }
+
35 
+
36  ::Vector4 ToVector4() { return {x, y, width, height}; }
+
37 
+
38  operator ::Vector4() const { return {x, y, width, height}; }
+
39 
+
43  void Draw(::Color color) const { ::DrawRectangleRec(*this, color); }
+
44 
+
45  void Draw(::Vector2 origin, float rotation, ::Color color) const {
+
46  ::DrawRectanglePro(*this, origin, rotation, color);
+
47  }
+
48 
+
49  void DrawGradientV(::Color color1, ::Color color2) const {
+
50  ::DrawRectangleGradientV(
+
51  static_cast<int>(x),
+
52  static_cast<int>(y),
+
53  static_cast<int>(width),
+
54  static_cast<int>(height),
+
55  color1,
+
56  color2);
+
57  }
+
58 
+
59  void DrawGradientH(::Color color1, ::Color color2) const {
+
60  ::DrawRectangleGradientH(
+
61  static_cast<int>(x),
+
62  static_cast<int>(y),
+
63  static_cast<int>(width),
+
64  static_cast<int>(height),
+
65  color1,
+
66  color2);
+
67  }
+
68 
+
69  void DrawGradient(::Color topLeft, ::Color bottomLeft, ::Color topRight, ::Color bottomRight) const {
+
70  ::DrawRectangleGradientEx(*this, topLeft, bottomLeft, topRight, bottomRight);
+
71  }
+
72 
+
73  void DrawLines(::Color color) const {
+
74  ::DrawRectangleLines(
+
75  static_cast<int>(x),
+
76  static_cast<int>(y),
+
77  static_cast<int>(width),
+
78  static_cast<int>(height),
+
79  color);
+
80  }
+
81 
+
82  void DrawLines(::Color color, float lineThick) const { ::DrawRectangleLinesEx(*this, lineThick, color); }
+
83 
+
84  void DrawRounded(float roundness, int segments, ::Color color) const {
+
85  ::DrawRectangleRounded(*this, roundness, segments, color);
+
86  }
+
87 
+
88  void DrawRoundedLines(float roundness, int segments, ::Color color) const {
+
89  ::DrawRectangleRoundedLines(*this, roundness, segments, color);
+
90  }
+
91 
+
92  void DrawRoundedLines(float roundness, int segments, float lineThick, ::Color color) const {
+
93  DrawRectangleRoundedLinesEx(*this, roundness, segments, lineThick, color);
+
94  }
+
95 
+
99  bool CheckCollision(::Rectangle rec2) const { return ::CheckCollisionRecs(*this, rec2); }
+
100 
+
104  ::Rectangle GetCollision(::Rectangle rec2) const { return ::GetCollisionRec(*this, rec2); }
+
105 
+
109  bool CheckCollision(::Vector2 point) const { return ::CheckCollisionPointRec(point, *this); }
+
110 
+
114  bool CheckCollision(::Vector2 center, float radius) const {
+
115  return ::CheckCollisionCircleRec(center, radius, *this);
+
116  }
+
117 
+
118  Vector2 GetSize() const { return {width, height}; }
+
119 
+
120  Rectangle& SetSize(float newWidth, float newHeight) {
+
121  width = newWidth;
+
122  height = newHeight;
+
123  return *this;
+
124  }
+
125 
+
126  Rectangle& SetSize(const ::Vector2& size) { return SetSize(size.x, size.y); }
+
127 
+
128  Rectangle& SetShapesTexture(const ::Texture2D& texture) {
+
129  ::SetShapesTexture(texture, *this);
+
130  return *this;
+
131  }
+
132 
+
133  Vector2 GetPosition() const { return {x, y}; }
+
134 
+
135  Rectangle& SetPosition(float newX, float newY) {
+
136  x = newX;
+
137  y = newY;
+
138  return *this;
+
139  }
+
140 
+
141  Rectangle& SetPosition(const ::Vector2& position) { return SetPosition(position.x, position.y); }
+
142 protected:
+
143  void set(const ::Rectangle& rect) {
+
144  x = rect.x;
+
145  y = rect.y;
+
146  width = rect.width;
+
147  height = rect.height;
+
148  }
+
149 };
+
150 } // namespace raylib
+
151 
+ +
153 
+
154 #endif // RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Rectangle type.
Definition: Rectangle.hpp:12
+
::Rectangle GetCollision(::Rectangle rec2) const
Get collision rectangle for two rectangles collision.
Definition: Rectangle.hpp:104
+
bool CheckCollision(::Rectangle rec2) const
Check collision between two rectangles.
Definition: Rectangle.hpp:99
+
void Draw(::Color color) const
Draw a color-filled rectangle.
Definition: Rectangle.hpp:43
+
bool CheckCollision(::Vector2 center, float radius) const
Check collision between circle and rectangle.
Definition: Rectangle.hpp:114
+
bool CheckCollision(::Vector2 point) const
Check if point is inside rectangle.
Definition: Rectangle.hpp:109
+
Vector2 type.
Definition: Vector2.hpp:18
+
Vector4 type.
Definition: Vector4.hpp:19
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_render_texture_8hpp_source.html b/_render_texture_8hpp_source.html new file mode 100644 index 00000000..a73133f1 --- /dev/null +++ b/_render_texture_8hpp_source.html @@ -0,0 +1,188 @@ + + + + + + + +raylib-cpp: RenderTexture.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
RenderTexture.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
+
3 
+
4 #include "./RaylibException.hpp"
+
5 #include "./TextureUnmanaged.hpp"
+
6 #include "./raylib-cpp-utils.hpp"
+
7 #include "./raylib.hpp"
+
8 
+
9 namespace raylib {
+ +
14 public:
+
18  RenderTexture() { id = 0; }
+
19 
+
20  RenderTexture(const ::RenderTexture& renderTexture) { set(renderTexture); }
+
21 
+
22  RenderTexture(unsigned int id, const ::Texture& texture, const ::Texture& depth)
+
23  : ::RenderTexture{id, texture, depth} {}
+
24 
+
28  RenderTexture(int width, int height) { set(::LoadRenderTexture(width, height)); }
+
29 
+
30  RenderTexture(const RenderTexture&) = delete;
+
31 
+
32  RenderTexture(RenderTexture&& other) {
+
33  set(other);
+
34 
+
35  other.id = 0;
+
36  other.texture = {};
+
37  other.depth = {};
+
38  }
+
39 
+
40  GETTER(unsigned int, Id, id)
+
41 
+
42 
+
45  TextureUnmanaged GetTexture() { return texture; }
+
46 
+
47  void SetTexture(const ::Texture& newTexture) { texture = newTexture; }
+
48 
+
52  TextureUnmanaged GetDepth() { return depth; }
+
53 
+
54  void SetDepth(const ::Texture& newDepth) { depth = newDepth; }
+
55 
+
56  RenderTexture& operator=(const ::RenderTexture& texture) {
+
57  set(texture);
+
58  return *this;
+
59  }
+
60 
+
61  RenderTexture& operator=(const RenderTexture&) = delete;
+
62 
+
63  RenderTexture& operator=(RenderTexture&& other) noexcept {
+
64  if (this == &other) {
+
65  return *this;
+
66  }
+
67 
+
68  Unload();
+
69  set(other);
+
70 
+
71  other.id = 0;
+
72  other.texture = {};
+
73  other.depth = {};
+
74 
+
75  return *this;
+
76  }
+
77 
+
78  ~RenderTexture() { Unload(); }
+
79 
+
80  void Unload() { UnloadRenderTexture(*this); }
+
81 
+ +
86  ::BeginTextureMode(*this);
+
87  return *this;
+
88  }
+
89 
+ +
94  ::EndTextureMode();
+
95  return *this;
+
96  }
+
97 
+
101  static RenderTexture Load(int width, int height) { return ::LoadRenderTexture(width, height); }
+
102 
+
106  bool IsValid() const { return ::IsRenderTextureValid(*this); }
+
107 protected:
+
108  void set(const ::RenderTexture& renderTexture) {
+
109  id = renderTexture.id;
+
110  texture = renderTexture.texture;
+
111  depth = renderTexture.depth;
+
112  }
+
113 };
+
114 
+
115 using RenderTexture2D = RenderTexture;
+
116 
+
117 } // namespace raylib
+
118 
+ + +
121 
+
122 #endif // RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
+
RenderTexture type, for texture rendering.
+
TextureUnmanaged GetTexture()
Get the color buffer attachment texture.
+
RenderTexture & EndMode()
Ends drawing to render texture.
+
bool IsValid() const
Retrieves whether or not the render texture is ready.
+
RenderTexture & BeginMode()
Initializes render texture for drawing.
+
TextureUnmanaged GetDepth()
Depth buffer attachment texture.
+
RenderTexture()
Default constructor to build an empty RenderTexture.
+
static RenderTexture Load(int width, int height)
Load texture for rendering (framebuffer)
+
RenderTexture(int width, int height)
Load texture for rendering (framebuffer)
+
A Texture that is not managed by C++ RAII.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_shader_8hpp_source.html b/_shader_8hpp_source.html new file mode 100644 index 00000000..b7e48fb2 --- /dev/null +++ b/_shader_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + + +raylib-cpp: Shader.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Shader.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_SHADER_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_SHADER_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "ShaderUnmanaged.hpp"
+
7 #include "Texture.hpp"
+
8 #include "./raylib-cpp-utils.hpp"
+
9 #include "./raylib.hpp"
+
10 
+
11 namespace raylib {
+
15 class Shader : public ShaderUnmanaged {
+
16 public:
+
17  using ShaderUnmanaged::ShaderUnmanaged;
+
18 
+
19  Shader(const Shader&) = delete;
+
20 
+
21  Shader(Shader&& other) {
+
22  set(other);
+
23 
+
24  other.id = 0;
+
25  other.locs = nullptr;
+
26  }
+
27 
+
28  Shader& operator=(const Shader&) = delete;
+
29 
+
30  Shader& operator=(Shader&& other) noexcept {
+
31  if (this == &other) {
+
32  return *this;
+
33  }
+
34 
+
35  Unload();
+
36  set(other);
+
37 
+
38  other.id = 0;
+
39  other.locs = nullptr;
+
40 
+
41  return *this;
+
42  }
+
43 
+
47  ~Shader() { Unload(); }
+
48 
+
52  void Unload() {
+
53  if (locs != nullptr) {
+
54  ::UnloadShader(*this);
+
55  }
+
56  }
+
57 };
+
58 } // namespace raylib
+
59 
+
60 using RShader = raylib::Shader;
+
61 
+
62 #endif // RAYLIB_CPP_INCLUDE_SHADER_HPP_
+
Shader type (generic)
Definition: Shader.hpp:15
+
void Unload()
Unload shader from GPU memory (VRAM)
Definition: Shader.hpp:52
+
~Shader()
Unload shader from GPU memory (VRAM)
Definition: Shader.hpp:47
+
Shader type (generic), not managed by C++ RAII.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_shader_unmanaged_8hpp_source.html b/_shader_unmanaged_8hpp_source.html new file mode 100644 index 00000000..95919a4b --- /dev/null +++ b/_shader_unmanaged_8hpp_source.html @@ -0,0 +1,190 @@ + + + + + + + +raylib-cpp: ShaderUnmanaged.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ShaderUnmanaged.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_UNMANAGEDSHADER_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_UNMANAGEDSHADER_HPP_
+
3 
+
4 #include <rlgl.h>
+
5 #include <string>
+
6 
+
7 #include "Texture.hpp"
+
8 #include "./raylib-cpp-utils.hpp"
+
9 #include "./raylib.hpp"
+
10 
+
11 namespace raylib {
+
12 
+
16 class ShaderUnmanaged : public ::Shader {
+
17 public:
+
18  ShaderUnmanaged() : ::Shader{rlGetShaderIdDefault(), rlGetShaderLocsDefault()} {}
+
19 
+
20  ShaderUnmanaged(const ::Shader& shader) { set(shader); }
+
21 
+
22  ShaderUnmanaged(unsigned int id, int* locs = nullptr) : ::Shader{id, locs} {}
+
23 
+
24  ShaderUnmanaged(const std::string& vsFileName, const std::string& fsFileName) {
+
25  set(::LoadShader(vsFileName.c_str(), fsFileName.c_str()));
+
26  }
+
27  ShaderUnmanaged(const char* vsFileName, const char* fsFileName) { set(::LoadShader(vsFileName, fsFileName)); }
+
28 
+
34  static ::Shader Load(const std::string& vsFileName, const std::string& fsFileName) {
+
35  return ::LoadShader(vsFileName.c_str(), fsFileName.c_str());
+
36  }
+
37  static ::Shader Load(const char* vsFileName, const char* fsFileName) {
+
38  return ::LoadShader(vsFileName, fsFileName);
+
39  }
+
40 
+
46  static ::Shader LoadFromMemory(const std::string& vsCode, const std::string& fsCode) {
+
47  return ::LoadShaderFromMemory(vsCode.c_str(), fsCode.c_str());
+
48  }
+
49  static ::Shader LoadFromMemory(const char* vsCode, const char* fsCode) {
+
50  return ::LoadShaderFromMemory(vsCode, fsCode);
+
51  }
+
52 
+
53  GETTER(unsigned int, Id, id)
+
54  GETTER(int*, Locs, locs)
+
55 
+
56  ShaderUnmanaged& operator=(const ::Shader& shader) {
+
57  set(shader);
+
58  return *this;
+
59  }
+
60 
+ +
65  ::BeginShaderMode(*this);
+
66  return *this;
+
67  }
+
68 
+ +
73  ::EndShaderMode();
+
74  return *this;
+
75  }
+
76 
+
82  int GetLocation(const std::string& uniformName) const { return ::GetShaderLocation(*this, uniformName.c_str()); }
+
83 
+
89  int GetLocationAttrib(const std::string& attribName) const {
+
90  return ::GetShaderLocationAttrib(*this, attribName.c_str());
+
91  }
+
92 
+
98  ShaderUnmanaged& SetValue(int uniformLoc, const void* value, int uniformType) {
+
99  ::SetShaderValue(*this, uniformLoc, value, uniformType);
+
100  return *this;
+
101  }
+
102 
+
108  ShaderUnmanaged& SetValue(int uniformLoc, const void* value, int uniformType, int count) {
+
109  ::SetShaderValueV(*this, uniformLoc, value, uniformType, count);
+
110  return *this;
+
111  }
+
112 
+
118  ShaderUnmanaged& SetValue(int uniformLoc, const ::Matrix& mat) {
+
119  ::SetShaderValueMatrix(*this, uniformLoc, mat);
+
120  return *this;
+
121  }
+
122 
+
128  ShaderUnmanaged& SetValue(int uniformLoc, const ::Texture2D& texture) {
+
129  ::SetShaderValueTexture(*this, uniformLoc, texture);
+
130  return *this;
+
131  }
+
132 
+
136  bool IsValid() const { return ::IsShaderValid(*this); }
+
137 protected:
+
138  void set(const ::Shader& shader) {
+
139  id = shader.id;
+
140  locs = shader.locs;
+
141  }
+
142 };
+
143 } // namespace raylib
+
144 
+ +
146 
+
147 #endif // RAYLIB_CPP_INCLUDE_UNMANAGEDSHADER_HPP_
+
Shader type (generic)
Definition: Shader.hpp:15
+
Shader type (generic), not managed by C++ RAII.
+
ShaderUnmanaged & SetValue(int uniformLoc, const ::Matrix &mat)
Set shader uniform value (matrix 4x4)
+
ShaderUnmanaged & BeginMode()
Begin custom shader drawing.
+
bool IsValid() const
Retrieves whether or not the shader is ready.
+
::Shader LoadFromMemory(const std::string &vsCode, const std::string &fsCode)
Load a shader from memory.
+
::Shader Load(const std::string &vsFileName, const std::string &fsFileName)
Load shader from files and bind default locations.
+
ShaderUnmanaged & SetValue(int uniformLoc, const void *value, int uniformType)
Set shader uniform value.
+
int GetLocationAttrib(const std::string &attribName) const
Get shader attribute location.
+
ShaderUnmanaged & EndMode()
End custom shader drawing (use default shader).
+
ShaderUnmanaged & SetValue(int uniformLoc, const void *value, int uniformType, int count)
Set shader uniform value vector.
+
ShaderUnmanaged & SetValue(int uniformLoc, const ::Texture2D &texture)
Set shader uniform value for texture.
+
int GetLocation(const std::string &uniformName) const
Get shader uniform location.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_sound_8hpp_source.html b/_sound_8hpp_source.html new file mode 100644 index 00000000..ec757e8f --- /dev/null +++ b/_sound_8hpp_source.html @@ -0,0 +1,235 @@ + + + + + + + +raylib-cpp: Sound.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Sound.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_SOUND_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_SOUND_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./RaylibException.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
19 class Sound : public ::Sound {
+
20 public:
+
21  Sound(const Sound&) = delete;
+
22  Sound& operator=(const Sound&) = delete;
+
23 
+
24  Sound() {
+
25  stream = {nullptr, nullptr, 0, 0, 0};
+
26  frameCount = 0;
+
27  }
+
28 
+
29  Sound(::AudioStream stream, unsigned int frameCount) : ::Sound{stream, frameCount} {
+
30  // Nothing.
+
31  }
+
32 
+
33  Sound(Sound&& other) {
+
34  set(other);
+
35 
+
36  other.stream = {nullptr, nullptr, 0, 0, 0};
+
37  other.frameCount = 0;
+
38  }
+
39 
+
45  Sound(const std::string& fileName) { Load(fileName); }
+
46 
+
52  Sound(const ::Wave& wave) { Load(wave); }
+
53 
+
54  ~Sound() { Unload(); }
+
55 
+
56  GETTER(unsigned int, FrameCount, frameCount)
+
57  GETTER(::AudioStream, Stream, stream)
+
58 
+
59  Sound& operator=(Sound&& other) noexcept {
+
60  if (this == &other) {
+
61  return *this;
+
62  }
+
63 
+
64  Unload();
+
65  set(other);
+
66  other.frameCount = 0;
+
67  other.stream = {nullptr, nullptr, 0, 0, 0};
+
68 
+
69  return *this;
+
70  }
+
71 
+
75  Sound& Update(const void* data, int samplesCount) {
+
76  ::UpdateSound(*this, data, samplesCount);
+
77  return *this;
+
78  }
+
79 
+
83  Sound& Update(const void* data) {
+
84  ::UpdateSound(*this, data, static_cast<int>(frameCount));
+
85  return *this;
+
86  }
+
87 
+
91  void Unload() {
+
92  // Protect against calling UnloadSound() twice.
+
93  if (frameCount != 0) {
+
94  ::UnloadSound(*this);
+
95  frameCount = 0;
+
96  }
+
97  }
+
98 
+
102  Sound& Play() {
+
103  ::PlaySound(*this);
+
104  return *this;
+
105  }
+
106 
+
110  Sound& Stop() {
+
111  ::StopSound(*this);
+
112  return *this;
+
113  }
+
114 
+ +
119  ::PauseSound(*this);
+
120  return *this;
+
121  }
+
122 
+ +
127  ::ResumeSound(*this);
+
128  return *this;
+
129  }
+
130 
+
134  bool IsPlaying() const { return ::IsSoundPlaying(*this); }
+
135 
+
139  Sound& SetVolume(float volume) {
+
140  ::SetSoundVolume(*this, volume);
+
141  return *this;
+
142  }
+
143 
+
147  Sound& SetPitch(float pitch) {
+
148  ::SetSoundPitch(*this, pitch);
+
149  return *this;
+
150  }
+
151 
+
155  Sound& SetPan(float pan = 0.5f) {
+
156  ::SetSoundPan(*this, pan);
+
157  return *this;
+
158  }
+
159 
+
165  void Load(const std::string& fileName) {
+
166  set(::LoadSound(fileName.c_str()));
+
167  if (!IsValid()) {
+
168  throw RaylibException("Failed to load Sound from file");
+
169  }
+
170  }
+
171 
+
177  void Load(const ::Wave& wave) {
+
178  set(::LoadSoundFromWave(wave));
+
179  if (!IsValid()) {
+
180  throw RaylibException("Failed to load Wave");
+
181  }
+
182  }
+
183 
+
189  bool IsValid() const { return ::IsSoundValid(*this); }
+
190 protected:
+
191  void set(const ::Sound& sound) {
+
192  frameCount = sound.frameCount;
+
193  stream = sound.stream;
+
194  }
+
195 };
+
196 } // namespace raylib
+
197 
+
198 using RSound = raylib::Sound;
+
199 
+
200 #endif // RAYLIB_CPP_INCLUDE_SOUND_HPP_
+
AudioStream management functions.
Definition: AudioStream.hpp:12
+
Exception used for most raylib-related exceptions.
+
Wave/Sound management functions.
Definition: Sound.hpp:19
+
Sound & SetVolume(float volume)
Set volume for a sound (1.0 is max level)
Definition: Sound.hpp:139
+
Sound & Resume()
Resume a paused sound.
Definition: Sound.hpp:126
+
Sound(const std::string &fileName)
Loads a sound from the given file.
Definition: Sound.hpp:45
+
void Unload()
Unload sound.
Definition: Sound.hpp:91
+
bool IsValid() const
Retrieve whether or not the Sound buffer is loaded.
Definition: Sound.hpp:189
+
void Load(const ::Wave &wave)
Loads the given Wave object into the Sound.
Definition: Sound.hpp:177
+
Sound & Play()
Play a sound.
Definition: Sound.hpp:102
+
Sound & SetPan(float pan=0.5f)
Set pan for a sound (0.5 is center)
Definition: Sound.hpp:155
+
Sound & SetPitch(float pitch)
Set pitch for a sound (1.0 is base level)
Definition: Sound.hpp:147
+
Sound & Pause()
Pause a sound.
Definition: Sound.hpp:118
+
void Load(const std::string &fileName)
Load a sound from the given file.
Definition: Sound.hpp:165
+
Sound & Update(const void *data)
Update sound buffer with new data, assuming it's the same sample count.
Definition: Sound.hpp:83
+
bool IsPlaying() const
Check if a sound is currently playing.
Definition: Sound.hpp:134
+
Sound & Update(const void *data, int samplesCount)
Update sound buffer with new data.
Definition: Sound.hpp:75
+
Sound(const ::Wave &wave)
Loads a sound from the given Wave.
Definition: Sound.hpp:52
+
Sound & Stop()
Stop playing a sound.
Definition: Sound.hpp:110
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_text_8hpp_source.html b/_text_8hpp_source.html new file mode 100644 index 00000000..a68c01b5 --- /dev/null +++ b/_text_8hpp_source.html @@ -0,0 +1,231 @@ + + + + + + + +raylib-cpp: Text.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Text.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_TEXT_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_TEXT_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./RaylibException.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
14 class Text {
+
15 public:
+
19  std::string text;
+
20 
+
24  float fontSize;
+
25 
+ +
30 
+ +
35 
+
39  float spacing;
+
40 
+ +
51  const std::string& text = "",
+
52  float fontSize = 10,
+
53  const ::Color& color = WHITE,
+
54  const ::Font& font = ::GetFontDefault(),
+
55  float spacing = 0)
+
56  : text(text)
+ +
58  , color(color)
+
59  , font(font)
+
60  , spacing(spacing) {
+
61  // Nothing.
+
62  }
+
63 
+ +
74  const ::Font& font,
+
75  const std::string& text = "",
+
76  float fontSize = 10,
+
77  float spacing = 0,
+
78  const ::Color& color = WHITE)
+
79  : text(text)
+ +
81  , color(color)
+
82  , font(font)
+
83  , spacing(spacing) {
+
84  // Nothing.
+
85  }
+
86 
+
87  GETTERSETTER(std::string, Text, text)
+
88  GETTERSETTER(float, FontSize, fontSize)
+
89  GETTERSETTER(::Font, Font, font)
+
90  GETTERSETTER(::Color, Color, color)
+
91  GETTERSETTER(float, Spacing, spacing)
+
92 
+
96  void Draw(const ::Vector2& position) const { ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, color); }
+
97 
+
101  void Draw(int posX, int posY) const {
+
102  ::DrawTextEx(
+
103  font,
+
104  text.c_str(),
+
105  {static_cast<float>(posX), static_cast<float>(posY)},
+
106  fontSize,
+
107  spacing,
+
108  color);
+
109  }
+
110 
+
116  void Draw(const ::Vector2& position, float rotation, const ::Vector2& origin = {0, 0}) const {
+
117  ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, color);
+
118  }
+
119 
+
123  int Measure() const { return ::MeasureText(text.c_str(), static_cast<int>(fontSize)); }
+
124 
+
128  Vector2 MeasureEx() const { return ::MeasureTextEx(font, text.c_str(), fontSize, spacing); }
+
129 
+
130  Text& operator=(const Text& other) {
+
131  if (this == &other) {
+
132  return *this;
+
133  }
+
134 
+
135  text = other.text;
+
136  fontSize = other.fontSize;
+
137  color = other.color;
+
138  font = other.font;
+
139  spacing = other.spacing;
+
140 
+
141  return *this;
+
142  }
+
143 
+
149  static void
+
150  Draw(const std::string& text, const int posX, const int posY, const int fontSize, const ::Color& color) {
+
151  ::DrawText(text.c_str(), posX, posY, fontSize, color);
+
152  }
+
153 
+
159  static void Draw(const std::string& text, const ::Vector2& pos, const int fontSize, const ::Color& color) {
+
160  ::DrawText(text.c_str(), static_cast<int>(pos.x), static_cast<int>(pos.y), fontSize, color);
+
161  }
+
162 
+
168  static void Draw(
+
169  const ::Font& font,
+
170  const std::string& text,
+
171  const ::Vector2& position,
+
172  const float fontSize,
+
173  const float spacing,
+
174  const ::Color& color) {
+
175  ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, color);
+
176  }
+
177 
+
183  static void Draw(
+
184  const ::Font& font,
+
185  const std::string& text,
+
186  const ::Vector2& position,
+
187  const ::Vector2& origin,
+
188  const float rotation,
+
189  const float fontSize,
+
190  const float spacing,
+
191  const ::Color& color) {
+
192  ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, color);
+
193  }
+
194 };
+
195 } // namespace raylib
+
196 
+
197 using RText = raylib::Text;
+
198 
+
199 #endif // RAYLIB_CPP_INCLUDE_TEXT_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Font type, includes texture and charSet array data.
Definition: Font.hpp:15
+
Text Functions.
Definition: Text.hpp:14
+
float fontSize
The size of the text.
Definition: Text.hpp:24
+
Vector2 MeasureEx() const
Measure string size for Font.
Definition: Text.hpp:128
+
Text(const ::Font &font, const std::string &text="", float fontSize=10, float spacing=0, const ::Color &color=WHITE)
Initializes a new Text object with a custom font.
Definition: Text.hpp:73
+
int Measure() const
Measure string width for default font.
Definition: Text.hpp:123
+
static void Draw(const std::string &text, const ::Vector2 &pos, const int fontSize, const ::Color &color)
Draw text using font and color, with position defined as Vector2.
Definition: Text.hpp:159
+
static void Draw(const ::Font &font, const std::string &text, const ::Vector2 &position, const float fontSize, const float spacing, const ::Color &color)
Draw text using font, color, position, font size and spacing.
Definition: Text.hpp:168
+
float spacing
The character spacing for the text.
Definition: Text.hpp:39
+
::Font font
The internal raylib font to use for the text.
Definition: Text.hpp:34
+
Text(const std::string &text="", float fontSize=10, const ::Color &color=WHITE, const ::Font &font=::GetFontDefault(), float spacing=0)
Initializes a new Text object.
Definition: Text.hpp:50
+
static void Draw(const std::string &text, const int posX, const int posY, const int fontSize, const ::Color &color)
Draw text using font and color.
Definition: Text.hpp:150
+
::Color color
The color of the text.
Definition: Text.hpp:29
+
std::string text
The internal text.
Definition: Text.hpp:19
+
static void Draw(const ::Font &font, const std::string &text, const ::Vector2 &position, const ::Vector2 &origin, const float rotation, const float fontSize, const float spacing, const ::Color &color)
Draw text using font, color, position, origin, font size and spacing.
Definition: Text.hpp:183
+
void Draw(const ::Vector2 &position, float rotation, const ::Vector2 &origin={0, 0}) const
Draw text using Font and pro parameters (rotation).
Definition: Text.hpp:116
+
void Draw(int posX, int posY) const
Draw text with values in class.
Definition: Text.hpp:101
+
void Draw(const ::Vector2 &position) const
Draw text with values in class.
Definition: Text.hpp:96
+
Vector2 type.
Definition: Vector2.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
static void DrawTextPro(const Font &font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint)
Draw text using Font and pro parameters (rotation)
Definition: Functions.hpp:272
+
static void DrawText(const char *text, int posX, int posY, int fontSize, ::Color color)
Draw text (using default font)
Definition: Functions.hpp:241
+
static void DrawTextEx(const Font &font, char *text, Vector2 position, float fontSize, float spacing, ::Color tint)
Draw text using font and additional parameters.
Definition: Functions.hpp:257
+
+ + + + diff --git a/_texture_8hpp_source.html b/_texture_8hpp_source.html new file mode 100644 index 00000000..93e03eb5 --- /dev/null +++ b/_texture_8hpp_source.html @@ -0,0 +1,146 @@ + + + + + + + +raylib-cpp: Texture.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Texture.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
+
3 
+
4 #include "./TextureUnmanaged.hpp"
+
5 
+
6 namespace raylib {
+
14 class Texture : public TextureUnmanaged {
+
15 public:
+ +
17 
+
21  Texture(const Texture&) = delete;
+
22 
+
26  Texture& operator=(const Texture&) = delete;
+
27 
+
31  Texture(Texture&& other) {
+
32  set(other);
+
33 
+
34  other.id = 0;
+
35  other.width = 0;
+
36  other.height = 0;
+
37  other.mipmaps = 0;
+
38  other.format = 0;
+
39  }
+
40 
+
44  ~Texture() { Unload(); }
+
45 
+
49  Texture& operator=(Texture&& other) noexcept {
+
50  if (this == &other) {
+
51  return *this;
+
52  }
+
53 
+
54  Unload();
+
55  set(other);
+
56 
+
57  other.id = 0;
+
58  other.width = 0;
+
59  other.height = 0;
+
60  other.mipmaps = 0;
+
61  other.format = 0;
+
62 
+
63  return *this;
+
64  }
+
65 };
+
66 
+
67 // Create the Texture aliases.
+
68 using Texture2D = Texture;
+
69 using TextureCubemap = Texture;
+
70 
+
71 } // namespace raylib
+
72 
+ + + +
76 
+
77 #endif // RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
+
Texture type.
Definition: Texture.hpp:14
+
Texture(const Texture &)=delete
Explicitly forbid the copy constructor.
+
Texture(Texture &&other)
Move constructor.
Definition: Texture.hpp:31
+
Texture & operator=(const Texture &)=delete
Explicitly forbid copy assignment.
+
Texture & operator=(Texture &&other) noexcept
Move assignment.
Definition: Texture.hpp:49
+
~Texture()
On destruction, unload the Texture.
Definition: Texture.hpp:44
+
A Texture that is not managed by C++ RAII.
+
TextureUnmanaged()
Default texture constructor.
+
void Unload()
Unload texture from GPU memory (VRAM)
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_texture_unmanaged_8hpp_source.html b/_texture_unmanaged_8hpp_source.html new file mode 100644 index 00000000..64f0ca77 --- /dev/null +++ b/_texture_unmanaged_8hpp_source.html @@ -0,0 +1,336 @@ + + + + + + + +raylib-cpp: TextureUnmanaged.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
TextureUnmanaged.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_TEXTUREUNMANAGED_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_TEXTUREUNMANAGED_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./Image.hpp"
+
7 #include "./Material.hpp"
+
8 #include "./RaylibException.hpp"
+
9 #include "./Vector2.hpp"
+
10 #include "./raylib-cpp-utils.hpp"
+
11 #include "./raylib.hpp"
+
12 
+
13 namespace raylib {
+
21 class TextureUnmanaged : public ::Texture {
+
22 public:
+
26  TextureUnmanaged() : ::Texture{0, 0, 0, 0, 0} {
+
27  // Nothing.
+
28  }
+
29 
+ +
34  unsigned int id,
+
35  int width,
+
36  int height,
+
37  int mipmaps = 1,
+
38  int format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
+
39  : ::Texture{id, width, height, mipmaps, format} {
+
40  // Nothing.
+
41  }
+
42 
+
46  TextureUnmanaged(const ::Texture& texture)
+
47  : ::Texture{texture.id, texture.width, texture.height, texture.mipmaps, texture.format} {
+
48  // Nothing.
+
49  }
+
50 
+
56  TextureUnmanaged(const ::Image& image) { Load(image); }
+
57 
+
65  TextureUnmanaged(const ::Image& image, int layout) { Load(image, layout); }
+
66 
+
72  TextureUnmanaged(const std::string& fileName) { Load(fileName); }
+
73 
+
74  TextureUnmanaged(::Texture&& other) : ::Texture{other.id, other.width, other.height, other.mipmaps, other.format} {
+
75  // Nothing.
+
76  }
+
77 
+
78  GETTER(unsigned int, Id, id)
+
79  GETTER(int, Width, width)
+
80  GETTER(int, Height, height)
+
81  GETTER(int, Mipmaps, mipmaps)
+
82  GETTER(int, Format, format)
+
83 
+
84  TextureUnmanaged& operator=(const ::Texture& texture) {
+
85  set(texture);
+
86  return *this;
+
87  }
+
88 
+
92  ::Vector2 GetSize() const { return {static_cast<float>(width), static_cast<float>(height)}; }
+
93 
+
97  void Load(const ::Image& image) {
+
98  set(::LoadTextureFromImage(image));
+
99  if (!IsValid()) {
+
100  throw RaylibException("Failed to load Texture from Image");
+
101  }
+
102  }
+
103 
+
107  void Load(const ::Image& image, int layoutType) {
+
108  set(::LoadTextureCubemap(image, layoutType));
+
109  if (!IsValid()) {
+
110  throw RaylibException("Failed to load Texture from Cubemap");
+
111  }
+
112  }
+
113 
+
117  void Load(const std::string& fileName) {
+
118  set(::LoadTexture(fileName.c_str()));
+
119  if (!IsValid()) {
+
120  throw RaylibException("Failed to load Texture from file: " + fileName);
+
121  }
+
122  }
+
123 
+
127  void Unload() {
+
128  // Protect against calling UnloadTexture() twice.
+
129  if (id != 0) {
+
130  ::UnloadTexture(*this);
+
131  id = 0;
+
132  }
+
133  }
+
134 
+
138  TextureUnmanaged& Update(const void* pixels) {
+
139  ::UpdateTexture(*this, pixels);
+
140  return *this;
+
141  }
+
142 
+
146  TextureUnmanaged& Update(::Rectangle rec, const void* pixels) {
+
147  UpdateTextureRec(*this, rec, pixels);
+
148  return *this;
+
149  }
+
150 
+
154  ::Image GetData() const { return ::LoadImageFromTexture(*this); }
+
155 
+
159  operator Image() { return GetData(); }
+
160 
+ +
165  ::GenTextureMipmaps(this);
+
166  return *this;
+
167  }
+
168 
+
172  TextureUnmanaged& SetFilter(int filterMode) {
+
173  ::SetTextureFilter(*this, filterMode);
+
174  return *this;
+
175  }
+
176 
+
180  TextureUnmanaged& SetWrap(int wrapMode) {
+
181  ::SetTextureWrap(*this, wrapMode);
+
182  return *this;
+
183  }
+
184 
+
190  void Draw(int posX = 0, int posY = 0, ::Color tint = {255, 255, 255, 255}) const {
+
191  ::DrawTexture(*this, posX, posY, tint);
+
192  }
+
193 
+
199  void Draw(::Vector2 position, ::Color tint = {255, 255, 255, 255}) const { ::DrawTextureV(*this, position, tint); }
+
200 
+
206  void Draw(::Vector2 position, float rotation, float scale = 1.0f, ::Color tint = {255, 255, 255, 255}) const {
+
207  ::DrawTextureEx(*this, position, rotation, scale, tint);
+
208  }
+
209 
+
215  void Draw(::Rectangle sourceRec, ::Vector2 position = {0, 0}, ::Color tint = {255, 255, 255, 255}) const {
+
216  ::DrawTextureRec(*this, sourceRec, position, tint);
+
217  }
+
218 
+
224  void Draw(
+
225  ::Rectangle sourceRec,
+
226  ::Rectangle destRec,
+
227  ::Vector2 origin = {0, 0},
+
228  float rotation = 0,
+
229  ::Color tint = {255, 255, 255, 255}) const {
+
230  ::DrawTexturePro(*this, sourceRec, destRec, origin, rotation, tint);
+
231  }
+
232 
+
238  void Draw(
+
239  ::NPatchInfo nPatchInfo,
+
240  ::Rectangle destRec,
+
241  ::Vector2 origin = {0, 0},
+
242  float rotation = 0,
+
243  ::Color tint = {255, 255, 255, 255}) const {
+
244  ::DrawTextureNPatch(*this, nPatchInfo, destRec, origin, rotation, tint);
+
245  }
+
246 
+
252  void
+
253  DrawBillboard(const ::Camera& camera, ::Vector3 position, float size, ::Color tint = {255, 255, 255, 255}) const {
+
254  ::DrawBillboard(camera, *this, position, size, tint);
+
255  }
+
256 
+ +
263  const ::Camera& camera,
+
264  ::Rectangle source,
+
265  ::Vector3 position,
+
266  ::Vector2 size,
+
267  ::Color tint = {255, 255, 255, 255}) const {
+
268  DrawBillboardRec(camera, *this, source, position, size, tint);
+
269  }
+
270 
+ +
277  const ::Camera& camera,
+
278  ::Rectangle source,
+
279  Vector3 position,
+
280  ::Vector3 up,
+
281  Vector2 size,
+
282  Vector2 origin,
+
283  float rotation = 0.0f,
+
284  ::Color tint = {255, 255, 255, 255}) const {
+
285  DrawBillboardPro(camera, *this, source, position, up, size, origin, rotation, tint);
+
286  }
+
287 
+
291  TextureUnmanaged& SetMaterial(::Material* material, int mapType = MATERIAL_MAP_NORMAL) {
+
292  ::SetMaterialTexture(material, mapType, *this);
+
293  return *this;
+
294  }
+
295 
+
296  TextureUnmanaged& SetMaterial(const ::Material& material, int mapType = MATERIAL_MAP_NORMAL) {
+
297  ::SetMaterialTexture((::Material*)(&material), mapType, *this);
+
298  return *this;
+
299  }
+
300 
+
304  TextureUnmanaged& SetShapes(const ::Rectangle& source) {
+
305  ::SetShapesTexture(*this, source);
+
306  return *this;
+
307  }
+
308 
+
312  TextureUnmanaged& SetShaderValue(const ::Shader& shader, int locIndex) {
+
313  ::SetShaderValueTexture(shader, locIndex, *this);
+
314  return *this;
+
315  }
+
316 
+
322  bool IsValid() const { return IsTextureValid(*this); }
+
323 protected:
+
324  void set(const ::Texture& texture) {
+
325  id = texture.id;
+
326  width = texture.width;
+
327  height = texture.height;
+
328  mipmaps = texture.mipmaps;
+
329  format = texture.format;
+
330  }
+
331 };
+
332 
+
333 // Create the TextureUnmanaged aliases.
+
334 using Texture2DUnmanaged = TextureUnmanaged;
+
335 using TextureCubemapUnmanaged = TextureUnmanaged;
+
336 
+
337 } // namespace raylib
+
338 
+ + + +
342 
+
343 #endif // RAYLIB_CPP_INCLUDE_TEXTUREUNMANAGED_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:17
+
Material type (generic)
Definition: Material.hpp:14
+
Exception used for most raylib-related exceptions.
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Texture type.
Definition: Texture.hpp:14
+
A Texture that is not managed by C++ RAII.
+
void DrawBillboard(const ::Camera &camera, ::Vector3 position, float size, ::Color tint={255, 255, 255, 255}) const
Draw a billboard texture.
+
TextureUnmanaged & SetFilter(int filterMode)
Set texture scaling filter mode.
+
TextureUnmanaged & Update(::Rectangle rec, const void *pixels)
Update GPU texture rectangle with new data.
+
void Load(const ::Image &image, int layoutType)
Load cubemap from image, multiple image cubemap layouts supported.
+
TextureUnmanaged & Update(const void *pixels)
Update GPU texture with new data.
+
TextureUnmanaged & SetShaderValue(const ::Shader &shader, int locIndex)
Set shader uniform value for texture (sampler2d)
+
TextureUnmanaged(const ::Image &image, int layout)
Load cubemap from image, multiple image cubemap layouts supported.
+
void Draw(::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) const
Draws a texture (or part of it) that stretches or shrinks nicely.
+
bool IsValid() const
Determines whether or not the Texture has been loaded and is ready.
+
TextureUnmanaged(unsigned int id, int width, int height, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
Move/Create a texture structure manually.
+
void Load(const ::Image &image)
Load texture from image data.
+
void Draw(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) const
Draw a part of a texture defined by a rectangle with 'pro' parameters.
+
void DrawBillboard(const ::Camera &camera, ::Rectangle source, Vector3 position, ::Vector3 up, Vector2 size, Vector2 origin, float rotation=0.0f, ::Color tint={255, 255, 255, 255}) const
Draw a billboard texture defined by source and rotation.
+
void Load(const std::string &fileName)
Load texture from file into GPU memory (VRAM)
+
void Draw(int posX=0, int posY=0, ::Color tint={255, 255, 255, 255}) const
Draw a Texture2D.
+
TextureUnmanaged & SetMaterial(::Material *material, int mapType=MATERIAL_MAP_NORMAL)
Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
+
TextureUnmanaged & GenMipmaps()
Generate GPU mipmaps for a texture.
+
void Draw(::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255}) const
Draw a part of a texture defined by a rectangle.
+
void Draw(::Vector2 position, ::Color tint={255, 255, 255, 255}) const
Draw a Texture2D with position defined as Vector2.
+
void Draw(::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255}) const
Draw a Texture2D with extended parameters.
+
::Vector2 GetSize() const
Retrieve the width and height of the texture.
+
TextureUnmanaged()
Default texture constructor.
+
TextureUnmanaged & SetWrap(int wrapMode)
Set texture wrapping mode.
+
TextureUnmanaged(const std::string &fileName)
Load texture from file into GPU memory (VRAM)
+
void Unload()
Unload texture from GPU memory (VRAM)
+
::Image GetData() const
Get pixel data from GPU texture and return an Image.
+
TextureUnmanaged(const ::Texture &texture)
Creates a texture object based on the given Texture struct data.
+
TextureUnmanaged(const ::Image &image)
Creates a texture from the given Image.
+
TextureUnmanaged & SetShapes(const ::Rectangle &source)
Set texture and rectangle to be used on shapes drawing.
+
void DrawBillboard(const ::Camera &camera, ::Rectangle source, ::Vector3 position, ::Vector2 size, ::Color tint={255, 255, 255, 255}) const
Draw a billboard texture defined by source.
+
Vector2 type.
Definition: Vector2.hpp:18
+
Vector3 type.
Definition: Vector3.hpp:18
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_touch_8hpp_source.html b/_touch_8hpp_source.html new file mode 100644 index 00000000..654c82bc --- /dev/null +++ b/_touch_8hpp_source.html @@ -0,0 +1,121 @@ + + + + + + + +raylib-cpp: Touch.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Touch.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_TOUCH_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_TOUCH_HPP_
+
3 
+
4 #include "./raylib.hpp"
+
5 
+
6 namespace raylib {
+
10 namespace Touch {
+
14 [[maybe_unused]] RLCPPAPI inline int GetX() {
+
15  return ::GetTouchX();
+
16 }
+
17 
+
21 [[maybe_unused]] RLCPPAPI inline int GetY() {
+
22  return ::GetTouchY();
+
23 }
+
24 
+
28 [[maybe_unused]] RLCPPAPI inline Vector2 GetPosition(int index) {
+
29  return ::GetTouchPosition(index);
+
30 }
+
31 
+
35 [[maybe_unused]] RLCPPAPI inline int GetPointId(int index) {
+
36  return ::GetTouchPointId(index);
+
37 }
+
38 
+
42 [[maybe_unused]] RLCPPAPI inline int GetPointCount() {
+
43  return ::GetTouchPointCount();
+
44 }
+
45 } // namespace Touch
+
46 } // namespace raylib
+
47 
+
48 namespace RTouch = raylib::Touch;
+
49 
+
50 #endif // RAYLIB_CPP_INCLUDE_TOUCH_HPP_
+
Vector2 type.
Definition: Vector2.hpp:18
+
Input-related functions: touch.
Definition: Touch.hpp:10
+
RLCPPAPI int GetPointId(int index)
Get touch point identifier for given index.
Definition: Touch.hpp:35
+
RLCPPAPI int GetX()
Get touch position X for touch point 0 (relative to screen size)
Definition: Touch.hpp:14
+
RLCPPAPI int GetY()
Get touch position Y for touch point 0 (relative to screen size)
Definition: Touch.hpp:21
+
RLCPPAPI int GetPointCount()
Get number of touch points.
Definition: Touch.hpp:42
+
RLCPPAPI Vector2 GetPosition(int index)
Get touch position XY for a touch point index (relative to screen size)
Definition: Touch.hpp:28
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_vector2_8hpp_source.html b/_vector2_8hpp_source.html new file mode 100644 index 00000000..4f2e6a58 --- /dev/null +++ b/_vector2_8hpp_source.html @@ -0,0 +1,336 @@ + + + + + + + +raylib-cpp: Vector2.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Vector2.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
+
3 
+
4 #ifndef RAYLIB_CPP_NO_MATH
+
5 #include <cmath>
+
6 #endif
+
7 
+
8 #include <string>
+
9 
+
10 #include "./raylib-cpp-utils.hpp"
+
11 #include "./raylib.hpp"
+
12 #include "./raymath.hpp"
+
13 
+
14 namespace raylib {
+
18 class Vector2 : public ::Vector2 {
+
19 public:
+
20  Vector2(const ::Vector2& vec) : ::Vector2{vec.x, vec.y} {}
+
21 
+
22  Vector2(float x, float y) : ::Vector2{x, y} {}
+
23  Vector2(float x) : ::Vector2{x, 0} {}
+
24  Vector2() : ::Vector2{0, 0} {}
+
25 
+
26  GETTERSETTER(float, X, x)
+
27  GETTERSETTER(float, Y, y)
+
28 
+
32  Vector2& operator=(const ::Vector2& vector2) {
+
33  set(vector2);
+
34  return *this;
+
35  }
+
36 
+
40  bool operator==(const ::Vector2& other) const { return x == other.x && y == other.y; }
+
41 
+
45  bool operator!=(const ::Vector2& other) const { return !(*this == other); }
+
46 
+
47  std::string ToString() const { return TextFormat("Vector2(%f, %f)", x, y); }
+
48 
+
49  operator std::string() const { return ToString(); }
+
50 
+
51 #ifndef RAYLIB_CPP_NO_MATH
+
55  Vector2 Add(const ::Vector2& vector2) const { return Vector2Add(*this, vector2); }
+
56 
+
60  Vector2 operator+(const ::Vector2& vector2) const { return Vector2Add(*this, vector2); }
+
61 
+
65  Vector2& operator+=(const ::Vector2& vector2) {
+
66  set(Vector2Add(*this, vector2));
+
67 
+
68  return *this;
+
69  }
+
70 
+
74  Vector2 Subtract(const ::Vector2& vector2) const { return Vector2Subtract(*this, vector2); }
+
75 
+
79  Vector2 operator-(const ::Vector2& vector2) const { return Vector2Subtract(*this, vector2); }
+
80 
+
84  Vector2& operator-=(const ::Vector2& vector2) {
+
85  set(Vector2Subtract(*this, vector2));
+
86 
+
87  return *this;
+
88  }
+
89 
+
93  Vector2 Negate() const { return Vector2Negate(*this); }
+
94 
+
98  Vector2 operator-() const { return Vector2Negate(*this); }
+
99 
+
103  Vector2 Multiply(const ::Vector2& vector2) const { return Vector2Multiply(*this, vector2); }
+
104 
+
108  Vector2 operator*(const ::Vector2& vector2) const { return Vector2Multiply(*this, vector2); }
+
109 
+
113  Vector2& operator*=(const ::Vector2& vector2) {
+
114  set(Vector2Multiply(*this, vector2));
+
115 
+
116  return *this;
+
117  }
+
118 
+
122  Vector2 Scale(const float scale) const { return Vector2Scale(*this, scale); }
+
123 
+
127  Vector2 operator*(const float scale) const { return Vector2Scale(*this, scale); }
+
128 
+
132  Vector2& operator*=(const float scale) {
+
133  set(Vector2Scale(*this, scale));
+
134 
+
135  return *this;
+
136  }
+
137 
+
141  Vector2 Divide(const ::Vector2& vector2) const { return Vector2Divide(*this, vector2); }
+
142 
+
143 
+
147  Vector2 operator/(const ::Vector2& vector2) const { return Vector2Divide(*this, vector2); }
+
148 
+
152  Vector2& operator/=(const ::Vector2& vector2) {
+
153  set(Vector2Divide(*this, vector2));
+
154 
+
155  return *this;
+
156  }
+
157 
+
161  Vector2 Divide(const float div) const { return ::Vector2{x / div, y / div}; }
+
162 
+
166  Vector2 operator/(const float div) const { return Divide(div); }
+
167 
+
171  Vector2& operator/=(const float div) {
+
172  this->x /= div;
+
173  this->y /= div;
+
174 
+
175  return *this;
+
176  }
+
177 
+
181  Vector2 Normalize() const { return Vector2Normalize(*this); }
+
182 
+
186  Vector2 Transform(::Matrix mat) const { return ::Vector2Transform(*this, mat); }
+
187 
+
191  Vector2 Lerp(const ::Vector2& vector2, float amount) const { return Vector2Lerp(*this, vector2, amount); }
+
192 
+
196  Vector2 Reflect(const ::Vector2& normal) const { return Vector2Reflect(*this, normal); }
+
197 
+
201  Vector2 Rotate(float angle) const { return Vector2Rotate(*this, angle); }
+
202 
+
206  Vector2 MoveTowards(const ::Vector2& target, float maxDistance) const {
+
207  return Vector2MoveTowards(*this, target, maxDistance);
+
208  }
+
209 
+
213  Vector2 Invert() const { return ::Vector2Invert(*this); }
+
214 
+
218  Vector2 Clamp(::Vector2 min, ::Vector2 max) const { return ::Vector2Clamp(*this, min, max); }
+
219 
+
223  Vector2 Clamp(float min, float max) const { return ::Vector2ClampValue(*this, min, max); }
+
224 
+
228  int Equals(::Vector2 q) const { return ::Vector2Equals(*this, q); }
+
229 
+
233  float Length() const { return Vector2Length(*this); }
+
234 
+
238  float LengthSqr() const { return Vector2LengthSqr(*this); }
+
239 
+
243  float DotProduct(const ::Vector2& vector2) const { return Vector2DotProduct(*this, vector2); }
+
244 
+
248  float Distance(const ::Vector2& vector2) const { return Vector2Distance(*this, vector2); }
+
249 
+
253  float DistanceSqr(::Vector2 v2) const { return ::Vector2DistanceSqr(*this, v2); }
+
254 
+
258  float Angle(const ::Vector2& vector2) const { return Vector2Angle(*this, vector2); }
+
259 
+
263  static Vector2 Zero() { return Vector2Zero(); }
+
264 
+
268  static Vector2 One() { return Vector2One(); }
+
269 #endif
+
270 
+
271  void DrawPixel(::Color color = {0, 0, 0, 255}) const { ::DrawPixelV(*this, color); }
+
272 
+
273  void DrawLine(::Vector2 endPos, ::Color color = {0, 0, 0, 255}) const { ::DrawLineV(*this, endPos, color); }
+
274 
+
275  void DrawLine(::Vector2 endPos, float thick, ::Color color = {0, 0, 0, 255}) const {
+
276  ::DrawLineEx(*this, endPos, thick, color);
+
277  }
+
278 
+
279  void DrawLineBezier(::Vector2 endPos, float thick, ::Color color = {0, 0, 0, 255}) const {
+
280  ::DrawLineBezier(*this, endPos, thick, color);
+
281  }
+
282 
+
286  void DrawCircle(float radius, ::Color color = {0, 0, 0, 255}) const { ::DrawCircleV(*this, radius, color); }
+
287 
+
288  void DrawRectangle(::Vector2 size, ::Color color = {0, 0, 0, 255}) const { ::DrawRectangleV(*this, size, color); }
+
289 
+
290  void DrawPoly(int sides, float radius, float rotation, ::Color color = {0, 0, 0, 255}) const {
+
291  ::DrawPoly(*this, sides, radius, rotation, color);
+
292  }
+
293 
+
297  bool CheckCollisionCircle(float radius1, ::Vector2 center2, float radius2) const {
+
298  return ::CheckCollisionCircles(*this, radius1, center2, radius2);
+
299  }
+
300 
+
304  bool CheckCollisionCircle(float radius, ::Rectangle rec) const {
+
305  return ::CheckCollisionCircleRec(*this, radius, rec);
+
306  }
+
307 
+
311  bool CheckCollision(::Rectangle rec) const { return ::CheckCollisionPointRec(*this, rec); }
+
312 
+
316  bool CheckCollision(::Vector2 center, float radius) const {
+
317  return ::CheckCollisionPointCircle(*this, center, radius);
+
318  }
+
319 
+
323  bool CheckCollision(::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const {
+
324  return ::CheckCollisionPointTriangle(*this, p1, p2, p3);
+
325  }
+
326 
+
330  bool
+
331  CheckCollisionLines(::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2* collisionPoint) const {
+
332  return ::CheckCollisionLines(*this, endPos1, startPos2, endPos2, collisionPoint);
+
333  }
+
334 
+
338  bool CheckCollisionPointLine(::Vector2 p1, ::Vector2 p2, int threshold = 1) const {
+
339  return ::CheckCollisionPointLine(*this, p1, p2, threshold);
+
340  }
+
341 protected:
+
342  void set(const ::Vector2& vec) {
+
343  x = vec.x;
+
344  y = vec.y;
+
345  }
+
346 };
+
347 
+
348 } // namespace raylib
+
349 
+
350 using RVector2 = raylib::Vector2;
+
351 
+
352 #endif // RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Matrix type (OpenGL style 4x4 - right handed, column major)
Definition: Matrix.hpp:16
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Vector2 type.
Definition: Vector2.hpp:18
+
bool operator==(const ::Vector2 &other) const
Determine whether or not the vectors are equal.
Definition: Vector2.hpp:40
+
bool CheckCollision(::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const
Check if point is inside a triangle.
Definition: Vector2.hpp:323
+
Vector2 MoveTowards(const ::Vector2 &target, float maxDistance) const
Move Vector towards target.
Definition: Vector2.hpp:206
+
Vector2 Subtract(const ::Vector2 &vector2) const
Subtract two vectors (v1 - v2)
Definition: Vector2.hpp:74
+
Vector2 Clamp(::Vector2 min, ::Vector2 max) const
Clamp the components of the vector between.
Definition: Vector2.hpp:218
+
Vector2 operator*(const float scale) const
Scale vector (multiply by value)
Definition: Vector2.hpp:127
+
bool CheckCollision(::Rectangle rec) const
Check if point is inside rectangle.
Definition: Vector2.hpp:311
+
Vector2 & operator*=(const float scale)
Scale vector (multiply by value)
Definition: Vector2.hpp:132
+
bool operator!=(const ::Vector2 &other) const
Determines if the vectors are not equal.
Definition: Vector2.hpp:45
+
Vector2 Lerp(const ::Vector2 &vector2, float amount) const
Calculate linear interpolation between two vectors.
Definition: Vector2.hpp:191
+
float Length() const
Calculate vector length.
Definition: Vector2.hpp:233
+
float DotProduct(const ::Vector2 &vector2) const
Calculate two vectors dot product.
Definition: Vector2.hpp:243
+
float LengthSqr() const
Calculate vector square length.
Definition: Vector2.hpp:238
+
Vector2 & operator*=(const ::Vector2 &vector2)
Multiply vector by vector.
Definition: Vector2.hpp:113
+
float DistanceSqr(::Vector2 v2) const
Calculate square distance between two vectors.
Definition: Vector2.hpp:253
+
Vector2 & operator-=(const ::Vector2 &vector2)
Subtract two vectors (v1 - v2)
Definition: Vector2.hpp:84
+
float Distance(const ::Vector2 &vector2) const
Calculate distance between two vectors.
Definition: Vector2.hpp:248
+
Vector2 Clamp(float min, float max) const
// Clamp the magnitude of the vector between two min and max values
Definition: Vector2.hpp:223
+
bool CheckCollision(::Vector2 center, float radius) const
Check if point is inside circle.
Definition: Vector2.hpp:316
+
Vector2 Divide(const ::Vector2 &vector2) const
Divide vector by vector.
Definition: Vector2.hpp:141
+
bool CheckCollisionCircle(float radius, ::Rectangle rec) const
Check collision between circle and rectangle.
Definition: Vector2.hpp:304
+
static Vector2 Zero()
Vector with components value 0.0f.
Definition: Vector2.hpp:263
+
void DrawCircle(float radius, ::Color color={0, 0, 0, 255}) const
Draw a color-filled circle (Vector version)
Definition: Vector2.hpp:286
+
bool CheckCollisionCircle(float radius1, ::Vector2 center2, float radius2) const
Check collision between two circles.
Definition: Vector2.hpp:297
+
Vector2 Reflect(const ::Vector2 &normal) const
Calculate reflected vector to normal.
Definition: Vector2.hpp:196
+
Vector2 & operator/=(const float div)
Divide vector by value.
Definition: Vector2.hpp:171
+
Vector2 Multiply(const ::Vector2 &vector2) const
Multiply vector by vector.
Definition: Vector2.hpp:103
+
Vector2 operator+(const ::Vector2 &vector2) const
Add two vectors (v1 + v2)
Definition: Vector2.hpp:60
+
Vector2 operator/(const ::Vector2 &vector2) const
Divide vector by vector.
Definition: Vector2.hpp:147
+
Vector2 & operator/=(const ::Vector2 &vector2)
Divide vector by vector.
Definition: Vector2.hpp:152
+
Vector2 Negate() const
Negate vector.
Definition: Vector2.hpp:93
+
Vector2 Scale(const float scale) const
Scale vector (multiply by value)
Definition: Vector2.hpp:122
+
Vector2 Add(const ::Vector2 &vector2) const
Add two vectors (v1 + v2)
Definition: Vector2.hpp:55
+
Vector2 operator*(const ::Vector2 &vector2) const
Multiply vector by vector.
Definition: Vector2.hpp:108
+
Vector2 operator/(const float div) const
Divide vector by value.
Definition: Vector2.hpp:166
+
Vector2 Invert() const
Invert the given vector.
Definition: Vector2.hpp:213
+
Vector2 & operator+=(const ::Vector2 &vector2)
Add two vectors (v1 + v2)
Definition: Vector2.hpp:65
+
Vector2 Rotate(float angle) const
Rotate Vector by float in radians.
Definition: Vector2.hpp:201
+
bool CheckCollisionPointLine(::Vector2 p1, ::Vector2 p2, int threshold=1) const
Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels...
Definition: Vector2.hpp:338
+
Vector2 Transform(::Matrix mat) const
Transforms a Vector2 by a given Matrix.
Definition: Vector2.hpp:186
+
bool CheckCollisionLines(::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2 *collisionPoint) const
Check the collision between two lines defined by two points each, returns collision point by referenc...
Definition: Vector2.hpp:331
+
static Vector2 One()
Vector with components value 1.0f.
Definition: Vector2.hpp:268
+
int Equals(::Vector2 q) const
Check whether two given vectors are almost equal.
Definition: Vector2.hpp:228
+
Vector2 Normalize() const
Normalize provided vector.
Definition: Vector2.hpp:181
+
Vector2 operator-() const
Negate vector.
Definition: Vector2.hpp:98
+
Vector2 operator-(const ::Vector2 &vector2) const
Subtract two vectors (v1 - v2)
Definition: Vector2.hpp:79
+
float Angle(const ::Vector2 &vector2) const
Calculate angle from two vectors in X-axis.
Definition: Vector2.hpp:258
+
Vector2 Divide(const float div) const
Divide vector by value.
Definition: Vector2.hpp:161
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_vector3_8hpp_source.html b/_vector3_8hpp_source.html new file mode 100644 index 00000000..5e2c51f9 --- /dev/null +++ b/_vector3_8hpp_source.html @@ -0,0 +1,314 @@ + + + + + + + +raylib-cpp: Vector3.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Vector3.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
+
3 
+
4 #ifndef RAYLIB_CPP_NO_MATH
+
5 #include <cmath>
+
6 #endif
+
7 
+
8 #include <string>
+
9 
+
10 #include "./raylib-cpp-utils.hpp"
+
11 #include "./raylib.hpp"
+
12 #include "./raymath.hpp"
+
13 
+
14 namespace raylib {
+
18 class Vector3 : public ::Vector3 {
+
19 public:
+
20  Vector3(const ::Vector3& vec) : ::Vector3{vec.x, vec.y, vec.z} {}
+
21 
+
22  Vector3(float x, float y, float z) : ::Vector3{x, y, z} {}
+
23  Vector3(float x, float y) : ::Vector3{x, y, 0} {}
+
24  Vector3(float x) : ::Vector3{x, 0, 0} {}
+
25  Vector3() {}
+
26 
+
27  Vector3(::Color color) { set(ColorToHSV(color)); }
+
28 
+
29  GETTERSETTER(float, X, x)
+
30  GETTERSETTER(float, Y, y)
+
31  GETTERSETTER(float, Z, z)
+
32 
+
33  Vector3& operator=(const ::Vector3& vector3) {
+
34  set(vector3);
+
35  return *this;
+
36  }
+
37 
+
38  bool operator==(const ::Vector3& other) const { return x == other.x && y == other.y && z == other.z; }
+
39 
+
40  bool operator!=(const ::Vector3& other) const { return !(*this == other); }
+
41 
+
42  std::string ToString() const { return TextFormat("Vector3(%f, %f, %f)", x, y, z); }
+
43 
+
44  operator std::string() const { return ToString(); }
+
45 
+
46 #ifndef RAYLIB_CPP_NO_MATH
+
50  Vector3 Add(const ::Vector3& vector3) const { return Vector3Add(*this, vector3); }
+
51 
+
55  Vector3 operator+(const ::Vector3& vector3) const { return Vector3Add(*this, vector3); }
+
56 
+
57  Vector3& operator+=(const ::Vector3& vector3) {
+
58  set(Vector3Add(*this, vector3));
+
59 
+
60  return *this;
+
61  }
+
62 
+
66  Vector3 Subtract(const ::Vector3& vector3) const { return Vector3Subtract(*this, vector3); }
+
67 
+
71  Vector3 operator-(const ::Vector3& vector3) const { return Vector3Subtract(*this, vector3); }
+
72 
+
73  Vector3& operator-=(const ::Vector3& vector3) {
+
74  set(Vector3Subtract(*this, vector3));
+
75 
+
76  return *this;
+
77  }
+
78 
+
82  Vector3 Negate() const { return Vector3Negate(*this); }
+
83 
+
87  Vector3 operator-() const { return Vector3Negate(*this); }
+
88 
+
92  Vector3 Multiply(const ::Vector3& vector3) const { return Vector3Multiply(*this, vector3); }
+
93 
+
97  Vector3 operator*(const ::Vector3& vector3) const { return Vector3Multiply(*this, vector3); }
+
98 
+
102  Vector3& operator*=(const ::Vector3& vector3) {
+
103  set(Vector3Multiply(*this, vector3));
+
104 
+
105  return *this;
+
106  }
+
107 
+
111  Vector3 Scale(const float scaler) const { return Vector3Scale(*this, scaler); }
+
112 
+
116  Vector3 operator*(const float scaler) const { return Vector3Scale(*this, scaler); }
+
117 
+
121  Vector3& operator*=(const float scaler) {
+
122  set(Vector3Scale(*this, scaler));
+
123 
+
124  return *this;
+
125  }
+
126 
+
130  Vector3 Divide(const ::Vector3& vector3) const { return Vector3Divide(*this, vector3); }
+
131 
+
135  Vector3 operator/(const ::Vector3& vector3) const { return Vector3Divide(*this, vector3); }
+
136 
+
140  Vector3& operator/=(const ::Vector3& vector3) {
+
141  x /= vector3.x;
+
142  y /= vector3.y;
+
143  z /= vector3.z;
+
144 
+
145  return *this;
+
146  }
+
147 
+
151  Vector3 Divide(const float div) const { return ::Vector3{x / div, y / div, z / div}; }
+
152 
+
156  Vector3 operator/(const float div) const { return Divide(div); }
+
157 
+
161  Vector3& operator/=(const float div) {
+
162  x /= div;
+
163  y /= div;
+
164  z /= div;
+
165 
+
166  return *this;
+
167  }
+
168 
+
172  float Length() const { return Vector3Length(*this); }
+
173 
+
177  float LengthSqr() const { return Vector3LengthSqr(*this); }
+
178 
+
179  Vector3 Normalize() const { return Vector3Normalize(*this); }
+
180 
+
181  float DotProduct(const ::Vector3& vector3) const { return Vector3DotProduct(*this, vector3); }
+
182 
+
183  float Distance(const ::Vector3& vector3) const { return Vector3Distance(*this, vector3); }
+
184 
+
185  Vector3 Lerp(const ::Vector3& vector3, const float amount) const { return Vector3Lerp(*this, vector3, amount); }
+
186 
+
187  Vector3 CrossProduct(const ::Vector3& vector3) const { return Vector3CrossProduct(*this, vector3); }
+
188 
+
189  Vector3 Perpendicular() const { return Vector3Perpendicular(*this); }
+
190 
+
191  Vector3 Project(const ::Vector3& vector3) const { return Vector3Project(*this, vector3); }
+
192 
+
193  Vector3 Reject(const ::Vector3& vector3) const { return Vector3Reject(*this, vector3); }
+
194 
+
195  void OrthoNormalize(::Vector3* vector3) { Vector3OrthoNormalize(this, vector3); }
+
196 
+
197  Vector3 Transform(const ::Matrix& matrix) const { return Vector3Transform(*this, matrix); }
+
198 
+
199  Vector3 RotateByQuaternion(const ::Quaternion& quaternion) const {
+
200  return Vector3RotateByQuaternion(*this, quaternion);
+
201  }
+
202 
+
203  Vector3 Reflect(const ::Vector3& normal) const { return Vector3Reflect(*this, normal); }
+
204 
+
205  Vector3 Min(const ::Vector3& vector3) const { return Vector3Min(*this, vector3); }
+
206 
+
207  Vector3 Max(const ::Vector3& vector3) const { return Vector3Max(*this, vector3); }
+
208 
+
209  Vector3 Barycenter(const ::Vector3& a, const ::Vector3& b, const ::Vector3& c) const {
+
210  return Vector3Barycenter(*this, a, b, c);
+
211  }
+
212 
+
213  static Vector3 Zero() { return Vector3Zero(); }
+
214 
+
215  static Vector3 One() { return Vector3One(); }
+
216 #endif
+
217 
+
218  void DrawLine3D(const ::Vector3& endPos, ::Color color) const { ::DrawLine3D(*this, endPos, color); }
+
219 
+
220  void DrawPoint3D(::Color color) const { ::DrawPoint3D(*this, color); }
+
221 
+
222  void DrawCircle3D(float radius, const ::Vector3& rotationAxis, float rotationAngle, Color color) const {
+
223  ::DrawCircle3D(*this, radius, rotationAxis, rotationAngle, color);
+
224  }
+
225 
+
226  void DrawCube(float width, float height, float length, ::Color color) const {
+
227  ::DrawCube(*this, width, height, length, color);
+
228  }
+
229 
+
230  void DrawCube(const ::Vector3& size, ::Color color) const { ::DrawCubeV(*this, size, color); }
+
231 
+
232  void DrawCubeWires(float width, float height, float length, ::Color color) const {
+
233  ::DrawCubeWires(*this, width, height, length, color);
+
234  }
+
235 
+
236  void DrawCubeWires(const ::Vector3& size, ::Color color) const { ::DrawCubeWiresV(*this, size, color); }
+
237 
+
238  void DrawSphere(float radius, ::Color color) const { ::DrawSphere(*this, radius, color); }
+
239 
+
240  void DrawSphere(float radius, int rings, int slices, ::Color color) const {
+
241  ::DrawSphereEx(*this, radius, rings, slices, color);
+
242  }
+
243 
+
244  void DrawSphereWires(float radius, int rings, int slices, ::Color color) const {
+
245  ::DrawSphereWires(*this, radius, rings, slices, color);
+
246  }
+
247 
+
248  void DrawCylinder(float radiusTop, float radiusBottom, float height, int slices, ::Color color) const {
+
249  ::DrawCylinder(*this, radiusTop, radiusBottom, height, slices, color);
+
250  }
+
251 
+
252  void DrawCylinderWires(float radiusTop, float radiusBottom, float height, int slices, ::Color color) const {
+
253  ::DrawCylinderWires(*this, radiusTop, radiusBottom, height, slices, color);
+
254  }
+
255 
+
256  void DrawPlane(const ::Vector2& size, ::Color color) const { ::DrawPlane(*this, size, color); }
+
257 
+
261  bool CheckCollision(float radius1, const ::Vector3& center2, float radius2) const {
+
262  return CheckCollisionSpheres(*this, radius1, center2, radius2);
+
263  }
+
264 protected:
+
265  void set(const ::Vector3& vec) {
+
266  x = vec.x;
+
267  y = vec.y;
+
268  z = vec.z;
+
269  }
+
270 };
+
271 } // namespace raylib
+
272 
+
273 using RVector3 = raylib::Vector3;
+
274 
+
275 #endif // RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Vector3 type.
Definition: Vector3.hpp:18
+
Vector3 operator/(const ::Vector3 &vector3) const
Divide vector by vector.
Definition: Vector3.hpp:135
+
Vector3 Negate() const
Negate provided vector (invert direction)
Definition: Vector3.hpp:82
+
Vector3 operator-() const
Negate provided vector (invert direction)
Definition: Vector3.hpp:87
+
Vector3 operator*(const ::Vector3 &vector3) const
Multiply vector by vector.
Definition: Vector3.hpp:97
+
Vector3 & operator/=(const ::Vector3 &vector3)
Divide vector by vector.
Definition: Vector3.hpp:140
+
Vector3 & operator*=(const ::Vector3 &vector3)
Multiply vector by vector.
Definition: Vector3.hpp:102
+
Vector3 operator/(const float div) const
Divide a vector by a value.
Definition: Vector3.hpp:156
+
float LengthSqr() const
Calculate vector square length.
Definition: Vector3.hpp:177
+
Vector3 operator+(const ::Vector3 &vector3) const
Add two vectors.
Definition: Vector3.hpp:55
+
Vector3 Add(const ::Vector3 &vector3) const
Add two vectors.
Definition: Vector3.hpp:50
+
Vector3 Scale(const float scaler) const
Multiply vector by scalar.
Definition: Vector3.hpp:111
+
float Length() const
Calculate vector length.
Definition: Vector3.hpp:172
+
Vector3 Divide(const ::Vector3 &vector3) const
Divide vector by vector.
Definition: Vector3.hpp:130
+
Vector3 Divide(const float div) const
Divide a vector by a value.
Definition: Vector3.hpp:151
+
Vector3 Subtract(const ::Vector3 &vector3) const
Subtract two vectors.
Definition: Vector3.hpp:66
+
Vector3 & operator/=(const float div)
Divide a vector by a value.
Definition: Vector3.hpp:161
+
Vector3 & operator*=(const float scaler)
Multiply vector by scalar.
Definition: Vector3.hpp:121
+
Vector3 Multiply(const ::Vector3 &vector3) const
Multiply vector by vector.
Definition: Vector3.hpp:92
+
Vector3 operator-(const ::Vector3 &vector3) const
Subtract two vectors.
Definition: Vector3.hpp:71
+
bool CheckCollision(float radius1, const ::Vector3 &center2, float radius2) const
Detect collision between two spheres.
Definition: Vector3.hpp:261
+
Vector3 operator*(const float scaler) const
Multiply vector by scalar.
Definition: Vector3.hpp:116
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_vector4_8hpp_source.html b/_vector4_8hpp_source.html new file mode 100644 index 00000000..150bcf7d --- /dev/null +++ b/_vector4_8hpp_source.html @@ -0,0 +1,214 @@ + + + + + + + +raylib-cpp: Vector4.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Vector4.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
+
3 
+
4 #ifndef RAYLIB_CPP_NO_MATH
+
5 #include <cmath>
+
6 #include <utility>
+
7 #endif
+
8 
+
9 #include <string>
+
10 
+
11 #include "./raylib-cpp-utils.hpp"
+
12 #include "./raylib.hpp"
+
13 #include "./raymath.hpp"
+
14 
+
15 namespace raylib {
+
19 class Vector4 : public ::Vector4 {
+
20 public:
+
21  Vector4(const ::Vector4& vec) : ::Vector4{vec.x, vec.y, vec.z, vec.w} {}
+
22 
+
23  Vector4(float x, float y, float z, float w) : ::Vector4{x, y, z, w} {}
+
24  Vector4(float x, float y, float z) : ::Vector4{x, y, z, 0} {}
+
25  Vector4(float x, float y) : ::Vector4{x, y, 0, 0} {}
+
26  Vector4(float x) : ::Vector4{x, 0, 0, 0} {}
+
27  Vector4() : ::Vector4{0, 0, 0, 0} {}
+
28  Vector4(::Rectangle rectangle) : ::Vector4{rectangle.x, rectangle.y, rectangle.width, rectangle.height} {}
+
29 
+
30  Vector4(::Color color) { set(ColorNormalize(color)); }
+
31 
+
32  GETTERSETTER(float, X, x)
+
33  GETTERSETTER(float, Y, y)
+
34  GETTERSETTER(float, Z, z)
+
35  GETTERSETTER(float, W, w)
+
36 
+
37  Vector4& operator=(const ::Vector4& vector4) {
+
38  set(vector4);
+
39  return *this;
+
40  }
+
41 
+
42  bool operator==(const ::Vector4& other) const {
+
43  return x == other.x && y == other.y && z == other.z && w == other.w;
+
44  }
+
45 
+
46  bool operator!=(const ::Vector4& other) const { return !(*this == other); }
+
47 
+
48  ::Rectangle ToRectangle() const { return {x, y, z, w}; }
+
49 
+
50  operator ::Rectangle() const { return {x, y, z, w}; }
+
51 
+
52  std::string ToString() const { return TextFormat("Vector4(%f, %f, %f, %f)", x, y, z, w); }
+
53 
+
54  operator std::string() const { return ToString(); }
+
55 
+
56 #ifndef RAYLIB_CPP_NO_MATH
+
57  Vector4 Multiply(const ::Vector4& vector4) const { return QuaternionMultiply(*this, vector4); }
+
58 
+
59  Vector4 operator*(const ::Vector4& vector4) const { return QuaternionMultiply(*this, vector4); }
+
60 
+
61  Vector4 Lerp(const ::Vector4& vector4, float amount) const { return QuaternionLerp(*this, vector4, amount); }
+
62 
+
63  Vector4 Nlerp(const ::Vector4& vector4, float amount) const { return QuaternionNlerp(*this, vector4, amount); }
+
64 
+
65  Vector4 Slerp(const ::Vector4& vector4, float amount) const { return QuaternionSlerp(*this, vector4, amount); }
+
66 
+
67  Matrix ToMatrix() const { return QuaternionToMatrix(*this); }
+
68 
+
69  float Length() const { return QuaternionLength(*this); }
+
70 
+
71  Vector4 Normalize() const { return QuaternionNormalize(*this); }
+
72 
+
73  Vector4 Invert() const { return QuaternionInvert(*this); }
+
74 
+
75  void ToAxisAngle(::Vector3* outAxis, float* outAngle) const { QuaternionToAxisAngle(*this, outAxis, outAngle); }
+
76 
+
80  std::pair<Vector3, float> ToAxisAngle() const {
+
81  Vector3 outAxis;
+
82  float outAngle;
+
83  QuaternionToAxisAngle(*this, &outAxis, &outAngle);
+
84 
+
85  return std::pair<Vector3, float>(outAxis, outAngle);
+
86  }
+
87 
+
88  Vector4 Transform(const ::Matrix& matrix) const { return ::QuaternionTransform(*this, matrix); }
+
89 
+
90  static Vector4 Identity() { return ::QuaternionIdentity(); }
+
91 
+
92  static Vector4 FromVector3ToVector3(const ::Vector3& from, const ::Vector3& to) {
+
93  return ::QuaternionFromVector3ToVector3(from, to);
+
94  }
+
95 
+
96  static Vector4 FromMatrix(const ::Matrix& matrix) { return ::QuaternionFromMatrix(matrix); }
+
97 
+
98  static Vector4 FromAxisAngle(const ::Vector3& axis, const float angle) {
+
99  return ::QuaternionFromAxisAngle(axis, angle);
+
100  }
+
101 
+
102  static Vector4 FromEuler(const float pitch, const float yaw, const float roll) {
+
103  return ::QuaternionFromEuler(pitch, yaw, roll);
+
104  }
+
105 
+
106  static Vector4 FromEuler(const ::Vector3& vector3) {
+
107  return ::QuaternionFromEuler(vector3.x, vector3.y, vector3.z);
+
108  }
+
109 
+
110  Vector3 ToEuler() const { return ::QuaternionToEuler(*this); }
+
111 #endif
+
112 
+
113  Color ColorFromNormalized() const { return ::ColorFromNormalized(*this); }
+
114 
+
115  operator Color() const { return ColorFromNormalized(); }
+
116 protected:
+
117  void set(const ::Vector4& vec4) {
+
118  x = vec4.x;
+
119  y = vec4.y;
+
120  z = vec4.z;
+
121  w = vec4.w;
+
122  }
+
123 };
+
124 
+
125 // Alias the Vector4 as Quaternion.
+
126 using Quaternion = Vector4;
+
127 
+
128 } // namespace raylib
+
129 
+
130 using RVector4 = raylib::Vector4;
+ +
132 
+
133 #endif // RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Rectangle type.
Definition: Rectangle.hpp:12
+
Vector3 type.
Definition: Vector3.hpp:18
+
Vector4 type.
Definition: Vector4.hpp:19
+
std::pair< Vector3, float > ToAxisAngle() const
Get the rotation angle and axis for a given quaternion.
Definition: Vector4.hpp:80
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_vr_stereo_config_8hpp_source.html b/_vr_stereo_config_8hpp_source.html new file mode 100644 index 00000000..32a95cc1 --- /dev/null +++ b/_vr_stereo_config_8hpp_source.html @@ -0,0 +1,139 @@ + + + + + + + +raylib-cpp: VrStereoConfig.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
VrStereoConfig.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_
+
3 
+
4 #include "./raylib-cpp-utils.hpp"
+
5 #include "./raylib.hpp"
+
6 
+
7 namespace raylib {
+ +
12 public:
+
13  VrStereoConfig(const ::VrDeviceInfo& info) { Load(info); }
+
14 
+
18  void Load(const ::VrDeviceInfo& info) { set(LoadVrStereoConfig(info)); }
+
19 
+ +
24 
+ +
29  ::BeginVrStereoMode(*this);
+
30  return *this;
+
31  }
+
32 
+ +
37  ::EndVrStereoMode();
+
38  return *this;
+
39  }
+
40 
+
44  void Unload() { ::UnloadVrStereoConfig(*this); }
+
45 protected:
+
46  void set(const ::VrStereoConfig& config) {
+
47  projection[0] = config.projection[0];
+
48  projection[1] = config.projection[1];
+
49  viewOffset[0] = config.viewOffset[0];
+
50  viewOffset[1] = config.viewOffset[1];
+
51  leftLensCenter[0] = config.leftLensCenter[0];
+
52  leftLensCenter[1] = config.leftLensCenter[1];
+
53  rightLensCenter[0] = config.rightLensCenter[0];
+
54  rightLensCenter[1] = config.rightLensCenter[1];
+
55  leftScreenCenter[0] = config.leftScreenCenter[0];
+
56  leftScreenCenter[1] = config.leftScreenCenter[1];
+
57  rightScreenCenter[0] = config.rightScreenCenter[0];
+
58  rightScreenCenter[1] = config.rightScreenCenter[1];
+
59  scale[0] = config.scale[0];
+
60  scale[1] = config.scale[1];
+
61  scaleIn[0] = config.scaleIn[0];
+
62  scaleIn[1] = config.scaleIn[1];
+
63  }
+
64 };
+
65 } // namespace raylib
+
66 
+ +
68 
+
69 #endif // RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_
+
VR stereo config functions for VR simulator.
+
void Load(const ::VrDeviceInfo &info)
Load VR stereo config for VR simulator device parameters.
+
VrStereoConfig & BeginMode()
Begin stereo rendering.
+
void Unload()
Unload VR stereo config.
+
VrStereoConfig & EndMode()
End stereo rendering.
+
~VrStereoConfig()
Unload VR stereo config.
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_wave_8hpp_source.html b/_wave_8hpp_source.html new file mode 100644 index 00000000..4e799564 --- /dev/null +++ b/_wave_8hpp_source.html @@ -0,0 +1,251 @@ + + + + + + + +raylib-cpp: Wave.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Wave.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_WAVE_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_WAVE_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./RaylibException.hpp"
+
7 #include "./raylib-cpp-utils.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
14 class Wave : public ::Wave {
+
15 public:
+
16  Wave(const ::Wave& wave) { set(wave); }
+
17 
+
18  Wave(
+
19  unsigned int frameCount = 0,
+
20  unsigned int sampleRate = 0,
+
21  unsigned int sampleSize = 0,
+
22  unsigned int channels = 0,
+
23  void* data = nullptr)
+
24  : ::Wave{frameCount, sampleRate, sampleSize, channels, data} {
+
25  // Nothing.
+
26  }
+
27 
+
33  Wave(const std::string& fileName) { Load(fileName); }
+
34 
+
40  Wave(const std::string& fileType, const unsigned char* fileData, int dataSize) {
+
41  Load(fileType, fileData, dataSize);
+
42  }
+
43 
+
44  Wave(const Wave& other) { set(other.Copy()); }
+
45 
+
46  Wave(Wave&& other) {
+
47  set(other);
+
48 
+
49  other.frameCount = 0;
+
50  other.sampleRate = 0;
+
51  other.sampleSize = 0;
+
52  other.channels = 0;
+
53  other.data = nullptr;
+
54  }
+
55 
+
59  ~Wave() { Unload(); }
+
60 
+
61  GETTER(unsigned int, FrameCount, frameCount)
+
62  GETTER(unsigned int, SampleRate, sampleRate)
+
63  GETTER(unsigned int, SampleSize, sampleSize)
+
64  GETTER(unsigned int, Channels, channels)
+
65  GETTER(void*, Data, data)
+
66 
+
67  Wave& operator=(const ::Wave& wave) {
+
68  set(wave);
+
69  return *this;
+
70  }
+
71 
+
72  Wave& operator=(const Wave& other) {
+
73  if (this == &other) {
+
74  return *this;
+
75  }
+
76 
+
77  Unload();
+
78  set(other.Copy());
+
79 
+
80  return *this;
+
81  }
+
82 
+
83  Wave& operator=(Wave&& other) noexcept {
+
84  if (this != &other) {
+
85  return *this;
+
86  }
+
87 
+
88  Unload();
+
89  set(other);
+
90 
+
91  other.frameCount = 0;
+
92  other.sampleRate = 0;
+
93  other.sampleSize = 0;
+
94  other.channels = 0;
+
95  other.data = nullptr;
+
96 
+
97  return *this;
+
98  }
+
99 
+
103  ::Wave Copy() const { return ::WaveCopy(*this); }
+
104 
+
108  Wave& Crop(int initSample, int finalSample) {
+
109  ::WaveCrop(this, initSample, finalSample);
+
110  return *this;
+
111  }
+
112 
+
116  Wave& Format(int SampleRate, int SampleSize, int Channels = 2) {
+
117  ::WaveFormat(this, SampleRate, SampleSize, Channels);
+
118  return *this;
+
119  }
+
120 
+
124  float* LoadSamples() { return ::LoadWaveSamples(*this); }
+
125 
+
129  static void UnloadSamples(float* samples) { ::UnloadWaveSamples(samples); }
+
130 
+
134  bool Export(const std::string& fileName) {
+
135  // TODO(RobLoach): Throw exception on error.
+
136  return ::ExportWave(*this, fileName.c_str());
+
137  }
+
138 
+
142  bool ExportAsCode(const std::string& fileName) {
+
143  // TODO(RobLoach): Throw exception on error.
+
144  return ::ExportWaveAsCode(*this, fileName.c_str());
+
145  }
+
146 
+
150  void Unload() {
+
151  // Protect against calling UnloadWave() twice.
+
152  if (data != nullptr) {
+
153  ::UnloadWave(*this);
+
154  data = nullptr;
+
155  }
+
156  }
+
157 
+
161  ::Sound LoadSound() { return ::LoadSoundFromWave(*this); }
+
162 
+
166  operator ::Sound() { return LoadSound(); }
+
167 
+
173  void Load(const std::string& fileName) {
+
174  set(::LoadWave(fileName.c_str()));
+
175  if (!IsValid()) {
+
176  throw RaylibException("Failed to load Wave from file: " + fileName);
+
177  }
+
178  }
+
179 
+
185  void Load(const std::string& fileType, const unsigned char* fileData, int dataSize) {
+
186  set(::LoadWaveFromMemory(fileType.c_str(), fileData, dataSize));
+
187  if (!IsValid()) {
+
188  throw RaylibException("Failed to load Wave from file data of type: " + fileType);
+
189  }
+
190  }
+
191 
+
197  bool IsValid() const { return ::IsWaveValid(*this); }
+
198 protected:
+
199  void set(const ::Wave& wave) {
+
200  frameCount = wave.frameCount;
+
201  sampleRate = wave.sampleRate;
+
202  sampleSize = wave.sampleSize;
+
203  channels = wave.channels;
+
204  data = wave.data;
+
205  }
+
206 };
+
207 
+
208 } // namespace raylib
+
209 
+
210 using RWave = raylib::Wave;
+
211 
+
212 #endif // RAYLIB_CPP_INCLUDE_WAVE_HPP_
+
Exception used for most raylib-related exceptions.
+
Wave/Sound management functions.
Definition: Sound.hpp:19
+
Wave type, defines audio wave data.
Definition: Wave.hpp:14
+
Wave & Crop(int initSample, int finalSample)
Crop a wave to defined samples range.
Definition: Wave.hpp:108
+
void Load(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load wave from memory buffer, fileType refers to extension: i.e.
Definition: Wave.hpp:185
+
Wave(const std::string &fileType, const unsigned char *fileData, int dataSize)
Load wave from memory buffer, fileType refers to extension: i.e.
Definition: Wave.hpp:40
+
::Wave Copy() const
Copy a wave to a new wave.
Definition: Wave.hpp:103
+
bool ExportAsCode(const std::string &fileName)
Export wave sample data to code (.h), returns true on success.
Definition: Wave.hpp:142
+
::Sound LoadSound()
Load sound from wave data.
Definition: Wave.hpp:161
+
Wave & Format(int SampleRate, int SampleSize, int Channels=2)
Convert wave data to desired format.
Definition: Wave.hpp:116
+
~Wave()
Unload wave data.
Definition: Wave.hpp:59
+
void Unload()
Unload wave data.
Definition: Wave.hpp:150
+
bool IsValid() const
Retrieve whether or not the Wave data has been loaded.
Definition: Wave.hpp:197
+
bool Export(const std::string &fileName)
Export wave data to file, returns true on success.
Definition: Wave.hpp:134
+
float * LoadSamples()
Load samples data from wave as a floats array.
Definition: Wave.hpp:124
+
static void UnloadSamples(float *samples)
Unload samples data loaded with LoadWaveSamples()
Definition: Wave.hpp:129
+
Wave(const std::string &fileName)
Load wave data from file.
Definition: Wave.hpp:33
+
void Load(const std::string &fileName)
Load wave data from file.
Definition: Wave.hpp:173
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
+ + + + diff --git a/_window_8hpp_source.html b/_window_8hpp_source.html new file mode 100644 index 00000000..03214c85 --- /dev/null +++ b/_window_8hpp_source.html @@ -0,0 +1,364 @@ + + + + + + + +raylib-cpp: Window.hpp Source File + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Window.hpp
+
+
+
1 #ifndef RAYLIB_CPP_INCLUDE_WINDOW_HPP_
+
2 #define RAYLIB_CPP_INCLUDE_WINDOW_HPP_
+
3 
+
4 #include <string>
+
5 
+
6 #include "./RaylibException.hpp"
+
7 #include "./Vector2.hpp"
+
8 #include "./raylib.hpp"
+
9 
+
10 namespace raylib {
+
14 class Window {
+
15 public:
+
21  Window() {
+
22  // Nothing.
+
23  }
+
24 
+
38  Window(int width, int height, const std::string& title = "raylib", unsigned int flags = 0) {
+
39  Init(width, height, title, flags);
+
40  }
+
41 
+
45  ~Window() { Close(); }
+
46 
+
60  void Init(int width = 800, int height = 450, const std::string& title = "raylib", unsigned int flags = 0) {
+
61  if (flags != 0) {
+
62  ::SetConfigFlags(flags);
+
63  }
+
64  ::InitWindow(width, height, title.c_str());
+
65  if (!::IsWindowReady()) {
+
66  throw RaylibException("Failed to create Window");
+
67  }
+
68  }
+
69 
+
73  bool ShouldClose() const { return ::WindowShouldClose(); }
+
74 
+
78  void SetExitKey(int key) { ::SetExitKey(key); }
+
79 
+
83  void Close() {
+
84  if (::IsWindowReady()) {
+
85  ::CloseWindow();
+
86  }
+
87  }
+
88 
+
92  bool IsCursorOnScreen() const { return ::IsCursorOnScreen(); }
+
93 
+
97  bool IsFullscreen() const { return ::IsWindowFullscreen(); }
+
98 
+
102  bool IsHidden() const { return ::IsWindowHidden(); }
+
103 
+
107  bool IsMinimized() const { return ::IsWindowMinimized(); }
+
108 
+
112  bool IsMaximized() const { return ::IsWindowMaximized(); }
+
113 
+
117  bool IsFocused() const { return ::IsWindowFocused(); }
+
118 
+
122  bool IsResized() const { return ::IsWindowResized(); }
+
123 
+
127  bool IsState(unsigned int flag) const { return ::IsWindowState(flag); }
+
128 
+
132  Window& SetState(unsigned int flag) {
+
133  ::SetWindowState(flag);
+
134  return *this;
+
135  }
+
136 
+
140  Window& ClearState(unsigned int flag) {
+
141  ::ClearWindowState(flag);
+
142  return *this;
+
143  }
+
144 
+
148  Window& ClearBackground(const ::Color& color = BLACK) {
+
149  ::ClearBackground(color);
+
150  return *this;
+
151  }
+
152 
+ + +
158  return *this;
+
159  }
+
160 
+
164  Window& SetFullscreen(bool fullscreen) {
+
165  if (fullscreen) {
+
166  if (!IsFullscreen()) {
+ +
168  }
+
169  }
+
170  else {
+
171  if (IsFullscreen()) {
+ +
173  }
+
174  }
+
175 
+
176  return *this;
+
177  }
+
178 
+ +
183  ::ToggleBorderlessWindowed();
+
184  return *this;
+
185  }
+
186 
+ +
191  ::MaximizeWindow();
+
192  return *this;
+
193  }
+
194 
+ +
199  ::MinimizeWindow();
+
200  return *this;
+
201  }
+
202 
+ +
207  ::RestoreWindow();
+
208  return *this;
+
209  }
+
210 
+
214  Window& SetIcon(const ::Image& image) {
+
215  ::SetWindowIcon(image);
+
216  return *this;
+
217  }
+
218 
+
222  Window& SetIcons(Image* images, int count) {
+
223  ::SetWindowIcons(images, count);
+
224  return *this;
+
225  }
+
226 
+
230  Window& SetTitle(const std::string& title) {
+
231  ::SetWindowTitle(title.c_str());
+
232  return *this;
+
233  }
+
234 
+
238  Window& SetPosition(int x, int y) {
+
239  ::SetWindowPosition(x, y);
+
240  return *this;
+
241  }
+
242 
+
246  Window& SetPosition(const ::Vector2& position) {
+
247  return SetPosition(static_cast<int>(position.x), static_cast<int>(position.y));
+
248  }
+
249 
+
253  Window& SetMonitor(int monitor) {
+
254  ::SetWindowMonitor(monitor);
+
255  return *this;
+
256  }
+
257 
+
261  Window& SetMinSize(int width, int height) {
+
262  ::SetWindowMinSize(width, height);
+
263  return *this;
+
264  }
+
265 
+
269  Window& SetMinSize(const ::Vector2& size) {
+
270  ::SetWindowMinSize(static_cast<int>(size.x), static_cast<int>(size.y));
+
271  return *this;
+
272  }
+
273 
+
277  Window& SetSize(int width, int height) {
+
278  ::SetWindowSize(width, height);
+
279  return *this;
+
280  }
+
281 
+
285  Window& SetOpacity(float opacity) {
+
286  ::SetWindowOpacity(opacity);
+
287  return *this;
+
288  }
+
289 
+ +
294  ::SetWindowFocused();
+
295  return *this;
+
296  }
+
297 
+
301  Window& SetSize(const ::Vector2& size) { return SetSize(static_cast<int>(size.x), static_cast<int>(size.y)); }
+
302 
+
306  Vector2 GetSize() const { return {static_cast<float>(GetWidth()), static_cast<float>(GetHeight())}; }
+
307 
+
311  void* GetHandle() const { return ::GetWindowHandle(); }
+
312 
+ +
317  ::BeginDrawing();
+
318  return *this;
+
319  }
+
320 
+ +
325  ::EndDrawing();
+
326  return *this;
+
327  }
+
328 
+
332  int GetWidth() const { return ::GetScreenWidth(); }
+
333 
+
337  int GetHeight() const { return ::GetScreenHeight(); }
+
338 
+
342  int GetRenderWidth() const { return ::GetRenderWidth(); }
+
343 
+
347  int GetRenderHeight() const { return ::GetRenderHeight(); }
+
348 
+
352  Vector2 GetPosition() const { return ::GetWindowPosition(); }
+
353 
+
357  Vector2 GetScaleDPI() const { return ::GetWindowScaleDPI(); }
+
358 
+
362  void SetClipboardText(const std::string& text) { ::SetClipboardText(text.c_str()); }
+
363 
+
367  const std::string GetClipboardText() { return ::GetClipboardText(); }
+
368 
+
372  Window& SetTargetFPS(int fps) {
+
373  ::SetTargetFPS(fps);
+
374  return *this;
+
375  }
+
376 
+
380  int GetFPS() const { return ::GetFPS(); }
+
381 
+
385  void DrawFPS(int posX = 10, int posY = 10) const { ::DrawFPS(posX, posY); }
+
386 
+
390  float GetFrameTime() const { return ::GetFrameTime(); }
+
391 
+
395  double GetTime() const { return ::GetTime(); }
+
396 
+
400  static bool IsReady() { return ::IsWindowReady(); }
+
401 
+
409  void SetConfigFlags(unsigned int flags) { ::SetConfigFlags(flags); }
+
410 };
+
411 } // namespace raylib
+
412 
+
413 using RWindow = raylib::Window;
+
414 
+
415 #endif // RAYLIB_CPP_INCLUDE_WINDOW_HPP_
+
Image type, bpp always RGBA (32bit)
Definition: Image.hpp:17
+
Exception used for most raylib-related exceptions.
+
Vector2 type.
Definition: Vector2.hpp:18
+
Window and Graphics Device Functions.
Definition: Window.hpp:14
+
int GetHeight() const
Get current screen height.
Definition: Window.hpp:337
+
int GetRenderWidth() const
Get current render width (it considers HiDPI)
Definition: Window.hpp:342
+
void * GetHandle() const
Get native window handle.
Definition: Window.hpp:311
+
int GetRenderHeight() const
Get current render height (it considers HiDPI)
Definition: Window.hpp:347
+
Window & Minimize()
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
Definition: Window.hpp:198
+
Window & SetTargetFPS(int fps)
Set target FPS (maximum)
Definition: Window.hpp:372
+
int GetWidth() const
Get current screen width.
Definition: Window.hpp:332
+
Window & SetTitle(const std::string &title)
Set title for window.
Definition: Window.hpp:230
+
Window & ClearState(unsigned int flag)
Clear window configuration state flags.
Definition: Window.hpp:140
+
Vector2 GetScaleDPI() const
Get window scale DPI factor.
Definition: Window.hpp:357
+
Vector2 GetPosition() const
Get window position XY on monitor.
Definition: Window.hpp:352
+
Window & EndDrawing()
End canvas drawing and swap buffers (double buffering)
Definition: Window.hpp:324
+
Window & ToggleFullscreen()
Toggle window state: fullscreen/windowed.
Definition: Window.hpp:156
+
Window & SetIcon(const ::Image &image)
Set icon for window.
Definition: Window.hpp:214
+
Window & SetSize(const ::Vector2 &size)
Set window dimensions.
Definition: Window.hpp:301
+
Window & SetIcons(Image *images, int count)
Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
Definition: Window.hpp:222
+
bool IsFullscreen() const
Check if window is currently fullscreen.
Definition: Window.hpp:97
+
void SetConfigFlags(unsigned int flags)
Sets the configuration flags for raylib.
Definition: Window.hpp:409
+
void Close()
Close window and unload OpenGL context.
Definition: Window.hpp:83
+
bool IsState(unsigned int flag) const
Check if one specific window flag is enabled.
Definition: Window.hpp:127
+
bool ShouldClose() const
Check if KEY_ESCAPE pressed or Close icon pressed.
Definition: Window.hpp:73
+
~Window()
Close window and unload OpenGL context.
Definition: Window.hpp:45
+
double GetTime() const
Returns elapsed time in seconds since InitWindow()
Definition: Window.hpp:395
+
Window & SetPosition(int x, int y)
Set window position on screen.
Definition: Window.hpp:238
+
Window & SetMonitor(int monitor)
Set monitor for the current window.
Definition: Window.hpp:253
+
Window & ClearBackground(const ::Color &color=BLACK)
Clear window with given color.
Definition: Window.hpp:148
+
Window & SetPosition(const ::Vector2 &position)
Set window position on screen.
Definition: Window.hpp:246
+
int GetFPS() const
Returns current FPS.
Definition: Window.hpp:380
+
void SetExitKey(int key)
Set a custom key to exit program (default is ESC)
Definition: Window.hpp:78
+
Window & BeginDrawing()
Setup canvas (framebuffer) to start drawing.
Definition: Window.hpp:316
+
Window & SetState(unsigned int flag)
Set window configuration state using flags.
Definition: Window.hpp:132
+
void DrawFPS(int posX=10, int posY=10) const
Draw current FPS.
Definition: Window.hpp:385
+
Window & Restore()
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
Definition: Window.hpp:206
+
Window & SetFocused()
Set window focused (only PLATFORM_DESKTOP)
Definition: Window.hpp:293
+
const std::string GetClipboardText()
Get clipboard text content.
Definition: Window.hpp:367
+
static bool IsReady()
Check if window has been initialized successfully.
Definition: Window.hpp:400
+
Window & SetSize(int width, int height)
Set window dimensions.
Definition: Window.hpp:277
+
Window(int width, int height, const std::string &title="raylib", unsigned int flags=0)
Initialize window and OpenGL context.
Definition: Window.hpp:38
+
float GetFrameTime() const
Returns time in seconds for last frame drawn.
Definition: Window.hpp:390
+
bool IsCursorOnScreen() const
Check if cursor is on the current screen.
Definition: Window.hpp:92
+
Vector2 GetSize() const
Get the screen's width and height.
Definition: Window.hpp:306
+
bool IsHidden() const
Check if window is currently hidden.
Definition: Window.hpp:102
+
bool IsResized() const
Check if window has been resized last frame.
Definition: Window.hpp:122
+
Window & SetMinSize(int width, int height)
Set window minimum dimensions.
Definition: Window.hpp:261
+
Window()
Build a Window object, but defer the initialization.
Definition: Window.hpp:21
+
void Init(int width=800, int height=450, const std::string &title="raylib", unsigned int flags=0)
Initializes the window.
Definition: Window.hpp:60
+
Window & ToggleBorderless()
Toggle window state: borderless/windowed.
Definition: Window.hpp:182
+
Window & SetMinSize(const ::Vector2 &size)
Set window minimum dimensions.
Definition: Window.hpp:269
+
Window & SetOpacity(float opacity)
Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
Definition: Window.hpp:285
+
bool IsFocused() const
Check if window is currently focused.
Definition: Window.hpp:117
+
bool IsMaximized() const
Check if window is currently minimized.
Definition: Window.hpp:112
+
Window & SetFullscreen(bool fullscreen)
Set whether or not the application should be fullscreen.
Definition: Window.hpp:164
+
Window & Maximize()
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
Definition: Window.hpp:190
+
bool IsMinimized() const
Check if window is currently minimized.
Definition: Window.hpp:107
+
void SetClipboardText(const std::string &text)
Set clipboard text content.
Definition: Window.hpp:362
+
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8
+
static void SetWindowTitle(const std::string &title)
Set title for window.
Definition: Functions.hpp:31
+
static void InitWindow(int width, int height, const std::string &title="raylib")
Initialize window and OpenGL context.
Definition: Functions.hpp:24
+
+ + + + diff --git a/annotated.html b/annotated.html new file mode 100644 index 00000000..ae535596 --- /dev/null +++ b/annotated.html @@ -0,0 +1,116 @@ + + + + + + + +raylib-cpp: Class List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 12]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 NraylibAll raylib-cpp classes and functions appear in the raylib namespace
 CAudioDeviceAudio device management functions
 CAudioStreamAudioStream management functions
 CAutomationEventListAutomationEventList management functions
 CBoundingBoxBounding box type
 CCamera2DCamera2D type, defines a 2d camera
 CCamera3DCamera type, defines a camera position/orientation in 3d space
 CColorColor type, RGBA (32bit)
 CFontFont type, includes texture and charSet array data
 CGamepadInput-related functions: gamepads
 CImageImage type, bpp always RGBA (32bit)
 CMaterialMaterial type (generic)
 CMatrixMatrix type (OpenGL style 4x4 - right handed, column major)
 CMeshVertex data defining a mesh
 CMeshUnmanagedVertex data defining a mesh, not managed by C++ RAII
 CModelModel type
 CModelAnimationModel animation
 CMusicMusic stream type (audio file streaming from memory)
 CRayRay type (useful for raycast)
 CRayCollisionRaycast hit information
 CRaylibExceptionException used for most raylib-related exceptions
 CRectangleRectangle type
 CRenderTextureRenderTexture type, for texture rendering
 CShaderShader type (generic)
 CShaderUnmanagedShader type (generic), not managed by C++ RAII
 CSoundWave/Sound management functions
 CTextText Functions
 CTextureTexture type
 CTextureUnmanagedA Texture that is not managed by C++ RAII
 CVector2Vector2 type
 CVector3Vector3 type
 CVector4Vector4 type
 CVrStereoConfigVR stereo config functions for VR simulator
 CWaveWave type, defines audio wave data
 CWindowWindow and Graphics Device Functions
+
+
+ + + + diff --git a/bc_s.png b/bc_s.png new file mode 100644 index 00000000..224b29aa Binary files /dev/null and b/bc_s.png differ diff --git a/bdwn.png b/bdwn.png new file mode 100644 index 00000000..940a0b95 Binary files /dev/null and b/bdwn.png differ diff --git a/classes.html b/classes.html new file mode 100644 index 00000000..b08a9bfe --- /dev/null +++ b/classes.html @@ -0,0 +1,116 @@ + + + + + + + +raylib-cpp: Class Index + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Class Index
+
+ + + + + diff --git a/classraylib_1_1_audio_device-members.html b/classraylib_1_1_audio_device-members.html new file mode 100644 index 00000000..3610a44e --- /dev/null +++ b/classraylib_1_1_audio_device-members.html @@ -0,0 +1,90 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::AudioDevice Member List
+
+
+ +

This is the complete list of members for raylib::AudioDevice, including all inherited members.

+ + + + + + + +
AudioDevice(bool lateInit=false)raylib::AudioDeviceinline
Close()raylib::AudioDeviceinline
Init()raylib::AudioDeviceinline
IsReady() constraylib::AudioDeviceinline
SetVolume(float volume)raylib::AudioDeviceinline
~AudioDevice()raylib::AudioDeviceinline
+ + + + diff --git a/classraylib_1_1_audio_device.html b/classraylib_1_1_audio_device.html new file mode 100644 index 00000000..205868ce --- /dev/null +++ b/classraylib_1_1_audio_device.html @@ -0,0 +1,237 @@ + + + + + + + +raylib-cpp: raylib::AudioDevice Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::AudioDevice Class Reference
+
+
+ +

Audio device management functions. + More...

+ + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 AudioDevice (bool lateInit=false)
 Initialize audio device and context. More...
 
~AudioDevice ()
 Close the audio device and context.
 
+void Close ()
 Close the audio device and context.
 
void Init ()
 Initialize audio device and context. More...
 
+bool IsReady () const
 Check if audio device has been initialized successfully.
 
AudioDeviceSetVolume (float volume)
 Set master volume (listener). More...
 
+

Detailed Description

+

Audio device management functions.

+ +

Definition at line 12 of file AudioDevice.hpp.

+

Constructor & Destructor Documentation

+ +

◆ AudioDevice()

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::AudioDevice::AudioDevice (bool lateInit = false)
+
+inline
+
+ +

Initialize audio device and context.

+
Parameters
+ + +
lateInitWhether or not to post-pone initializing the context.
+
+
+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the AudioDevice failed to initialize.
+
+
+ +

Definition at line 21 of file AudioDevice.hpp.

+ +

References Init().

+ +
+
+

Member Function Documentation

+ +

◆ Init()

+ +
+
+ + + + + +
+ + + + + + + +
void raylib::AudioDevice::Init ()
+
+inline
+
+ +

Initialize audio device and context.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the AudioDevice failed to initialize.
+
+
+ +

Definition at line 37 of file AudioDevice.hpp.

+ +

References IsReady().

+ +

Referenced by AudioDevice().

+ +
+
+ +

◆ SetVolume()

+ +
+
+ + + + + +
+ + + + + + + + +
AudioDevice& raylib::AudioDevice::SetVolume (float volume)
+
+inline
+
+ +

Set master volume (listener).

+
Parameters
+ + +
volumeThe desired volume to set.
+
+
+ +

Definition at line 59 of file AudioDevice.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_audio_stream-members.html b/classraylib_1_1_audio_stream-members.html new file mode 100644 index 00000000..ffe6626a --- /dev/null +++ b/classraylib_1_1_audio_stream-members.html @@ -0,0 +1,116 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::AudioStream Member List
+
+
+ +

This is the complete list of members for raylib::AudioStream, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttachProcessor(::AudioCallback processor)raylib::AudioStreaminline
AudioStream(const ::AudioStream &music) (defined in raylib::AudioStream)raylib::AudioStreaminline
AudioStream(rAudioBuffer *buffer=nullptr, rAudioProcessor *processor=nullptr, unsigned int sampleRate=0, unsigned int sampleSize=0, unsigned int channels=0) (defined in raylib::AudioStream)raylib::AudioStreaminline
AudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels=2)raylib::AudioStreaminline
AudioStream(const AudioStream &)=delete (defined in raylib::AudioStream)raylib::AudioStream
AudioStream(AudioStream &&other) (defined in raylib::AudioStream)raylib::AudioStreaminline
DetachProcessor(::AudioCallback processor)raylib::AudioStreaminline
GetBuffer() constraylib::AudioStreaminline
GetChannels() constraylib::AudioStreaminline
GetProcessor() constraylib::AudioStreaminline
GetSampleRate() constraylib::AudioStreaminline
GetSampleSize() constraylib::AudioStreaminline
IsPlaying() constraylib::AudioStreaminline
IsProcessed() constraylib::AudioStreaminline
IsValid() constraylib::AudioStreaminline
Load(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels=2)raylib::AudioStreaminline
operator=(const ::AudioStream &stream) (defined in raylib::AudioStream)raylib::AudioStreaminline
operator=(const AudioStream &)=delete (defined in raylib::AudioStream)raylib::AudioStream
operator=(AudioStream &&other) noexcept (defined in raylib::AudioStream)raylib::AudioStreaminline
Pause()raylib::AudioStreaminline
Play()raylib::AudioStreaminline
Resume()raylib::AudioStreaminline
set(const ::AudioStream &stream) (defined in raylib::AudioStream)raylib::AudioStreaminlineprotected
SetBufferSizeDefault(int size)raylib::AudioStreaminlinestatic
SetCallback(::AudioCallback callback)raylib::AudioStreaminline
SetPan(float pan=0.5f)raylib::AudioStreaminline
SetPitch(float pitch)raylib::AudioStreaminline
SetVolume(float volume=1.0f)raylib::AudioStreaminline
Stop()raylib::AudioStreaminline
Unload()raylib::AudioStreaminline
Update(const void *data, int samplesCount)raylib::AudioStreaminline
~AudioStream() (defined in raylib::AudioStream)raylib::AudioStreaminline
+ + + + diff --git a/classraylib_1_1_audio_stream.html b/classraylib_1_1_audio_stream.html new file mode 100644 index 00000000..f1075bae --- /dev/null +++ b/classraylib_1_1_audio_stream.html @@ -0,0 +1,474 @@ + + + + + + + +raylib-cpp: raylib::AudioStream Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

AudioStream management functions. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

AudioStream (AudioStream &&other)
 
AudioStream (const ::AudioStream &music)
 
AudioStream (const AudioStream &)=delete
 
AudioStream (rAudioBuffer *buffer=nullptr, rAudioProcessor *processor=nullptr, unsigned int sampleRate=0, unsigned int sampleSize=0, unsigned int channels=0)
 
 AudioStream (unsigned int sampleRate, unsigned int sampleSize, unsigned int channels=2)
 Init audio stream (to stream raw audio pcm data) More...
 
+void AttachProcessor (::AudioCallback processor)
 Attach audio stream processor to stream.
 
+void DetachProcessor (::AudioCallback processor)
 Detach audio stream processor from stream.
 
rAudioBuffer * GetBuffer () const
 Retrieves the buffer value for the object. More...
 
unsigned int GetChannels () const
 Retrieves the channels value for the object. More...
 
rAudioProcessor * GetProcessor () const
 Retrieves the processor value for the object. More...
 
unsigned int GetSampleRate () const
 Retrieves the sampleRate value for the object. More...
 
unsigned int GetSampleSize () const
 Retrieves the sampleSize value for the object. More...
 
+bool IsPlaying () const
 Check if audio stream is playing.
 
+bool IsProcessed () const
 Check if any audio stream buffers requires refill.
 
+bool IsValid () const
 Retrieve whether or not the audio stream is ready.
 
void Load (unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels=2)
 Load audio stream (to stream raw audio pcm data) More...
 
+AudioStreamoperator= (AudioStream &&other) noexcept
 
+AudioStreamoperator= (const ::AudioStream &stream)
 
+AudioStreamoperator= (const AudioStream &)=delete
 
+AudioStreamPause ()
 Pause audio stream.
 
+AudioStreamPlay ()
 Play audio stream.
 
+AudioStreamResume ()
 Resume audio stream.
 
+void SetCallback (::AudioCallback callback)
 Audio thread callback to request new data.
 
+AudioStreamSetPan (float pan=0.5f)
 Set pan for audio stream (0.5 is centered)
 
+AudioStreamSetPitch (float pitch)
 Set pitch for audio stream (1.0 is base level)
 
+AudioStreamSetVolume (float volume=1.0f)
 Set volume for audio stream (1.0 is max level)
 
+AudioStreamStop ()
 Stop audio stream.
 
+void Unload ()
 Unload audio stream and free memory.
 
+AudioStreamUpdate (const void *data, int samplesCount)
 Update audio stream buffers with data.
 
+ + + + +

+Static Public Member Functions

+static void SetBufferSizeDefault (int size)
 Default size for new audio streams.
 
+ + + +

+Protected Member Functions

+void set (const ::AudioStream &stream)
 
+

Detailed Description

+

AudioStream management functions.

+ +

Definition at line 12 of file AudioStream.hpp.

+

Constructor & Destructor Documentation

+ +

◆ AudioStream()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
raylib::AudioStream::AudioStream (unsigned int sampleRate,
unsigned int sampleSize,
unsigned int channels = 2 
)
+
+inline
+
+ +

Init audio stream (to stream raw audio pcm data)

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the AudioStream failed to load.
+
+
+ +

Definition at line 31 of file AudioStream.hpp.

+ +

References Load().

+ +
+
+

Member Function Documentation

+ +

◆ GetBuffer()

+ +
+
+ + + + + +
+ + + + + + + +
rAudioBuffer* raylib::AudioStream::GetBuffer () const
+
+inline
+
+ +

Retrieves the buffer value for the object.

+
Returns
The buffer value of the object.
+ +

Definition at line 49 of file AudioStream.hpp.

+ +
+
+ +

◆ GetChannels()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::AudioStream::GetChannels () const
+
+inline
+
+ +

Retrieves the channels value for the object.

+
Returns
The channels value of the object.
+ +

Definition at line 53 of file AudioStream.hpp.

+ +
+
+ +

◆ GetProcessor()

+ +
+
+ + + + + +
+ + + + + + + +
rAudioProcessor* raylib::AudioStream::GetProcessor () const
+
+inline
+
+ +

Retrieves the processor value for the object.

+
Returns
The processor value of the object.
+ +

Definition at line 50 of file AudioStream.hpp.

+ +
+
+ +

◆ GetSampleRate()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::AudioStream::GetSampleRate () const
+
+inline
+
+ +

Retrieves the sampleRate value for the object.

+
Returns
The sampleRate value of the object.
+ +

Definition at line 51 of file AudioStream.hpp.

+ +
+
+ +

◆ GetSampleSize()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::AudioStream::GetSampleSize () const
+
+inline
+
+ +

Retrieves the sampleSize value for the object.

+
Returns
The sampleSize value of the object.
+ +

Definition at line 52 of file AudioStream.hpp.

+ +
+
+ +

◆ Load()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::AudioStream::Load (unsigned int SampleRate,
unsigned int SampleSize,
unsigned int Channels = 2 
)
+
+inline
+
+ +

Load audio stream (to stream raw audio pcm data)

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the AudioStream failed to load.
+
+
+ +

Definition at line 192 of file AudioStream.hpp.

+ +

References IsValid(), and Unload().

+ +

Referenced by AudioStream().

+ +
+
+
+ + + + diff --git a/classraylib_1_1_automation_event_list-members.html b/classraylib_1_1_automation_event_list-members.html new file mode 100644 index 00000000..448e3565 --- /dev/null +++ b/classraylib_1_1_automation_event_list-members.html @@ -0,0 +1,106 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::AutomationEventList Member List
+
+
+ +

This is the complete list of members for raylib::AutomationEventList, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + +
AutomationEventList(const ::AutomationEventList &automationEventList) (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
AutomationEventList()raylib::AutomationEventListinline
AutomationEventList(const char *fileName)raylib::AutomationEventListinline
AutomationEventList(const AutomationEventList &)=delete (defined in raylib::AutomationEventList)raylib::AutomationEventList
AutomationEventList(AutomationEventList &&other) (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
Export(const char *fileName) (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
GetCapacity() constraylib::AutomationEventListinline
GetCount() constraylib::AutomationEventListinline
GetEvents() constraylib::AutomationEventListinline
IsValid() (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
Load(const char *fileName)raylib::AutomationEventListinline
operator=(const ::AutomationEventList &other) (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
operator=(const AutomationEventList &)=delete (defined in raylib::AutomationEventList)raylib::AutomationEventList
operator=(AutomationEventList &&other) noexcept (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
Play(int index) (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
Set() (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
set(const ::AutomationEventList &other) (defined in raylib::AutomationEventList)raylib::AutomationEventListinlineprotected
SetBaseFrame(int frame) (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
StartRecording() (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
StopRecording() (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
Unload()raylib::AutomationEventListinline
~AutomationEventList() (defined in raylib::AutomationEventList)raylib::AutomationEventListinline
+ + + + diff --git a/classraylib_1_1_automation_event_list.html b/classraylib_1_1_automation_event_list.html new file mode 100644 index 00000000..7dc24b51 --- /dev/null +++ b/classraylib_1_1_automation_event_list.html @@ -0,0 +1,334 @@ + + + + + + + +raylib-cpp: raylib::AutomationEventList Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::AutomationEventList Class Reference
+
+
+ +

AutomationEventList management functions. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

AutomationEventList ()
 Load an empty automation events list.
 
AutomationEventList (AutomationEventList &&other)
 
AutomationEventList (const ::AutomationEventList &automationEventList)
 
AutomationEventList (const AutomationEventList &)=delete
 
 AutomationEventList (const char *fileName)
 Load automation events list from file. More...
 
+bool Export (const char *fileName)
 
unsigned int GetCapacity () const
 Retrieves the capacity value for the object. More...
 
unsigned int GetCount () const
 Retrieves the count value for the object. More...
 
AutomationEvent * GetEvents () const
 Retrieves the events value for the object. More...
 
+bool IsValid ()
 
void Load (const char *fileName)
 Load audio stream (to stream raw audio pcm data) More...
 
+AutomationEventListoperator= (AutomationEventList &&other) noexcept
 
+AutomationEventListoperator= (const ::AutomationEventList &other)
 
+AutomationEventListoperator= (const AutomationEventList &)=delete
 
+void Play (int index)
 
+void Set ()
 
+void SetBaseFrame (int frame)
 
+void StartRecording ()
 
+void StopRecording ()
 
+void Unload ()
 Update audio stream buffers with data.
 
+ + + +

+Protected Member Functions

+void set (const ::AutomationEventList &other)
 
+

Detailed Description

+

AutomationEventList management functions.

+ +

Definition at line 12 of file AutomationEventList.hpp.

+

Constructor & Destructor Documentation

+ +

◆ AutomationEventList()

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::AutomationEventList::AutomationEventList (const char * fileName)
+
+inline
+
+ +

Load automation events list from file.

+
Parameters
+ + +
fileNameThe file path to load the automation events list from.
+
+
+ +

Definition at line 26 of file AutomationEventList.hpp.

+ +

References Load().

+ +
+
+

Member Function Documentation

+ +

◆ GetCapacity()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::AutomationEventList::GetCapacity () const
+
+inline
+
+ +

Retrieves the capacity value for the object.

+
Returns
The capacity value of the object.
+ +

Definition at line 40 of file AutomationEventList.hpp.

+ +
+
+ +

◆ GetCount()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::AutomationEventList::GetCount () const
+
+inline
+
+ +

Retrieves the count value for the object.

+
Returns
The count value of the object.
+ +

Definition at line 41 of file AutomationEventList.hpp.

+ +
+
+ +

◆ GetEvents()

+ +
+
+ + + + + +
+ + + + + + + +
AutomationEvent* raylib::AutomationEventList::GetEvents () const
+
+inline
+
+ +

Retrieves the events value for the object.

+
Returns
The events value of the object.
+ +

Definition at line 42 of file AutomationEventList.hpp.

+ +
+
+ +

◆ Load()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::AutomationEventList::Load (const char * fileName)
+
+inline
+
+ +

Load audio stream (to stream raw audio pcm data)

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the AutomationEventList failed to load.
+
+
+ +

Definition at line 71 of file AutomationEventList.hpp.

+ +

References Unload().

+ +

Referenced by AutomationEventList().

+ +
+
+
+ + + + diff --git a/classraylib_1_1_bounding_box-members.html b/classraylib_1_1_bounding_box-members.html new file mode 100644 index 00000000..e6270045 --- /dev/null +++ b/classraylib_1_1_bounding_box-members.html @@ -0,0 +1,100 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::BoundingBox Member List
+
+
+ +

This is the complete list of members for raylib::BoundingBox, including all inherited members.

+ + + + + + + + + + + + + + + + + +
BoundingBox(const ::BoundingBox &box) (defined in raylib::BoundingBox)raylib::BoundingBoxinline
BoundingBox(const ::Mesh &mesh)raylib::BoundingBoxinline
BoundingBox(::Vector3 minMax=::Vector3{0.0f, 0.0f, 0.0f}) (defined in raylib::BoundingBox)raylib::BoundingBoxinline
BoundingBox(::Vector3 min, ::Vector3 max) (defined in raylib::BoundingBox)raylib::BoundingBoxinline
CheckCollision(const ::BoundingBox &box2) constraylib::BoundingBoxinline
CheckCollision(::Vector3 center, float radius) constraylib::BoundingBoxinline
CheckCollision(const ::Ray &ray) constraylib::BoundingBoxinline
Draw(::Color color={255, 255, 255, 255}) constraylib::BoundingBoxinline
GetCollision(const ::Ray &ray) constraylib::BoundingBoxinline
GetMax() constraylib::BoundingBoxinline
GetMin() constraylib::BoundingBoxinline
operator=(const ::BoundingBox &box) (defined in raylib::BoundingBox)raylib::BoundingBoxinline
set(const ::BoundingBox &box) (defined in raylib::BoundingBox)raylib::BoundingBoxinlineprotected
set(const ::Vector3 &_min, const ::Vector3 &_max) (defined in raylib::BoundingBox)raylib::BoundingBoxinlineprotected
SetMax(::Vector3 value)raylib::BoundingBoxinline
SetMin(::Vector3 value)raylib::BoundingBoxinline
+ + + + diff --git a/classraylib_1_1_bounding_box.html b/classraylib_1_1_bounding_box.html new file mode 100644 index 00000000..82513200 --- /dev/null +++ b/classraylib_1_1_bounding_box.html @@ -0,0 +1,286 @@ + + + + + + + +raylib-cpp: raylib::BoundingBox Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::BoundingBox Class Reference
+
+
+ +

Bounding box type. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

BoundingBox (::Vector3 min, ::Vector3 max)
 
BoundingBox (::Vector3 minMax=::Vector3{0.0f, 0.0f, 0.0f})
 
BoundingBox (const ::BoundingBox &box)
 
BoundingBox (const ::Mesh &mesh)
 Compute mesh bounding box limits.
 
+bool CheckCollision (::Vector3 center, float radius) const
 Detect collision between box and sphere.
 
+bool CheckCollision (const ::BoundingBox &box2) const
 Detect collision between two boxes.
 
+bool CheckCollision (const ::Ray &ray) const
 Detect collision between ray and bounding box.
 
+void Draw (::Color color={255, 255, 255, 255}) const
 Draw a bounding box with wires.
 
+RayCollision GetCollision (const ::Ray &ray) const
 Get collision information between ray and bounding box.
 
::Vector3 GetMax () const
 Retrieves the max value for the object. More...
 
::Vector3 GetMin () const
 Retrieves the min value for the object. More...
 
+BoundingBoxoperator= (const ::BoundingBox &box)
 
void SetMax (::Vector3 value)
 Sets the max value for the object. More...
 
void SetMin (::Vector3 value)
 Sets the min value for the object. More...
 
+ + + + + +

+Protected Member Functions

+void set (const ::BoundingBox &box)
 
+void set (const ::Vector3 &_min, const ::Vector3 &_max)
 
+

Detailed Description

+

Bounding box type.

+ +

Definition at line 11 of file BoundingBox.hpp.

+

Member Function Documentation

+ +

◆ GetMax()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector3 raylib::BoundingBox::GetMax () const
+
+inline
+
+ +

Retrieves the max value for the object.

+
Returns
The max value of the object.
+ +

Definition at line 29 of file BoundingBox.hpp.

+ +
+
+ +

◆ GetMin()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector3 raylib::BoundingBox::GetMin () const
+
+inline
+
+ +

Retrieves the min value for the object.

+
Returns
The min value of the object.
+ +

Definition at line 28 of file BoundingBox.hpp.

+ +
+
+ +

◆ SetMax()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::BoundingBox::SetMax (::Vector3 value)
+
+inline
+
+ +

Sets the max value for the object.

+
Parameters
+ + +
valueThe value of which to set max to.
+
+
+ +

Definition at line 29 of file BoundingBox.hpp.

+ +
+
+ +

◆ SetMin()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::BoundingBox::SetMin (::Vector3 value)
+
+inline
+
+ +

Sets the min value for the object.

+
Parameters
+ + +
valueThe value of which to set min to.
+
+
+ +

Definition at line 28 of file BoundingBox.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_camera2_d-members.html b/classraylib_1_1_camera2_d-members.html new file mode 100644 index 00000000..1d9188f0 --- /dev/null +++ b/classraylib_1_1_camera2_d-members.html @@ -0,0 +1,102 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Camera2D Member List
+
+
+ +

This is the complete list of members for raylib::Camera2D, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
BeginMode() (defined in raylib::Camera2D)raylib::Camera2Dinline
Camera2D(const ::Camera2D &camera) (defined in raylib::Camera2D)raylib::Camera2Dinline
Camera2D() (defined in raylib::Camera2D)raylib::Camera2Dinline
Camera2D(::Vector2 offset, ::Vector2 target, float rotation=0.0f, float zoom=1.0f) (defined in raylib::Camera2D)raylib::Camera2Dinline
EndMode() (defined in raylib::Camera2D)raylib::Camera2Dinline
GetMatrix() constraylib::Camera2Dinline
GetOffset() constraylib::Camera2Dinline
GetRotation() constraylib::Camera2Dinline
GetScreenToWorld(::Vector2 position) constraylib::Camera2Dinline
GetTarget() constraylib::Camera2Dinline
GetWorldToScreen(::Vector2 position) constraylib::Camera2Dinline
GetZoom() constraylib::Camera2Dinline
operator=(const ::Camera2D &camera) (defined in raylib::Camera2D)raylib::Camera2Dinline
set(const ::Camera2D &camera) (defined in raylib::Camera2D)raylib::Camera2Dinlineprotected
SetOffset(::Vector2 value)raylib::Camera2Dinline
SetRotation(float value)raylib::Camera2Dinline
SetTarget(::Vector2 value)raylib::Camera2Dinline
SetZoom(float value)raylib::Camera2Dinline
+ + + + diff --git a/classraylib_1_1_camera2_d.html b/classraylib_1_1_camera2_d.html new file mode 100644 index 00000000..18d5006a --- /dev/null +++ b/classraylib_1_1_camera2_d.html @@ -0,0 +1,418 @@ + + + + + + + +raylib-cpp: raylib::Camera2D Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Camera2D Class Reference
+
+
+ +

Camera2D type, defines a 2d camera. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Camera2D (::Vector2 offset, ::Vector2 target, float rotation=0.0f, float zoom=1.0f)
 
Camera2D (const ::Camera2D &camera)
 
+Camera2DBeginMode ()
 
+Camera2DEndMode ()
 
+Matrix GetMatrix () const
 Returns camera 2d transform matrix.
 
::Vector2 GetOffset () const
 Retrieves the offset value for the object. More...
 
float GetRotation () const
 Retrieves the rotation value for the object. More...
 
+Vector2 GetScreenToWorld (::Vector2 position) const
 Returns the world space position for a 2d camera screen space position.
 
::Vector2 GetTarget () const
 Retrieves the target value for the object. More...
 
+Vector2 GetWorldToScreen (::Vector2 position) const
 Returns the screen space position for a 2d world space position.
 
float GetZoom () const
 Retrieves the zoom value for the object. More...
 
+Camera2Doperator= (const ::Camera2D &camera)
 
void SetOffset (::Vector2 value)
 Sets the offset value for the object. More...
 
void SetRotation (float value)
 Sets the rotation value for the object. More...
 
void SetTarget (::Vector2 value)
 Sets the target value for the object. More...
 
void SetZoom (float value)
 Sets the zoom value for the object. More...
 
+ + + +

+Protected Member Functions

+void set (const ::Camera2D &camera)
 
+

Detailed Description

+

Camera2D type, defines a 2d camera.

+ +

Definition at line 12 of file Camera2D.hpp.

+

Member Function Documentation

+ +

◆ GetOffset()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector2 raylib::Camera2D::GetOffset () const
+
+inline
+
+ +

Retrieves the offset value for the object.

+
Returns
The offset value of the object.
+ +

Definition at line 30 of file Camera2D.hpp.

+ +
+
+ +

◆ GetRotation()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Camera2D::GetRotation () const
+
+inline
+
+ +

Retrieves the rotation value for the object.

+
Returns
The rotation value of the object.
+ +

Definition at line 32 of file Camera2D.hpp.

+ +
+
+ +

◆ GetTarget()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector2 raylib::Camera2D::GetTarget () const
+
+inline
+
+ +

Retrieves the target value for the object.

+
Returns
The target value of the object.
+ +

Definition at line 31 of file Camera2D.hpp.

+ +
+
+ +

◆ GetZoom()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Camera2D::GetZoom () const
+
+inline
+
+ +

Retrieves the zoom value for the object.

+
Returns
The zoom value of the object.
+ +

Definition at line 33 of file Camera2D.hpp.

+ +
+
+ +

◆ SetOffset()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Camera2D::SetOffset (::Vector2 value)
+
+inline
+
+ +

Sets the offset value for the object.

+
Parameters
+ + +
valueThe value of which to set offset to.
+
+
+ +

Definition at line 30 of file Camera2D.hpp.

+ +
+
+ +

◆ SetRotation()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Camera2D::SetRotation (float value)
+
+inline
+
+ +

Sets the rotation value for the object.

+
Parameters
+ + +
valueThe value of which to set rotation to.
+
+
+ +

Definition at line 32 of file Camera2D.hpp.

+ +
+
+ +

◆ SetTarget()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Camera2D::SetTarget (::Vector2 value)
+
+inline
+
+ +

Sets the target value for the object.

+
Parameters
+ + +
valueThe value of which to set target to.
+
+
+ +

Definition at line 31 of file Camera2D.hpp.

+ +
+
+ +

◆ SetZoom()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Camera2D::SetZoom (float value)
+
+inline
+
+ +

Sets the zoom value for the object.

+
Parameters
+ + +
valueThe value of which to set zoom to.
+
+
+ +

Definition at line 33 of file Camera2D.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_camera3_d-members.html b/classraylib_1_1_camera3_d-members.html new file mode 100644 index 00000000..9286eda0 --- /dev/null +++ b/classraylib_1_1_camera3_d-members.html @@ -0,0 +1,109 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Camera3D Member List
+
+
+ +

This is the complete list of members for raylib::Camera3D, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
BeginMode()raylib::Camera3Dinline
Camera3D(const ::Camera3D &camera) (defined in raylib::Camera3D)raylib::Camera3Dinline
Camera3D(::Vector3 position, ::Vector3 target=::Vector3{0.0f, 0.0f, 0.0f}, ::Vector3 up=::Vector3{0.0f, 1.0f, 0.0f}, float fovy=0, int projection=CAMERA_PERSPECTIVE)raylib::Camera3Dinline
Camera3D() (defined in raylib::Camera3D)raylib::Camera3Dinline
DrawBillboard(const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255}) constraylib::Camera3Dinline
DrawBillboard(const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, ::Vector2 size, ::Color tint={255, 255, 255, 255}) constraylib::Camera3Dinline
EndMode()raylib::Camera3Dinline
GetFovy() constraylib::Camera3Dinline
GetMatrix() constraylib::Camera3Dinline
GetMouseRay(::Vector2 mousePosition) constraylib::Camera3Dinline
GetPosition() constraylib::Camera3Dinline
GetProjection() constraylib::Camera3Dinline
GetScreenToWorldRay(::Vector2 position, int width, int height)raylib::Camera3Dinline
GetTarget() constraylib::Camera3Dinline
GetUp() constraylib::Camera3Dinline
GetWorldToScreen(::Vector3 position) constraylib::Camera3Dinline
operator=(const ::Camera3D &camera) (defined in raylib::Camera3D)raylib::Camera3Dinline
set(const ::Camera3D &camera) (defined in raylib::Camera3D)raylib::Camera3Dinlineprotected
SetFovy(float value)raylib::Camera3Dinline
SetPosition(::Vector3 value)raylib::Camera3Dinline
SetProjection(int value)raylib::Camera3Dinline
SetTarget(::Vector3 value)raylib::Camera3Dinline
SetUp(::Vector3 value)raylib::Camera3Dinline
Update(int mode)raylib::Camera3Dinline
Update(::Vector3 movement, ::Vector3 rotation, float zoom=1.0f)raylib::Camera3Dinline
+ + + + diff --git a/classraylib_1_1_camera3_d.html b/classraylib_1_1_camera3_d.html new file mode 100644 index 00000000..8843bb97 --- /dev/null +++ b/classraylib_1_1_camera3_d.html @@ -0,0 +1,581 @@ + + + + + + + +raylib-cpp: raylib::Camera3D Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Camera3D Class Reference
+
+
+ +

Camera type, defines a camera position/orientation in 3d space. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Camera3D (::Vector3 position, ::Vector3 target=::Vector3{0.0f, 0.0f, 0.0f}, ::Vector3 up=::Vector3{0.0f, 1.0f, 0.0f}, float fovy=0, int projection=CAMERA_PERSPECTIVE)
 Create a new Camera3D. More...
 
Camera3D (const ::Camera3D &camera)
 
+Camera3DBeginMode ()
 Initializes 3D mode with custom camera (3D)
 
+void DrawBillboard (const ::Texture2D &texture, ::Rectangle sourceRec, ::Vector3 center, ::Vector2 size, ::Color tint={255, 255, 255, 255}) const
 Draw a billboard texture defined by source.
 
+void DrawBillboard (const ::Texture2D &texture, ::Vector3 center, float size, ::Color tint={255, 255, 255, 255}) const
 Draw a billboard texture.
 
+Camera3DEndMode ()
 Ends 3D mode and returns to default 2D orthographic mode.
 
float GetFovy () const
 Retrieves the fovy value for the object. More...
 
+Matrix GetMatrix () const
 Get camera transform matrix (view matrix)
 
+Ray GetMouseRay (::Vector2 mousePosition) const
 Returns a ray trace from mouse position.
 
::Vector3 GetPosition () const
 Retrieves the position value for the object. More...
 
int GetProjection () const
 Retrieves the projection value for the object. More...
 
+Ray GetScreenToWorldRay (::Vector2 position, int width, int height)
 Get a ray trace from screen position (i.e mouse) in a viewport.
 
::Vector3 GetTarget () const
 Retrieves the target value for the object. More...
 
::Vector3 GetUp () const
 Retrieves the up value for the object. More...
 
+Vector2 GetWorldToScreen (::Vector3 position) const
 Returns the screen space position for a 3d world space position.
 
+Camera3Doperator= (const ::Camera3D &camera)
 
void SetFovy (float value)
 Sets the fovy value for the object. More...
 
void SetPosition (::Vector3 value)
 Sets the position value for the object. More...
 
void SetProjection (int value)
 Sets the projection value for the object. More...
 
void SetTarget (::Vector3 value)
 Sets the target value for the object. More...
 
void SetUp (::Vector3 value)
 Sets the up value for the object. More...
 
+Camera3DUpdate (::Vector3 movement, ::Vector3 rotation, float zoom=1.0f)
 Update camera movement/rotation.
 
+Camera3DUpdate (int mode)
 Update camera position for selected mode.
 
+ + + +

+Protected Member Functions

+void set (const ::Camera3D &camera)
 
+

Detailed Description

+

Camera type, defines a camera position/orientation in 3d space.

+ +

Definition at line 12 of file Camera3D.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Camera3D()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Camera3D::Camera3D (::Vector3 position,
::Vector3 target = ::Vector3{0.0f, 0.0f, 0.0f},
::Vector3 up = ::Vector3{0.0f, 1.0f, 0.0f},
float fovy = 0,
int projection = CAMERA_PERSPECTIVE 
)
+
+inline
+
+ +

Create a new Camera3D.

+
Parameters
+ + + + + + +
positionCamera position
targetCamera target it looks-at
upCamera up vector (rotation over its axis)
fovyCamera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
projectionCamera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
+
+
+ +

Definition at line 26 of file Camera3D.hpp.

+ +
+
+

Member Function Documentation

+ +

◆ GetFovy()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Camera3D::GetFovy () const
+
+inline
+
+ +

Retrieves the fovy value for the object.

+
Returns
The fovy value of the object.
+ +

Definition at line 39 of file Camera3D.hpp.

+ +
+
+ +

◆ GetPosition()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector3 raylib::Camera3D::GetPosition () const
+
+inline
+
+ +

Retrieves the position value for the object.

+
Returns
The position value of the object.
+ +

Definition at line 36 of file Camera3D.hpp.

+ +
+
+ +

◆ GetProjection()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Camera3D::GetProjection () const
+
+inline
+
+ +

Retrieves the projection value for the object.

+
Returns
The projection value of the object.
+ +

Definition at line 40 of file Camera3D.hpp.

+ +
+
+ +

◆ GetTarget()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector3 raylib::Camera3D::GetTarget () const
+
+inline
+
+ +

Retrieves the target value for the object.

+
Returns
The target value of the object.
+ +

Definition at line 37 of file Camera3D.hpp.

+ +
+
+ +

◆ GetUp()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector3 raylib::Camera3D::GetUp () const
+
+inline
+
+ +

Retrieves the up value for the object.

+
Returns
The up value of the object.
+ +

Definition at line 38 of file Camera3D.hpp.

+ +
+
+ +

◆ SetFovy()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Camera3D::SetFovy (float value)
+
+inline
+
+ +

Sets the fovy value for the object.

+
Parameters
+ + +
valueThe value of which to set fovy to.
+
+
+ +

Definition at line 39 of file Camera3D.hpp.

+ +
+
+ +

◆ SetPosition()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Camera3D::SetPosition (::Vector3 value)
+
+inline
+
+ +

Sets the position value for the object.

+
Parameters
+ + +
valueThe value of which to set position to.
+
+
+ +

Definition at line 36 of file Camera3D.hpp.

+ +
+
+ +

◆ SetProjection()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Camera3D::SetProjection (int value)
+
+inline
+
+ +

Sets the projection value for the object.

+
Parameters
+ + +
valueThe value of which to set projection to.
+
+
+ +

Definition at line 40 of file Camera3D.hpp.

+ +
+
+ +

◆ SetTarget()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Camera3D::SetTarget (::Vector3 value)
+
+inline
+
+ +

Sets the target value for the object.

+
Parameters
+ + +
valueThe value of which to set target to.
+
+
+ +

Definition at line 37 of file Camera3D.hpp.

+ +
+
+ +

◆ SetUp()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Camera3D::SetUp (::Vector3 value)
+
+inline
+
+ +

Sets the up value for the object.

+
Parameters
+ + +
valueThe value of which to set up to.
+
+
+ +

Definition at line 38 of file Camera3D.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_color-members.html b/classraylib_1_1_color-members.html new file mode 100644 index 00000000..4d2aceb0 --- /dev/null +++ b/classraylib_1_1_color-members.html @@ -0,0 +1,164 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Color Member List
+
+
+ +

This is the complete list of members for raylib::Color, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Alpha(float alpha) constraylib::Colorinline
AlphaBlend(::Color dst, ::Color tint) constraylib::Colorinline
Beige() (defined in raylib::Color)raylib::Colorinlinestatic
Black() (defined in raylib::Color)raylib::Colorinlinestatic
Blank() (defined in raylib::Color)raylib::Colorinlinestatic
Blue() (defined in raylib::Color)raylib::Colorinlinestatic
Brightness(float factor)raylib::Colorinline
Brown() (defined in raylib::Color)raylib::Colorinlinestatic
ClearBackground()raylib::Colorinline
Color(const ::Color &color) (defined in raylib::Color)raylib::Colorinline
Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) (defined in raylib::Color)raylib::Colorinline
Color()raylib::Colorinline
Color(::Vector3 hsv)raylib::Colorinline
Color(unsigned int hexValue)raylib::Colorinline
Color(void *srcPtr, int format) (defined in raylib::Color)raylib::Colorinline
Color(::Vector4 normalized)raylib::Colorinline
Contrast(float contrast)raylib::Colorinline
DarkBlue() (defined in raylib::Color)raylib::Colorinlinestatic
DarkBrown() (defined in raylib::Color)raylib::Colorinlinestatic
DarkGray() (defined in raylib::Color)raylib::Colorinlinestatic
DarkGreen() (defined in raylib::Color)raylib::Colorinlinestatic
DarkPurple() (defined in raylib::Color)raylib::Colorinlinestatic
DrawLine(int startPosX, int startPosY, int endPosX, int endPosY) constraylib::Colorinline
DrawLine(::Vector2 startPos, ::Vector2 endPos) constraylib::Colorinline
DrawLine(::Vector2 startPos, ::Vector2 endPos, float thick) constraylib::Colorinline
DrawLineBezier(::Vector2 startPos, ::Vector2 endPos, float thick=1.0f) const (defined in raylib::Color)raylib::Colorinline
DrawLineStrip(::Vector2 *points, int numPoints) const (defined in raylib::Color)raylib::Colorinline
DrawPixel(int x, int y) const (defined in raylib::Color)raylib::Colorinline
DrawPixel(::Vector2 pos) constraylib::Colorinline
DrawRectangle(int posX, int posY, int width, int height) const (defined in raylib::Color)raylib::Colorinline
DrawRectangle(::Vector2 position, ::Vector2 size) const (defined in raylib::Color)raylib::Colorinline
DrawRectangle(::Rectangle rec) const (defined in raylib::Color)raylib::Colorinline
DrawRectangle(::Rectangle rec, ::Vector2 origin, float rotation) const (defined in raylib::Color)raylib::Colorinline
DrawRectangleLines(int posX, int posY, int width, int height) const (defined in raylib::Color)raylib::Colorinline
DrawRectangleLines(::Rectangle rec, float lineThick) const (defined in raylib::Color)raylib::Colorinline
DrawText(const char *text, int posX=0, int posY=0, int fontSize=10.0f) const (defined in raylib::Color)raylib::Colorinline
DrawText(const std::string &text, int posX=0, int posY=0, int fontSize=10.0f) const (defined in raylib::Color)raylib::Colorinline
DrawText(const ::Font &font, const char *text, ::Vector2 position, float fontSize, float spacing) const (defined in raylib::Color)raylib::Colorinline
DrawText(const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing) const (defined in raylib::Color)raylib::Colorinline
DrawText(const ::Font &font, const char *text, ::Vector2 position, ::Vector2 origin, float rotation, float fontSize, float spacing) const (defined in raylib::Color)raylib::Colorinline
DrawText(const ::Font &font, const std::string &text, ::Vector2 position, ::Vector2 origin, float rotation, float fontSize, float spacing) const (defined in raylib::Color)raylib::Colorinline
Fade(float alpha) constraylib::Colorinline
FromHSV(float hue, float saturation, float value)raylib::Colorinlinestatic
GetA() constraylib::Colorinline
GetB() constraylib::Colorinline
GetG() constraylib::Colorinline
GetR() constraylib::Colorinline
Gold() (defined in raylib::Color)raylib::Colorinlinestatic
Gray() (defined in raylib::Color)raylib::Colorinlinestatic
Green() (defined in raylib::Color)raylib::Colorinlinestatic
IsEqual(::Color color) (defined in raylib::Color)raylib::Colorinline
Lerp(::Color color2, float factor) (defined in raylib::Color)raylib::Colorinline
LightGray() (defined in raylib::Color)raylib::Colorinlinestatic
Lime() (defined in raylib::Color)raylib::Colorinlinestatic
Magenta() (defined in raylib::Color)raylib::Colorinlinestatic
Maroon() (defined in raylib::Color)raylib::Colorinlinestatic
Normalize() constraylib::Colorinline
operator int() constraylib::Colorinline
operator std::string() const (defined in raylib::Color)raylib::Colorinline
operator!=(const ::Color &other) const (defined in raylib::Color)raylib::Colorinline
operator=(const ::Color &color) (defined in raylib::Color)raylib::Colorinline
operator==(const ::Color &other) const (defined in raylib::Color)raylib::Colorinline
Orange() (defined in raylib::Color)raylib::Colorinlinestatic
Pink() (defined in raylib::Color)raylib::Colorinlinestatic
Purple() (defined in raylib::Color)raylib::Colorinlinestatic
RayWhite() (defined in raylib::Color)raylib::Colorinlinestatic
Red() (defined in raylib::Color)raylib::Colorinlinestatic
set(const ::Color &color) (defined in raylib::Color)raylib::Colorinlineprotected
SetA(unsigned char value)raylib::Colorinline
SetB(unsigned char value)raylib::Colorinline
SetG(unsigned char value)raylib::Colorinline
SetR(unsigned char value)raylib::Colorinline
SkyBlue() (defined in raylib::Color)raylib::Colorinlinestatic
Tint(::Color tint)raylib::Colorinline
ToHSV() constraylib::Colorinline
ToInt() constraylib::Colorinline
ToString() const (defined in raylib::Color)raylib::Colorinline
Violet() (defined in raylib::Color)raylib::Colorinlinestatic
White() (defined in raylib::Color)raylib::Colorinlinestatic
Yellow() (defined in raylib::Color)raylib::Colorinlinestatic
+ + + + diff --git a/classraylib_1_1_color.html b/classraylib_1_1_color.html new file mode 100644 index 00000000..8599db15 --- /dev/null +++ b/classraylib_1_1_color.html @@ -0,0 +1,628 @@ + + + + + + + +raylib-cpp: raylib::Color Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Color type, RGBA (32bit) + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Color ()
 Black.
 
Color (::Vector3 hsv)
 Returns a Color from HSV values.
 
Color (::Vector4 normalized)
 Returns Color from normalized values [0..1].
 
Color (const ::Color &color)
 
Color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255)
 
Color (unsigned int hexValue)
 Get Color structure from hexadecimal value.
 
Color (void *srcPtr, int format)
 
+Color Alpha (float alpha) const
 Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
 
+Color AlphaBlend (::Color dst, ::Color tint) const
 Returns src alpha-blended into dst color with tint.
 
+Color Brightness (float factor)
 Get color with brightness correction, brightness factor goes from -1.0f to 1.0f.
 
+ColorClearBackground ()
 Set background color (framebuffer clear color)
 
+Color Contrast (float contrast)
 Get color with contrast correction, contrast values between -1.0f and 1.0f.
 
+void DrawLine (::Vector2 startPos, ::Vector2 endPos) const
 Draw a line using Vector points.
 
+void DrawLine (::Vector2 startPos, ::Vector2 endPos, float thick) const
 Draw a line using Vector points, with a given thickness.
 
+void DrawLine (int startPosX, int startPosY, int endPosX, int endPosY) const
 Draw a line.
 
+void DrawLineBezier (::Vector2 startPos, ::Vector2 endPos, float thick=1.0f) const
 
+void DrawLineStrip (::Vector2 *points, int numPoints) const
 
+void DrawPixel (::Vector2 pos) const
 Draw a pixel.
 
+void DrawPixel (int x, int y) const
 
+void DrawRectangle (::Rectangle rec) const
 
+void DrawRectangle (::Rectangle rec, ::Vector2 origin, float rotation) const
 
+void DrawRectangle (::Vector2 position, ::Vector2 size) const
 
+void DrawRectangle (int posX, int posY, int width, int height) const
 
+void DrawRectangleLines (::Rectangle rec, float lineThick) const
 
+void DrawRectangleLines (int posX, int posY, int width, int height) const
 
+void DrawText (const ::Font &font, const char *text, ::Vector2 position, ::Vector2 origin, float rotation, float fontSize, float spacing) const
 
+void DrawText (const ::Font &font, const char *text, ::Vector2 position, float fontSize, float spacing) const
 
+void DrawText (const ::Font &font, const std::string &text, ::Vector2 position, ::Vector2 origin, float rotation, float fontSize, float spacing) const
 
+void DrawText (const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing) const
 
+void DrawText (const char *text, int posX=0, int posY=0, int fontSize=10.0f) const
 
+void DrawText (const std::string &text, int posX=0, int posY=0, int fontSize=10.0f) const
 
+Color Fade (float alpha) const
 Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
 
unsigned char GetA () const
 Retrieves the a value for the object. More...
 
unsigned char GetB () const
 Retrieves the b value for the object. More...
 
unsigned char GetG () const
 Retrieves the g value for the object. More...
 
unsigned char GetR () const
 Retrieves the r value for the object. More...
 
+bool IsEqual (::Color color)
 
+Color Lerp (::Color color2, float factor)
 
+Vector4 Normalize () const
 Returns Color normalized as float [0..1].
 
operator int () const
 Returns hexadecimal value for a Color.
 
operator std::string () const
 
+bool operator!= (const ::Color &other) const
 
+Coloroperator= (const ::Color &color)
 
+bool operator== (const ::Color &other) const
 
void SetA (unsigned char value)
 Sets the a value for the object. More...
 
void SetB (unsigned char value)
 Sets the b value for the object. More...
 
void SetG (unsigned char value)
 Sets the g value for the object. More...
 
void SetR (unsigned char value)
 Sets the r value for the object. More...
 
+Color Tint (::Color tint)
 Get color multiplied with another color.
 
+Vector3 ToHSV () const
 Returns HSV values for a Color.
 
+int ToInt () const
 Returns hexadecimal value for a Color.
 
+std::string ToString () const
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

+static Color Beige ()
 
+static Color Black ()
 
+static Color Blank ()
 
+static Color Blue ()
 
+static Color Brown ()
 
+static Color DarkBlue ()
 
+static Color DarkBrown ()
 
+static Color DarkGray ()
 
+static Color DarkGreen ()
 
+static Color DarkPurple ()
 
+::Color FromHSV (float hue, float saturation, float value)
 Returns a Color from HSV values.
 
+static Color Gold ()
 
+static Color Gray ()
 
+static Color Green ()
 
+static Color LightGray ()
 
+static Color Lime ()
 
+static Color Magenta ()
 
+static Color Maroon ()
 
+static Color Orange ()
 
+static Color Pink ()
 
+static Color Purple ()
 
+static Color RayWhite ()
 
+static Color Red ()
 
+static Color SkyBlue ()
 
+static Color Violet ()
 
+static Color White ()
 
+static Color Yellow ()
 
+ + + +

+Protected Member Functions

+void set (const ::Color &color)
 
+

Detailed Description

+

Color type, RGBA (32bit)

+ +

Definition at line 14 of file Color.hpp.

+

Member Function Documentation

+ +

◆ GetA()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned char raylib::Color::GetA () const
+
+inline
+
+ +

Retrieves the a value for the object.

+
Returns
The a value of the object.
+ +

Definition at line 80 of file Color.hpp.

+ +
+
+ +

◆ GetB()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned char raylib::Color::GetB () const
+
+inline
+
+ +

Retrieves the b value for the object.

+
Returns
The b value of the object.
+ +

Definition at line 79 of file Color.hpp.

+ +
+
+ +

◆ GetG()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned char raylib::Color::GetG () const
+
+inline
+
+ +

Retrieves the g value for the object.

+
Returns
The g value of the object.
+ +

Definition at line 78 of file Color.hpp.

+ +
+
+ +

◆ GetR()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned char raylib::Color::GetR () const
+
+inline
+
+ +

Retrieves the r value for the object.

+
Returns
The r value of the object.
+ +

Definition at line 77 of file Color.hpp.

+ +
+
+ +

◆ SetA()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Color::SetA (unsigned char value)
+
+inline
+
+ +

Sets the a value for the object.

+
Parameters
+ + +
valueThe value of which to set a to.
+
+
+ +

Definition at line 80 of file Color.hpp.

+ +
+
+ +

◆ SetB()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Color::SetB (unsigned char value)
+
+inline
+
+ +

Sets the b value for the object.

+
Parameters
+ + +
valueThe value of which to set b to.
+
+
+ +

Definition at line 79 of file Color.hpp.

+ +
+
+ +

◆ SetG()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Color::SetG (unsigned char value)
+
+inline
+
+ +

Sets the g value for the object.

+
Parameters
+ + +
valueThe value of which to set g to.
+
+
+ +

Definition at line 78 of file Color.hpp.

+ +
+
+ +

◆ SetR()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Color::SetR (unsigned char value)
+
+inline
+
+ +

Sets the r value for the object.

+
Parameters
+ + +
valueThe value of which to set r to.
+
+
+ +

Definition at line 77 of file Color.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_font-members.html b/classraylib_1_1_font-members.html new file mode 100644 index 00000000..74478777 --- /dev/null +++ b/classraylib_1_1_font-members.html @@ -0,0 +1,124 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Font Member List
+
+
+ +

This is the complete list of members for raylib::Font, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DrawText(const char *text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE) constraylib::Fontinline
DrawText(const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE) constraylib::Fontinline
DrawText(const char *text, int posX, int posY, float fontSize, float spacing, ::Color tint=WHITE) constraylib::Fontinline
DrawText(const std::string &text, int posX, int posY, float fontSize, float spacing, ::Color tint=WHITE) constraylib::Fontinline
DrawText(const char *text, ::Vector2 position, ::Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint=WHITE) const (defined in raylib::Font)raylib::Fontinline
DrawText(const std::string &text, ::Vector2 position, ::Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint=WHITE) const (defined in raylib::Font)raylib::Fontinline
DrawText(int codepoint, ::Vector2 position, float fontSize, ::Color tint={255, 255, 255, 255}) constraylib::Fontinline
DrawText(const int *codepoints, int count, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) constraylib::Fontinline
Font(int baseSize, int glyphCount, int glyphPadding, ::Texture2D texture, ::Rectangle *recs=nullptr, ::GlyphInfo *glyphs=nullptr) (defined in raylib::Font)raylib::Fontinline
Font()raylib::Fontinline
Font(const ::Font &font) (defined in raylib::Font)raylib::Fontinline
Font(const std::string &fileName)raylib::Fontinline
Font(const std::string &fileName, int fontSize, int *fontChars=0, int charCount=0)raylib::Fontinline
Font(const ::Image &image, ::Color key, int firstChar)raylib::Fontinline
Font(const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)raylib::Fontinline
Font(const Font &)=delete (defined in raylib::Font)raylib::Font
Font(Font &&other) (defined in raylib::Font)raylib::Fontinline
GetBaseSize() constraylib::Fontinline
GetGlyphCount() constraylib::Fontinline
GetGlyphIndex(int character) constraylib::Fontinline
GetGlyphPadding() constraylib::Fontinline
GetGlyphs() constraylib::Fontinline
GetRecs() constraylib::Fontinline
GetTexture()raylib::Fontinline
ImageText(const char *text, float fontSize, float spacing, ::Color tint) constraylib::Fontinline
ImageText(const std::string &text, float fontSize, float spacing, ::Color tint) constraylib::Fontinline
IsValid() constraylib::Fontinline
Load(const std::string &fileName)raylib::Fontinline
Load(const std::string &fileName, int fontSize, int *fontChars, int charCount)raylib::Fontinline
Load(const ::Image &image, ::Color key, int firstChar) (defined in raylib::Font)raylib::Fontinline
Load(const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount) (defined in raylib::Font)raylib::Fontinline
MeasureText(const char *text, float fontSize, float spacing) constraylib::Fontinline
MeasureText(const std::string &text, float fontSize, float spacing) constraylib::Fontinline
operator=(const ::Font &font) (defined in raylib::Font)raylib::Fontinline
operator=(const Font &)=delete (defined in raylib::Font)raylib::Font
operator=(Font &&other) noexcept (defined in raylib::Font)raylib::Fontinline
set(const ::Font &font) (defined in raylib::Font)raylib::Fontinlineprotected
SetTexture(const ::Texture &newTexture)raylib::Fontinline
Unload() (defined in raylib::Font)raylib::Fontinline
~Font() (defined in raylib::Font)raylib::Fontinline
+ + + + diff --git a/classraylib_1_1_font.html b/classraylib_1_1_font.html new file mode 100644 index 00000000..42b32476 --- /dev/null +++ b/classraylib_1_1_font.html @@ -0,0 +1,743 @@ + + + + + + + +raylib-cpp: raylib::Font Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Font Class Reference
+
+
+ +

Font type, includes texture and charSet array data. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Font ()
 Retrieves the default Font.
 
Font (const ::Font &font)
 
 Font (const ::Image &image, ::Color key, int firstChar)
 Loads a Font from the given image with a color key. More...
 
Font (const Font &)=delete
 
 Font (const std::string &fileName)
 Loads a Font from the given file. More...
 
 Font (const std::string &fileName, int fontSize, int *fontChars=0, int charCount=0)
 Loads a Font from the given file, with generation parameters. More...
 
 Font (const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
 Loads a font from memory, based on the given file type and file data. More...
 
Font (Font &&other)
 
Font (int baseSize, int glyphCount, int glyphPadding, ::Texture2D texture, ::Rectangle *recs=nullptr, ::GlyphInfo *glyphs=nullptr)
 
+void DrawText (const char *text, ::Vector2 position, ::Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint=WHITE) const
 
+void DrawText (const char *text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE) const
 Draw text using font and additional parameters.
 
+void DrawText (const char *text, int posX, int posY, float fontSize, float spacing, ::Color tint=WHITE) const
 Draw text using font and additional parameters.
 
+void DrawText (const int *codepoints, int count, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) const
 Draw multiple character (codepoint)
 
+void DrawText (const std::string &text, ::Vector2 position, ::Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint=WHITE) const
 
+void DrawText (const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint=WHITE) const
 Draw text using font and additional parameters.
 
+void DrawText (const std::string &text, int posX, int posY, float fontSize, float spacing, ::Color tint=WHITE) const
 Draw text using font and additional parameters.
 
+void DrawText (int codepoint, ::Vector2 position, float fontSize, ::Color tint={255, 255, 255, 255}) const
 Draw one character (codepoint)
 
int GetBaseSize () const
 Retrieves the baseSize value for the object. More...
 
int GetGlyphCount () const
 Retrieves the glyphCount value for the object. More...
 
+int GetGlyphIndex (int character) const
 Get index position for a unicode character on font.
 
int GetGlyphPadding () const
 Retrieves the glyphPadding value for the object. More...
 
::GlyphInfo * GetGlyphs () const
 Retrieves the glyphs value for the object. More...
 
::RectangleGetRecs () const
 Retrieves the recs value for the object. More...
 
+TextureUnmanaged GetTexture ()
 Get the texture atlas containing the glyphs.
 
+::Image ImageText (const char *text, float fontSize, float spacing, ::Color tint) const
 Create an image from text (custom sprite font)
 
+::Image ImageText (const std::string &text, float fontSize, float spacing, ::Color tint) const
 Create an image from text (custom sprite font)
 
+bool IsValid () const
 Returns if the font is ready to be used.
 
+void Load (const ::Image &image, ::Color key, int firstChar)
 
void Load (const std::string &fileName)
 Loads a font from a given file. More...
 
void Load (const std::string &fileName, int fontSize, int *fontChars, int charCount)
 Loads a font from a given file with generation parameters. More...
 
+void Load (const std::string &fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
 
+Vector2 MeasureText (const char *text, float fontSize, float spacing) const
 Measure string size for Font.
 
+Vector2 MeasureText (const std::string &text, float fontSize, float spacing) const
 Measure string size for Font.
 
+Fontoperator= (const ::Font &font)
 
+Fontoperator= (const Font &)=delete
 
+Fontoperator= (Font &&other) noexcept
 
+void SetTexture (const ::Texture &newTexture)
 Set the texture atlas containing the glyphs.
 
+void Unload ()
 
+ + + +

+Protected Member Functions

+void set (const ::Font &font)
 
+

Detailed Description

+

Font type, includes texture and charSet array data.

+ +

Definition at line 15 of file Font.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Font() [1/4]

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::Font::Font (const std::string & fileName)
+
+inline
+
+ +

Loads a Font from the given file.

+
Parameters
+ + +
fileNameThe file name of the font to load.
+
+
+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the given font failed to initialize.
+
+
+ +

Definition at line 42 of file Font.hpp.

+ +

References Load().

+ +
+
+ +

◆ Font() [2/4]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Font::Font (const std::string & fileName,
int fontSize,
int * fontChars = 0,
int charCount = 0 
)
+
+inline
+
+ +

Loads a Font from the given file, with generation parameters.

+
Parameters
+ + +
fileNameThe file name of the font to load.
+
+
+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the given font failed to initialize.
+
+
+
See also
LoadFontEx
+ +

Definition at line 53 of file Font.hpp.

+ +

References Load().

+ +
+
+ +

◆ Font() [3/4]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Font::Font (const ::Imageimage,
::Color key,
int firstChar 
)
+
+inline
+
+ +

Loads a Font from the given image with a color key.

+
Parameters
+ + +
imageThe image to load the fond from.
+
+
+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the given font failed to initialize.
+
+
+
See also
::LoadFontFromImage()
+ +

Definition at line 66 of file Font.hpp.

+ +

References Load().

+ +
+
+ +

◆ Font() [4/4]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Font::Font (const std::string & fileType,
const unsigned char * fileData,
int dataSize,
int fontSize,
int * fontChars,
int charsCount 
)
+
+inline
+
+ +

Loads a font from memory, based on the given file type and file data.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the given font failed to initialize.
+
+
+
See also
::LoadFontFromMemory()
+ +

Definition at line 75 of file Font.hpp.

+ +

References Load().

+ +
+
+

Member Function Documentation

+ +

◆ GetBaseSize()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Font::GetBaseSize () const
+
+inline
+
+ +

Retrieves the baseSize value for the object.

+
Returns
The baseSize value of the object.
+ +

Definition at line 108 of file Font.hpp.

+ +
+
+ +

◆ GetGlyphCount()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Font::GetGlyphCount () const
+
+inline
+
+ +

Retrieves the glyphCount value for the object.

+
Returns
The glyphCount value of the object.
+ +

Definition at line 109 of file Font.hpp.

+ +
+
+ +

◆ GetGlyphPadding()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Font::GetGlyphPadding () const
+
+inline
+
+ +

Retrieves the glyphPadding value for the object.

+
Returns
The glyphPadding value of the object.
+ +

Definition at line 110 of file Font.hpp.

+ +
+
+ +

◆ GetGlyphs()

+ +
+
+ + + + + +
+ + + + + + + +
::GlyphInfo* raylib::Font::GetGlyphs () const
+
+inline
+
+ +

Retrieves the glyphs value for the object.

+
Returns
The glyphs value of the object.
+ +

Definition at line 112 of file Font.hpp.

+ +
+
+ +

◆ GetRecs()

+ +
+
+ + + + + +
+ + + + + + + +
::Rectangle* raylib::Font::GetRecs () const
+
+inline
+
+ +

Retrieves the recs value for the object.

+
Returns
The recs value of the object.
+ +

Definition at line 111 of file Font.hpp.

+ +
+
+ +

◆ Load() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Font::Load (const std::string & fileName)
+
+inline
+
+ +

Loads a font from a given file.

+
Parameters
+ + +
fileNameThe filename of the font to load.
+
+
+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the given font failed to initialize.
+
+
+
See also
LoadFont()
+ +

Definition at line 159 of file Font.hpp.

+ +

References IsValid(), and raylib::LoadFont().

+ +

Referenced by Font().

+ +
+
+ +

◆ Load() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::Font::Load (const std::string & fileName,
int fontSize,
int * fontChars,
int charCount 
)
+
+inline
+
+ +

Loads a font from a given file with generation parameters.

+
Parameters
+ + + +
fileNameThe filename of the font to load.
fontSizeThe desired size of the font.
+
+
+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the given font failed to initialize.
+
+
+
See also
LoadFontEx()
+ +

Definition at line 176 of file Font.hpp.

+ +

References IsValid(), and raylib::LoadFontEx().

+ +
+
+
+ + + + diff --git a/classraylib_1_1_gamepad-members.html b/classraylib_1_1_gamepad-members.html new file mode 100644 index 00000000..c486fdd0 --- /dev/null +++ b/classraylib_1_1_gamepad-members.html @@ -0,0 +1,105 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Gamepad Member List
+
+
+ +

This is the complete list of members for raylib::Gamepad, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + +
Gamepad(int gamepadNumber=0) (defined in raylib::Gamepad)raylib::Gamepadinline
GetAxisCount() constraylib::Gamepadinline
GetAxisMovement(int axis) constraylib::Gamepadinline
GetButtonPressed() constraylib::Gamepadinline
GetName() constraylib::Gamepadinline
GetNumber() constraylib::Gamepadinline
IsAvailable() constraylib::Gamepadinline
IsAvailable(int number)raylib::Gamepadinlinestatic
IsButtonDown(int button) constraylib::Gamepadinline
IsButtonPressed(int button) constraylib::Gamepadinline
IsButtonReleased(int button) constraylib::Gamepadinline
IsButtonUp(int button) constraylib::Gamepadinline
number (defined in raylib::Gamepad)raylib::Gamepad
operator int() const (defined in raylib::Gamepad)raylib::Gamepadinline
operator std::string() constraylib::Gamepadinline
operator=(const Gamepad &gamepad) (defined in raylib::Gamepad)raylib::Gamepadinline
operator=(int gamepadNumber) (defined in raylib::Gamepad)raylib::Gamepadinline
set(int gamepadNumber) (defined in raylib::Gamepad)raylib::Gamepadinlineprotected
SetMappings(const std::string &mappings) (defined in raylib::Gamepad)raylib::Gamepadinline
SetNumber(int value)raylib::Gamepadinline
SetVibration(float leftMotor, float rightMotor, float duration)raylib::Gamepadinline
+ + + + diff --git a/classraylib_1_1_gamepad.html b/classraylib_1_1_gamepad.html new file mode 100644 index 00000000..9742fa69 --- /dev/null +++ b/classraylib_1_1_gamepad.html @@ -0,0 +1,249 @@ + + + + + + + +raylib-cpp: raylib::Gamepad Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Input-related functions: gamepads. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Gamepad (int gamepadNumber=0)
 
+int GetAxisCount () const
 Return gamepad axis count for a gamepad.
 
+float GetAxisMovement (int axis) const
 Return axis movement value for a gamepad axis.
 
+int GetButtonPressed () const
 Get the last gamepad button pressed.
 
+std::string GetName () const
 Return gamepad internal name id.
 
int GetNumber () const
 Retrieves the number value for the object. More...
 
+bool IsAvailable () const
 Detect if a gamepad is available.
 
+bool IsButtonDown (int button) const
 Detect if a gamepad button is being pressed.
 
+bool IsButtonPressed (int button) const
 Detect if a gamepad button has been pressed once.
 
+bool IsButtonReleased (int button) const
 Detect if a gamepad button has been released once.
 
+bool IsButtonUp (int button) const
 Detect if a gamepad button is NOT being pressed.
 
operator int () const
 
operator std::string () const
 Return gamepad internal name id.
 
+Gamepadoperator= (const Gamepad &gamepad)
 
+Gamepadoperator= (int gamepadNumber)
 
+int SetMappings (const std::string &mappings)
 
void SetNumber (int value)
 Sets the number value for the object. More...
 
+void SetVibration (float leftMotor, float rightMotor, float duration)
 Set gamepad vibration for both motors (duration in seconds)
 
+ + + + +

+Static Public Member Functions

+static bool IsAvailable (int number)
 Detect if a gamepad is available.
 
+ + + +

+Public Attributes

+int number
 
+ + + +

+Protected Member Functions

+void set (int gamepadNumber)
 
+

Detailed Description

+

Input-related functions: gamepads.

+ +

Definition at line 13 of file Gamepad.hpp.

+

Member Function Documentation

+ +

◆ GetNumber()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Gamepad::GetNumber () const
+
+inline
+
+ +

Retrieves the number value for the object.

+
Returns
The number value of the object.
+ +

Definition at line 18 of file Gamepad.hpp.

+ +
+
+ +

◆ SetNumber()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Gamepad::SetNumber (int value)
+
+inline
+
+ +

Sets the number value for the object.

+
Parameters
+ + +
valueThe value of which to set number to.
+
+
+ +

Definition at line 18 of file Gamepad.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_image-members.html b/classraylib_1_1_image-members.html new file mode 100644 index 00000000..c7d47ec7 --- /dev/null +++ b/classraylib_1_1_image-members.html @@ -0,0 +1,189 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Image Member List
+
+
+ +

This is the complete list of members for raylib::Image, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AlphaClear(::Color color, float threshold)raylib::Imageinline
AlphaCrop(float threshold)raylib::Imageinline
AlphaMask(const ::Image &alphaMask)raylib::Imageinline
AlphaPremultiply()raylib::Imageinline
Cellular(int width, int height, int tileSize)raylib::Imageinlinestatic
Channel(int selectedChannel)raylib::Imageinline
Checked(int width, int height, int checksX, int checksY, ::Color col1={255, 255, 255, 255}, ::Color col2={0, 0, 0, 255})raylib::Imageinlinestatic
ClearBackground(::Color color={0, 0, 0, 255})raylib::Imageinline
Color(int width, int height, ::Color color={255, 255, 255, 255})raylib::Imageinlinestatic
ColorBrightness(int brightness)raylib::Imageinline
ColorContrast(float contrast)raylib::Imageinline
ColorGrayscale()raylib::Imageinline
ColorInvert()raylib::Imageinline
ColorReplace(::Color color, ::Color replace)raylib::Imageinline
ColorTint(::Color color={255, 255, 255, 255})raylib::Imageinline
Copy() constraylib::Imageinline
Crop(::Rectangle crop)raylib::Imageinline
Crop(int newWidth, int newHeight)raylib::Imageinline
Crop(::Vector2 size)raylib::Imageinline
Crop(int offsetX, int offsetY, int newWidth, int newHeight)raylib::Imageinline
Dither(int rBpp, int gBpp, int bBpp, int aBpp)raylib::Imageinline
Draw(const ::Image &src, ::Rectangle srcRec, ::Rectangle dstRec, ::Color tint={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawCircle(int centerX, int centerY, int radius, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawCircle(::Vector2 center, int radius, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawLine(::Vector2 start, ::Vector2 end, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawLine(::Vector2 start, ::Vector2 end, int thick, ::Color color={255, 255, 255, 255})raylib::Imageinline
DrawPixel(int posX, int posY, ::Color color={255, 255, 255, 255})raylib::Imageinline
DrawPixel(::Vector2 position, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawRectangle(int posX, int posY, int width, int height, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawRectangle(Vector2 position, Vector2 size, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawRectangle(::Rectangle rec, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawRectangleLines(::Rectangle rec, int thick=1, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawText(const char *text, ::Vector2 position, int fontSize, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawText(const std::string &text, ::Vector2 position, int fontSize, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawText(const std::string &text, int x, int y, int fontSize, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawText(const char *text, int x, int y, int fontSize, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawText(const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
DrawText(const ::Font &font, const char *text, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
Export(const std::string &fileName) constraylib::Imageinline
ExportAsCode(const std::string &fileName) constraylib::Imageinline
ExportToMemory(const char *fileType, int *fileSize)raylib::Imageinline
FlipHorizontal()raylib::Imageinline
FlipVertical()raylib::Imageinline
Format(int newFormat)raylib::Imageinline
FromImage(::Rectangle rec) constraylib::Imageinline
GetAlphaBorder(float threshold) constraylib::Imageinline
GetClipboard()raylib::Imageinlinestatic
GetColor(int x=0, int y=0) constraylib::Imageinline
GetColor(::Vector2 position) constraylib::Imageinline
GetData() constraylib::Imageinline
GetFormat() constraylib::Imageinline
GetHeight() constraylib::Imageinline
GetMipmaps() constraylib::Imageinline
GetPixelDataSize(int width, int height, int format=PIXELFORMAT_UNCOMPRESSED_R32G32B32A32)raylib::Imageinlinestatic
GetPixelDataSize() constraylib::Imageinline
GetSize() constraylib::Imageinline
GetWidth() constraylib::Imageinline
GradientLinear(int width, int height, int direction, ::Color start, ::Color end)raylib::Imageinlinestatic
GradientRadial(int width, int height, float density, ::Color inner, ::Color outer)raylib::Imageinlinestatic
Image(void *data=nullptr, int width=0, int height=0, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8) (defined in raylib::Image)raylib::Imageinline
Image(const ::Image &image) (defined in raylib::Image)raylib::Imageinline
Image(const std::string &fileName)raylib::Imageinline
Image(const std::string &fileName, int width, int height, int format, int headerSize=0)raylib::Imageinline
Image(const std::string &fileName, int *frames)raylib::Imageinline
Image(const std::string &fileType, const unsigned char *fileData, int dataSize)raylib::Imageinline
Image(const ::Texture2D &texture)raylib::Imageinline
Image(int width, int height, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
Image(const std::string &text, int fontSize, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
Image(const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinline
Image(const Image &other) (defined in raylib::Image)raylib::Imageinline
Image(Image &&other) (defined in raylib::Image)raylib::Imageinline
IsValid() constraylib::Imageinline
KernelConvolution(const float *kernel, int kernelSize)raylib::Imageinline
Load(const std::string &fileName)raylib::Imageinline
Load(const std::string &fileName, int width, int height, int format, int headerSize)raylib::Imageinline
Load(const std::string &fileName, int *frames)raylib::Imageinline
Load(const std::string &fileType, const unsigned char *fileData, int dataSize)raylib::Imageinline
Load(const ::Texture2D &texture)raylib::Imageinline
LoadColors() constraylib::Imageinline
LoadFromScreen()raylib::Imageinlinestatic
LoadPalette(int maxPaletteSize, int *colorsCount) constraylib::Imageinline
LoadTexture() constraylib::Imageinline
Mipmaps()raylib::Imageinline
operator::Texture2D()raylib::Imageinline
operator=(const ::Image &image) (defined in raylib::Image)raylib::Imageinline
operator=(const Image &other) (defined in raylib::Image)raylib::Imageinline
operator=(Image &&other) noexcept (defined in raylib::Image)raylib::Imageinline
Resize(int newWidth, int newHeight)raylib::Imageinline
ResizeCanvas(int newWidth, int newHeight, int offsetX=0, int offsetY=0, ::Color color={255, 255, 255, 255})raylib::Imageinline
ResizeNN(int newWidth, int newHeight)raylib::Imageinline
Rotate(int degrees)raylib::Imageinline
RotateCCW()raylib::Imageinline
RotateCW()raylib::Imageinline
set(const ::Image &image) (defined in raylib::Image)raylib::Imageinlineprotected
SetHeight(int height, int offsetX=0, int offsetY=0, ::Color fill={255, 255, 255, 255})raylib::Imageinline
SetWidth(int width, int offsetX=0, int offsetY=0, ::Color fill={255, 255, 255, 255})raylib::Imageinline
Text(const std::string &text, int fontSize, ::Color color={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinlinestatic
Text(const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255}) (defined in raylib::Image)raylib::Imageinlinestatic
ToPOT(::Color fillColor)raylib::Imageinline
Unload()raylib::Imageinline
UnloadColors(::Color *colors) constraylib::Imageinline
UnloadPalette(::Color *colors) constraylib::Imageinline
WhiteNoise(int width, int height, float factor)raylib::Imageinlinestatic
~Image() (defined in raylib::Image)raylib::Imageinline
+ + + + diff --git a/classraylib_1_1_image.html b/classraylib_1_1_image.html new file mode 100644 index 00000000..bb4798fe --- /dev/null +++ b/classraylib_1_1_image.html @@ -0,0 +1,1547 @@ + + + + + + + +raylib-cpp: raylib::Image Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Image type, bpp always RGBA (32bit) + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Image (const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
 
Image (const ::Image &image)
 
 Image (const ::Texture2D &texture)
 Load an image from the given file. More...
 
Image (const Image &other)
 
 Image (const std::string &fileName)
 Load an image from the given file. More...
 
 Image (const std::string &fileName, int *frames)
 Load an animation image from the given file. More...
 
 Image (const std::string &fileName, int width, int height, int format, int headerSize=0)
 Load a raw image from the given file, with the provided width, height, and formats. More...
 
 Image (const std::string &fileType, const unsigned char *fileData, int dataSize)
 Load an image from the given file. More...
 
Image (const std::string &text, int fontSize, ::Color color={255, 255, 255, 255})
 
Image (Image &&other)
 
Image (int width, int height, ::Color color={255, 255, 255, 255})
 
Image (void *data=nullptr, int width=0, int height=0, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
 
+ImageAlphaClear (::Color color, float threshold)
 Clear alpha channel to desired color.
 
+ImageAlphaCrop (float threshold)
 Crop image depending on alpha value.
 
+ImageAlphaMask (const ::Image &alphaMask)
 Apply alpha mask to image.
 
+ImageAlphaPremultiply ()
 Premultiply alpha channel.
 
+::Image Channel (int selectedChannel)
 Create an image from a selected channel of another image (GRAYSCALE)
 
+ImageClearBackground (::Color color={0, 0, 0, 255})
 Clear image background with given color.
 
ImageColorBrightness (int brightness)
 Modify image color: brightness. More...
 
ImageColorContrast (float contrast)
 Modify image color: contrast. More...
 
+ImageColorGrayscale ()
 Modify image color: grayscale.
 
+ImageColorInvert ()
 Modify image color: invert.
 
+ImageColorReplace (::Color color, ::Color replace)
 Modify image color: replace color.
 
+ImageColorTint (::Color color={255, 255, 255, 255})
 Modify image color: tint.
 
+::Image Copy () const
 Create an image duplicate (useful for transformations)
 
+ImageCrop (::Rectangle crop)
 Crop an image to area defined by a rectangle.
 
+ImageCrop (::Vector2 size)
 Crop an image to a new given width and height based on a vector.
 
+ImageCrop (int newWidth, int newHeight)
 Crop an image to a new given width and height.
 
+ImageCrop (int offsetX, int offsetY, int newWidth, int newHeight)
 Crop an image to area defined by a rectangle.
 
+ImageDither (int rBpp, int gBpp, int bBpp, int aBpp)
 Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
 
+void Draw (const ::Image &src, ::Rectangle srcRec, ::Rectangle dstRec, ::Color tint={255, 255, 255, 255})
 
+void DrawCircle (::Vector2 center, int radius, ::Color color={255, 255, 255, 255})
 
+void DrawCircle (int centerX, int centerY, int radius, ::Color color={255, 255, 255, 255})
 
+void DrawLine (::Vector2 start, ::Vector2 end, ::Color color={255, 255, 255, 255})
 
+void DrawLine (::Vector2 start, ::Vector2 end, int thick, ::Color color={255, 255, 255, 255})
 Description: Draw a line defining thickness within an image.
 
+void DrawLine (int startPosX, int startPosY, int endPosX, int endPosY, ::Color color={255, 255, 255, 255})
 
+void DrawPixel (::Vector2 position, ::Color color={255, 255, 255, 255})
 
+void DrawPixel (int posX, int posY, ::Color color={255, 255, 255, 255})
 Draw pixel within an image.
 
+void DrawRectangle (::Rectangle rec, ::Color color={255, 255, 255, 255})
 
+void DrawRectangle (int posX, int posY, int width, int height, ::Color color={255, 255, 255, 255})
 
+void DrawRectangle (Vector2 position, Vector2 size, ::Color color={255, 255, 255, 255})
 
+void DrawRectangleLines (::Rectangle rec, int thick=1, ::Color color={255, 255, 255, 255})
 
+void DrawText (const ::Font &font, const char *text, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
 
+void DrawText (const ::Font &font, const std::string &text, ::Vector2 position, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
 
+void DrawText (const char *text, ::Vector2 position, int fontSize, ::Color color={255, 255, 255, 255})
 
+void DrawText (const char *text, int x, int y, int fontSize, ::Color color={255, 255, 255, 255})
 
+void DrawText (const std::string &text, ::Vector2 position, int fontSize, ::Color color={255, 255, 255, 255})
 
+void DrawText (const std::string &text, int x, int y, int fontSize, ::Color color={255, 255, 255, 255})
 
void Export (const std::string &fileName) const
 Export image data to file, returns true on success. More...
 
void ExportAsCode (const std::string &fileName) const
 Export image as code file defining an array of bytes, returns true on success. More...
 
+unsigned char * ExportToMemory (const char *fileType, int *fileSize)
 Export image to memory buffer.
 
+ImageFlipHorizontal ()
 Flip image horizontally.
 
+ImageFlipVertical ()
 Flip image vertically.
 
+ImageFormat (int newFormat)
 Convert image data to desired format.
 
+::Image FromImage (::Rectangle rec) const
 Create an image from another image piece.
 
Rectangle GetAlphaBorder (float threshold) const
 Get image alpha border rectangle. More...
 
+raylib::Color GetColor (::Vector2 position) const
 Get image pixel color at vector position.
 
+raylib::Color GetColor (int x=0, int y=0) const
 Get image pixel color at (x, y) position.
 
void * GetData () const
 Retrieves the data value for the object. More...
 
int GetFormat () const
 Retrieves the format value for the object. More...
 
int GetHeight () const
 Retrieves the height value for the object. More...
 
int GetMipmaps () const
 Retrieves the mipmaps value for the object. More...
 
int GetPixelDataSize () const
 Returns the pixel data size based on the current image. More...
 
+::Vector2 GetSize () const
 Retrieve the width and height of the image.
 
int GetWidth () const
 Retrieves the width value for the object. More...
 
bool IsValid () const
 Retrieve whether or not the Image has been loaded. More...
 
+void KernelConvolution (const float *kernel, int kernelSize)
 Apply custom square convolution kernel to image.
 
void Load (const ::Texture2D &texture)
 Load an image from the given file. More...
 
void Load (const std::string &fileName)
 Load image from file into CPU memory (RAM) More...
 
void Load (const std::string &fileName, int *frames)
 Load image sequence from file (frames appended to image.data). More...
 
void Load (const std::string &fileName, int width, int height, int format, int headerSize)
 Load image from RAW file data. More...
 
void Load (const std::string &fileType, const unsigned char *fileData, int dataSize)
 Load image from memory buffer, fileType refers to extension: i.e. More...
 
+::ColorLoadColors () const
 Load color data from image as a Color array (RGBA - 32bit)
 
+::ColorLoadPalette (int maxPaletteSize, int *colorsCount) const
 Load colors palette from image as a Color array (RGBA - 32bit)
 
+::Texture2D LoadTexture () const
 Load texture from image data.
 
+ImageMipmaps ()
 Generate all mipmap levels for a provided image.
 
 operator::Texture2D ()
 Loads a texture from the image data. More...
 
+Imageoperator= (const ::Image &image)
 
+Imageoperator= (const Image &other)
 
+Imageoperator= (Image &&other) noexcept
 
+ImageResize (int newWidth, int newHeight)
 Resize and image to new size.
 
+ImageResizeCanvas (int newWidth, int newHeight, int offsetX=0, int offsetY=0, ::Color color={255, 255, 255, 255})
 Resize canvas and fill with color.
 
+ImageResizeNN (int newWidth, int newHeight)
 Resize and image to new size using Nearest-Neighbor scaling algorithm.
 
+ImageRotate (int degrees)
 Rotate image by input angle in degrees (-359 to 359)
 
+ImageRotateCCW ()
 Rotate image counter-clockwise 90deg.
 
+ImageRotateCW ()
 Rotate image clockwise 90deg.
 
void SetHeight (int height, int offsetX=0, int offsetY=0, ::Color fill={255, 255, 255, 255})
 Set the height of the image canvas. More...
 
void SetWidth (int width, int offsetX=0, int offsetY=0, ::Color fill={255, 255, 255, 255})
 Set the width of the image canvas. More...
 
+ImageToPOT (::Color fillColor)
 Convert image to POT (power-of-two)
 
+void Unload ()
 Unload image from CPU memory (RAM)
 
+void UnloadColors (::Color *colors) const
 Unload color data loaded with LoadImageColors()
 
+void UnloadPalette (::Color *colors) const
 Unload colors palette loaded with LoadImagePalette()
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

::Image Cellular (int width, int height, int tileSize)
 Generate image: cellular algorithm. More...
 
+::Image Checked (int width, int height, int checksX, int checksY, ::Color col1={255, 255, 255, 255}, ::Color col2={0, 0, 0, 255})
 Generate image: checked.
 
+::Image Color (int width, int height, ::Color color={255, 255, 255, 255})
 Generate image: plain color.
 
+::Image GetClipboard ()
 Get clipboard image content.
 
+static int GetPixelDataSize (int width, int height, int format=PIXELFORMAT_UNCOMPRESSED_R32G32B32A32)
 Get pixel data size in bytes for certain format.
 
+::Image GradientLinear (int width, int height, int direction, ::Color start, ::Color end)
 Generate image: linear gradient.
 
+::Image GradientRadial (int width, int height, float density, ::Color inner, ::Color outer)
 Generate image: radial gradient.
 
+::Image LoadFromScreen ()
 Get pixel data from screen buffer and return an Image (screenshot)
 
+::Image Text (const ::Font &font, const std::string &text, float fontSize, float spacing, ::Color tint={255, 255, 255, 255})
 
+::Image Text (const std::string &text, int fontSize, ::Color color={255, 255, 255, 255})
 
+::Image WhiteNoise (int width, int height, float factor)
 Generate image: white noise.
 
+ + + +

+Protected Member Functions

+void set (const ::Image &image)
 
+

Detailed Description

+

Image type, bpp always RGBA (32bit)

+

Data stored in CPU memory (RAM)

+ +

Definition at line 17 of file Image.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Image() [1/5]

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::Image::Image (const std::string & fileName)
+
+inline
+
+ +

Load an image from the given file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image failed to load from the file.
+
+
+
See also
Load()
+ +

Definition at line 38 of file Image.hpp.

+ +

References Load().

+ +
+
+ +

◆ Image() [2/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Image::Image (const std::string & fileName,
int width,
int height,
int format,
int headerSize = 0 
)
+
+inline
+
+ +

Load a raw image from the given file, with the provided width, height, and formats.

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image failed to load from the file.
+
+
+
See also
LoadRaw()
+ +

Definition at line 47 of file Image.hpp.

+ +

References Load().

+ +
+
+ +

◆ Image() [3/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
raylib::Image::Image (const std::string & fileName,
int * frames 
)
+
+inline
+
+ +

Load an animation image from the given file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image failed to load from the file.
+
+
+
See also
LoadAnim()
+ +

Definition at line 58 of file Image.hpp.

+ +

References Load().

+ +
+
+ +

◆ Image() [4/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Image::Image (const std::string & fileType,
const unsigned char * fileData,
int dataSize 
)
+
+inline
+
+ +

Load an image from the given file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image failed to load from the file.
+
+
+ +

Definition at line 65 of file Image.hpp.

+ +

References Load().

+ +
+
+ +

◆ Image() [5/5]

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::Image::Image (const ::Texture2Dtexture)
+
+inline
+
+ +

Load an image from the given file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image failed to load from the file.
+
+
+ +

Definition at line 74 of file Image.hpp.

+ +

References Load().

+ +
+
+

Member Function Documentation

+ +

◆ Cellular()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
::Image raylib::Image::Cellular (int width,
int height,
int tileSize 
)
+
+inlinestatic
+
+ +

Generate image: cellular algorithm.

+

Bigger tileSize means bigger cells

+ +

Definition at line 165 of file Image.hpp.

+ +
+
+ +

◆ ColorBrightness()

+ +
+
+ + + + + +
+ + + + + + + + +
Image& raylib::Image::ColorBrightness (int brightness)
+
+inline
+
+ +

Modify image color: brightness.

+
Parameters
+ + +
brightnessBrightness values between -255 and 255
+
+
+ +

Definition at line 554 of file Image.hpp.

+ +
+
+ +

◆ ColorContrast()

+ +
+
+ + + + + +
+ + + + + + + + +
Image& raylib::Image::ColorContrast (float contrast)
+
+inline
+
+ +

Modify image color: contrast.

+
Parameters
+ + +
contrastContrast values between -100 and 100
+
+
+ +

Definition at line 544 of file Image.hpp.

+ +
+
+ +

◆ Export()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Image::Export (const std::string & fileName) const
+
+inline
+
+ +

Export image data to file, returns true on success.

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image failed to load from the file.
+
+
+ +

Definition at line 292 of file Image.hpp.

+ +

References raylib::ExportImage().

+ +
+
+ +

◆ ExportAsCode()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Image::ExportAsCode (const std::string & fileName) const
+
+inline
+
+ +

Export image as code file defining an array of bytes, returns true on success.

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image failed to load from the file.
+
+
+ +

Definition at line 310 of file Image.hpp.

+ +

References raylib::ExportImageAsCode().

+ +
+
+ +

◆ GetAlphaBorder()

+ +
+
+ + + + + +
+ + + + + + + + +
Rectangle raylib::Image::GetAlphaBorder (float threshold) const
+
+inline
+
+ +

Get image alpha border rectangle.

+
Parameters
+ + +
thresholdThreshold is defined as a percentatge: 0.0f -> 1.0f
+
+
+ +

Definition at line 572 of file Image.hpp.

+ +
+
+ +

◆ GetData()

+ +
+
+ + + + + +
+ + + + + + + +
void* raylib::Image::GetData () const
+
+inline
+
+ +

Retrieves the data value for the object.

+
Returns
The data value of the object.
+ +

Definition at line 316 of file Image.hpp.

+ +
+
+ +

◆ GetFormat()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Image::GetFormat () const
+
+inline
+
+ +

Retrieves the format value for the object.

+
Returns
The format value of the object.
+ +

Definition at line 320 of file Image.hpp.

+ +
+
+ +

◆ GetHeight()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Image::GetHeight () const
+
+inline
+
+ +

Retrieves the height value for the object.

+
Returns
The height value of the object.
+ +

Definition at line 318 of file Image.hpp.

+ +
+
+ +

◆ GetMipmaps()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Image::GetMipmaps () const
+
+inline
+
+ +

Retrieves the mipmaps value for the object.

+
Returns
The mipmaps value of the object.
+ +

Definition at line 319 of file Image.hpp.

+ +
+
+ +

◆ GetPixelDataSize()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Image::GetPixelDataSize () const
+
+inline
+
+ +

Returns the pixel data size based on the current image.

+
Returns
The pixel data size of the image.
+ +

Definition at line 738 of file Image.hpp.

+ +
+
+ +

◆ GetWidth()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Image::GetWidth () const
+
+inline
+
+ +

Retrieves the width value for the object.

+
Returns
The width value of the object.
+ +

Definition at line 317 of file Image.hpp.

+ +
+
+ +

◆ IsValid()

+ +
+
+ + + + + +
+ + + + + + + +
bool raylib::Image::IsValid () const
+
+inline
+
+ +

Retrieve whether or not the Image has been loaded.

+
Returns
True or false depending on whether the Image has been loaded.
+ +

Definition at line 745 of file Image.hpp.

+ +

Referenced by Load().

+ +
+
+ +

◆ Load() [1/5]

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Image::Load (const ::Texture2Dtexture)
+
+inline
+
+ +

Load an image from the given file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image animation to load from the file.
+
+
+
See also
::LoadImageFromTexture()
+ +

Definition at line 270 of file Image.hpp.

+ +

References IsValid().

+ +
+
+ +

◆ Load() [2/5]

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Image::Load (const std::string & fileName)
+
+inline
+
+ +

Load image from file into CPU memory (RAM)

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image failed to load from the file.
+
+
+
See also
LoadImage()
+ +

Definition at line 214 of file Image.hpp.

+ +

References IsValid(), and raylib::LoadImage().

+ +

Referenced by Image().

+ +
+
+ +

◆ Load() [3/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void raylib::Image::Load (const std::string & fileName,
int * frames 
)
+
+inline
+
+ +

Load image sequence from file (frames appended to image.data).

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image animation to load from the file.
+
+
+
See also
LoadImageAnim()
+ +

Definition at line 242 of file Image.hpp.

+ +

References IsValid(), and raylib::LoadImageAnim().

+ +
+
+ +

◆ Load() [4/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::Image::Load (const std::string & fileName,
int width,
int height,
int format,
int headerSize 
)
+
+inline
+
+ +

Load image from RAW file data.

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image failed to load from the file.
+
+
+
See also
LoadImageRaw()
+ +

Definition at line 228 of file Image.hpp.

+ +

References IsValid(), and raylib::LoadImageRaw().

+ +
+
+ +

◆ Load() [5/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::Image::Load (const std::string & fileType,
const unsigned char * fileData,
int dataSize 
)
+
+inline
+
+ +

Load image from memory buffer, fileType refers to extension: i.e.

+

"png".

+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the image animation to load from the file.
+
+
+
See also
LoadImageFromMemory()
+ +

Definition at line 256 of file Image.hpp.

+ +

References IsValid(), and raylib::LoadImageFromMemory().

+ +
+
+ +

◆ operator::Texture2D()

+ +
+
+ + + + + +
+ + + + + + + +
raylib::Image::operator::Texture2D ()
+
+inline
+
+ +

Loads a texture from the image data.

+
See also
LoadTexture()
+ +

Definition at line 724 of file Image.hpp.

+ +

References LoadTexture().

+ +
+
+ +

◆ SetHeight()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::Image::SetHeight (int height,
int offsetX = 0,
int offsetY = 0,
::Color fill = {255, 255, 255, 255} 
)
+
+inline
+
+ +

Set the height of the image canvas.

+
See also
ResizeCanvas
+ +

Definition at line 336 of file Image.hpp.

+ +
+
+ +

◆ SetWidth()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::Image::SetWidth (int width,
int offsetX = 0,
int offsetY = 0,
::Color fill = {255, 255, 255, 255} 
)
+
+inline
+
+ +

Set the width of the image canvas.

+
See also
ResizeCanvas
+ +

Definition at line 327 of file Image.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_material-members.html b/classraylib_1_1_material-members.html new file mode 100644 index 00000000..2f808f0b --- /dev/null +++ b/classraylib_1_1_material-members.html @@ -0,0 +1,103 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Material Member List
+
+
+ +

This is the complete list of members for raylib::Material, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + +
DrawMesh(const ::Mesh &mesh, ::Matrix transform) constraylib::Materialinline
DrawMesh(const ::Mesh &mesh, ::Matrix *transforms, int instances) constraylib::Materialinline
GetMaps() constraylib::Materialinline
GetShader() constraylib::Materialinline
IsValid() constraylib::Materialinline
Load(const std::string &fileName)raylib::Materialinlinestatic
Material(const ::Material &material) (defined in raylib::Material)raylib::Materialinline
Material()raylib::Materialinline
Material(const Material &)=delete (defined in raylib::Material)raylib::Material
Material(Material &&other) (defined in raylib::Material)raylib::Materialinline
operator=(const ::Material &material) (defined in raylib::Material)raylib::Materialinline
operator=(const Material &)=delete (defined in raylib::Material)raylib::Material
operator=(Material &&other) noexcept (defined in raylib::Material)raylib::Materialinline
set(const ::Material &material) (defined in raylib::Material)raylib::Materialinlineprotected
SetMaps(::MaterialMap *value)raylib::Materialinline
SetShader(::Shader value)raylib::Materialinline
SetTexture(int mapType, const ::Texture2D &texture)raylib::Materialinline
Unload()raylib::Materialinline
~Material() (defined in raylib::Material)raylib::Materialinline
+ + + + diff --git a/classraylib_1_1_material.html b/classraylib_1_1_material.html new file mode 100644 index 00000000..eb40108c --- /dev/null +++ b/classraylib_1_1_material.html @@ -0,0 +1,297 @@ + + + + + + + +raylib-cpp: raylib::Material Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Material type (generic) + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Material ()
 Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
 
Material (const ::Material &material)
 
Material (const Material &)=delete
 
Material (Material &&other)
 
+void DrawMesh (const ::Mesh &mesh, ::Matrix *transforms, int instances) const
 Draw multiple mesh instances with material and different transforms.
 
+void DrawMesh (const ::Mesh &mesh, ::Matrix transform) const
 Draw a 3d mesh with material and transform.
 
::MaterialMap * GetMaps () const
 Retrieves the maps value for the object. More...
 
::Shader GetShader () const
 Retrieves the shader value for the object. More...
 
+bool IsValid () const
 Check if material is ready.
 
+Materialoperator= (const ::Material &material)
 
+Materialoperator= (const Material &)=delete
 
+Materialoperator= (Material &&other) noexcept
 
void SetMaps (::MaterialMap *value)
 Sets the maps value for the object. More...
 
void SetShader (::Shader value)
 Sets the shader value for the object. More...
 
+MaterialSetTexture (int mapType, const ::Texture2D &texture)
 Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
 
+void Unload ()
 Unload material from memory.
 
+ + + + +

+Static Public Member Functions

+static std::vector< MaterialLoad (const std::string &fileName)
 Load materials from model file.
 
+ + + +

+Protected Member Functions

+void set (const ::Material &material)
 
+

Detailed Description

+

Material type (generic)

+ +

Definition at line 14 of file Material.hpp.

+

Member Function Documentation

+ +

◆ GetMaps()

+ +
+
+ + + + + +
+ + + + + + + +
::MaterialMap* raylib::Material::GetMaps () const
+
+inline
+
+ +

Retrieves the maps value for the object.

+
Returns
The maps value of the object.
+ +

Definition at line 49 of file Material.hpp.

+ +
+
+ +

◆ GetShader()

+ +
+
+ + + + + +
+ + + + + + + +
::Shader raylib::Material::GetShader () const
+
+inline
+
+ +

Retrieves the shader value for the object.

+
Returns
The shader value of the object.
+ +

Definition at line 48 of file Material.hpp.

+ +
+
+ +

◆ SetMaps()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Material::SetMaps (::MaterialMap * value)
+
+inline
+
+ +

Sets the maps value for the object.

+
Parameters
+ + +
valueThe value of which to set maps to.
+
+
+ +

Definition at line 49 of file Material.hpp.

+ +
+
+ +

◆ SetShader()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Material::SetShader (::Shader value)
+
+inline
+
+ +

Sets the shader value for the object.

+
Parameters
+ + +
valueThe value of which to set shader to.
+
+
+ +

Definition at line 48 of file Material.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_matrix-members.html b/classraylib_1_1_matrix-members.html new file mode 100644 index 00000000..6078db12 --- /dev/null +++ b/classraylib_1_1_matrix-members.html @@ -0,0 +1,149 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Matrix Member List
+
+
+ +

This is the complete list of members for raylib::Matrix, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Add(const ::Matrix &right) (defined in raylib::Matrix)raylib::Matrixinline
Frustum(double left, double right, double bottom, double top, double near, double far) (defined in raylib::Matrix)raylib::Matrixinlinestatic
GetCamera(const ::Camera &camera) (defined in raylib::Matrix)raylib::Matrixinlinestatic
GetCamera(const ::Camera2D &camera) (defined in raylib::Matrix)raylib::Matrixinlinestatic
GetM0() constraylib::Matrixinline
GetM1() constraylib::Matrixinline
GetM10() constraylib::Matrixinline
GetM11() constraylib::Matrixinline
GetM12() constraylib::Matrixinline
GetM13() constraylib::Matrixinline
GetM14() constraylib::Matrixinline
GetM15() constraylib::Matrixinline
GetM2() constraylib::Matrixinline
GetM3() constraylib::Matrixinline
GetM4() constraylib::Matrixinline
GetM5() constraylib::Matrixinline
GetM6() constraylib::Matrixinline
GetM7() constraylib::Matrixinline
GetM8() constraylib::Matrixinline
GetM9() constraylib::Matrixinline
Identity() (defined in raylib::Matrix)raylib::Matrixinlinestatic
Invert() const (defined in raylib::Matrix)raylib::Matrixinline
LookAt(Vector3 eye, Vector3 target, Vector3 up) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Matrix(const ::Matrix &mat) (defined in raylib::Matrix)raylib::Matrixinline
Matrix(float m0=0, float m4=0, float m8=0, float m12=0, float m1=0, float m5=0, float m9=0, float m13=0, float m2=0, float m6=0, float m10=0, float m14=0, float m3=0, float m7=0, float m11=0, float m15=0) (defined in raylib::Matrix)raylib::Matrixinline
Multiply(const ::Matrix &right) const (defined in raylib::Matrix)raylib::Matrixinline
operator float16() (defined in raylib::Matrix)raylib::Matrixinline
operator!=(const ::Matrix &other) (defined in raylib::Matrix)raylib::Matrixinline
operator*(const ::Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator+(const ::Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator-(const ::Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator=(const ::Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator=(const Matrix &matrix) (defined in raylib::Matrix)raylib::Matrixinline
operator==(const ::Matrix &other) (defined in raylib::Matrix)raylib::Matrixinline
Ortho(double left, double right, double bottom, double top, double near, double far) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Perspective(double fovy, double aspect, double near, double far) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Rotate(Vector3 axis, float angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
RotateX(float angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
RotateXYZ(Vector3 angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
RotateY(float angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
RotateZ(float angle) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Scale(float x, float y, float z) (defined in raylib::Matrix)raylib::Matrixinlinestatic
set(const ::Matrix &mat) (defined in raylib::Matrix)raylib::Matrixinlineprotected
SetM0(float value)raylib::Matrixinline
SetM1(float value)raylib::Matrixinline
SetM10(float value)raylib::Matrixinline
SetM11(float value)raylib::Matrixinline
SetM12(float value)raylib::Matrixinline
SetM13(float value)raylib::Matrixinline
SetM14(float value)raylib::Matrixinline
SetM15(float value)raylib::Matrixinline
SetM2(float value)raylib::Matrixinline
SetM3(float value)raylib::Matrixinline
SetM4(float value)raylib::Matrixinline
SetM5(float value)raylib::Matrixinline
SetM6(float value)raylib::Matrixinline
SetM7(float value)raylib::Matrixinline
SetM8(float value)raylib::Matrixinline
SetM9(float value)raylib::Matrixinline
SetShaderValue(const ::Shader &shader, int uniformLoc)raylib::Matrixinline
Subtract(const ::Matrix &right) (defined in raylib::Matrix)raylib::Matrixinline
ToFloatV() const (defined in raylib::Matrix)raylib::Matrixinline
Trace() constraylib::Matrixinline
Translate(float x, float y, float z) (defined in raylib::Matrix)raylib::Matrixinlinestatic
Transpose() constraylib::Matrixinline
+ + + + diff --git a/classraylib_1_1_matrix.html b/classraylib_1_1_matrix.html new file mode 100644 index 00000000..a4cee305 --- /dev/null +++ b/classraylib_1_1_matrix.html @@ -0,0 +1,1358 @@ + + + + + + + +raylib-cpp: raylib::Matrix Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Matrix type (OpenGL style 4x4 - right handed, column major) + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Matrix (const ::Matrix &mat)
 
Matrix (float m0=0, float m4=0, float m8=0, float m12=0, float m1=0, float m5=0, float m9=0, float m13=0, float m2=0, float m6=0, float m10=0, float m14=0, float m3=0, float m7=0, float m11=0, float m15=0)
 
+Matrix Add (const ::Matrix &right)
 
float GetM0 () const
 Retrieves the m0 value for the object. More...
 
float GetM1 () const
 Retrieves the m1 value for the object. More...
 
float GetM10 () const
 Retrieves the m10 value for the object. More...
 
float GetM11 () const
 Retrieves the m11 value for the object. More...
 
float GetM12 () const
 Retrieves the m12 value for the object. More...
 
float GetM13 () const
 Retrieves the m13 value for the object. More...
 
float GetM14 () const
 Retrieves the m14 value for the object. More...
 
float GetM15 () const
 Retrieves the m15 value for the object. More...
 
float GetM2 () const
 Retrieves the m2 value for the object. More...
 
float GetM3 () const
 Retrieves the m3 value for the object. More...
 
float GetM4 () const
 Retrieves the m4 value for the object. More...
 
float GetM5 () const
 Retrieves the m5 value for the object. More...
 
float GetM6 () const
 Retrieves the m6 value for the object. More...
 
float GetM7 () const
 Retrieves the m7 value for the object. More...
 
float GetM8 () const
 Retrieves the m8 value for the object. More...
 
float GetM9 () const
 Retrieves the m9 value for the object. More...
 
+Matrix Invert () const
 
+Matrix Multiply (const ::Matrix &right) const
 
operator float16 ()
 
+bool operator!= (const ::Matrix &other)
 
+Matrix operator* (const ::Matrix &matrix)
 
+Matrix operator+ (const ::Matrix &matrix)
 
+Matrix operator- (const ::Matrix &matrix)
 
+Matrixoperator= (const ::Matrix &matrix)
 
+Matrixoperator= (const Matrix &matrix)
 
+bool operator== (const ::Matrix &other)
 
void SetM0 (float value)
 Sets the m0 value for the object. More...
 
void SetM1 (float value)
 Sets the m1 value for the object. More...
 
void SetM10 (float value)
 Sets the m10 value for the object. More...
 
void SetM11 (float value)
 Sets the m11 value for the object. More...
 
void SetM12 (float value)
 Sets the m12 value for the object. More...
 
void SetM13 (float value)
 Sets the m13 value for the object. More...
 
void SetM14 (float value)
 Sets the m14 value for the object. More...
 
void SetM15 (float value)
 Sets the m15 value for the object. More...
 
void SetM2 (float value)
 Sets the m2 value for the object. More...
 
void SetM3 (float value)
 Sets the m3 value for the object. More...
 
void SetM4 (float value)
 Sets the m4 value for the object. More...
 
void SetM5 (float value)
 Sets the m5 value for the object. More...
 
void SetM6 (float value)
 Sets the m6 value for the object. More...
 
void SetM7 (float value)
 Sets the m7 value for the object. More...
 
void SetM8 (float value)
 Sets the m8 value for the object. More...
 
void SetM9 (float value)
 Sets the m9 value for the object. More...
 
+MatrixSetShaderValue (const ::Shader &shader, int uniformLoc)
 Set shader uniform value (matrix 4x4)
 
+Matrix Subtract (const ::Matrix &right)
 
+float16 ToFloatV () const
 
+float Trace () const
 Returns the trace of the matrix (sum of the values along the diagonal)
 
+Matrix Transpose () const
 Transposes provided matrix.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

+static Matrix Frustum (double left, double right, double bottom, double top, double near, double far)
 
+static Matrix GetCamera (const ::Camera &camera)
 
+static Matrix GetCamera (const ::Camera2D &camera)
 
+static Matrix Identity ()
 
+static Matrix LookAt (Vector3 eye, Vector3 target, Vector3 up)
 
+static Matrix Ortho (double left, double right, double bottom, double top, double near, double far)
 
+static Matrix Perspective (double fovy, double aspect, double near, double far)
 
+static Matrix Rotate (Vector3 axis, float angle)
 
+static Matrix RotateX (float angle)
 
+static Matrix RotateXYZ (Vector3 angle)
 
+static Matrix RotateY (float angle)
 
+static Matrix RotateZ (float angle)
 
+static Matrix Scale (float x, float y, float z)
 
+static Matrix Translate (float x, float y, float z)
 
+ + + +

+Protected Member Functions

+void set (const ::Matrix &mat)
 
+

Detailed Description

+

Matrix type (OpenGL style 4x4 - right handed, column major)

+ +

Definition at line 16 of file Matrix.hpp.

+

Member Function Documentation

+ +

◆ GetM0()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM0 () const
+
+inline
+
+ +

Retrieves the m0 value for the object.

+
Returns
The m0 value of the object.
+ +

Definition at line 60 of file Matrix.hpp.

+ +
+
+ +

◆ GetM1()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM1 () const
+
+inline
+
+ +

Retrieves the m1 value for the object.

+
Returns
The m1 value of the object.
+ +

Definition at line 61 of file Matrix.hpp.

+ +
+
+ +

◆ GetM10()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM10 () const
+
+inline
+
+ +

Retrieves the m10 value for the object.

+
Returns
The m10 value of the object.
+ +

Definition at line 70 of file Matrix.hpp.

+ +
+
+ +

◆ GetM11()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM11 () const
+
+inline
+
+ +

Retrieves the m11 value for the object.

+
Returns
The m11 value of the object.
+ +

Definition at line 71 of file Matrix.hpp.

+ +
+
+ +

◆ GetM12()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM12 () const
+
+inline
+
+ +

Retrieves the m12 value for the object.

+
Returns
The m12 value of the object.
+ +

Definition at line 72 of file Matrix.hpp.

+ +
+
+ +

◆ GetM13()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM13 () const
+
+inline
+
+ +

Retrieves the m13 value for the object.

+
Returns
The m13 value of the object.
+ +

Definition at line 73 of file Matrix.hpp.

+ +
+
+ +

◆ GetM14()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM14 () const
+
+inline
+
+ +

Retrieves the m14 value for the object.

+
Returns
The m14 value of the object.
+ +

Definition at line 74 of file Matrix.hpp.

+ +
+
+ +

◆ GetM15()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM15 () const
+
+inline
+
+ +

Retrieves the m15 value for the object.

+
Returns
The m15 value of the object.
+ +

Definition at line 75 of file Matrix.hpp.

+ +
+
+ +

◆ GetM2()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM2 () const
+
+inline
+
+ +

Retrieves the m2 value for the object.

+
Returns
The m2 value of the object.
+ +

Definition at line 62 of file Matrix.hpp.

+ +
+
+ +

◆ GetM3()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM3 () const
+
+inline
+
+ +

Retrieves the m3 value for the object.

+
Returns
The m3 value of the object.
+ +

Definition at line 63 of file Matrix.hpp.

+ +
+
+ +

◆ GetM4()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM4 () const
+
+inline
+
+ +

Retrieves the m4 value for the object.

+
Returns
The m4 value of the object.
+ +

Definition at line 64 of file Matrix.hpp.

+ +
+
+ +

◆ GetM5()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM5 () const
+
+inline
+
+ +

Retrieves the m5 value for the object.

+
Returns
The m5 value of the object.
+ +

Definition at line 65 of file Matrix.hpp.

+ +
+
+ +

◆ GetM6()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM6 () const
+
+inline
+
+ +

Retrieves the m6 value for the object.

+
Returns
The m6 value of the object.
+ +

Definition at line 66 of file Matrix.hpp.

+ +
+
+ +

◆ GetM7()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM7 () const
+
+inline
+
+ +

Retrieves the m7 value for the object.

+
Returns
The m7 value of the object.
+ +

Definition at line 67 of file Matrix.hpp.

+ +
+
+ +

◆ GetM8()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM8 () const
+
+inline
+
+ +

Retrieves the m8 value for the object.

+
Returns
The m8 value of the object.
+ +

Definition at line 68 of file Matrix.hpp.

+ +
+
+ +

◆ GetM9()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Matrix::GetM9 () const
+
+inline
+
+ +

Retrieves the m9 value for the object.

+
Returns
The m9 value of the object.
+ +

Definition at line 69 of file Matrix.hpp.

+ +
+
+ +

◆ SetM0()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM0 (float value)
+
+inline
+
+ +

Sets the m0 value for the object.

+
Parameters
+ + +
valueThe value of which to set m0 to.
+
+
+ +

Definition at line 60 of file Matrix.hpp.

+ +
+
+ +

◆ SetM1()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM1 (float value)
+
+inline
+
+ +

Sets the m1 value for the object.

+
Parameters
+ + +
valueThe value of which to set m1 to.
+
+
+ +

Definition at line 61 of file Matrix.hpp.

+ +
+
+ +

◆ SetM10()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM10 (float value)
+
+inline
+
+ +

Sets the m10 value for the object.

+
Parameters
+ + +
valueThe value of which to set m10 to.
+
+
+ +

Definition at line 70 of file Matrix.hpp.

+ +
+
+ +

◆ SetM11()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM11 (float value)
+
+inline
+
+ +

Sets the m11 value for the object.

+
Parameters
+ + +
valueThe value of which to set m11 to.
+
+
+ +

Definition at line 71 of file Matrix.hpp.

+ +
+
+ +

◆ SetM12()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM12 (float value)
+
+inline
+
+ +

Sets the m12 value for the object.

+
Parameters
+ + +
valueThe value of which to set m12 to.
+
+
+ +

Definition at line 72 of file Matrix.hpp.

+ +
+
+ +

◆ SetM13()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM13 (float value)
+
+inline
+
+ +

Sets the m13 value for the object.

+
Parameters
+ + +
valueThe value of which to set m13 to.
+
+
+ +

Definition at line 73 of file Matrix.hpp.

+ +
+
+ +

◆ SetM14()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM14 (float value)
+
+inline
+
+ +

Sets the m14 value for the object.

+
Parameters
+ + +
valueThe value of which to set m14 to.
+
+
+ +

Definition at line 74 of file Matrix.hpp.

+ +
+
+ +

◆ SetM15()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM15 (float value)
+
+inline
+
+ +

Sets the m15 value for the object.

+
Parameters
+ + +
valueThe value of which to set m15 to.
+
+
+ +

Definition at line 75 of file Matrix.hpp.

+ +
+
+ +

◆ SetM2()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM2 (float value)
+
+inline
+
+ +

Sets the m2 value for the object.

+
Parameters
+ + +
valueThe value of which to set m2 to.
+
+
+ +

Definition at line 62 of file Matrix.hpp.

+ +
+
+ +

◆ SetM3()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM3 (float value)
+
+inline
+
+ +

Sets the m3 value for the object.

+
Parameters
+ + +
valueThe value of which to set m3 to.
+
+
+ +

Definition at line 63 of file Matrix.hpp.

+ +
+
+ +

◆ SetM4()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM4 (float value)
+
+inline
+
+ +

Sets the m4 value for the object.

+
Parameters
+ + +
valueThe value of which to set m4 to.
+
+
+ +

Definition at line 64 of file Matrix.hpp.

+ +
+
+ +

◆ SetM5()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM5 (float value)
+
+inline
+
+ +

Sets the m5 value for the object.

+
Parameters
+ + +
valueThe value of which to set m5 to.
+
+
+ +

Definition at line 65 of file Matrix.hpp.

+ +
+
+ +

◆ SetM6()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM6 (float value)
+
+inline
+
+ +

Sets the m6 value for the object.

+
Parameters
+ + +
valueThe value of which to set m6 to.
+
+
+ +

Definition at line 66 of file Matrix.hpp.

+ +
+
+ +

◆ SetM7()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM7 (float value)
+
+inline
+
+ +

Sets the m7 value for the object.

+
Parameters
+ + +
valueThe value of which to set m7 to.
+
+
+ +

Definition at line 67 of file Matrix.hpp.

+ +
+
+ +

◆ SetM8()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM8 (float value)
+
+inline
+
+ +

Sets the m8 value for the object.

+
Parameters
+ + +
valueThe value of which to set m8 to.
+
+
+ +

Definition at line 68 of file Matrix.hpp.

+ +
+
+ +

◆ SetM9()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Matrix::SetM9 (float value)
+
+inline
+
+ +

Sets the m9 value for the object.

+
Parameters
+ + +
valueThe value of which to set m9 to.
+
+
+ +

Definition at line 69 of file Matrix.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_mesh-members.html b/classraylib_1_1_mesh-members.html new file mode 100644 index 00000000..7c9e1b2e --- /dev/null +++ b/classraylib_1_1_mesh-members.html @@ -0,0 +1,150 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Mesh Member List
+
+
+ +

This is the complete list of members for raylib::Mesh, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BoundingBox() constraylib::MeshUnmanagedinline
Cone(float radius, float height, int slices)raylib::MeshUnmanagedinlinestatic
Cube(float width, float height, float length)raylib::MeshUnmanagedinlinestatic
Cubicmap(const ::Image &cubicmap, ::Vector3 cubeSize)raylib::MeshUnmanagedinlinestatic
Cylinder(float radius, float height, int slices)raylib::MeshUnmanagedinlinestatic
Draw(const ::Material &material, const ::Matrix &transform) constraylib::MeshUnmanagedinline
Draw(const ::Material &material, ::Matrix *transforms, int instances) constraylib::MeshUnmanagedinline
Export(const std::string &fileName)raylib::MeshUnmanagedinline
ExportCode(const std::string &fileName)raylib::MeshUnmanagedinline
GenTangents()raylib::MeshUnmanagedinline
GetAnimNormals() constraylib::MeshUnmanagedinline
GetAnimVertices() constraylib::MeshUnmanagedinline
GetBoneIds() constraylib::MeshUnmanagedinline
GetBoneWeights() constraylib::MeshUnmanagedinline
GetColors() constraylib::MeshUnmanagedinline
GetIndices() constraylib::MeshUnmanagedinline
GetNormals() constraylib::MeshUnmanagedinline
GetTangents() constraylib::MeshUnmanagedinline
GetTexCoords() constraylib::MeshUnmanagedinline
GetTexCoords2() constraylib::MeshUnmanagedinline
GetTriangleCount() constraylib::MeshUnmanagedinline
GetVaoId() constraylib::MeshUnmanagedinline
GetVboId() constraylib::MeshUnmanagedinline
GetVertexCount() constraylib::MeshUnmanagedinline
GetVertices() constraylib::MeshUnmanagedinline
Heightmap(const ::Image &heightmap, ::Vector3 size)raylib::MeshUnmanagedinlinestatic
HemiSphere(float radius, int rings, int slices)raylib::MeshUnmanagedinlinestatic
IsValid()raylib::MeshUnmanagedinline
Knot(float radius, float size, int radSeg, int sides)raylib::MeshUnmanagedinlinestatic
LoadModelFrom() constraylib::MeshUnmanagedinline
Mesh(const Mesh &)=deleteraylib::Mesh
Mesh(Mesh &&other)raylib::Meshinline
MeshUnmanaged()raylib::Meshinline
MeshUnmanaged(const ::Mesh &mesh) (defined in raylib::Mesh)raylib::Meshinline
MeshUnmanaged(::Mesh &&mesh) (defined in raylib::Mesh)raylib::Meshinline
MeshUnmanaged(const ::Mesh &mesh) (defined in raylib::MeshUnmanaged)raylib::MeshUnmanagedinline
MeshUnmanaged(::Mesh &&mesh) (defined in raylib::MeshUnmanaged)raylib::MeshUnmanagedinline
operator raylib::BoundingBox()raylib::MeshUnmanagedinline
operator raylib::Model()raylib::MeshUnmanagedinline
operator=(const Mesh &)=deleteraylib::Mesh
operator=(Mesh &&other) noexcept (defined in raylib::Mesh)raylib::Meshinline
operator=(const ::Mesh &mesh) (defined in raylib::MeshUnmanaged)raylib::MeshUnmanagedinline
Plane(float width, float length, int resX, int resZ)raylib::MeshUnmanagedinlinestatic
Poly(int sides, float radius)raylib::MeshUnmanagedinlinestatic
set(const ::Mesh &mesh) (defined in raylib::MeshUnmanaged)raylib::MeshUnmanagedinlineprotected
SetAnimNormals(float *value)raylib::MeshUnmanagedinline
SetAnimVertices(float *value)raylib::MeshUnmanagedinline
SetBoneIds(unsigned char *value)raylib::MeshUnmanagedinline
SetBoneWeights(float *value)raylib::MeshUnmanagedinline
SetColors(unsigned char *value)raylib::MeshUnmanagedinline
SetIndices(unsigned short *value)raylib::MeshUnmanagedinline
SetNormals(float *value)raylib::MeshUnmanagedinline
SetTangents(float *value)raylib::MeshUnmanagedinline
SetTexCoords(float *value)raylib::MeshUnmanagedinline
SetTexCoords2(float *value)raylib::MeshUnmanagedinline
SetTriangleCount(int value)raylib::MeshUnmanagedinline
SetVaoId(unsigned int value)raylib::MeshUnmanagedinline
SetVboId(unsigned int *value)raylib::MeshUnmanagedinline
SetVertexCount(int value)raylib::MeshUnmanagedinline
SetVertices(float *value)raylib::MeshUnmanagedinline
Sphere(float radius, int rings, int slices)raylib::MeshUnmanagedinlinestatic
Torus(float radius, float size, int radSeg, int sides)raylib::MeshUnmanagedinlinestatic
Unload()raylib::MeshUnmanagedinline
UpdateBuffer(int index, void *data, int dataSize, int offset=0)raylib::MeshUnmanagedinline
Upload(bool dynamic=false)raylib::MeshUnmanagedinline
~Mesh() (defined in raylib::Mesh)raylib::Meshinline
+ + + + diff --git a/classraylib_1_1_mesh.html b/classraylib_1_1_mesh.html new file mode 100644 index 00000000..8cd88c8f --- /dev/null +++ b/classraylib_1_1_mesh.html @@ -0,0 +1,327 @@ + + + + + + + +raylib-cpp: raylib::Mesh Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Mesh Class Reference
+
+
+ +

Vertex data defining a mesh. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Mesh (const Mesh &)=delete
 Explicitly forbid the copy constructor.
 
Mesh (Mesh &&other)
 Move constructor.
 
MeshUnmanaged ()
 Default texture constructor.
 
MeshUnmanaged (::Mesh &&mesh)
 
MeshUnmanaged (const ::Mesh &mesh)
 
+Meshoperator= (const Mesh &)=delete
 Explicitly forbid copy assignment.
 
+Meshoperator= (Mesh &&other) noexcept
 
- Public Member Functions inherited from raylib::MeshUnmanaged
MeshUnmanaged ()
 Default texture constructor.
 
MeshUnmanaged (::Mesh &&mesh)
 
MeshUnmanaged (const ::Mesh &mesh)
 
+raylib::BoundingBox BoundingBox () const
 Compute mesh bounding box limits.
 
+void Draw (const ::Material &material, ::Matrix *transforms, int instances) const
 Draw multiple mesh instances with material and different transforms.
 
+void Draw (const ::Material &material, const ::Matrix &transform) const
 Draw a 3d mesh with material and transform.
 
void Export (const std::string &fileName)
 Export mesh data to file. More...
 
void ExportCode (const std::string &fileName)
 Export mesh as code file (.h) defining multiple arrays of vertex attributes. More...
 
+MeshGenTangents ()
 Compute mesh tangents.
 
float * GetAnimNormals () const
 Retrieves the animNormals value for the object. More...
 
float * GetAnimVertices () const
 Retrieves the animVertices value for the object. More...
 
unsigned char * GetBoneIds () const
 Retrieves the boneIds value for the object. More...
 
float * GetBoneWeights () const
 Retrieves the boneWeights value for the object. More...
 
unsigned char * GetColors () const
 Retrieves the colors value for the object. More...
 
unsigned short * GetIndices () const
 Retrieves the indices value for the object. More...
 
float * GetNormals () const
 Retrieves the normals value for the object. More...
 
float * GetTangents () const
 Retrieves the tangents value for the object. More...
 
float * GetTexCoords () const
 Retrieves the texcoords value for the object. More...
 
float * GetTexCoords2 () const
 Retrieves the texcoords2 value for the object. More...
 
int GetTriangleCount () const
 Retrieves the triangleCount value for the object. More...
 
unsigned int GetVaoId () const
 Retrieves the vaoId value for the object. More...
 
unsigned int * GetVboId () const
 Retrieves the vboId value for the object. More...
 
int GetVertexCount () const
 Retrieves the vertexCount value for the object. More...
 
float * GetVertices () const
 Retrieves the vertices value for the object. More...
 
+bool IsValid ()
 Returns whether or not the Mesh is valid.
 
+raylib::Model LoadModelFrom () const
 Load model from generated mesh.
 
operator raylib::BoundingBox ()
 Compute mesh bounding box limits.
 
operator raylib::Model ()
 Load model from generated mesh.
 
+MeshUnmanagedoperator= (const ::Mesh &mesh)
 
void SetAnimNormals (float *value)
 Sets the animNormals value for the object. More...
 
void SetAnimVertices (float *value)
 Sets the animVertices value for the object. More...
 
void SetBoneIds (unsigned char *value)
 Sets the boneIds value for the object. More...
 
void SetBoneWeights (float *value)
 Sets the boneWeights value for the object. More...
 
void SetColors (unsigned char *value)
 Sets the colors value for the object. More...
 
void SetIndices (unsigned short *value)
 Sets the indices value for the object. More...
 
void SetNormals (float *value)
 Sets the normals value for the object. More...
 
void SetTangents (float *value)
 Sets the tangents value for the object. More...
 
void SetTexCoords (float *value)
 Sets the texcoords value for the object. More...
 
void SetTexCoords2 (float *value)
 Sets the texcoords2 value for the object. More...
 
void SetTriangleCount (int value)
 Sets the triangleCount value for the object. More...
 
void SetVaoId (unsigned int value)
 Sets the vaoId value for the object. More...
 
void SetVboId (unsigned int *value)
 Sets the vboId value for the object. More...
 
void SetVertexCount (int value)
 Sets the vertexCount value for the object. More...
 
void SetVertices (float *value)
 Sets the vertices value for the object. More...
 
+void Unload ()
 Unload mesh from memory (RAM and/or VRAM)
 
+void UpdateBuffer (int index, void *data, int dataSize, int offset=0)
 Upload mesh vertex data to GPU (VRAM)
 
+void Upload (bool dynamic=false)
 Upload mesh vertex data to GPU (VRAM)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from raylib::MeshUnmanaged
+::Mesh Cone (float radius, float height, int slices)
 Generate cone/pyramid mesh.
 
+::Mesh Cube (float width, float height, float length)
 Generate cuboid mesh.
 
+::Mesh Cubicmap (const ::Image &cubicmap, ::Vector3 cubeSize)
 Generate cubes-based map mesh from image data.
 
+::Mesh Cylinder (float radius, float height, int slices)
 Generate cylinder mesh.
 
+::Mesh Heightmap (const ::Image &heightmap, ::Vector3 size)
 Generate heightmap mesh from image data.
 
+::Mesh HemiSphere (float radius, int rings, int slices)
 Generate half-sphere mesh (no bottom cap)
 
+::Mesh Knot (float radius, float size, int radSeg, int sides)
 Generate trefoil knot mesh.
 
+::Mesh Plane (float width, float length, int resX, int resZ)
 Generate plane mesh (with subdivisions)
 
::Mesh Poly (int sides, float radius)
 Load meshes from model file. More...
 
+::Mesh Sphere (float radius, int rings, int slices)
 Generate sphere mesh (standard sphere)
 
+::Mesh Torus (float radius, float size, int radSeg, int sides)
 Generate torus mesh.
 
- Protected Member Functions inherited from raylib::MeshUnmanaged
+void set (const ::Mesh &mesh)
 
+

Detailed Description

+

Vertex data defining a mesh.

+

The Mesh will be unloaded on object destruction.

+
See also
raylib::MeshUnmanaged
+ +

Definition at line 21 of file Mesh.hpp.

+
+ + + + diff --git a/classraylib_1_1_mesh_unmanaged-members.html b/classraylib_1_1_mesh_unmanaged-members.html new file mode 100644 index 00000000..72c6b199 --- /dev/null +++ b/classraylib_1_1_mesh_unmanaged-members.html @@ -0,0 +1,143 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::MeshUnmanaged Member List
+
+
+ +

This is the complete list of members for raylib::MeshUnmanaged, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BoundingBox() constraylib::MeshUnmanagedinline
Cone(float radius, float height, int slices)raylib::MeshUnmanagedinlinestatic
Cube(float width, float height, float length)raylib::MeshUnmanagedinlinestatic
Cubicmap(const ::Image &cubicmap, ::Vector3 cubeSize)raylib::MeshUnmanagedinlinestatic
Cylinder(float radius, float height, int slices)raylib::MeshUnmanagedinlinestatic
Draw(const ::Material &material, const ::Matrix &transform) constraylib::MeshUnmanagedinline
Draw(const ::Material &material, ::Matrix *transforms, int instances) constraylib::MeshUnmanagedinline
Export(const std::string &fileName)raylib::MeshUnmanagedinline
ExportCode(const std::string &fileName)raylib::MeshUnmanagedinline
GenTangents()raylib::MeshUnmanagedinline
GetAnimNormals() constraylib::MeshUnmanagedinline
GetAnimVertices() constraylib::MeshUnmanagedinline
GetBoneIds() constraylib::MeshUnmanagedinline
GetBoneWeights() constraylib::MeshUnmanagedinline
GetColors() constraylib::MeshUnmanagedinline
GetIndices() constraylib::MeshUnmanagedinline
GetNormals() constraylib::MeshUnmanagedinline
GetTangents() constraylib::MeshUnmanagedinline
GetTexCoords() constraylib::MeshUnmanagedinline
GetTexCoords2() constraylib::MeshUnmanagedinline
GetTriangleCount() constraylib::MeshUnmanagedinline
GetVaoId() constraylib::MeshUnmanagedinline
GetVboId() constraylib::MeshUnmanagedinline
GetVertexCount() constraylib::MeshUnmanagedinline
GetVertices() constraylib::MeshUnmanagedinline
Heightmap(const ::Image &heightmap, ::Vector3 size)raylib::MeshUnmanagedinlinestatic
HemiSphere(float radius, int rings, int slices)raylib::MeshUnmanagedinlinestatic
IsValid()raylib::MeshUnmanagedinline
Knot(float radius, float size, int radSeg, int sides)raylib::MeshUnmanagedinlinestatic
LoadModelFrom() constraylib::MeshUnmanagedinline
MeshUnmanaged()raylib::MeshUnmanagedinline
MeshUnmanaged(const ::Mesh &mesh) (defined in raylib::MeshUnmanaged)raylib::MeshUnmanagedinline
MeshUnmanaged(::Mesh &&mesh) (defined in raylib::MeshUnmanaged)raylib::MeshUnmanagedinline
operator raylib::BoundingBox()raylib::MeshUnmanagedinline
operator raylib::Model()raylib::MeshUnmanagedinline
operator=(const ::Mesh &mesh) (defined in raylib::MeshUnmanaged)raylib::MeshUnmanagedinline
Plane(float width, float length, int resX, int resZ)raylib::MeshUnmanagedinlinestatic
Poly(int sides, float radius)raylib::MeshUnmanagedinlinestatic
set(const ::Mesh &mesh) (defined in raylib::MeshUnmanaged)raylib::MeshUnmanagedinlineprotected
SetAnimNormals(float *value)raylib::MeshUnmanagedinline
SetAnimVertices(float *value)raylib::MeshUnmanagedinline
SetBoneIds(unsigned char *value)raylib::MeshUnmanagedinline
SetBoneWeights(float *value)raylib::MeshUnmanagedinline
SetColors(unsigned char *value)raylib::MeshUnmanagedinline
SetIndices(unsigned short *value)raylib::MeshUnmanagedinline
SetNormals(float *value)raylib::MeshUnmanagedinline
SetTangents(float *value)raylib::MeshUnmanagedinline
SetTexCoords(float *value)raylib::MeshUnmanagedinline
SetTexCoords2(float *value)raylib::MeshUnmanagedinline
SetTriangleCount(int value)raylib::MeshUnmanagedinline
SetVaoId(unsigned int value)raylib::MeshUnmanagedinline
SetVboId(unsigned int *value)raylib::MeshUnmanagedinline
SetVertexCount(int value)raylib::MeshUnmanagedinline
SetVertices(float *value)raylib::MeshUnmanagedinline
Sphere(float radius, int rings, int slices)raylib::MeshUnmanagedinlinestatic
Torus(float radius, float size, int radSeg, int sides)raylib::MeshUnmanagedinlinestatic
Unload()raylib::MeshUnmanagedinline
UpdateBuffer(int index, void *data, int dataSize, int offset=0)raylib::MeshUnmanagedinline
Upload(bool dynamic=false)raylib::MeshUnmanagedinline
+ + + + diff --git a/classraylib_1_1_mesh_unmanaged.html b/classraylib_1_1_mesh_unmanaged.html new file mode 100644 index 00000000..8cf6b18b --- /dev/null +++ b/classraylib_1_1_mesh_unmanaged.html @@ -0,0 +1,1408 @@ + + + + + + + +raylib-cpp: raylib::MeshUnmanaged Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Vertex data defining a mesh, not managed by C++ RAII. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

MeshUnmanaged ()
 Default texture constructor.
 
MeshUnmanaged (::Mesh &&mesh)
 
MeshUnmanaged (const ::Mesh &mesh)
 
+raylib::BoundingBox BoundingBox () const
 Compute mesh bounding box limits.
 
+void Draw (const ::Material &material, ::Matrix *transforms, int instances) const
 Draw multiple mesh instances with material and different transforms.
 
+void Draw (const ::Material &material, const ::Matrix &transform) const
 Draw a 3d mesh with material and transform.
 
void Export (const std::string &fileName)
 Export mesh data to file. More...
 
void ExportCode (const std::string &fileName)
 Export mesh as code file (.h) defining multiple arrays of vertex attributes. More...
 
+MeshGenTangents ()
 Compute mesh tangents.
 
float * GetAnimNormals () const
 Retrieves the animNormals value for the object. More...
 
float * GetAnimVertices () const
 Retrieves the animVertices value for the object. More...
 
unsigned char * GetBoneIds () const
 Retrieves the boneIds value for the object. More...
 
float * GetBoneWeights () const
 Retrieves the boneWeights value for the object. More...
 
unsigned char * GetColors () const
 Retrieves the colors value for the object. More...
 
unsigned short * GetIndices () const
 Retrieves the indices value for the object. More...
 
float * GetNormals () const
 Retrieves the normals value for the object. More...
 
float * GetTangents () const
 Retrieves the tangents value for the object. More...
 
float * GetTexCoords () const
 Retrieves the texcoords value for the object. More...
 
float * GetTexCoords2 () const
 Retrieves the texcoords2 value for the object. More...
 
int GetTriangleCount () const
 Retrieves the triangleCount value for the object. More...
 
unsigned int GetVaoId () const
 Retrieves the vaoId value for the object. More...
 
unsigned int * GetVboId () const
 Retrieves the vboId value for the object. More...
 
int GetVertexCount () const
 Retrieves the vertexCount value for the object. More...
 
float * GetVertices () const
 Retrieves the vertices value for the object. More...
 
+bool IsValid ()
 Returns whether or not the Mesh is valid.
 
+raylib::Model LoadModelFrom () const
 Load model from generated mesh.
 
operator raylib::BoundingBox ()
 Compute mesh bounding box limits.
 
operator raylib::Model ()
 Load model from generated mesh.
 
+MeshUnmanagedoperator= (const ::Mesh &mesh)
 
void SetAnimNormals (float *value)
 Sets the animNormals value for the object. More...
 
void SetAnimVertices (float *value)
 Sets the animVertices value for the object. More...
 
void SetBoneIds (unsigned char *value)
 Sets the boneIds value for the object. More...
 
void SetBoneWeights (float *value)
 Sets the boneWeights value for the object. More...
 
void SetColors (unsigned char *value)
 Sets the colors value for the object. More...
 
void SetIndices (unsigned short *value)
 Sets the indices value for the object. More...
 
void SetNormals (float *value)
 Sets the normals value for the object. More...
 
void SetTangents (float *value)
 Sets the tangents value for the object. More...
 
void SetTexCoords (float *value)
 Sets the texcoords value for the object. More...
 
void SetTexCoords2 (float *value)
 Sets the texcoords2 value for the object. More...
 
void SetTriangleCount (int value)
 Sets the triangleCount value for the object. More...
 
void SetVaoId (unsigned int value)
 Sets the vaoId value for the object. More...
 
void SetVboId (unsigned int *value)
 Sets the vboId value for the object. More...
 
void SetVertexCount (int value)
 Sets the vertexCount value for the object. More...
 
void SetVertices (float *value)
 Sets the vertices value for the object. More...
 
+void Unload ()
 Unload mesh from memory (RAM and/or VRAM)
 
+void UpdateBuffer (int index, void *data, int dataSize, int offset=0)
 Upload mesh vertex data to GPU (VRAM)
 
+void Upload (bool dynamic=false)
 Upload mesh vertex data to GPU (VRAM)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

+::Mesh Cone (float radius, float height, int slices)
 Generate cone/pyramid mesh.
 
+::Mesh Cube (float width, float height, float length)
 Generate cuboid mesh.
 
+::Mesh Cubicmap (const ::Image &cubicmap, ::Vector3 cubeSize)
 Generate cubes-based map mesh from image data.
 
+::Mesh Cylinder (float radius, float height, int slices)
 Generate cylinder mesh.
 
+::Mesh Heightmap (const ::Image &heightmap, ::Vector3 size)
 Generate heightmap mesh from image data.
 
+::Mesh HemiSphere (float radius, int rings, int slices)
 Generate half-sphere mesh (no bottom cap)
 
+::Mesh Knot (float radius, float size, int radSeg, int sides)
 Generate trefoil knot mesh.
 
+::Mesh Plane (float width, float length, int resX, int resZ)
 Generate plane mesh (with subdivisions)
 
::Mesh Poly (int sides, float radius)
 Load meshes from model file. More...
 
+::Mesh Sphere (float radius, int rings, int slices)
 Generate sphere mesh (standard sphere)
 
+::Mesh Torus (float radius, float size, int radSeg, int sides)
 Generate torus mesh.
 
+ + + +

+Protected Member Functions

+void set (const ::Mesh &mesh)
 
+

Detailed Description

+

Vertex data defining a mesh, not managed by C++ RAII.

+

Make sure to Unload() this if needed, otherwise use raylib::Mesh.

+
See also
raylib::Mesh
+ +

Definition at line 21 of file MeshUnmanaged.hpp.

+

Member Function Documentation

+ +

◆ Export()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::Export (const std::string & fileName)
+
+inline
+
+ +

Export mesh data to file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to export the Mesh.
+
+
+ +

Definition at line 180 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ ExportCode()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::ExportCode (const std::string & fileName)
+
+inline
+
+ +

Export mesh as code file (.h) defining multiple arrays of vertex attributes.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to export the Mesh.
+
+
+ +

Definition at line 191 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetAnimNormals()

+ +
+
+ + + + + +
+ + + + + + + +
float* raylib::MeshUnmanaged::GetAnimNormals () const
+
+inline
+
+ +

Retrieves the animNormals value for the object.

+
Returns
The animNormals value of the object.
+ +

Definition at line 130 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetAnimVertices()

+ +
+
+ + + + + +
+ + + + + + + +
float* raylib::MeshUnmanaged::GetAnimVertices () const
+
+inline
+
+ +

Retrieves the animVertices value for the object.

+
Returns
The animVertices value of the object.
+ +

Definition at line 129 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetBoneIds()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned char* raylib::MeshUnmanaged::GetBoneIds () const
+
+inline
+
+ +

Retrieves the boneIds value for the object.

+
Returns
The boneIds value of the object.
+ +

Definition at line 131 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetBoneWeights()

+ +
+
+ + + + + +
+ + + + + + + +
float* raylib::MeshUnmanaged::GetBoneWeights () const
+
+inline
+
+ +

Retrieves the boneWeights value for the object.

+
Returns
The boneWeights value of the object.
+ +

Definition at line 132 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetColors()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned char* raylib::MeshUnmanaged::GetColors () const
+
+inline
+
+ +

Retrieves the colors value for the object.

+
Returns
The colors value of the object.
+ +

Definition at line 127 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetIndices()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned short* raylib::MeshUnmanaged::GetIndices () const
+
+inline
+
+ +

Retrieves the indices value for the object.

+
Returns
The indices value of the object.
+ +

Definition at line 128 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetNormals()

+ +
+
+ + + + + +
+ + + + + + + +
float* raylib::MeshUnmanaged::GetNormals () const
+
+inline
+
+ +

Retrieves the normals value for the object.

+
Returns
The normals value of the object.
+ +

Definition at line 125 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetTangents()

+ +
+
+ + + + + +
+ + + + + + + +
float* raylib::MeshUnmanaged::GetTangents () const
+
+inline
+
+ +

Retrieves the tangents value for the object.

+
Returns
The tangents value of the object.
+ +

Definition at line 126 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetTexCoords()

+ +
+
+ + + + + +
+ + + + + + + +
float* raylib::MeshUnmanaged::GetTexCoords () const
+
+inline
+
+ +

Retrieves the texcoords value for the object.

+
Returns
The texcoords value of the object.
+ +

Definition at line 123 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetTexCoords2()

+ +
+
+ + + + + +
+ + + + + + + +
float* raylib::MeshUnmanaged::GetTexCoords2 () const
+
+inline
+
+ +

Retrieves the texcoords2 value for the object.

+
Returns
The texcoords2 value of the object.
+ +

Definition at line 124 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetTriangleCount()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::MeshUnmanaged::GetTriangleCount () const
+
+inline
+
+ +

Retrieves the triangleCount value for the object.

+
Returns
The triangleCount value of the object.
+ +

Definition at line 121 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetVaoId()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::MeshUnmanaged::GetVaoId () const
+
+inline
+
+ +

Retrieves the vaoId value for the object.

+
Returns
The vaoId value of the object.
+ +

Definition at line 133 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetVboId()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int* raylib::MeshUnmanaged::GetVboId () const
+
+inline
+
+ +

Retrieves the vboId value for the object.

+
Returns
The vboId value of the object.
+ +

Definition at line 134 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetVertexCount()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::MeshUnmanaged::GetVertexCount () const
+
+inline
+
+ +

Retrieves the vertexCount value for the object.

+
Returns
The vertexCount value of the object.
+ +

Definition at line 120 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ GetVertices()

+ +
+
+ + + + + +
+ + + + + + + +
float* raylib::MeshUnmanaged::GetVertices () const
+
+inline
+
+ +

Retrieves the vertices value for the object.

+
Returns
The vertices value of the object.
+ +

Definition at line 122 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ Poly()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
::Mesh raylib::MeshUnmanaged::Poly (int sides,
float radius 
)
+
+inlinestatic
+
+ +

Load meshes from model file.

+

Generate polygonal mesh

+ +

Definition at line 60 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetAnimNormals()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetAnimNormals (float * value)
+
+inline
+
+ +

Sets the animNormals value for the object.

+
Parameters
+ + +
valueThe value of which to set animNormals to.
+
+
+ +

Definition at line 130 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetAnimVertices()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetAnimVertices (float * value)
+
+inline
+
+ +

Sets the animVertices value for the object.

+
Parameters
+ + +
valueThe value of which to set animVertices to.
+
+
+ +

Definition at line 129 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetBoneIds()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetBoneIds (unsigned char * value)
+
+inline
+
+ +

Sets the boneIds value for the object.

+
Parameters
+ + +
valueThe value of which to set boneIds to.
+
+
+ +

Definition at line 131 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetBoneWeights()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetBoneWeights (float * value)
+
+inline
+
+ +

Sets the boneWeights value for the object.

+
Parameters
+ + +
valueThe value of which to set boneWeights to.
+
+
+ +

Definition at line 132 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetColors()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetColors (unsigned char * value)
+
+inline
+
+ +

Sets the colors value for the object.

+
Parameters
+ + +
valueThe value of which to set colors to.
+
+
+ +

Definition at line 127 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetIndices()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetIndices (unsigned short * value)
+
+inline
+
+ +

Sets the indices value for the object.

+
Parameters
+ + +
valueThe value of which to set indices to.
+
+
+ +

Definition at line 128 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetNormals()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetNormals (float * value)
+
+inline
+
+ +

Sets the normals value for the object.

+
Parameters
+ + +
valueThe value of which to set normals to.
+
+
+ +

Definition at line 125 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetTangents()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetTangents (float * value)
+
+inline
+
+ +

Sets the tangents value for the object.

+
Parameters
+ + +
valueThe value of which to set tangents to.
+
+
+ +

Definition at line 126 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetTexCoords()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetTexCoords (float * value)
+
+inline
+
+ +

Sets the texcoords value for the object.

+
Parameters
+ + +
valueThe value of which to set texcoords to.
+
+
+ +

Definition at line 123 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetTexCoords2()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetTexCoords2 (float * value)
+
+inline
+
+ +

Sets the texcoords2 value for the object.

+
Parameters
+ + +
valueThe value of which to set texcoords2 to.
+
+
+ +

Definition at line 124 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetTriangleCount()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetTriangleCount (int value)
+
+inline
+
+ +

Sets the triangleCount value for the object.

+
Parameters
+ + +
valueThe value of which to set triangleCount to.
+
+
+ +

Definition at line 121 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetVaoId()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetVaoId (unsigned int value)
+
+inline
+
+ +

Sets the vaoId value for the object.

+
Parameters
+ + +
valueThe value of which to set vaoId to.
+
+
+ +

Definition at line 133 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetVboId()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetVboId (unsigned int * value)
+
+inline
+
+ +

Sets the vboId value for the object.

+
Parameters
+ + +
valueThe value of which to set vboId to.
+
+
+ +

Definition at line 134 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetVertexCount()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetVertexCount (int value)
+
+inline
+
+ +

Sets the vertexCount value for the object.

+
Parameters
+ + +
valueThe value of which to set vertexCount to.
+
+
+ +

Definition at line 120 of file MeshUnmanaged.hpp.

+ +
+
+ +

◆ SetVertices()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::MeshUnmanaged::SetVertices (float * value)
+
+inline
+
+ +

Sets the vertices value for the object.

+
Parameters
+ + +
valueThe value of which to set vertices to.
+
+
+ +

Definition at line 122 of file MeshUnmanaged.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_model-members.html b/classraylib_1_1_model-members.html new file mode 100644 index 00000000..fd3a9521 --- /dev/null +++ b/classraylib_1_1_model-members.html @@ -0,0 +1,130 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Model Member List
+
+
+ +

This is the complete list of members for raylib::Model, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Draw(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255}) constraylib::Modelinline
Draw(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255}) constraylib::Modelinline
DrawPoints(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})raylib::Modelinline
DrawPoints(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})raylib::Modelinline
DrawWires(::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255}) constraylib::Modelinline
DrawWires(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255}) constraylib::Modelinline
GetBindPose() constraylib::Modelinline
GetBoneCount() constraylib::Modelinline
GetBones() constraylib::Modelinline
GetBoundingBox() constraylib::Modelinline
GetMaterialCount() constraylib::Modelinline
GetMaterials() constraylib::Modelinline
GetMeshCount() constraylib::Modelinline
GetMeshes() constraylib::Modelinline
GetMeshMaterial() constraylib::Modelinline
GetTransform() constraylib::Modelinline
IsModelAnimationValid(const ::ModelAnimation &anim) constraylib::Modelinline
IsValid() constraylib::Modelinline
Load(const std::string &fileName)raylib::Modelinline
Load(const ::Mesh &mesh)raylib::Modelinline
Model() (defined in raylib::Model)raylib::Modelinline
Model(const ::Model &model) (defined in raylib::Model)raylib::Modelinline
Model(const std::string &fileName) (defined in raylib::Model)raylib::Modelinline
Model(const ::Mesh &mesh) (defined in raylib::Model)raylib::Modelinline
Model(const raylib::Mesh &mesh)=deleteraylib::Model
Model(const Model &)=delete (defined in raylib::Model)raylib::Model
Model(Model &&other) (defined in raylib::Model)raylib::Modelinline
operator BoundingBox() constraylib::Modelinline
operator=(const ::Model &model) (defined in raylib::Model)raylib::Modelinline
operator=(const Model &)=delete (defined in raylib::Model)raylib::Model
operator=(Model &&other) noexcept (defined in raylib::Model)raylib::Modelinline
set(const ::Model &model) (defined in raylib::Model)raylib::Modelinlineprotected
SetBindPose(::Transform *value)raylib::Modelinline
SetBoneCount(int value)raylib::Modelinline
SetBones(::BoneInfo *value)raylib::Modelinline
SetMaterialCount(int value)raylib::Modelinline
SetMaterials(::Material *value)raylib::Modelinline
SetMeshCount(int value)raylib::Modelinline
SetMeshes(::Mesh *value)raylib::Modelinline
SetMeshMaterial(int *value)raylib::Modelinline
SetMeshMaterial(int meshId, int materialId)raylib::Modelinline
SetTransform(::Matrix value)raylib::Modelinline
Unload()raylib::Modelinline
UpdateAnimation(const ::ModelAnimation &anim, int frame)raylib::Modelinline
UpdateAnimationBones(const ::ModelAnimation &anim, int frame)raylib::Modelinline
~Model() (defined in raylib::Model)raylib::Modelinline
+ + + + diff --git a/classraylib_1_1_model.html b/classraylib_1_1_model.html new file mode 100644 index 00000000..350a0b49 --- /dev/null +++ b/classraylib_1_1_model.html @@ -0,0 +1,949 @@ + + + + + + + +raylib-cpp: raylib::Model Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Model Class Reference
+
+
+ +

Model type. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Model (const ::Mesh &mesh)
 
Model (const ::Model &model)
 
Model (const Model &)=delete
 
 Model (const raylib::Mesh &mesh)=delete
 The Model constructor with a Mesh() is removed. More...
 
Model (const std::string &fileName)
 
Model (Model &&other)
 
+void Draw (::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255}) const
 Draw a model with extended parameters.
 
+void Draw (::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255}) const
 Draw a model (with texture if set)
 
+void DrawPoints (::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
 Draw a model as points.
 
+void DrawPoints (::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
 Draw a model as points.
 
+void DrawWires (::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255}) const
 Draw a model wires (with texture if set) with extended parameters.
 
+void DrawWires (::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255}) const
 Draw a model wires (with texture if set)
 
::Transform * GetBindPose () const
 Retrieves the bindPose value for the object. More...
 
int GetBoneCount () const
 Retrieves the boneCount value for the object. More...
 
::BoneInfo * GetBones () const
 Retrieves the bones value for the object. More...
 
+BoundingBox GetBoundingBox () const
 Compute model bounding box limits (considers all meshes)
 
int GetMaterialCount () const
 Retrieves the materialCount value for the object. More...
 
::MaterialGetMaterials () const
 Retrieves the materials value for the object. More...
 
int GetMeshCount () const
 Retrieves the meshCount value for the object. More...
 
::MeshGetMeshes () const
 Retrieves the meshes value for the object. More...
 
int * GetMeshMaterial () const
 Retrieves the meshMaterial value for the object. More...
 
::Matrix GetTransform () const
 Retrieves the transform value for the object. More...
 
+bool IsModelAnimationValid (const ::ModelAnimation &anim) const
 Check model animation skeleton match.
 
+bool IsValid () const
 Determines whether or not the Model has data in it.
 
void Load (const ::Mesh &mesh)
 Loads a Model from the given Mesh. More...
 
void Load (const std::string &fileName)
 Loads a Model from the given file. More...
 
operator BoundingBox () const
 Compute model bounding box limits (considers all meshes)
 
+Modeloperator= (const ::Model &model)
 
+Modeloperator= (const Model &)=delete
 
+Modeloperator= (Model &&other) noexcept
 
void SetBindPose (::Transform *value)
 Sets the bindPose value for the object. More...
 
void SetBoneCount (int value)
 Sets the boneCount value for the object. More...
 
void SetBones (::BoneInfo *value)
 Sets the bones value for the object. More...
 
void SetMaterialCount (int value)
 Sets the materialCount value for the object. More...
 
void SetMaterials (::Material *value)
 Sets the materials value for the object. More...
 
void SetMeshCount (int value)
 Sets the meshCount value for the object. More...
 
void SetMeshes (::Mesh *value)
 Sets the meshes value for the object. More...
 
void SetMeshMaterial (int *value)
 Sets the meshMaterial value for the object. More...
 
+ModelSetMeshMaterial (int meshId, int materialId)
 Set material for a mesh.
 
void SetTransform (::Matrix value)
 Sets the transform value for the object. More...
 
+void Unload ()
 Unload model (including meshes) from memory (RAM and/or VRAM)
 
+ModelUpdateAnimation (const ::ModelAnimation &anim, int frame)
 Update model animation pose.
 
+ModelUpdateAnimationBones (const ::ModelAnimation &anim, int frame)
 Update model animation pose.
 
+ + + +

+Protected Member Functions

+void set (const ::Model &model)
 
+

Detailed Description

+

Model type.

+ +

Definition at line 15 of file Model.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Model()

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::Model::Model (const raylib::Meshmesh)
+
+delete
+
+ +

The Model constructor with a Mesh() is removed.

+

Use raylib::MeshUnmanaged or ::Mesh instead, as raylib will take ownership of the data.

+
See also
raylib::MeshUnmanaged
+ +

References Unload().

+ +
+
+

Member Function Documentation

+ +

◆ GetBindPose()

+ +
+
+ + + + + +
+ + + + + + + +
::Transform* raylib::Model::GetBindPose () const
+
+inline
+
+ +

Retrieves the bindPose value for the object.

+
Returns
The bindPose value of the object.
+ +

Definition at line 74 of file Model.hpp.

+ +
+
+ +

◆ GetBoneCount()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Model::GetBoneCount () const
+
+inline
+
+ +

Retrieves the boneCount value for the object.

+
Returns
The boneCount value of the object.
+ +

Definition at line 72 of file Model.hpp.

+ +
+
+ +

◆ GetBones()

+ +
+
+ + + + + +
+ + + + + + + +
::BoneInfo* raylib::Model::GetBones () const
+
+inline
+
+ +

Retrieves the bones value for the object.

+
Returns
The bones value of the object.
+ +

Definition at line 73 of file Model.hpp.

+ +
+
+ +

◆ GetMaterialCount()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Model::GetMaterialCount () const
+
+inline
+
+ +

Retrieves the materialCount value for the object.

+
Returns
The materialCount value of the object.
+ +

Definition at line 68 of file Model.hpp.

+ +
+
+ +

◆ GetMaterials()

+ +
+
+ + + + + +
+ + + + + + + +
::Material* raylib::Model::GetMaterials () const
+
+inline
+
+ +

Retrieves the materials value for the object.

+
Returns
The materials value of the object.
+ +

Definition at line 70 of file Model.hpp.

+ +
+
+ +

◆ GetMeshCount()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Model::GetMeshCount () const
+
+inline
+
+ +

Retrieves the meshCount value for the object.

+
Returns
The meshCount value of the object.
+ +

Definition at line 67 of file Model.hpp.

+ +
+
+ +

◆ GetMeshes()

+ +
+
+ + + + + +
+ + + + + + + +
::Mesh* raylib::Model::GetMeshes () const
+
+inline
+
+ +

Retrieves the meshes value for the object.

+
Returns
The meshes value of the object.
+ +

Definition at line 69 of file Model.hpp.

+ +
+
+ +

◆ GetMeshMaterial()

+ +
+
+ + + + + +
+ + + + + + + +
int* raylib::Model::GetMeshMaterial () const
+
+inline
+
+ +

Retrieves the meshMaterial value for the object.

+
Returns
The meshMaterial value of the object.
+ +

Definition at line 71 of file Model.hpp.

+ +
+
+ +

◆ GetTransform()

+ +
+
+ + + + + +
+ + + + + + + +
::Matrix raylib::Model::GetTransform () const
+
+inline
+
+ +

Retrieves the transform value for the object.

+
Returns
The transform value of the object.
+ +

Definition at line 66 of file Model.hpp.

+ +
+
+ +

◆ Load() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::Load (const ::Meshmesh)
+
+inline
+
+ +

Loads a Model from the given Mesh.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to load the Modal.
+
+
+ +

Definition at line 227 of file Model.hpp.

+ +

References IsValid().

+ +
+
+ +

◆ Load() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::Load (const std::string & fileName)
+
+inline
+
+ +

Loads a Model from the given file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to load the Modal.
+
+
+ +

Definition at line 215 of file Model.hpp.

+ +

References IsValid().

+ +
+
+ +

◆ SetBindPose()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::SetBindPose (::Transform * value)
+
+inline
+
+ +

Sets the bindPose value for the object.

+
Parameters
+ + +
valueThe value of which to set bindPose to.
+
+
+ +

Definition at line 74 of file Model.hpp.

+ +
+
+ +

◆ SetBoneCount()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::SetBoneCount (int value)
+
+inline
+
+ +

Sets the boneCount value for the object.

+
Parameters
+ + +
valueThe value of which to set boneCount to.
+
+
+ +

Definition at line 72 of file Model.hpp.

+ +
+
+ +

◆ SetBones()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::SetBones (::BoneInfo * value)
+
+inline
+
+ +

Sets the bones value for the object.

+
Parameters
+ + +
valueThe value of which to set bones to.
+
+
+ +

Definition at line 73 of file Model.hpp.

+ +
+
+ +

◆ SetMaterialCount()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::SetMaterialCount (int value)
+
+inline
+
+ +

Sets the materialCount value for the object.

+
Parameters
+ + +
valueThe value of which to set materialCount to.
+
+
+ +

Definition at line 68 of file Model.hpp.

+ +
+
+ +

◆ SetMaterials()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::SetMaterials (::Materialvalue)
+
+inline
+
+ +

Sets the materials value for the object.

+
Parameters
+ + +
valueThe value of which to set materials to.
+
+
+ +

Definition at line 70 of file Model.hpp.

+ +
+
+ +

◆ SetMeshCount()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::SetMeshCount (int value)
+
+inline
+
+ +

Sets the meshCount value for the object.

+
Parameters
+ + +
valueThe value of which to set meshCount to.
+
+
+ +

Definition at line 67 of file Model.hpp.

+ +
+
+ +

◆ SetMeshes()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::SetMeshes (::Meshvalue)
+
+inline
+
+ +

Sets the meshes value for the object.

+
Parameters
+ + +
valueThe value of which to set meshes to.
+
+
+ +

Definition at line 69 of file Model.hpp.

+ +
+
+ +

◆ SetMeshMaterial()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::SetMeshMaterial (int * value)
+
+inline
+
+ +

Sets the meshMaterial value for the object.

+
Parameters
+ + +
valueThe value of which to set meshMaterial to.
+
+
+ +

Definition at line 71 of file Model.hpp.

+ +
+
+ +

◆ SetTransform()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Model::SetTransform (::Matrix value)
+
+inline
+
+ +

Sets the transform value for the object.

+
Parameters
+ + +
valueThe value of which to set transform to.
+
+
+ +

Definition at line 66 of file Model.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_model_animation-members.html b/classraylib_1_1_model_animation-members.html new file mode 100644 index 00000000..ff240816 --- /dev/null +++ b/classraylib_1_1_model_animation-members.html @@ -0,0 +1,105 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::ModelAnimation Member List
+
+
+ +

This is the complete list of members for raylib::ModelAnimation, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + +
GetBoneCount() constraylib::ModelAnimationinline
GetBones() constraylib::ModelAnimationinline
GetFrameCount() constraylib::ModelAnimationinline
GetFramePoses() constraylib::ModelAnimationinline
IsValid(const ::Model &model) constraylib::ModelAnimationinline
Load(const std::string &fileName)raylib::ModelAnimationinlinestatic
ModelAnimation(const ::ModelAnimation &model) (defined in raylib::ModelAnimation)raylib::ModelAnimationinline
ModelAnimation(const ModelAnimation &)=delete (defined in raylib::ModelAnimation)raylib::ModelAnimation
ModelAnimation(ModelAnimation &&other) (defined in raylib::ModelAnimation)raylib::ModelAnimationinline
operator=(const ::ModelAnimation &model) (defined in raylib::ModelAnimation)raylib::ModelAnimationinline
operator=(const ModelAnimation &)=delete (defined in raylib::ModelAnimation)raylib::ModelAnimation
operator=(ModelAnimation &&other) noexcept (defined in raylib::ModelAnimation)raylib::ModelAnimationinline
set(const ::ModelAnimation &model) (defined in raylib::ModelAnimation)raylib::ModelAnimationinlineprotected
SetBoneCount(int value)raylib::ModelAnimationinline
SetBones(::BoneInfo *value)raylib::ModelAnimationinline
SetFrameCount(int value)raylib::ModelAnimationinline
SetFramePoses(::Transform **value)raylib::ModelAnimationinline
Unload()raylib::ModelAnimationinline
Update(const ::Model &model, int frame)raylib::ModelAnimationinline
UpdateBones(const ::Model &model, int frame)raylib::ModelAnimationinline
~ModelAnimation() (defined in raylib::ModelAnimation)raylib::ModelAnimationinline
+ + + + diff --git a/classraylib_1_1_model_animation.html b/classraylib_1_1_model_animation.html new file mode 100644 index 00000000..89f7b0b1 --- /dev/null +++ b/classraylib_1_1_model_animation.html @@ -0,0 +1,433 @@ + + + + + + + +raylib-cpp: raylib::ModelAnimation Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Model animation. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

ModelAnimation (const ::ModelAnimation &model)
 
ModelAnimation (const ModelAnimation &)=delete
 
ModelAnimation (ModelAnimation &&other)
 
int GetBoneCount () const
 Retrieves the boneCount value for the object. More...
 
::BoneInfo * GetBones () const
 Retrieves the bones value for the object. More...
 
int GetFrameCount () const
 Retrieves the frameCount value for the object. More...
 
::Transform ** GetFramePoses () const
 Retrieves the framePoses value for the object. More...
 
+bool IsValid (const ::Model &model) const
 Check model animation skeleton match.
 
+ModelAnimationoperator= (const ::ModelAnimation &model)
 
+ModelAnimationoperator= (const ModelAnimation &)=delete
 
+ModelAnimationoperator= (ModelAnimation &&other) noexcept
 
void SetBoneCount (int value)
 Sets the boneCount value for the object. More...
 
void SetBones (::BoneInfo *value)
 Sets the bones value for the object. More...
 
void SetFrameCount (int value)
 Sets the frameCount value for the object. More...
 
void SetFramePoses (::Transform **value)
 Sets the framePoses value for the object. More...
 
+void Unload ()
 Unload animation data.
 
+ModelAnimationUpdate (const ::Model &model, int frame)
 Update model animation pose.
 
+ModelAnimationUpdateBones (const ::Model &model, int frame)
 Update model animation mesh bone matrices (GPU skinning)
 
+ + + + +

+Static Public Member Functions

+static std::vector< ModelAnimationLoad (const std::string &fileName)
 Load model animations from file.
 
+ + + +

+Protected Member Functions

+void set (const ::ModelAnimation &model)
 
+

Detailed Description

+

Model animation.

+ +

Definition at line 15 of file ModelAnimation.hpp.

+

Member Function Documentation

+ +

◆ GetBoneCount()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::ModelAnimation::GetBoneCount () const
+
+inline
+
+ +

Retrieves the boneCount value for the object.

+
Returns
The boneCount value of the object.
+ +

Definition at line 45 of file ModelAnimation.hpp.

+ +
+
+ +

◆ GetBones()

+ +
+
+ + + + + +
+ + + + + + + +
::BoneInfo* raylib::ModelAnimation::GetBones () const
+
+inline
+
+ +

Retrieves the bones value for the object.

+
Returns
The bones value of the object.
+ +

Definition at line 46 of file ModelAnimation.hpp.

+ +
+
+ +

◆ GetFrameCount()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::ModelAnimation::GetFrameCount () const
+
+inline
+
+ +

Retrieves the frameCount value for the object.

+
Returns
The frameCount value of the object.
+ +

Definition at line 47 of file ModelAnimation.hpp.

+ +
+
+ +

◆ GetFramePoses()

+ +
+
+ + + + + +
+ + + + + + + +
::Transform** raylib::ModelAnimation::GetFramePoses () const
+
+inline
+
+ +

Retrieves the framePoses value for the object.

+
Returns
The framePoses value of the object.
+ +

Definition at line 48 of file ModelAnimation.hpp.

+ +
+
+ +

◆ SetBoneCount()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::ModelAnimation::SetBoneCount (int value)
+
+inline
+
+ +

Sets the boneCount value for the object.

+
Parameters
+ + +
valueThe value of which to set boneCount to.
+
+
+ +

Definition at line 45 of file ModelAnimation.hpp.

+ +
+
+ +

◆ SetBones()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::ModelAnimation::SetBones (::BoneInfo * value)
+
+inline
+
+ +

Sets the bones value for the object.

+
Parameters
+ + +
valueThe value of which to set bones to.
+
+
+ +

Definition at line 46 of file ModelAnimation.hpp.

+ +
+
+ +

◆ SetFrameCount()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::ModelAnimation::SetFrameCount (int value)
+
+inline
+
+ +

Sets the frameCount value for the object.

+
Parameters
+ + +
valueThe value of which to set frameCount to.
+
+
+ +

Definition at line 47 of file ModelAnimation.hpp.

+ +
+
+ +

◆ SetFramePoses()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::ModelAnimation::SetFramePoses (::Transform ** value)
+
+inline
+
+ +

Sets the framePoses value for the object.

+
Parameters
+ + +
valueThe value of which to set framePoses to.
+
+
+ +

Definition at line 48 of file ModelAnimation.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_music-members.html b/classraylib_1_1_music-members.html new file mode 100644 index 00000000..8a5c8b5d --- /dev/null +++ b/classraylib_1_1_music-members.html @@ -0,0 +1,117 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Music Member List
+
+
+ +

This is the complete list of members for raylib::Music, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GetCtxData() constraylib::Musicinline
GetCtxType() constraylib::Musicinline
GetFrameCount() constraylib::Musicinline
GetLooping() constraylib::Musicinline
GetStream() constraylib::Musicinline
GetTimeLength() constraylib::Musicinline
GetTimePlayed() constraylib::Musicinline
IsPlaying() constraylib::Musicinline
IsValid() constraylib::Musicinline
Load(const std::string &fileName)raylib::Musicinline
Load(const std::string &fileType, unsigned char *data, int dataSize)raylib::Musicinline
Music(::AudioStream stream={nullptr, nullptr, 0, 0, 0}, unsigned int frameCount=0, bool looping=false, int ctxType=0, void *ctxData=nullptr) (defined in raylib::Music)raylib::Musicinline
Music(const ::Music &music) (defined in raylib::Music)raylib::Musicinline
Music(const std::string &fileName)raylib::Musicinline
Music(const std::string &fileType, unsigned char *data, int dataSize)raylib::Musicinline
Music(const Music &)=delete (defined in raylib::Music)raylib::Music
Music(Music &&other) (defined in raylib::Music)raylib::Musicinline
operator=(const ::Music &music) (defined in raylib::Music)raylib::Musicinline
operator=(const Music &)=delete (defined in raylib::Music)raylib::Music
operator=(Music &&other) noexcept (defined in raylib::Music)raylib::Musicinline
Pause()raylib::Musicinline
Play()raylib::Musicinline
Resume()raylib::Musicinline
Seek(float position)raylib::Musicinline
set(const ::Music &music) (defined in raylib::Music)raylib::Musicinlineprotected
SetLooping(bool value)raylib::Musicinline
SetPan(float pan=0.5f)raylib::Musicinline
SetPitch(float pitch)raylib::Musicinline
SetVolume(float volume)raylib::Musicinline
Stop()raylib::Musicinline
Unload()raylib::Musicinline
Update()raylib::Musicinline
~Music()raylib::Musicinline
+ + + + diff --git a/classraylib_1_1_music.html b/classraylib_1_1_music.html new file mode 100644 index 00000000..b03e1205 --- /dev/null +++ b/classraylib_1_1_music.html @@ -0,0 +1,618 @@ + + + + + + + +raylib-cpp: raylib::Music Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Music Class Reference
+
+
+ +

Music stream type (audio file streaming from memory) + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Music (::AudioStream stream={nullptr, nullptr, 0, 0, 0}, unsigned int frameCount=0, bool looping=false, int ctxType=0, void *ctxData=nullptr)
 
Music (const ::Music &music)
 
Music (const Music &)=delete
 
 Music (const std::string &fileName)
 Load music stream from file. More...
 
 Music (const std::string &fileType, unsigned char *data, int dataSize)
 Load music stream from memory. More...
 
Music (Music &&other)
 
~Music ()
 Unload music stream.
 
void * GetCtxData () const
 Retrieves the ctxData value for the object. More...
 
int GetCtxType () const
 Retrieves the ctxType value for the object. More...
 
unsigned int GetFrameCount () const
 Retrieves the frameCount value for the object. More...
 
bool GetLooping () const
 Retrieves the looping value for the object. More...
 
::AudioStream GetStream () const
 Retrieves the stream value for the object. More...
 
+float GetTimeLength () const
 Get music time length (in seconds)
 
+float GetTimePlayed () const
 Get current music time played (in seconds)
 
+bool IsPlaying () const
 Check if music is playing.
 
bool IsValid () const
 Retrieve whether or not the Music has been loaded. More...
 
void Load (const std::string &fileName)
 Load music stream from file. More...
 
void Load (const std::string &fileType, unsigned char *data, int dataSize)
 Load music stream from memory. More...
 
+Musicoperator= (const ::Music &music)
 
+Musicoperator= (const Music &)=delete
 
+Musicoperator= (Music &&other) noexcept
 
+MusicPause ()
 Pause music playing.
 
+MusicPlay ()
 Start music playing.
 
+MusicResume ()
 Resume music playing.
 
+MusicSeek (float position)
 Seek music to a position (in seconds)
 
void SetLooping (bool value)
 Sets the looping value for the object. More...
 
+MusicSetPan (float pan=0.5f)
 Set pan for a music (0.5 is center)
 
+MusicSetPitch (float pitch)
 Set pitch for music.
 
+MusicSetVolume (float volume)
 Set volume for music.
 
+MusicStop ()
 Stop music playing.
 
+void Unload ()
 Unload music stream.
 
+MusicUpdate ()
 Updates buffers for music streaming.
 
+ + + +

+Protected Member Functions

+void set (const ::Music &music)
 
+

Detailed Description

+

Music stream type (audio file streaming from memory)

+ +

Definition at line 14 of file Music.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Music() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::Music::Music (const std::string & fileName)
+
+inline
+
+ +

Load music stream from file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the music failed to load.
+
+
+ +

Definition at line 31 of file Music.hpp.

+ +

References Load().

+ +
+
+ +

◆ Music() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Music::Music (const std::string & fileType,
unsigned char * data,
int dataSize 
)
+
+inline
+
+ +

Load music stream from memory.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the music failed to load.
+
+
+ +

Definition at line 38 of file Music.hpp.

+ +

References Load().

+ +
+
+

Member Function Documentation

+ +

◆ GetCtxData()

+ +
+
+ + + + + +
+ + + + + + + +
void* raylib::Music::GetCtxData () const
+
+inline
+
+ +

Retrieves the ctxData value for the object.

+
Returns
The ctxData value of the object.
+ +

Definition at line 61 of file Music.hpp.

+ +
+
+ +

◆ GetCtxType()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::Music::GetCtxType () const
+
+inline
+
+ +

Retrieves the ctxType value for the object.

+
Returns
The ctxType value of the object.
+ +

Definition at line 60 of file Music.hpp.

+ +
+
+ +

◆ GetFrameCount()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::Music::GetFrameCount () const
+
+inline
+
+ +

Retrieves the frameCount value for the object.

+
Returns
The frameCount value of the object.
+ +

Definition at line 58 of file Music.hpp.

+ +
+
+ +

◆ GetLooping()

+ +
+
+ + + + + +
+ + + + + + + +
bool raylib::Music::GetLooping () const
+
+inline
+
+ +

Retrieves the looping value for the object.

+
Returns
The looping value of the object.
+ +

Definition at line 59 of file Music.hpp.

+ +
+
+ +

◆ GetStream()

+ +
+
+ + + + + +
+ + + + + + + +
::AudioStream raylib::Music::GetStream () const
+
+inline
+
+ +

Retrieves the stream value for the object.

+
Returns
The stream value of the object.
+ +

Definition at line 57 of file Music.hpp.

+ +
+
+ +

◆ IsValid()

+ +
+
+ + + + + +
+ + + + + + + +
bool raylib::Music::IsValid () const
+
+inline
+
+ +

Retrieve whether or not the Music has been loaded.

+
Returns
True or false depending on whether the Music has been loaded.
+ +

Definition at line 208 of file Music.hpp.

+ +

Referenced by Load().

+ +
+
+ +

◆ Load() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Music::Load (const std::string & fileName)
+
+inline
+
+ +

Load music stream from file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the music failed to load.
+
+
+ +

Definition at line 184 of file Music.hpp.

+ +

References IsValid().

+ +

Referenced by Music().

+ +
+
+ +

◆ Load() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::Music::Load (const std::string & fileType,
unsigned char * data,
int dataSize 
)
+
+inline
+
+ +

Load music stream from memory.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the music failed to load.
+
+
+ +

Definition at line 196 of file Music.hpp.

+ +

References IsValid().

+ +
+
+ +

◆ SetLooping()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Music::SetLooping (bool value)
+
+inline
+
+ +

Sets the looping value for the object.

+
Parameters
+ + +
valueThe value of which to set looping to.
+
+
+ +

Definition at line 59 of file Music.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_ray-members.html b/classraylib_1_1_ray-members.html new file mode 100644 index 00000000..6b057a90 --- /dev/null +++ b/classraylib_1_1_ray-members.html @@ -0,0 +1,101 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Ray Member List
+
+
+ +

This is the complete list of members for raylib::Ray, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
Draw(::Color color) constraylib::Rayinline
GetCollision(::Vector3 center, float radius) constraylib::Rayinline
GetCollision(const ::BoundingBox &box) constraylib::Rayinline
GetCollision(const ::Mesh &mesh, const ::Matrix &transform) constraylib::Rayinline
GetCollision(::Vector3 p1, ::Vector3 p2, ::Vector3 p3) constraylib::Rayinline
GetCollision(::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4) constraylib::Rayinline
GetDirection() constraylib::Rayinline
GetMouse(::Vector2 mousePosition, const ::Camera &camera)raylib::Rayinlinestatic
GetMouse(const ::Camera &camera)raylib::Rayinlinestatic
GetPosition() constraylib::Rayinline
operator=(const ::Ray &ray) (defined in raylib::Ray)raylib::Rayinline
Ray(const ::Ray &ray) (defined in raylib::Ray)raylib::Rayinline
Ray(::Vector3 position={0.0f, 0.0f, 0.0f}, ::Vector3 direction={0.0f, 0.0f, 0.0f}) (defined in raylib::Ray)raylib::Rayinline
Ray(::Vector2 mousePosition, const ::Camera &camera) (defined in raylib::Ray)raylib::Rayinline
set(const ::Ray &ray) (defined in raylib::Ray)raylib::Rayinlineprotected
SetDirection(::Vector3 value)raylib::Rayinline
SetPosition(::Vector3 value)raylib::Rayinline
+ + + + diff --git a/classraylib_1_1_ray.html b/classraylib_1_1_ray.html new file mode 100644 index 00000000..d4ed966e --- /dev/null +++ b/classraylib_1_1_ray.html @@ -0,0 +1,295 @@ + + + + + + + +raylib-cpp: raylib::Ray Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Ray type (useful for raycast) + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Ray (::Vector2 mousePosition, const ::Camera &camera)
 
Ray (::Vector3 position={0.0f, 0.0f, 0.0f}, ::Vector3 direction={0.0f, 0.0f, 0.0f})
 
Ray (const ::Ray &ray)
 
+void Draw (::Color color) const
 Draw a ray line.
 
+RayCollision GetCollision (::Vector3 center, float radius) const
 Get collision information between ray and sphere.
 
+RayCollision GetCollision (::Vector3 p1, ::Vector3 p2, ::Vector3 p3) const
 Get collision info between ray and triangle.
 
+RayCollision GetCollision (::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4) const
 Get collision info between ray and quad.
 
+RayCollision GetCollision (const ::BoundingBox &box) const
 Detect collision between ray and box.
 
+RayCollision GetCollision (const ::Mesh &mesh, const ::Matrix &transform) const
 Get collision information between ray and mesh.
 
::Vector3 GetDirection () const
 Retrieves the direction value for the object. More...
 
::Vector3 GetPosition () const
 Retrieves the position value for the object. More...
 
+Rayoperator= (const ::Ray &ray)
 
void SetDirection (::Vector3 value)
 Sets the direction value for the object. More...
 
void SetPosition (::Vector3 value)
 Sets the position value for the object. More...
 
+ + + + + + + +

+Static Public Member Functions

+static Ray GetMouse (::Vector2 mousePosition, const ::Camera &camera)
 Get a ray trace from mouse position.
 
+static Ray GetMouse (const ::Camera &camera)
 Get a ray trace from mouse position.
 
+ + + +

+Protected Member Functions

+void set (const ::Ray &ray)
 
+

Detailed Description

+

Ray type (useful for raycast)

+ +

Definition at line 12 of file Ray.hpp.

+

Member Function Documentation

+ +

◆ GetDirection()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector3 raylib::Ray::GetDirection () const
+
+inline
+
+ +

Retrieves the direction value for the object.

+
Returns
The direction value of the object.
+ +

Definition at line 29 of file Ray.hpp.

+ +
+
+ +

◆ GetPosition()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector3 raylib::Ray::GetPosition () const
+
+inline
+
+ +

Retrieves the position value for the object.

+
Returns
The position value of the object.
+ +

Definition at line 28 of file Ray.hpp.

+ +
+
+ +

◆ SetDirection()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Ray::SetDirection (::Vector3 value)
+
+inline
+
+ +

Sets the direction value for the object.

+
Parameters
+ + +
valueThe value of which to set direction to.
+
+
+ +

Definition at line 29 of file Ray.hpp.

+ +
+
+ +

◆ SetPosition()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Ray::SetPosition (::Vector3 value)
+
+inline
+
+ +

Sets the position value for the object.

+
Parameters
+ + +
valueThe value of which to set position to.
+
+
+ +

Definition at line 28 of file Ray.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_ray_collision-members.html b/classraylib_1_1_ray_collision-members.html new file mode 100644 index 00000000..f43cceb1 --- /dev/null +++ b/classraylib_1_1_ray_collision-members.html @@ -0,0 +1,101 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::RayCollision Member List
+
+
+ +

This is the complete list of members for raylib::RayCollision, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
GetDistance() constraylib::RayCollisioninline
GetHit() constraylib::RayCollisioninline
GetNormal() constraylib::RayCollisioninline
GetPosition() constraylib::RayCollisioninline
operator=(const ::RayCollision &ray) (defined in raylib::RayCollision)raylib::RayCollisioninline
RayCollision(const ::RayCollision &ray) (defined in raylib::RayCollision)raylib::RayCollisioninline
RayCollision(bool hit, float distance, ::Vector3 point, ::Vector3 normal) (defined in raylib::RayCollision)raylib::RayCollisioninline
RayCollision(const ::Ray &ray, const ::BoundingBox &box)raylib::RayCollisioninline
RayCollision(const ::Ray &ray, const ::Mesh &mesh, const ::Matrix &transform)raylib::RayCollisioninline
RayCollision(const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4)raylib::RayCollisioninline
RayCollision(const ::Ray &ray, ::Vector3 center, float radius)raylib::RayCollisioninline
RayCollision(const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)raylib::RayCollisioninline
set(const ::RayCollision &ray) (defined in raylib::RayCollision)raylib::RayCollisioninlineprotected
SetDistance(float value)raylib::RayCollisioninline
SetHit(bool value)raylib::RayCollisioninline
SetNormal(::Vector3 value)raylib::RayCollisioninline
SetPosition(::Vector3 value)raylib::RayCollisioninline
+ + + + diff --git a/classraylib_1_1_ray_collision.html b/classraylib_1_1_ray_collision.html new file mode 100644 index 00000000..720d8143 --- /dev/null +++ b/classraylib_1_1_ray_collision.html @@ -0,0 +1,420 @@ + + + + + + + +raylib-cpp: raylib::RayCollision Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::RayCollision Class Reference
+
+
+ +

Raycast hit information. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

RayCollision (bool hit, float distance, ::Vector3 point, ::Vector3 normal)
 
RayCollision (const ::Ray &ray, ::Vector3 center, float radius)
 Get collision info between ray and sphere.
 
RayCollision (const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)
 Get collision info between ray and triangle.
 
RayCollision (const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4)
 Get collision info between ray and quad.
 
RayCollision (const ::Ray &ray, const ::BoundingBox &box)
 Get collision info between ray and bounding box.
 
RayCollision (const ::Ray &ray, const ::Mesh &mesh, const ::Matrix &transform)
 Get collision info between ray and mesh.
 
RayCollision (const ::RayCollision &ray)
 
float GetDistance () const
 Retrieves the distance value for the object. More...
 
bool GetHit () const
 Retrieves the hit value for the object. More...
 
::Vector3 GetNormal () const
 Retrieves the normal value for the object. More...
 
::Vector3 GetPosition () const
 Retrieves the point value for the object. More...
 
+RayCollisionoperator= (const ::RayCollision &ray)
 
void SetDistance (float value)
 Sets the distance value for the object. More...
 
void SetHit (bool value)
 Sets the hit value for the object. More...
 
void SetNormal (::Vector3 value)
 Sets the normal value for the object. More...
 
void SetPosition (::Vector3 value)
 Sets the point value for the object. More...
 
+ + + +

+Protected Member Functions

+void set (const ::RayCollision &ray)
 
+

Detailed Description

+

Raycast hit information.

+ +

Definition at line 11 of file RayCollision.hpp.

+

Member Function Documentation

+ +

◆ GetDistance()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::RayCollision::GetDistance () const
+
+inline
+
+ +

Retrieves the distance value for the object.

+
Returns
The distance value of the object.
+ +

Definition at line 59 of file RayCollision.hpp.

+ +
+
+ +

◆ GetHit()

+ +
+
+ + + + + +
+ + + + + + + +
bool raylib::RayCollision::GetHit () const
+
+inline
+
+ +

Retrieves the hit value for the object.

+
Returns
The hit value of the object.
+ +

Definition at line 58 of file RayCollision.hpp.

+ +
+
+ +

◆ GetNormal()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector3 raylib::RayCollision::GetNormal () const
+
+inline
+
+ +

Retrieves the normal value for the object.

+
Returns
The normal value of the object.
+ +

Definition at line 61 of file RayCollision.hpp.

+ +
+
+ +

◆ GetPosition()

+ +
+
+ + + + + +
+ + + + + + + +
::Vector3 raylib::RayCollision::GetPosition () const
+
+inline
+
+ +

Retrieves the point value for the object.

+
Returns
The point value of the object.
+ +

Definition at line 60 of file RayCollision.hpp.

+ +
+
+ +

◆ SetDistance()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::RayCollision::SetDistance (float value)
+
+inline
+
+ +

Sets the distance value for the object.

+
Parameters
+ + +
valueThe value of which to set distance to.
+
+
+ +

Definition at line 59 of file RayCollision.hpp.

+ +
+
+ +

◆ SetHit()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::RayCollision::SetHit (bool value)
+
+inline
+
+ +

Sets the hit value for the object.

+
Parameters
+ + +
valueThe value of which to set hit to.
+
+
+ +

Definition at line 58 of file RayCollision.hpp.

+ +
+
+ +

◆ SetNormal()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::RayCollision::SetNormal (::Vector3 value)
+
+inline
+
+ +

Sets the normal value for the object.

+
Parameters
+ + +
valueThe value of which to set normal to.
+
+
+ +

Definition at line 61 of file RayCollision.hpp.

+ +
+
+ +

◆ SetPosition()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::RayCollision::SetPosition (::Vector3 value)
+
+inline
+
+ +

Sets the point value for the object.

+
Parameters
+ + +
valueThe value of which to set point to.
+
+
+ +

Definition at line 60 of file RayCollision.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_raylib_exception-members.html b/classraylib_1_1_raylib_exception-members.html new file mode 100644 index 00000000..f91adbb6 --- /dev/null +++ b/classraylib_1_1_raylib_exception-members.html @@ -0,0 +1,86 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::RaylibException Member List
+
+
+ +

This is the complete list of members for raylib::RaylibException, including all inherited members.

+ + + +
RaylibException(std::string message)raylib::RaylibExceptioninline
TraceLog(int logLevel=LOG_ERROR)raylib::RaylibExceptioninline
+ + + + diff --git a/classraylib_1_1_raylib_exception.html b/classraylib_1_1_raylib_exception.html new file mode 100644 index 00000000..a1a27697 --- /dev/null +++ b/classraylib_1_1_raylib_exception.html @@ -0,0 +1,181 @@ + + + + + + + +raylib-cpp: raylib::RaylibException Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::RaylibException Class Reference
+
+
+ +

Exception used for most raylib-related exceptions. + More...

+ + + + + + + + +

+Public Member Functions

 RaylibException (std::string message) throw ()
 Construct a runtime exception with the given message. More...
 
void TraceLog (int logLevel=LOG_ERROR)
 Outputs the exception message to TraceLog(). More...
 
+

Detailed Description

+

Exception used for most raylib-related exceptions.

+ +

Definition at line 13 of file RaylibException.hpp.

+

Constructor & Destructor Documentation

+ +

◆ RaylibException()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + +
raylib::RaylibException::RaylibException (std::string message)
throw (
)
+
+inline
+
+ +

Construct a runtime exception with the given message.

+
Parameters
+ + +
messageThe message to provide for the exception.
+
+
+ +

Definition at line 20 of file RaylibException.hpp.

+ +
+
+

Member Function Documentation

+ +

◆ TraceLog()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::RaylibException::TraceLog (int logLevel = LOG_ERROR)
+
+inline
+
+ +

Outputs the exception message to TraceLog().

+
Parameters
+ + +
logLevelThe output status to use when outputing.
+
+
+ +

Definition at line 29 of file RaylibException.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_rectangle-members.html b/classraylib_1_1_rectangle-members.html new file mode 100644 index 00000000..6f42e985 --- /dev/null +++ b/classraylib_1_1_rectangle-members.html @@ -0,0 +1,126 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Rectangle Member List
+
+
+ +

This is the complete list of members for raylib::Rectangle, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CheckCollision(::Rectangle rec2) constraylib::Rectangleinline
CheckCollision(::Vector2 point) constraylib::Rectangleinline
CheckCollision(::Vector2 center, float radius) constraylib::Rectangleinline
Draw(::Color color) constraylib::Rectangleinline
Draw(::Vector2 origin, float rotation, ::Color color) const (defined in raylib::Rectangle)raylib::Rectangleinline
DrawGradient(::Color topLeft, ::Color bottomLeft, ::Color topRight, ::Color bottomRight) const (defined in raylib::Rectangle)raylib::Rectangleinline
DrawGradientH(::Color color1, ::Color color2) const (defined in raylib::Rectangle)raylib::Rectangleinline
DrawGradientV(::Color color1, ::Color color2) const (defined in raylib::Rectangle)raylib::Rectangleinline
DrawLines(::Color color) const (defined in raylib::Rectangle)raylib::Rectangleinline
DrawLines(::Color color, float lineThick) const (defined in raylib::Rectangle)raylib::Rectangleinline
DrawRounded(float roundness, int segments, ::Color color) const (defined in raylib::Rectangle)raylib::Rectangleinline
DrawRoundedLines(float roundness, int segments, ::Color color) const (defined in raylib::Rectangle)raylib::Rectangleinline
DrawRoundedLines(float roundness, int segments, float lineThick, ::Color color) const (defined in raylib::Rectangle)raylib::Rectangleinline
GetCollision(::Rectangle rec2) constraylib::Rectangleinline
GetHeight() constraylib::Rectangleinline
GetPosition() const (defined in raylib::Rectangle)raylib::Rectangleinline
GetSize() const (defined in raylib::Rectangle)raylib::Rectangleinline
GetWidth() constraylib::Rectangleinline
GetX() constraylib::Rectangleinline
GetY() constraylib::Rectangleinline
operator::Vector4() const (defined in raylib::Rectangle)raylib::Rectangleinline
operator=(const ::Rectangle &rect) (defined in raylib::Rectangle)raylib::Rectangleinline
Rectangle(const ::Rectangle &rect) (defined in raylib::Rectangle)raylib::Rectangleinline
Rectangle(float x, float y, float width, float height) (defined in raylib::Rectangle)raylib::Rectangleinline
Rectangle(float x, float y, float width) (defined in raylib::Rectangle)raylib::Rectangleinline
Rectangle(float x, float y) (defined in raylib::Rectangle)raylib::Rectangleinline
Rectangle(float x) (defined in raylib::Rectangle)raylib::Rectangleinline
Rectangle() (defined in raylib::Rectangle)raylib::Rectangleinline
Rectangle(::Vector2 position, ::Vector2 size) (defined in raylib::Rectangle)raylib::Rectangleinline
Rectangle(::Vector2 size) (defined in raylib::Rectangle)raylib::Rectangleinline
Rectangle(::Vector4 rect) (defined in raylib::Rectangle)raylib::Rectangleinline
set(const ::Rectangle &rect) (defined in raylib::Rectangle)raylib::Rectangleinlineprotected
SetHeight(float value)raylib::Rectangleinline
SetPosition(float newX, float newY) (defined in raylib::Rectangle)raylib::Rectangleinline
SetPosition(const ::Vector2 &position) (defined in raylib::Rectangle)raylib::Rectangleinline
SetShapesTexture(const ::Texture2D &texture) (defined in raylib::Rectangle)raylib::Rectangleinline
SetSize(float newWidth, float newHeight) (defined in raylib::Rectangle)raylib::Rectangleinline
SetSize(const ::Vector2 &size) (defined in raylib::Rectangle)raylib::Rectangleinline
SetWidth(float value)raylib::Rectangleinline
SetX(float value)raylib::Rectangleinline
SetY(float value)raylib::Rectangleinline
ToVector4() (defined in raylib::Rectangle)raylib::Rectangleinline
+ + + + diff --git a/classraylib_1_1_rectangle.html b/classraylib_1_1_rectangle.html new file mode 100644 index 00000000..8a7cee87 --- /dev/null +++ b/classraylib_1_1_rectangle.html @@ -0,0 +1,492 @@ + + + + + + + +raylib-cpp: raylib::Rectangle Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Rectangle Class Reference
+
+
+ +

Rectangle type. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Rectangle (::Vector2 position, ::Vector2 size)
 
Rectangle (::Vector2 size)
 
Rectangle (::Vector4 rect)
 
Rectangle (const ::Rectangle &rect)
 
Rectangle (float x)
 
Rectangle (float x, float y)
 
Rectangle (float x, float y, float width)
 
Rectangle (float x, float y, float width, float height)
 
+bool CheckCollision (::Rectangle rec2) const
 Check collision between two rectangles.
 
+bool CheckCollision (::Vector2 center, float radius) const
 Check collision between circle and rectangle.
 
+bool CheckCollision (::Vector2 point) const
 Check if point is inside rectangle.
 
+void Draw (::Color color) const
 Draw a color-filled rectangle.
 
+void Draw (::Vector2 origin, float rotation, ::Color color) const
 
+void DrawGradient (::Color topLeft, ::Color bottomLeft, ::Color topRight, ::Color bottomRight) const
 
+void DrawGradientH (::Color color1, ::Color color2) const
 
+void DrawGradientV (::Color color1, ::Color color2) const
 
+void DrawLines (::Color color) const
 
+void DrawLines (::Color color, float lineThick) const
 
+void DrawRounded (float roundness, int segments, ::Color color) const
 
+void DrawRoundedLines (float roundness, int segments, ::Color color) const
 
+void DrawRoundedLines (float roundness, int segments, float lineThick, ::Color color) const
 
+::Rectangle GetCollision (::Rectangle rec2) const
 Get collision rectangle for two rectangles collision.
 
float GetHeight () const
 Retrieves the height value for the object. More...
 
+Vector2 GetPosition () const
 
+Vector2 GetSize () const
 
float GetWidth () const
 Retrieves the width value for the object. More...
 
float GetX () const
 Retrieves the x value for the object. More...
 
float GetY () const
 Retrieves the y value for the object. More...
 
operator::Vector4 () const
 
+Rectangleoperator= (const ::Rectangle &rect)
 
void SetHeight (float value)
 Sets the height value for the object. More...
 
+RectangleSetPosition (const ::Vector2 &position)
 
+RectangleSetPosition (float newX, float newY)
 
+RectangleSetShapesTexture (const ::Texture2D &texture)
 
+RectangleSetSize (const ::Vector2 &size)
 
+RectangleSetSize (float newWidth, float newHeight)
 
void SetWidth (float value)
 Sets the width value for the object. More...
 
void SetX (float value)
 Sets the x value for the object. More...
 
void SetY (float value)
 Sets the y value for the object. More...
 
+::Vector4 ToVector4 ()
 
+ + + +

+Protected Member Functions

+void set (const ::Rectangle &rect)
 
+

Detailed Description

+

Rectangle type.

+ +

Definition at line 12 of file Rectangle.hpp.

+

Member Function Documentation

+ +

◆ GetHeight()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Rectangle::GetHeight () const
+
+inline
+
+ +

Retrieves the height value for the object.

+
Returns
The height value of the object.
+ +

Definition at line 29 of file Rectangle.hpp.

+ +
+
+ +

◆ GetWidth()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Rectangle::GetWidth () const
+
+inline
+
+ +

Retrieves the width value for the object.

+
Returns
The width value of the object.
+ +

Definition at line 28 of file Rectangle.hpp.

+ +
+
+ +

◆ GetX()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Rectangle::GetX () const
+
+inline
+
+ +

Retrieves the x value for the object.

+
Returns
The x value of the object.
+ +

Definition at line 26 of file Rectangle.hpp.

+ +
+
+ +

◆ GetY()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Rectangle::GetY () const
+
+inline
+
+ +

Retrieves the y value for the object.

+
Returns
The y value of the object.
+ +

Definition at line 27 of file Rectangle.hpp.

+ +
+
+ +

◆ SetHeight()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Rectangle::SetHeight (float value)
+
+inline
+
+ +

Sets the height value for the object.

+
Parameters
+ + +
valueThe value of which to set height to.
+
+
+ +

Definition at line 29 of file Rectangle.hpp.

+ +
+
+ +

◆ SetWidth()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Rectangle::SetWidth (float value)
+
+inline
+
+ +

Sets the width value for the object.

+
Parameters
+ + +
valueThe value of which to set width to.
+
+
+ +

Definition at line 28 of file Rectangle.hpp.

+ +
+
+ +

◆ SetX()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Rectangle::SetX (float value)
+
+inline
+
+ +

Sets the x value for the object.

+
Parameters
+ + +
valueThe value of which to set x to.
+
+
+ +

Definition at line 26 of file Rectangle.hpp.

+ +
+
+ +

◆ SetY()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Rectangle::SetY (float value)
+
+inline
+
+ +

Sets the y value for the object.

+
Parameters
+ + +
valueThe value of which to set y to.
+
+
+ +

Definition at line 27 of file Rectangle.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_render_texture-members.html b/classraylib_1_1_render_texture-members.html new file mode 100644 index 00000000..eee7f943 --- /dev/null +++ b/classraylib_1_1_render_texture-members.html @@ -0,0 +1,105 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::RenderTexture Member List
+
+
+ +

This is the complete list of members for raylib::RenderTexture, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + +
BeginMode()raylib::RenderTextureinline
EndMode()raylib::RenderTextureinline
GetDepth()raylib::RenderTextureinline
GetId() constraylib::RenderTextureinline
GetTexture()raylib::RenderTextureinline
IsValid() constraylib::RenderTextureinline
Load(int width, int height)raylib::RenderTextureinlinestatic
operator=(const ::RenderTexture &texture) (defined in raylib::RenderTexture)raylib::RenderTextureinline
operator=(const RenderTexture &)=delete (defined in raylib::RenderTexture)raylib::RenderTexture
operator=(RenderTexture &&other) noexcept (defined in raylib::RenderTexture)raylib::RenderTextureinline
RenderTexture()raylib::RenderTextureinline
RenderTexture(const ::RenderTexture &renderTexture) (defined in raylib::RenderTexture)raylib::RenderTextureinline
RenderTexture(unsigned int id, const ::Texture &texture, const ::Texture &depth) (defined in raylib::RenderTexture)raylib::RenderTextureinline
RenderTexture(int width, int height)raylib::RenderTextureinline
RenderTexture(const RenderTexture &)=delete (defined in raylib::RenderTexture)raylib::RenderTexture
RenderTexture(RenderTexture &&other) (defined in raylib::RenderTexture)raylib::RenderTextureinline
set(const ::RenderTexture &renderTexture) (defined in raylib::RenderTexture)raylib::RenderTextureinlineprotected
SetDepth(const ::Texture &newDepth) (defined in raylib::RenderTexture)raylib::RenderTextureinline
SetTexture(const ::Texture &newTexture) (defined in raylib::RenderTexture)raylib::RenderTextureinline
Unload() (defined in raylib::RenderTexture)raylib::RenderTextureinline
~RenderTexture() (defined in raylib::RenderTexture)raylib::RenderTextureinline
+ + + + diff --git a/classraylib_1_1_render_texture.html b/classraylib_1_1_render_texture.html new file mode 100644 index 00000000..125450b1 --- /dev/null +++ b/classraylib_1_1_render_texture.html @@ -0,0 +1,202 @@ + + + + + + + +raylib-cpp: raylib::RenderTexture Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

RenderTexture type, for texture rendering. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

RenderTexture ()
 Default constructor to build an empty RenderTexture.
 
RenderTexture (const ::RenderTexture &renderTexture)
 
RenderTexture (const RenderTexture &)=delete
 
RenderTexture (int width, int height)
 Load texture for rendering (framebuffer)
 
RenderTexture (RenderTexture &&other)
 
RenderTexture (unsigned int id, const ::Texture &texture, const ::Texture &depth)
 
+RenderTextureBeginMode ()
 Initializes render texture for drawing.
 
+RenderTextureEndMode ()
 Ends drawing to render texture.
 
+TextureUnmanaged GetDepth ()
 Depth buffer attachment texture.
 
unsigned int GetId () const
 Retrieves the id value for the object. More...
 
+TextureUnmanaged GetTexture ()
 Get the color buffer attachment texture.
 
+bool IsValid () const
 Retrieves whether or not the render texture is ready.
 
+RenderTextureoperator= (const ::RenderTexture &texture)
 
+RenderTextureoperator= (const RenderTexture &)=delete
 
+RenderTextureoperator= (RenderTexture &&other) noexcept
 
+void SetDepth (const ::Texture &newDepth)
 
+void SetTexture (const ::Texture &newTexture)
 
+void Unload ()
 
+ + + + +

+Static Public Member Functions

+static RenderTexture Load (int width, int height)
 Load texture for rendering (framebuffer)
 
+ + + +

+Protected Member Functions

+void set (const ::RenderTexture &renderTexture)
 
+

Detailed Description

+

RenderTexture type, for texture rendering.

+ +

Definition at line 13 of file RenderTexture.hpp.

+

Member Function Documentation

+ +

◆ GetId()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::RenderTexture::GetId () const
+
+inline
+
+ +

Retrieves the id value for the object.

+
Returns
The id value of the object.
+ +

Definition at line 40 of file RenderTexture.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_shader-members.html b/classraylib_1_1_shader-members.html new file mode 100644 index 00000000..20781a67 --- /dev/null +++ b/classraylib_1_1_shader-members.html @@ -0,0 +1,116 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Shader Member List
+
+
+ +

This is the complete list of members for raylib::Shader, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BeginMode()raylib::ShaderUnmanagedinline
EndMode()raylib::ShaderUnmanagedinline
GetId() constraylib::ShaderUnmanagedinline
GetLocation(const std::string &uniformName) constraylib::ShaderUnmanagedinline
GetLocationAttrib(const std::string &attribName) constraylib::ShaderUnmanagedinline
GetLocs() constraylib::ShaderUnmanagedinline
IsValid() constraylib::ShaderUnmanagedinline
Load(const std::string &vsFileName, const std::string &fsFileName)raylib::ShaderUnmanagedinlinestatic
Load(const char *vsFileName, const char *fsFileName) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinlinestatic
LoadFromMemory(const std::string &vsCode, const std::string &fsCode)raylib::ShaderUnmanagedinlinestatic
LoadFromMemory(const char *vsCode, const char *fsCode) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinlinestatic
operator=(const Shader &)=delete (defined in raylib::Shader)raylib::Shader
operator=(Shader &&other) noexcept (defined in raylib::Shader)raylib::Shaderinline
operator=(const ::Shader &shader) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
set(const ::Shader &shader) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinlineprotected
SetValue(int uniformLoc, const void *value, int uniformType)raylib::ShaderUnmanagedinline
SetValue(int uniformLoc, const void *value, int uniformType, int count)raylib::ShaderUnmanagedinline
SetValue(int uniformLoc, const ::Matrix &mat)raylib::ShaderUnmanagedinline
SetValue(int uniformLoc, const ::Texture2D &texture)raylib::ShaderUnmanagedinline
Shader(const Shader &)=delete (defined in raylib::Shader)raylib::Shader
Shader(Shader &&other) (defined in raylib::Shader)raylib::Shaderinline
ShaderUnmanaged() (defined in raylib::Shader)raylib::Shaderinline
ShaderUnmanaged(const ::Shader &shader) (defined in raylib::Shader)raylib::Shaderinline
ShaderUnmanaged(unsigned int id, int *locs=nullptr) (defined in raylib::Shader)raylib::Shaderinline
ShaderUnmanaged(const std::string &vsFileName, const std::string &fsFileName) (defined in raylib::Shader)raylib::Shaderinline
ShaderUnmanaged(const char *vsFileName, const char *fsFileName) (defined in raylib::Shader)raylib::Shaderinline
ShaderUnmanaged(const ::Shader &shader) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
ShaderUnmanaged(unsigned int id, int *locs=nullptr) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
ShaderUnmanaged(const std::string &vsFileName, const std::string &fsFileName) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
ShaderUnmanaged(const char *vsFileName, const char *fsFileName) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
Unload()raylib::Shaderinline
~Shader()raylib::Shaderinline
+ + + + diff --git a/classraylib_1_1_shader.html b/classraylib_1_1_shader.html new file mode 100644 index 00000000..e51efce4 --- /dev/null +++ b/classraylib_1_1_shader.html @@ -0,0 +1,202 @@ + + + + + + + +raylib-cpp: raylib::Shader Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Shader Class Reference
+
+
+ +

Shader type (generic) + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Shader (const Shader &)=delete
 
Shader (Shader &&other)
 
~Shader ()
 Unload shader from GPU memory (VRAM)
 
+Shaderoperator= (const Shader &)=delete
 
+Shaderoperator= (Shader &&other) noexcept
 
ShaderUnmanaged ()
 
ShaderUnmanaged (const ::Shader &shader)
 
ShaderUnmanaged (const char *vsFileName, const char *fsFileName)
 
ShaderUnmanaged (const std::string &vsFileName, const std::string &fsFileName)
 
ShaderUnmanaged (unsigned int id, int *locs=nullptr)
 
+void Unload ()
 Unload shader from GPU memory (VRAM)
 
- Public Member Functions inherited from raylib::ShaderUnmanaged
ShaderUnmanaged (const ::Shader &shader)
 
ShaderUnmanaged (const char *vsFileName, const char *fsFileName)
 
ShaderUnmanaged (const std::string &vsFileName, const std::string &fsFileName)
 
ShaderUnmanaged (unsigned int id, int *locs=nullptr)
 
+ShaderUnmanagedBeginMode ()
 Begin custom shader drawing.
 
+ShaderUnmanagedEndMode ()
 End custom shader drawing (use default shader).
 
unsigned int GetId () const
 Retrieves the id value for the object. More...
 
int GetLocation (const std::string &uniformName) const
 Get shader uniform location. More...
 
int GetLocationAttrib (const std::string &attribName) const
 Get shader attribute location. More...
 
int * GetLocs () const
 Retrieves the locs value for the object. More...
 
+bool IsValid () const
 Retrieves whether or not the shader is ready.
 
+ShaderUnmanagedoperator= (const ::Shader &shader)
 
ShaderUnmanagedSetValue (int uniformLoc, const ::Matrix &mat)
 Set shader uniform value (matrix 4x4) More...
 
ShaderUnmanagedSetValue (int uniformLoc, const ::Texture2D &texture)
 Set shader uniform value for texture. More...
 
ShaderUnmanagedSetValue (int uniformLoc, const void *value, int uniformType)
 Set shader uniform value. More...
 
ShaderUnmanagedSetValue (int uniformLoc, const void *value, int uniformType, int count)
 Set shader uniform value vector. More...
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from raylib::ShaderUnmanaged
+::Shader Load (const char *vsFileName, const char *fsFileName)
 
::Shader Load (const std::string &vsFileName, const std::string &fsFileName)
 Load shader from files and bind default locations. More...
 
+::Shader LoadFromMemory (const char *vsCode, const char *fsCode)
 
::Shader LoadFromMemory (const std::string &vsCode, const std::string &fsCode)
 Load a shader from memory. More...
 
- Protected Member Functions inherited from raylib::ShaderUnmanaged
+void set (const ::Shader &shader)
 
+

Detailed Description

+

Shader type (generic)

+ +

Definition at line 15 of file Shader.hpp.

+
+ + + + diff --git a/classraylib_1_1_shader_unmanaged-members.html b/classraylib_1_1_shader_unmanaged-members.html new file mode 100644 index 00000000..da0d8dd1 --- /dev/null +++ b/classraylib_1_1_shader_unmanaged-members.html @@ -0,0 +1,106 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::ShaderUnmanaged Member List
+
+
+ +

This is the complete list of members for raylib::ShaderUnmanaged, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + +
BeginMode()raylib::ShaderUnmanagedinline
EndMode()raylib::ShaderUnmanagedinline
GetId() constraylib::ShaderUnmanagedinline
GetLocation(const std::string &uniformName) constraylib::ShaderUnmanagedinline
GetLocationAttrib(const std::string &attribName) constraylib::ShaderUnmanagedinline
GetLocs() constraylib::ShaderUnmanagedinline
IsValid() constraylib::ShaderUnmanagedinline
Load(const std::string &vsFileName, const std::string &fsFileName)raylib::ShaderUnmanagedinlinestatic
Load(const char *vsFileName, const char *fsFileName) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinlinestatic
LoadFromMemory(const std::string &vsCode, const std::string &fsCode)raylib::ShaderUnmanagedinlinestatic
LoadFromMemory(const char *vsCode, const char *fsCode) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinlinestatic
operator=(const ::Shader &shader) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
set(const ::Shader &shader) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinlineprotected
SetValue(int uniformLoc, const void *value, int uniformType)raylib::ShaderUnmanagedinline
SetValue(int uniformLoc, const void *value, int uniformType, int count)raylib::ShaderUnmanagedinline
SetValue(int uniformLoc, const ::Matrix &mat)raylib::ShaderUnmanagedinline
SetValue(int uniformLoc, const ::Texture2D &texture)raylib::ShaderUnmanagedinline
ShaderUnmanaged() (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
ShaderUnmanaged(const ::Shader &shader) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
ShaderUnmanaged(unsigned int id, int *locs=nullptr) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
ShaderUnmanaged(const std::string &vsFileName, const std::string &fsFileName) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
ShaderUnmanaged(const char *vsFileName, const char *fsFileName) (defined in raylib::ShaderUnmanaged)raylib::ShaderUnmanagedinline
+ + + + diff --git a/classraylib_1_1_shader_unmanaged.html b/classraylib_1_1_shader_unmanaged.html new file mode 100644 index 00000000..1c919901 --- /dev/null +++ b/classraylib_1_1_shader_unmanaged.html @@ -0,0 +1,556 @@ + + + + + + + +raylib-cpp: raylib::ShaderUnmanaged Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Shader type (generic), not managed by C++ RAII. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

ShaderUnmanaged (const ::Shader &shader)
 
ShaderUnmanaged (const char *vsFileName, const char *fsFileName)
 
ShaderUnmanaged (const std::string &vsFileName, const std::string &fsFileName)
 
ShaderUnmanaged (unsigned int id, int *locs=nullptr)
 
+ShaderUnmanagedBeginMode ()
 Begin custom shader drawing.
 
+ShaderUnmanagedEndMode ()
 End custom shader drawing (use default shader).
 
unsigned int GetId () const
 Retrieves the id value for the object. More...
 
int GetLocation (const std::string &uniformName) const
 Get shader uniform location. More...
 
int GetLocationAttrib (const std::string &attribName) const
 Get shader attribute location. More...
 
int * GetLocs () const
 Retrieves the locs value for the object. More...
 
+bool IsValid () const
 Retrieves whether or not the shader is ready.
 
+ShaderUnmanagedoperator= (const ::Shader &shader)
 
ShaderUnmanagedSetValue (int uniformLoc, const ::Matrix &mat)
 Set shader uniform value (matrix 4x4) More...
 
ShaderUnmanagedSetValue (int uniformLoc, const ::Texture2D &texture)
 Set shader uniform value for texture. More...
 
ShaderUnmanagedSetValue (int uniformLoc, const void *value, int uniformType)
 Set shader uniform value. More...
 
ShaderUnmanagedSetValue (int uniformLoc, const void *value, int uniformType, int count)
 Set shader uniform value vector. More...
 
+ + + + + + + + + + + +

+Static Public Member Functions

+::Shader Load (const char *vsFileName, const char *fsFileName)
 
::Shader Load (const std::string &vsFileName, const std::string &fsFileName)
 Load shader from files and bind default locations. More...
 
+::Shader LoadFromMemory (const char *vsCode, const char *fsCode)
 
::Shader LoadFromMemory (const std::string &vsCode, const std::string &fsCode)
 Load a shader from memory. More...
 
+ + + +

+Protected Member Functions

+void set (const ::Shader &shader)
 
+

Detailed Description

+

Shader type (generic), not managed by C++ RAII.

+ +

Definition at line 16 of file ShaderUnmanaged.hpp.

+

Member Function Documentation

+ +

◆ GetId()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::ShaderUnmanaged::GetId () const
+
+inline
+
+ +

Retrieves the id value for the object.

+
Returns
The id value of the object.
+ +

Definition at line 53 of file ShaderUnmanaged.hpp.

+ +
+
+ +

◆ GetLocation()

+ +
+
+ + + + + +
+ + + + + + + + +
int raylib::ShaderUnmanaged::GetLocation (const std::string & uniformName) const
+
+inline
+
+ +

Get shader uniform location.

+
See also
GetShaderLocation()
+ +

Definition at line 82 of file ShaderUnmanaged.hpp.

+ +
+
+ +

◆ GetLocationAttrib()

+ +
+
+ + + + + +
+ + + + + + + + +
int raylib::ShaderUnmanaged::GetLocationAttrib (const std::string & attribName) const
+
+inline
+
+ +

Get shader attribute location.

+
See also
GetShaderLocationAttrib()
+ +

Definition at line 89 of file ShaderUnmanaged.hpp.

+ +
+
+ +

◆ GetLocs()

+ +
+
+ + + + + +
+ + + + + + + +
int* raylib::ShaderUnmanaged::GetLocs () const
+
+inline
+
+ +

Retrieves the locs value for the object.

+
Returns
The locs value of the object.
+ +

Definition at line 54 of file ShaderUnmanaged.hpp.

+ +
+
+ +

◆ Load()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
::Shader raylib::ShaderUnmanaged::Load (const std::string & vsFileName,
const std::string & fsFileName 
)
+
+inlinestatic
+
+ +

Load shader from files and bind default locations.

+
See also
::LoadShader
+ +

Definition at line 34 of file ShaderUnmanaged.hpp.

+ +
+
+ +

◆ LoadFromMemory()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
::Shader raylib::ShaderUnmanaged::LoadFromMemory (const std::string & vsCode,
const std::string & fsCode 
)
+
+inlinestatic
+
+ +

Load a shader from memory.

+
See also
::LoadShaderFromMemory
+ +

Definition at line 46 of file ShaderUnmanaged.hpp.

+ +
+
+ +

◆ SetValue() [1/4]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ShaderUnmanaged& raylib::ShaderUnmanaged::SetValue (int uniformLoc,
const ::Matrixmat 
)
+
+inline
+
+ +

Set shader uniform value (matrix 4x4)

+
See also
SetShaderValueMatrix()
+ +

Definition at line 118 of file ShaderUnmanaged.hpp.

+ +
+
+ +

◆ SetValue() [2/4]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ShaderUnmanaged& raylib::ShaderUnmanaged::SetValue (int uniformLoc,
const ::Texture2Dtexture 
)
+
+inline
+
+ +

Set shader uniform value for texture.

+
See also
SetShaderValueTexture()
+ +

Definition at line 128 of file ShaderUnmanaged.hpp.

+ +
+
+ +

◆ SetValue() [3/4]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
ShaderUnmanaged& raylib::ShaderUnmanaged::SetValue (int uniformLoc,
const void * value,
int uniformType 
)
+
+inline
+
+ +

Set shader uniform value.

+
See also
SetShaderValue()
+ +

Definition at line 98 of file ShaderUnmanaged.hpp.

+ +
+
+ +

◆ SetValue() [4/4]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ShaderUnmanaged& raylib::ShaderUnmanaged::SetValue (int uniformLoc,
const void * value,
int uniformType,
int count 
)
+
+inline
+
+ +

Set shader uniform value vector.

+
See also
SetShaderValueV()
+ +

Definition at line 108 of file ShaderUnmanaged.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_sound-members.html b/classraylib_1_1_sound-members.html new file mode 100644 index 00000000..df66e69a --- /dev/null +++ b/classraylib_1_1_sound-members.html @@ -0,0 +1,110 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Sound Member List
+
+
+ +

This is the complete list of members for raylib::Sound, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
GetFrameCount() constraylib::Soundinline
GetStream() constraylib::Soundinline
IsPlaying() constraylib::Soundinline
IsValid() constraylib::Soundinline
Load(const std::string &fileName)raylib::Soundinline
Load(const ::Wave &wave)raylib::Soundinline
operator=(const Sound &)=delete (defined in raylib::Sound)raylib::Sound
operator=(Sound &&other) noexcept (defined in raylib::Sound)raylib::Soundinline
Pause()raylib::Soundinline
Play()raylib::Soundinline
Resume()raylib::Soundinline
set(const ::Sound &sound) (defined in raylib::Sound)raylib::Soundinlineprotected
SetPan(float pan=0.5f)raylib::Soundinline
SetPitch(float pitch)raylib::Soundinline
SetVolume(float volume)raylib::Soundinline
Sound(const Sound &)=delete (defined in raylib::Sound)raylib::Sound
Sound() (defined in raylib::Sound)raylib::Soundinline
Sound(::AudioStream stream, unsigned int frameCount) (defined in raylib::Sound)raylib::Soundinline
Sound(Sound &&other) (defined in raylib::Sound)raylib::Soundinline
Sound(const std::string &fileName)raylib::Soundinline
Sound(const ::Wave &wave)raylib::Soundinline
Stop()raylib::Soundinline
Unload()raylib::Soundinline
Update(const void *data, int samplesCount)raylib::Soundinline
Update(const void *data)raylib::Soundinline
~Sound() (defined in raylib::Sound)raylib::Soundinline
+ + + + diff --git a/classraylib_1_1_sound.html b/classraylib_1_1_sound.html new file mode 100644 index 00000000..f4a09015 --- /dev/null +++ b/classraylib_1_1_sound.html @@ -0,0 +1,435 @@ + + + + + + + +raylib-cpp: raylib::Sound Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Sound Class Reference
+
+
+ +

Wave/Sound management functions. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Sound (::AudioStream stream, unsigned int frameCount)
 
 Sound (const ::Wave &wave)
 Loads a sound from the given Wave. More...
 
Sound (const Sound &)=delete
 
 Sound (const std::string &fileName)
 Loads a sound from the given file. More...
 
Sound (Sound &&other)
 
unsigned int GetFrameCount () const
 Retrieves the frameCount value for the object. More...
 
::AudioStream GetStream () const
 Retrieves the stream value for the object. More...
 
+bool IsPlaying () const
 Check if a sound is currently playing.
 
bool IsValid () const
 Retrieve whether or not the Sound buffer is loaded. More...
 
void Load (const ::Wave &wave)
 Loads the given Wave object into the Sound. More...
 
void Load (const std::string &fileName)
 Load a sound from the given file. More...
 
+Soundoperator= (const Sound &)=delete
 
+Soundoperator= (Sound &&other) noexcept
 
+SoundPause ()
 Pause a sound.
 
+SoundPlay ()
 Play a sound.
 
+SoundResume ()
 Resume a paused sound.
 
+SoundSetPan (float pan=0.5f)
 Set pan for a sound (0.5 is center)
 
+SoundSetPitch (float pitch)
 Set pitch for a sound (1.0 is base level)
 
+SoundSetVolume (float volume)
 Set volume for a sound (1.0 is max level)
 
+SoundStop ()
 Stop playing a sound.
 
+void Unload ()
 Unload sound.
 
+SoundUpdate (const void *data)
 Update sound buffer with new data, assuming it's the same sample count.
 
+SoundUpdate (const void *data, int samplesCount)
 Update sound buffer with new data.
 
+ + + +

+Protected Member Functions

+void set (const ::Sound &sound)
 
+

Detailed Description

+

Wave/Sound management functions.

+
raylib::Sound boom("boom.wav");
+
boom.Play();
+
Wave/Sound management functions.
Definition: Sound.hpp:19
+
+

Definition at line 19 of file Sound.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Sound() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::Sound::Sound (const std::string & fileName)
+
+inline
+
+ +

Loads a sound from the given file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the Sound failed to load.
+
+
+ +

Definition at line 45 of file Sound.hpp.

+ +

References Load().

+ +
+
+ +

◆ Sound() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::Sound::Sound (const ::Wavewave)
+
+inline
+
+ +

Loads a sound from the given Wave.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the Sound failed to load.
+
+
+ +

Definition at line 52 of file Sound.hpp.

+ +

References Load().

+ +
+
+

Member Function Documentation

+ +

◆ GetFrameCount()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::Sound::GetFrameCount () const
+
+inline
+
+ +

Retrieves the frameCount value for the object.

+
Returns
The frameCount value of the object.
+ +

Definition at line 56 of file Sound.hpp.

+ +
+
+ +

◆ GetStream()

+ +
+
+ + + + + +
+ + + + + + + +
::AudioStream raylib::Sound::GetStream () const
+
+inline
+
+ +

Retrieves the stream value for the object.

+
Returns
The stream value of the object.
+ +

Definition at line 57 of file Sound.hpp.

+ +

References Unload().

+ +
+
+ +

◆ IsValid()

+ +
+
+ + + + + +
+ + + + + + + +
bool raylib::Sound::IsValid () const
+
+inline
+
+ +

Retrieve whether or not the Sound buffer is loaded.

+
Returns
True or false depending on whether the Sound buffer is loaded.
+ +

Definition at line 189 of file Sound.hpp.

+ +

Referenced by Load().

+ +
+
+ +

◆ Load() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Sound::Load (const ::Wavewave)
+
+inline
+
+ +

Loads the given Wave object into the Sound.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the Sound failed to load.
+
+
+ +

Definition at line 177 of file Sound.hpp.

+ +

References IsValid().

+ +
+
+ +

◆ Load() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Sound::Load (const std::string & fileName)
+
+inline
+
+ +

Load a sound from the given file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the Sound failed to load.
+
+
+ +

Definition at line 165 of file Sound.hpp.

+ +

References IsValid().

+ +

Referenced by Sound().

+ +
+
+
+ + + + diff --git a/classraylib_1_1_text-members.html b/classraylib_1_1_text-members.html new file mode 100644 index 00000000..2a212117 --- /dev/null +++ b/classraylib_1_1_text-members.html @@ -0,0 +1,111 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Text Member List
+
+
+ +

This is the complete list of members for raylib::Text, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
colorraylib::Text
Draw(const ::Vector2 &position) constraylib::Textinline
Draw(int posX, int posY) constraylib::Textinline
Draw(const ::Vector2 &position, float rotation, const ::Vector2 &origin={0, 0}) constraylib::Textinline
Draw(const std::string &text, const int posX, const int posY, const int fontSize, const ::Color &color)raylib::Textinlinestatic
Draw(const std::string &text, const ::Vector2 &pos, const int fontSize, const ::Color &color)raylib::Textinlinestatic
Draw(const ::Font &font, const std::string &text, const ::Vector2 &position, const float fontSize, const float spacing, const ::Color &color)raylib::Textinlinestatic
Draw(const ::Font &font, const std::string &text, const ::Vector2 &position, const ::Vector2 &origin, const float rotation, const float fontSize, const float spacing, const ::Color &color)raylib::Textinlinestatic
fontraylib::Text
fontSizeraylib::Text
GetColor() constraylib::Textinline
GetFont() constraylib::Textinline
GetFontSize() constraylib::Textinline
GetSpacing() constraylib::Textinline
GetText() constraylib::Textinline
Measure() constraylib::Textinline
MeasureEx() constraylib::Textinline
operator=(const Text &other) (defined in raylib::Text)raylib::Textinline
SetColor(::Color value)raylib::Textinline
SetFont(::Font value)raylib::Textinline
SetFontSize(float value)raylib::Textinline
SetSpacing(float value)raylib::Textinline
SetText(std::string value)raylib::Textinline
spacingraylib::Text
textraylib::Text
Text(const std::string &text="", float fontSize=10, const ::Color &color=WHITE, const ::Font &font=::GetFontDefault(), float spacing=0)raylib::Textinline
Text(const ::Font &font, const std::string &text="", float fontSize=10, float spacing=0, const ::Color &color=WHITE)raylib::Textinline
+ + + + diff --git a/classraylib_1_1_text.html b/classraylib_1_1_text.html new file mode 100644 index 00000000..ba7e6da8 --- /dev/null +++ b/classraylib_1_1_text.html @@ -0,0 +1,970 @@ + + + + + + + +raylib-cpp: raylib::Text Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Text Functions. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Text (const ::Font &font, const std::string &text="", float fontSize=10, float spacing=0, const ::Color &color=WHITE)
 Initializes a new Text object with a custom font. More...
 
 Text (const std::string &text="", float fontSize=10, const ::Color &color=WHITE, const ::Font &font=::GetFontDefault(), float spacing=0)
 Initializes a new Text object. More...
 
+void Draw (const ::Vector2 &position) const
 Draw text with values in class.
 
void Draw (const ::Vector2 &position, float rotation, const ::Vector2 &origin={0, 0}) const
 Draw text using Font and pro parameters (rotation). More...
 
+void Draw (int posX, int posY) const
 Draw text with values in class.
 
::Color GetColor () const
 Retrieves the color value for the object. More...
 
::Font GetFont () const
 Retrieves the font value for the object. More...
 
float GetFontSize () const
 Retrieves the fontSize value for the object. More...
 
float GetSpacing () const
 Retrieves the spacing value for the object. More...
 
std::string GetText () const
 Retrieves the text value for the object. More...
 
+int Measure () const
 Measure string width for default font.
 
+Vector2 MeasureEx () const
 Measure string size for Font.
 
+Textoperator= (const Text &other)
 
void SetColor (::Color value)
 Sets the color value for the object. More...
 
void SetFont (::Font value)
 Sets the font value for the object. More...
 
void SetFontSize (float value)
 Sets the fontSize value for the object. More...
 
void SetSpacing (float value)
 Sets the spacing value for the object. More...
 
void SetText (std::string value)
 Sets the text value for the object. More...
 
+ + + + + + + + + + + + + +

+Static Public Member Functions

static void Draw (const ::Font &font, const std::string &text, const ::Vector2 &position, const ::Vector2 &origin, const float rotation, const float fontSize, const float spacing, const ::Color &color)
 Draw text using font, color, position, origin, font size and spacing. More...
 
static void Draw (const ::Font &font, const std::string &text, const ::Vector2 &position, const float fontSize, const float spacing, const ::Color &color)
 Draw text using font, color, position, font size and spacing. More...
 
static void Draw (const std::string &text, const ::Vector2 &pos, const int fontSize, const ::Color &color)
 Draw text using font and color, with position defined as Vector2. More...
 
static void Draw (const std::string &text, const int posX, const int posY, const int fontSize, const ::Color &color)
 Draw text using font and color. More...
 
+ + + + + + + + + + + + + + + + +

+Public Attributes

+::Color color
 The color of the text.
 
+::Font font
 The internal raylib font to use for the text.
 
+float fontSize
 The size of the text.
 
+float spacing
 The character spacing for the text.
 
+std::string text
 The internal text.
 
+

Detailed Description

+

Text Functions.

+ +

Definition at line 14 of file Text.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Text() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Text::Text (const std::string & text = "",
float fontSize = 10,
const ::Colorcolor = WHITE,
const ::Fontfont = ::GetFontDefault(),
float spacing = 0 
)
+
+inline
+
+ +

Initializes a new Text object.

+
Parameters
+ + + + + + +
textText to initialize.
fontSizeThe size of the text.
colorThe color of the font.
fontFont to initialize.
spacingThe spacing of the text.
+
+
+ +

Definition at line 50 of file Text.hpp.

+ +
+
+ +

◆ Text() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Text::Text (const ::Fontfont,
const std::string & text = "",
float fontSize = 10,
float spacing = 0,
const ::Colorcolor = WHITE 
)
+
+inline
+
+ +

Initializes a new Text object with a custom font.

+
Parameters
+ + + + + + +
fontFont to initialize.
textText to initialize.
fontSizeThe size of the text.
spacingThe spacing of the text.
colorThe color of the font.
+
+
+ +

Definition at line 73 of file Text.hpp.

+ +
+
+

Member Function Documentation

+ +

◆ Draw() [1/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void raylib::Text::Draw (const ::Fontfont,
const std::string & text,
const ::Vector2position,
const ::Vector2origin,
const float rotation,
const float fontSize,
const float spacing,
const ::Colorcolor 
)
+
+inlinestatic
+
+ +

Draw text using font, color, position, origin, font size and spacing.

+
See also
DrawTextPro
+ +

Definition at line 183 of file Text.hpp.

+ +

References color, raylib::DrawTextPro(), font, fontSize, spacing, and text.

+ +
+
+ +

◆ Draw() [2/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void raylib::Text::Draw (const ::Fontfont,
const std::string & text,
const ::Vector2position,
const float fontSize,
const float spacing,
const ::Colorcolor 
)
+
+inlinestatic
+
+ +

Draw text using font, color, position, font size and spacing.

+
See also
DrawTextEx
+ +

Definition at line 168 of file Text.hpp.

+ +

References color, raylib::DrawTextEx(), font, fontSize, spacing, and text.

+ +
+
+ +

◆ Draw() [3/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::Text::Draw (const ::Vector2position,
float rotation,
const ::Vector2origin = {0, 0} 
) const
+
+inline
+
+ +

Draw text using Font and pro parameters (rotation).

+
See also
DrawTextPro()
+ +

Definition at line 116 of file Text.hpp.

+ +
+
+ +

◆ Draw() [4/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void raylib::Text::Draw (const std::string & text,
const ::Vector2pos,
const int fontSize,
const ::Colorcolor 
)
+
+inlinestatic
+
+ +

Draw text using font and color, with position defined as Vector2.

+
See also
DrawText
+ +

Definition at line 159 of file Text.hpp.

+ +

References color, raylib::DrawText(), fontSize, and text.

+ +
+
+ +

◆ Draw() [5/5]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void raylib::Text::Draw (const std::string & text,
const int posX,
const int posY,
const int fontSize,
const ::Colorcolor 
)
+
+inlinestatic
+
+ +

Draw text using font and color.

+
See also
DrawText
+ +

Definition at line 150 of file Text.hpp.

+ +

References color, raylib::DrawText(), fontSize, and text.

+ +
+
+ +

◆ GetColor()

+ +
+
+ + + + + +
+ + + + + + + +
::Color raylib::Text::GetColor () const
+
+inline
+
+ +

Retrieves the color value for the object.

+
Returns
The color value of the object.
+ +

Definition at line 90 of file Text.hpp.

+ +
+
+ +

◆ GetFont()

+ +
+
+ + + + + +
+ + + + + + + +
::Font raylib::Text::GetFont () const
+
+inline
+
+ +

Retrieves the font value for the object.

+
Returns
The font value of the object.
+ +

Definition at line 89 of file Text.hpp.

+ +
+
+ +

◆ GetFontSize()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Text::GetFontSize () const
+
+inline
+
+ +

Retrieves the fontSize value for the object.

+
Returns
The fontSize value of the object.
+ +

Definition at line 88 of file Text.hpp.

+ +
+
+ +

◆ GetSpacing()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Text::GetSpacing () const
+
+inline
+
+ +

Retrieves the spacing value for the object.

+
Returns
The spacing value of the object.
+ +

Definition at line 91 of file Text.hpp.

+ +
+
+ +

◆ GetText()

+ +
+
+ + + + + +
+ + + + + + + +
std::string raylib::Text::GetText () const
+
+inline
+
+ +

Retrieves the text value for the object.

+
Returns
The text value of the object.
+ +

Definition at line 87 of file Text.hpp.

+ +
+
+ +

◆ SetColor()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Text::SetColor (::Color value)
+
+inline
+
+ +

Sets the color value for the object.

+
Parameters
+ + +
valueThe value of which to set color to.
+
+
+ +

Definition at line 90 of file Text.hpp.

+ +
+
+ +

◆ SetFont()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Text::SetFont (::Font value)
+
+inline
+
+ +

Sets the font value for the object.

+
Parameters
+ + +
valueThe value of which to set font to.
+
+
+ +

Definition at line 89 of file Text.hpp.

+ +
+
+ +

◆ SetFontSize()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Text::SetFontSize (float value)
+
+inline
+
+ +

Sets the fontSize value for the object.

+
Parameters
+ + +
valueThe value of which to set fontSize to.
+
+
+ +

Definition at line 88 of file Text.hpp.

+ +
+
+ +

◆ SetSpacing()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Text::SetSpacing (float value)
+
+inline
+
+ +

Sets the spacing value for the object.

+
Parameters
+ + +
valueThe value of which to set spacing to.
+
+
+ +

Definition at line 91 of file Text.hpp.

+ +
+
+ +

◆ SetText()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Text::SetText (std::string value)
+
+inline
+
+ +

Sets the text value for the object.

+
Parameters
+ + +
valueThe value of which to set text to.
+
+
+ +

Definition at line 87 of file Text.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_texture-members.html b/classraylib_1_1_texture-members.html new file mode 100644 index 00000000..1a05ec47 --- /dev/null +++ b/classraylib_1_1_texture-members.html @@ -0,0 +1,135 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Texture Member List
+
+
+ +

This is the complete list of members for raylib::Texture, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Draw(int posX=0, int posY=0, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::Vector2 position, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
DrawBillboard(const ::Camera &camera, ::Vector3 position, float size, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
DrawBillboard(const ::Camera &camera, ::Rectangle source, ::Vector3 position, ::Vector2 size, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
DrawBillboard(const ::Camera &camera, ::Rectangle source, Vector3 position, ::Vector3 up, Vector2 size, Vector2 origin, float rotation=0.0f, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
GenMipmaps()raylib::TextureUnmanagedinline
GetData() constraylib::TextureUnmanagedinline
GetFormat() constraylib::TextureUnmanagedinline
GetHeight() constraylib::TextureUnmanagedinline
GetId() constraylib::TextureUnmanagedinline
GetMipmaps() constraylib::TextureUnmanagedinline
GetSize() constraylib::TextureUnmanagedinline
GetWidth() constraylib::TextureUnmanagedinline
IsValid() constraylib::TextureUnmanagedinline
Load(const ::Image &image)raylib::TextureUnmanagedinline
Load(const ::Image &image, int layoutType)raylib::TextureUnmanagedinline
Load(const std::string &fileName)raylib::TextureUnmanagedinline
operator Image()raylib::TextureUnmanagedinline
operator=(const Texture &)=deleteraylib::Texture
operator=(Texture &&other) noexceptraylib::Textureinline
operator=(const ::Texture &texture) (defined in raylib::TextureUnmanaged)raylib::TextureUnmanagedinline
set(const ::Texture &texture) (defined in raylib::TextureUnmanaged)raylib::TextureUnmanagedinlineprotected
SetFilter(int filterMode)raylib::TextureUnmanagedinline
SetMaterial(::Material *material, int mapType=MATERIAL_MAP_NORMAL)raylib::TextureUnmanagedinline
SetMaterial(const ::Material &material, int mapType=MATERIAL_MAP_NORMAL) (defined in raylib::TextureUnmanaged)raylib::TextureUnmanagedinline
SetShaderValue(const ::Shader &shader, int locIndex)raylib::TextureUnmanagedinline
SetShapes(const ::Rectangle &source)raylib::TextureUnmanagedinline
SetWrap(int wrapMode)raylib::TextureUnmanagedinline
Texture(const Texture &)=deleteraylib::Texture
Texture(Texture &&other)raylib::Textureinline
TextureUnmanaged()raylib::Textureinline
TextureUnmanaged(unsigned int id, int width, int height, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)raylib::Textureinline
TextureUnmanaged(const ::Texture &texture)raylib::Textureinline
TextureUnmanaged(const ::Image &image)raylib::Textureinline
TextureUnmanaged(const ::Image &image, int layout)raylib::Textureinline
TextureUnmanaged(const std::string &fileName)raylib::Textureinline
TextureUnmanaged(::Texture &&other) (defined in raylib::Texture)raylib::Textureinline
raylib::TextureUnmanaged::TextureUnmanaged(unsigned int id, int width, int height, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)raylib::TextureUnmanagedinline
raylib::TextureUnmanaged::TextureUnmanaged(const ::Texture &texture)raylib::TextureUnmanagedinline
raylib::TextureUnmanaged::TextureUnmanaged(const ::Image &image)raylib::TextureUnmanagedinline
raylib::TextureUnmanaged::TextureUnmanaged(const ::Image &image, int layout)raylib::TextureUnmanagedinline
raylib::TextureUnmanaged::TextureUnmanaged(const std::string &fileName)raylib::TextureUnmanagedinline
TextureUnmanaged(::Texture &&other) (defined in raylib::TextureUnmanaged)raylib::TextureUnmanagedinline
Unload()raylib::TextureUnmanagedinline
Update(const void *pixels)raylib::TextureUnmanagedinline
Update(::Rectangle rec, const void *pixels)raylib::TextureUnmanagedinline
~Texture()raylib::Textureinline
+ + + + diff --git a/classraylib_1_1_texture.html b/classraylib_1_1_texture.html new file mode 100644 index 00000000..10a9d4a2 --- /dev/null +++ b/classraylib_1_1_texture.html @@ -0,0 +1,382 @@ + + + + + + + +raylib-cpp: raylib::Texture Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Texture Class Reference
+
+
+ +

Texture type. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Texture (const Texture &)=delete
 Explicitly forbid the copy constructor.
 
Texture (Texture &&other)
 Move constructor.
 
~Texture ()
 On destruction, unload the Texture.
 
+Textureoperator= (const Texture &)=delete
 Explicitly forbid copy assignment.
 
+Textureoperator= (Texture &&other) noexcept
 Move assignment.
 
TextureUnmanaged ()
 Default texture constructor.
 
TextureUnmanaged (::Texture &&other)
 
 TextureUnmanaged (const ::Image &image)
 Creates a texture from the given Image. More...
 
 TextureUnmanaged (const ::Image &image, int layout)
 Load cubemap from image, multiple image cubemap layouts supported. More...
 
TextureUnmanaged (const ::Texture &texture)
 Creates a texture object based on the given Texture struct data.
 
 TextureUnmanaged (const std::string &fileName)
 Load texture from file into GPU memory (VRAM) More...
 
TextureUnmanaged (unsigned int id, int width, int height, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
 Move/Create a texture structure manually.
 
- Public Member Functions inherited from raylib::TextureUnmanaged
TextureUnmanaged ()
 Default texture constructor.
 
TextureUnmanaged (::Texture &&other)
 
 TextureUnmanaged (const ::Image &image)
 Creates a texture from the given Image. More...
 
 TextureUnmanaged (const ::Image &image, int layout)
 Load cubemap from image, multiple image cubemap layouts supported. More...
 
TextureUnmanaged (const ::Texture &texture)
 Creates a texture object based on the given Texture struct data.
 
 TextureUnmanaged (const std::string &fileName)
 Load texture from file into GPU memory (VRAM) More...
 
TextureUnmanaged (unsigned int id, int width, int height, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
 Move/Create a texture structure manually.
 
void Draw (::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) const
 Draws a texture (or part of it) that stretches or shrinks nicely. More...
 
void Draw (::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) const
 Draw a part of a texture defined by a rectangle with 'pro' parameters. More...
 
void Draw (::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255}) const
 Draw a part of a texture defined by a rectangle. More...
 
void Draw (::Vector2 position, ::Color tint={255, 255, 255, 255}) const
 Draw a Texture2D with position defined as Vector2. More...
 
void Draw (::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255}) const
 Draw a Texture2D with extended parameters. More...
 
void Draw (int posX=0, int posY=0, ::Color tint={255, 255, 255, 255}) const
 Draw a Texture2D. More...
 
void DrawBillboard (const ::Camera &camera, ::Rectangle source, ::Vector3 position, ::Vector2 size, ::Color tint={255, 255, 255, 255}) const
 Draw a billboard texture defined by source. More...
 
void DrawBillboard (const ::Camera &camera, ::Rectangle source, Vector3 position, ::Vector3 up, Vector2 size, Vector2 origin, float rotation=0.0f, ::Color tint={255, 255, 255, 255}) const
 Draw a billboard texture defined by source and rotation. More...
 
void DrawBillboard (const ::Camera &camera, ::Vector3 position, float size, ::Color tint={255, 255, 255, 255}) const
 Draw a billboard texture. More...
 
+TextureUnmanagedGenMipmaps ()
 Generate GPU mipmaps for a texture.
 
+::Image GetData () const
 Get pixel data from GPU texture and return an Image.
 
int GetFormat () const
 Retrieves the format value for the object. More...
 
int GetHeight () const
 Retrieves the height value for the object. More...
 
unsigned int GetId () const
 Retrieves the id value for the object. More...
 
int GetMipmaps () const
 Retrieves the mipmaps value for the object. More...
 
+::Vector2 GetSize () const
 Retrieve the width and height of the texture.
 
int GetWidth () const
 Retrieves the width value for the object. More...
 
bool IsValid () const
 Determines whether or not the Texture has been loaded and is ready. More...
 
+void Load (const ::Image &image)
 Load texture from image data.
 
+void Load (const ::Image &image, int layoutType)
 Load cubemap from image, multiple image cubemap layouts supported.
 
+void Load (const std::string &fileName)
 Load texture from file into GPU memory (VRAM)
 
operator Image ()
 Get pixel data from GPU texture and return an Image.
 
+TextureUnmanagedoperator= (const ::Texture &texture)
 
+TextureUnmanagedSetFilter (int filterMode)
 Set texture scaling filter mode.
 
+TextureUnmanagedSetMaterial (::Material *material, int mapType=MATERIAL_MAP_NORMAL)
 Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
 
+TextureUnmanagedSetMaterial (const ::Material &material, int mapType=MATERIAL_MAP_NORMAL)
 
+TextureUnmanagedSetShaderValue (const ::Shader &shader, int locIndex)
 Set shader uniform value for texture (sampler2d)
 
+TextureUnmanagedSetShapes (const ::Rectangle &source)
 Set texture and rectangle to be used on shapes drawing.
 
+TextureUnmanagedSetWrap (int wrapMode)
 Set texture wrapping mode.
 
+void Unload ()
 Unload texture from GPU memory (VRAM)
 
+TextureUnmanagedUpdate (::Rectangle rec, const void *pixels)
 Update GPU texture rectangle with new data.
 
+TextureUnmanagedUpdate (const void *pixels)
 Update GPU texture with new data.
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from raylib::TextureUnmanaged
+void set (const ::Texture &texture)
 
+

Detailed Description

+

Texture type.

+

The texture will be unloaded on object destruction. Use raylib::TextureUnmanaged if you're looking to not unload.

+
See also
raylib::TextureUnmanaged
+ +

Definition at line 14 of file Texture.hpp.

+

Member Function Documentation

+ +

◆ TextureUnmanaged() [1/3]

+ +
+
+ + + + + +
+ + + + +
raylib::TextureUnmanaged::TextureUnmanaged
+
+inline
+
+ +

Creates a texture from the given Image.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to create the texture from the given image.
+
+
+ +

Definition at line 56 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ TextureUnmanaged() [2/3]

+ +
+
+ + + + + +
+ + + + +
raylib::TextureUnmanaged::TextureUnmanaged
+
+inline
+
+ +

Load cubemap from image, multiple image cubemap layouts supported.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to create the texture from the given cubemap.
+
+
+
See also
LoadTextureCubemap()
+ +

Definition at line 65 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ TextureUnmanaged() [3/3]

+ +
+
+ + + + + +
+ + + + +
raylib::TextureUnmanaged::TextureUnmanaged
+
+inline
+
+ +

Load texture from file into GPU memory (VRAM)

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to create the texture from the given file.
+
+
+ +

Definition at line 72 of file TextureUnmanaged.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_texture_unmanaged-members.html b/classraylib_1_1_texture_unmanaged-members.html new file mode 100644 index 00000000..ba2e3a1b --- /dev/null +++ b/classraylib_1_1_texture_unmanaged-members.html @@ -0,0 +1,124 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::TextureUnmanaged Member List
+
+
+ +

This is the complete list of members for raylib::TextureUnmanaged, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Draw(int posX=0, int posY=0, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::Vector2 position, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
Draw(::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
DrawBillboard(const ::Camera &camera, ::Vector3 position, float size, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
DrawBillboard(const ::Camera &camera, ::Rectangle source, ::Vector3 position, ::Vector2 size, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
DrawBillboard(const ::Camera &camera, ::Rectangle source, Vector3 position, ::Vector3 up, Vector2 size, Vector2 origin, float rotation=0.0f, ::Color tint={255, 255, 255, 255}) constraylib::TextureUnmanagedinline
GenMipmaps()raylib::TextureUnmanagedinline
GetData() constraylib::TextureUnmanagedinline
GetFormat() constraylib::TextureUnmanagedinline
GetHeight() constraylib::TextureUnmanagedinline
GetId() constraylib::TextureUnmanagedinline
GetMipmaps() constraylib::TextureUnmanagedinline
GetSize() constraylib::TextureUnmanagedinline
GetWidth() constraylib::TextureUnmanagedinline
IsValid() constraylib::TextureUnmanagedinline
Load(const ::Image &image)raylib::TextureUnmanagedinline
Load(const ::Image &image, int layoutType)raylib::TextureUnmanagedinline
Load(const std::string &fileName)raylib::TextureUnmanagedinline
operator Image()raylib::TextureUnmanagedinline
operator=(const ::Texture &texture) (defined in raylib::TextureUnmanaged)raylib::TextureUnmanagedinline
set(const ::Texture &texture) (defined in raylib::TextureUnmanaged)raylib::TextureUnmanagedinlineprotected
SetFilter(int filterMode)raylib::TextureUnmanagedinline
SetMaterial(::Material *material, int mapType=MATERIAL_MAP_NORMAL)raylib::TextureUnmanagedinline
SetMaterial(const ::Material &material, int mapType=MATERIAL_MAP_NORMAL) (defined in raylib::TextureUnmanaged)raylib::TextureUnmanagedinline
SetShaderValue(const ::Shader &shader, int locIndex)raylib::TextureUnmanagedinline
SetShapes(const ::Rectangle &source)raylib::TextureUnmanagedinline
SetWrap(int wrapMode)raylib::TextureUnmanagedinline
TextureUnmanaged()raylib::TextureUnmanagedinline
TextureUnmanaged(unsigned int id, int width, int height, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)raylib::TextureUnmanagedinline
TextureUnmanaged(const ::Texture &texture)raylib::TextureUnmanagedinline
TextureUnmanaged(const ::Image &image)raylib::TextureUnmanagedinline
TextureUnmanaged(const ::Image &image, int layout)raylib::TextureUnmanagedinline
TextureUnmanaged(const std::string &fileName)raylib::TextureUnmanagedinline
TextureUnmanaged(::Texture &&other) (defined in raylib::TextureUnmanaged)raylib::TextureUnmanagedinline
Unload()raylib::TextureUnmanagedinline
Update(const void *pixels)raylib::TextureUnmanagedinline
Update(::Rectangle rec, const void *pixels)raylib::TextureUnmanagedinline
+ + + + diff --git a/classraylib_1_1_texture_unmanaged.html b/classraylib_1_1_texture_unmanaged.html new file mode 100644 index 00000000..daa8178d --- /dev/null +++ b/classraylib_1_1_texture_unmanaged.html @@ -0,0 +1,1043 @@ + + + + + + + +raylib-cpp: raylib::TextureUnmanaged Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::TextureUnmanaged Class Reference
+
+
+ +

A Texture that is not managed by C++ RAII. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

TextureUnmanaged ()
 Default texture constructor.
 
TextureUnmanaged (::Texture &&other)
 
 TextureUnmanaged (const ::Image &image)
 Creates a texture from the given Image. More...
 
 TextureUnmanaged (const ::Image &image, int layout)
 Load cubemap from image, multiple image cubemap layouts supported. More...
 
TextureUnmanaged (const ::Texture &texture)
 Creates a texture object based on the given Texture struct data.
 
 TextureUnmanaged (const std::string &fileName)
 Load texture from file into GPU memory (VRAM) More...
 
TextureUnmanaged (unsigned int id, int width, int height, int mipmaps=1, int format=PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)
 Move/Create a texture structure manually.
 
void Draw (::NPatchInfo nPatchInfo, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) const
 Draws a texture (or part of it) that stretches or shrinks nicely. More...
 
void Draw (::Rectangle sourceRec, ::Rectangle destRec, ::Vector2 origin={0, 0}, float rotation=0, ::Color tint={255, 255, 255, 255}) const
 Draw a part of a texture defined by a rectangle with 'pro' parameters. More...
 
void Draw (::Rectangle sourceRec, ::Vector2 position={0, 0}, ::Color tint={255, 255, 255, 255}) const
 Draw a part of a texture defined by a rectangle. More...
 
void Draw (::Vector2 position, ::Color tint={255, 255, 255, 255}) const
 Draw a Texture2D with position defined as Vector2. More...
 
void Draw (::Vector2 position, float rotation, float scale=1.0f, ::Color tint={255, 255, 255, 255}) const
 Draw a Texture2D with extended parameters. More...
 
void Draw (int posX=0, int posY=0, ::Color tint={255, 255, 255, 255}) const
 Draw a Texture2D. More...
 
void DrawBillboard (const ::Camera &camera, ::Rectangle source, ::Vector3 position, ::Vector2 size, ::Color tint={255, 255, 255, 255}) const
 Draw a billboard texture defined by source. More...
 
void DrawBillboard (const ::Camera &camera, ::Rectangle source, Vector3 position, ::Vector3 up, Vector2 size, Vector2 origin, float rotation=0.0f, ::Color tint={255, 255, 255, 255}) const
 Draw a billboard texture defined by source and rotation. More...
 
void DrawBillboard (const ::Camera &camera, ::Vector3 position, float size, ::Color tint={255, 255, 255, 255}) const
 Draw a billboard texture. More...
 
+TextureUnmanagedGenMipmaps ()
 Generate GPU mipmaps for a texture.
 
+::Image GetData () const
 Get pixel data from GPU texture and return an Image.
 
int GetFormat () const
 Retrieves the format value for the object. More...
 
int GetHeight () const
 Retrieves the height value for the object. More...
 
unsigned int GetId () const
 Retrieves the id value for the object. More...
 
int GetMipmaps () const
 Retrieves the mipmaps value for the object. More...
 
+::Vector2 GetSize () const
 Retrieve the width and height of the texture.
 
int GetWidth () const
 Retrieves the width value for the object. More...
 
bool IsValid () const
 Determines whether or not the Texture has been loaded and is ready. More...
 
+void Load (const ::Image &image)
 Load texture from image data.
 
+void Load (const ::Image &image, int layoutType)
 Load cubemap from image, multiple image cubemap layouts supported.
 
+void Load (const std::string &fileName)
 Load texture from file into GPU memory (VRAM)
 
operator Image ()
 Get pixel data from GPU texture and return an Image.
 
+TextureUnmanagedoperator= (const ::Texture &texture)
 
+TextureUnmanagedSetFilter (int filterMode)
 Set texture scaling filter mode.
 
+TextureUnmanagedSetMaterial (::Material *material, int mapType=MATERIAL_MAP_NORMAL)
 Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
 
+TextureUnmanagedSetMaterial (const ::Material &material, int mapType=MATERIAL_MAP_NORMAL)
 
+TextureUnmanagedSetShaderValue (const ::Shader &shader, int locIndex)
 Set shader uniform value for texture (sampler2d)
 
+TextureUnmanagedSetShapes (const ::Rectangle &source)
 Set texture and rectangle to be used on shapes drawing.
 
+TextureUnmanagedSetWrap (int wrapMode)
 Set texture wrapping mode.
 
+void Unload ()
 Unload texture from GPU memory (VRAM)
 
+TextureUnmanagedUpdate (::Rectangle rec, const void *pixels)
 Update GPU texture rectangle with new data.
 
+TextureUnmanagedUpdate (const void *pixels)
 Update GPU texture with new data.
 
+ + + +

+Protected Member Functions

+void set (const ::Texture &texture)
 
+

Detailed Description

+

A Texture that is not managed by C++ RAII.

+

Make sure to Unload() this if needed, otherwise use raylib::Texture.

+
See also
raylib::Texture
+ +

Definition at line 21 of file TextureUnmanaged.hpp.

+

Constructor & Destructor Documentation

+ +

◆ TextureUnmanaged() [1/3]

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::TextureUnmanaged::TextureUnmanaged (const ::Imageimage)
+
+inline
+
+ +

Creates a texture from the given Image.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to create the texture from the given image.
+
+
+ +

Definition at line 56 of file TextureUnmanaged.hpp.

+ +

References Load().

+ +
+
+ +

◆ TextureUnmanaged() [2/3]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
raylib::TextureUnmanaged::TextureUnmanaged (const ::Imageimage,
int layout 
)
+
+inline
+
+ +

Load cubemap from image, multiple image cubemap layouts supported.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to create the texture from the given cubemap.
+
+
+
See also
LoadTextureCubemap()
+ +

Definition at line 65 of file TextureUnmanaged.hpp.

+ +

References Load().

+ +
+
+ +

◆ TextureUnmanaged() [3/3]

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::TextureUnmanaged::TextureUnmanaged (const std::string & fileName)
+
+inline
+
+ +

Load texture from file into GPU memory (VRAM)

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if failed to create the texture from the given file.
+
+
+ +

Definition at line 72 of file TextureUnmanaged.hpp.

+ +

References Load().

+ +
+
+

Member Function Documentation

+ +

◆ Draw() [1/6]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::TextureUnmanaged::Draw (::NPatchInfo nPatchInfo,
::Rectangle destRec,
::Vector2 origin = {0, 0},
float rotation = 0,
::Color tint = {255, 255, 255, 255} 
) const
+
+inline
+
+ +

Draws a texture (or part of it) that stretches or shrinks nicely.

+
See also
::DrawTextureNPatch()
+ +

Definition at line 238 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ Draw() [2/6]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::TextureUnmanaged::Draw (::Rectangle sourceRec,
::Rectangle destRec,
::Vector2 origin = {0, 0},
float rotation = 0,
::Color tint = {255, 255, 255, 255} 
) const
+
+inline
+
+ +

Draw a part of a texture defined by a rectangle with 'pro' parameters.

+
See also
::DrawTexturePro()
+ +

Definition at line 224 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ Draw() [3/6]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::TextureUnmanaged::Draw (::Rectangle sourceRec,
::Vector2 position = {0, 0},
::Color tint = {255, 255, 255, 255} 
) const
+
+inline
+
+ +

Draw a part of a texture defined by a rectangle.

+
See also
::DrawTextureRec()
+ +

Definition at line 215 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ Draw() [4/6]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void raylib::TextureUnmanaged::Draw (::Vector2 position,
::Color tint = {255, 255, 255, 255} 
) const
+
+inline
+
+ +

Draw a Texture2D with position defined as Vector2.

+
See also
::DrawTextureV()
+ +

Definition at line 199 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ Draw() [5/6]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::TextureUnmanaged::Draw (::Vector2 position,
float rotation,
float scale = 1.0f,
::Color tint = {255, 255, 255, 255} 
) const
+
+inline
+
+ +

Draw a Texture2D with extended parameters.

+
See also
::DrawTextureEx()
+ +

Definition at line 206 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ Draw() [6/6]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::TextureUnmanaged::Draw (int posX = 0,
int posY = 0,
::Color tint = {255, 255, 255, 255} 
) const
+
+inline
+
+ +

Draw a Texture2D.

+
See also
::DrawTexture()
+ +

Definition at line 190 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ DrawBillboard() [1/3]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::TextureUnmanaged::DrawBillboard (const ::Cameracamera,
::Rectangle source,
::Vector3 position,
::Vector2 size,
::Color tint = {255, 255, 255, 255} 
) const
+
+inline
+
+ +

Draw a billboard texture defined by source.

+
See also
::DrawBillboardRec()
+ +

Definition at line 262 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ DrawBillboard() [2/3]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::TextureUnmanaged::DrawBillboard (const ::Cameracamera,
::Rectangle source,
Vector3 position,
::Vector3 up,
Vector2 size,
Vector2 origin,
float rotation = 0.0f,
::Color tint = {255, 255, 255, 255} 
) const
+
+inline
+
+ +

Draw a billboard texture defined by source and rotation.

+
See also
::DrawBillboardPro()
+ +

Definition at line 276 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ DrawBillboard() [3/3]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::TextureUnmanaged::DrawBillboard (const ::Cameracamera,
::Vector3 position,
float size,
::Color tint = {255, 255, 255, 255} 
) const
+
+inline
+
+ +

Draw a billboard texture.

+
See also
::DrawBillboard()
+ +

Definition at line 253 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ GetFormat()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::TextureUnmanaged::GetFormat () const
+
+inline
+
+ +

Retrieves the format value for the object.

+
Returns
The format value of the object.
+ +

Definition at line 82 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ GetHeight()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::TextureUnmanaged::GetHeight () const
+
+inline
+
+ +

Retrieves the height value for the object.

+
Returns
The height value of the object.
+ +

Definition at line 80 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ GetId()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::TextureUnmanaged::GetId () const
+
+inline
+
+ +

Retrieves the id value for the object.

+
Returns
The id value of the object.
+ +

Definition at line 78 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ GetMipmaps()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::TextureUnmanaged::GetMipmaps () const
+
+inline
+
+ +

Retrieves the mipmaps value for the object.

+
Returns
The mipmaps value of the object.
+ +

Definition at line 81 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ GetWidth()

+ +
+
+ + + + + +
+ + + + + + + +
int raylib::TextureUnmanaged::GetWidth () const
+
+inline
+
+ +

Retrieves the width value for the object.

+
Returns
The width value of the object.
+ +

Definition at line 79 of file TextureUnmanaged.hpp.

+ +
+
+ +

◆ IsValid()

+ +
+
+ + + + + +
+ + + + + + + +
bool raylib::TextureUnmanaged::IsValid () const
+
+inline
+
+ +

Determines whether or not the Texture has been loaded and is ready.

+
Returns
True or false depending on whether the Texture has data.
+ +

Definition at line 322 of file TextureUnmanaged.hpp.

+ +

Referenced by Load().

+ +
+
+
+ + + + diff --git a/classraylib_1_1_vector2-members.html b/classraylib_1_1_vector2-members.html new file mode 100644 index 00000000..44d73bc0 --- /dev/null +++ b/classraylib_1_1_vector2-members.html @@ -0,0 +1,150 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Vector2 Member List
+
+
+ +

This is the complete list of members for raylib::Vector2, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Add(const ::Vector2 &vector2) constraylib::Vector2inline
Angle(const ::Vector2 &vector2) constraylib::Vector2inline
CheckCollision(::Rectangle rec) constraylib::Vector2inline
CheckCollision(::Vector2 center, float radius) constraylib::Vector2inline
CheckCollision(::Vector2 p1, ::Vector2 p2, ::Vector2 p3) constraylib::Vector2inline
CheckCollisionCircle(float radius1, ::Vector2 center2, float radius2) constraylib::Vector2inline
CheckCollisionCircle(float radius, ::Rectangle rec) constraylib::Vector2inline
CheckCollisionLines(::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2 *collisionPoint) constraylib::Vector2inline
CheckCollisionPointLine(::Vector2 p1, ::Vector2 p2, int threshold=1) constraylib::Vector2inline
Clamp(::Vector2 min, ::Vector2 max) constraylib::Vector2inline
Clamp(float min, float max) constraylib::Vector2inline
Distance(const ::Vector2 &vector2) constraylib::Vector2inline
DistanceSqr(::Vector2 v2) constraylib::Vector2inline
Divide(const ::Vector2 &vector2) constraylib::Vector2inline
Divide(const float div) constraylib::Vector2inline
DotProduct(const ::Vector2 &vector2) constraylib::Vector2inline
DrawCircle(float radius, ::Color color={0, 0, 0, 255}) constraylib::Vector2inline
DrawLine(::Vector2 endPos, ::Color color={0, 0, 0, 255}) const (defined in raylib::Vector2)raylib::Vector2inline
DrawLine(::Vector2 endPos, float thick, ::Color color={0, 0, 0, 255}) const (defined in raylib::Vector2)raylib::Vector2inline
DrawLineBezier(::Vector2 endPos, float thick, ::Color color={0, 0, 0, 255}) const (defined in raylib::Vector2)raylib::Vector2inline
DrawPixel(::Color color={0, 0, 0, 255}) const (defined in raylib::Vector2)raylib::Vector2inline
DrawPoly(int sides, float radius, float rotation, ::Color color={0, 0, 0, 255}) const (defined in raylib::Vector2)raylib::Vector2inline
DrawRectangle(::Vector2 size, ::Color color={0, 0, 0, 255}) const (defined in raylib::Vector2)raylib::Vector2inline
Equals(::Vector2 q) constraylib::Vector2inline
GetX() constraylib::Vector2inline
GetY() constraylib::Vector2inline
Invert() constraylib::Vector2inline
Length() constraylib::Vector2inline
LengthSqr() constraylib::Vector2inline
Lerp(const ::Vector2 &vector2, float amount) constraylib::Vector2inline
MoveTowards(const ::Vector2 &target, float maxDistance) constraylib::Vector2inline
Multiply(const ::Vector2 &vector2) constraylib::Vector2inline
Negate() constraylib::Vector2inline
Normalize() constraylib::Vector2inline
One()raylib::Vector2inlinestatic
operator std::string() const (defined in raylib::Vector2)raylib::Vector2inline
operator!=(const ::Vector2 &other) constraylib::Vector2inline
operator*(const ::Vector2 &vector2) constraylib::Vector2inline
operator*(const float scale) constraylib::Vector2inline
operator*=(const ::Vector2 &vector2)raylib::Vector2inline
operator*=(const float scale)raylib::Vector2inline
operator+(const ::Vector2 &vector2) constraylib::Vector2inline
operator+=(const ::Vector2 &vector2)raylib::Vector2inline
operator-(const ::Vector2 &vector2) constraylib::Vector2inline
operator-() constraylib::Vector2inline
operator-=(const ::Vector2 &vector2)raylib::Vector2inline
operator/(const ::Vector2 &vector2) constraylib::Vector2inline
operator/(const float div) constraylib::Vector2inline
operator/=(const ::Vector2 &vector2)raylib::Vector2inline
operator/=(const float div)raylib::Vector2inline
operator=(const ::Vector2 &vector2)raylib::Vector2inline
operator==(const ::Vector2 &other) constraylib::Vector2inline
Reflect(const ::Vector2 &normal) constraylib::Vector2inline
Rotate(float angle) constraylib::Vector2inline
Scale(const float scale) constraylib::Vector2inline
set(const ::Vector2 &vec) (defined in raylib::Vector2)raylib::Vector2inlineprotected
SetX(float value)raylib::Vector2inline
SetY(float value)raylib::Vector2inline
Subtract(const ::Vector2 &vector2) constraylib::Vector2inline
ToString() const (defined in raylib::Vector2)raylib::Vector2inline
Transform(::Matrix mat) constraylib::Vector2inline
Vector2(const ::Vector2 &vec) (defined in raylib::Vector2)raylib::Vector2inline
Vector2(float x, float y) (defined in raylib::Vector2)raylib::Vector2inline
Vector2(float x) (defined in raylib::Vector2)raylib::Vector2inline
Vector2() (defined in raylib::Vector2)raylib::Vector2inline
Zero()raylib::Vector2inlinestatic
+ + + + diff --git a/classraylib_1_1_vector2.html b/classraylib_1_1_vector2.html new file mode 100644 index 00000000..7f4d539b --- /dev/null +++ b/classraylib_1_1_vector2.html @@ -0,0 +1,480 @@ + + + + + + + +raylib-cpp: raylib::Vector2 Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Vector2 type. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Vector2 (const ::Vector2 &vec)
 
Vector2 (float x)
 
Vector2 (float x, float y)
 
+Vector2 Add (const ::Vector2 &vector2) const
 Add two vectors (v1 + v2)
 
+float Angle (const ::Vector2 &vector2) const
 Calculate angle from two vectors in X-axis.
 
+bool CheckCollision (::Rectangle rec) const
 Check if point is inside rectangle.
 
+bool CheckCollision (::Vector2 center, float radius) const
 Check if point is inside circle.
 
+bool CheckCollision (::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const
 Check if point is inside a triangle.
 
+bool CheckCollisionCircle (float radius, ::Rectangle rec) const
 Check collision between circle and rectangle.
 
+bool CheckCollisionCircle (float radius1, ::Vector2 center2, float radius2) const
 Check collision between two circles.
 
+bool CheckCollisionLines (::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2 *collisionPoint) const
 Check the collision between two lines defined by two points each, returns collision point by reference.
 
+bool CheckCollisionPointLine (::Vector2 p1, ::Vector2 p2, int threshold=1) const
 Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold].
 
+Vector2 Clamp (::Vector2 min, ::Vector2 max) const
 Clamp the components of the vector between.
 
+Vector2 Clamp (float min, float max) const
 // Clamp the magnitude of the vector between two min and max values
 
+float Distance (const ::Vector2 &vector2) const
 Calculate distance between two vectors.
 
+float DistanceSqr (::Vector2 v2) const
 Calculate square distance between two vectors.
 
+Vector2 Divide (const ::Vector2 &vector2) const
 Divide vector by vector.
 
+Vector2 Divide (const float div) const
 Divide vector by value.
 
+float DotProduct (const ::Vector2 &vector2) const
 Calculate two vectors dot product.
 
+void DrawCircle (float radius, ::Color color={0, 0, 0, 255}) const
 Draw a color-filled circle (Vector version)
 
+void DrawLine (::Vector2 endPos, ::Color color={0, 0, 0, 255}) const
 
+void DrawLine (::Vector2 endPos, float thick, ::Color color={0, 0, 0, 255}) const
 
+void DrawLineBezier (::Vector2 endPos, float thick, ::Color color={0, 0, 0, 255}) const
 
+void DrawPixel (::Color color={0, 0, 0, 255}) const
 
+void DrawPoly (int sides, float radius, float rotation, ::Color color={0, 0, 0, 255}) const
 
+void DrawRectangle (::Vector2 size, ::Color color={0, 0, 0, 255}) const
 
+int Equals (::Vector2 q) const
 Check whether two given vectors are almost equal.
 
float GetX () const
 Retrieves the x value for the object. More...
 
float GetY () const
 Retrieves the y value for the object. More...
 
+Vector2 Invert () const
 Invert the given vector.
 
+float Length () const
 Calculate vector length.
 
+float LengthSqr () const
 Calculate vector square length.
 
+Vector2 Lerp (const ::Vector2 &vector2, float amount) const
 Calculate linear interpolation between two vectors.
 
+Vector2 MoveTowards (const ::Vector2 &target, float maxDistance) const
 Move Vector towards target.
 
+Vector2 Multiply (const ::Vector2 &vector2) const
 Multiply vector by vector.
 
+Vector2 Negate () const
 Negate vector.
 
+Vector2 Normalize () const
 Normalize provided vector.
 
operator std::string () const
 
+bool operator!= (const ::Vector2 &other) const
 Determines if the vectors are not equal.
 
+Vector2 operator* (const ::Vector2 &vector2) const
 Multiply vector by vector.
 
+Vector2 operator* (const float scale) const
 Scale vector (multiply by value)
 
+Vector2operator*= (const ::Vector2 &vector2)
 Multiply vector by vector.
 
+Vector2operator*= (const float scale)
 Scale vector (multiply by value)
 
+Vector2 operator+ (const ::Vector2 &vector2) const
 Add two vectors (v1 + v2)
 
+Vector2operator+= (const ::Vector2 &vector2)
 Add two vectors (v1 + v2)
 
+Vector2 operator- () const
 Negate vector.
 
+Vector2 operator- (const ::Vector2 &vector2) const
 Subtract two vectors (v1 - v2)
 
+Vector2operator-= (const ::Vector2 &vector2)
 Subtract two vectors (v1 - v2)
 
+Vector2 operator/ (const ::Vector2 &vector2) const
 Divide vector by vector.
 
+Vector2 operator/ (const float div) const
 Divide vector by value.
 
+Vector2operator/= (const ::Vector2 &vector2)
 Divide vector by vector.
 
+Vector2operator/= (const float div)
 Divide vector by value.
 
+Vector2operator= (const ::Vector2 &vector2)
 Set the Vector2 to the same as the given Vector2.
 
+bool operator== (const ::Vector2 &other) const
 Determine whether or not the vectors are equal.
 
+Vector2 Reflect (const ::Vector2 &normal) const
 Calculate reflected vector to normal.
 
+Vector2 Rotate (float angle) const
 Rotate Vector by float in radians.
 
+Vector2 Scale (const float scale) const
 Scale vector (multiply by value)
 
void SetX (float value)
 Sets the x value for the object. More...
 
void SetY (float value)
 Sets the y value for the object. More...
 
+Vector2 Subtract (const ::Vector2 &vector2) const
 Subtract two vectors (v1 - v2)
 
+std::string ToString () const
 
+Vector2 Transform (::Matrix mat) const
 Transforms a Vector2 by a given Matrix.
 
+ + + + + + + +

+Static Public Member Functions

+static Vector2 One ()
 Vector with components value 1.0f.
 
+static Vector2 Zero ()
 Vector with components value 0.0f.
 
+ + + +

+Protected Member Functions

+void set (const ::Vector2 &vec)
 
+

Detailed Description

+

Vector2 type.

+ +

Definition at line 18 of file Vector2.hpp.

+

Member Function Documentation

+ +

◆ GetX()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Vector2::GetX () const
+
+inline
+
+ +

Retrieves the x value for the object.

+
Returns
The x value of the object.
+ +

Definition at line 26 of file Vector2.hpp.

+ +
+
+ +

◆ GetY()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Vector2::GetY () const
+
+inline
+
+ +

Retrieves the y value for the object.

+
Returns
The y value of the object.
+ +

Definition at line 27 of file Vector2.hpp.

+ +
+
+ +

◆ SetX()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Vector2::SetX (float value)
+
+inline
+
+ +

Sets the x value for the object.

+
Parameters
+ + +
valueThe value of which to set x to.
+
+
+ +

Definition at line 26 of file Vector2.hpp.

+ +
+
+ +

◆ SetY()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Vector2::SetY (float value)
+
+inline
+
+ +

Sets the y value for the object.

+
Parameters
+ + +
valueThe value of which to set y to.
+
+
+ +

Definition at line 27 of file Vector2.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_vector3-members.html b/classraylib_1_1_vector3-members.html new file mode 100644 index 00000000..e857b426 --- /dev/null +++ b/classraylib_1_1_vector3-members.html @@ -0,0 +1,155 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Vector3 Member List
+
+
+ +

This is the complete list of members for raylib::Vector3, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Add(const ::Vector3 &vector3) constraylib::Vector3inline
Barycenter(const ::Vector3 &a, const ::Vector3 &b, const ::Vector3 &c) const (defined in raylib::Vector3)raylib::Vector3inline
CheckCollision(float radius1, const ::Vector3 &center2, float radius2) constraylib::Vector3inline
CrossProduct(const ::Vector3 &vector3) const (defined in raylib::Vector3)raylib::Vector3inline
Distance(const ::Vector3 &vector3) const (defined in raylib::Vector3)raylib::Vector3inline
Divide(const ::Vector3 &vector3) constraylib::Vector3inline
Divide(const float div) constraylib::Vector3inline
DotProduct(const ::Vector3 &vector3) const (defined in raylib::Vector3)raylib::Vector3inline
DrawCircle3D(float radius, const ::Vector3 &rotationAxis, float rotationAngle, Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawCube(float width, float height, float length, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawCube(const ::Vector3 &size, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawCubeWires(float width, float height, float length, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawCubeWires(const ::Vector3 &size, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawCylinder(float radiusTop, float radiusBottom, float height, int slices, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawCylinderWires(float radiusTop, float radiusBottom, float height, int slices, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawLine3D(const ::Vector3 &endPos, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawPlane(const ::Vector2 &size, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawPoint3D(::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawSphere(float radius, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawSphere(float radius, int rings, int slices, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
DrawSphereWires(float radius, int rings, int slices, ::Color color) const (defined in raylib::Vector3)raylib::Vector3inline
GetX() constraylib::Vector3inline
GetY() constraylib::Vector3inline
GetZ() constraylib::Vector3inline
Length() constraylib::Vector3inline
LengthSqr() constraylib::Vector3inline
Lerp(const ::Vector3 &vector3, const float amount) const (defined in raylib::Vector3)raylib::Vector3inline
Max(const ::Vector3 &vector3) const (defined in raylib::Vector3)raylib::Vector3inline
Min(const ::Vector3 &vector3) const (defined in raylib::Vector3)raylib::Vector3inline
Multiply(const ::Vector3 &vector3) constraylib::Vector3inline
Negate() constraylib::Vector3inline
Normalize() const (defined in raylib::Vector3)raylib::Vector3inline
One() (defined in raylib::Vector3)raylib::Vector3inlinestatic
operator std::string() const (defined in raylib::Vector3)raylib::Vector3inline
operator!=(const ::Vector3 &other) const (defined in raylib::Vector3)raylib::Vector3inline
operator*(const ::Vector3 &vector3) constraylib::Vector3inline
operator*(const float scaler) constraylib::Vector3inline
operator*=(const ::Vector3 &vector3)raylib::Vector3inline
operator*=(const float scaler)raylib::Vector3inline
operator+(const ::Vector3 &vector3) constraylib::Vector3inline
operator+=(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator-(const ::Vector3 &vector3) constraylib::Vector3inline
operator-() constraylib::Vector3inline
operator-=(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator/(const ::Vector3 &vector3) constraylib::Vector3inline
operator/(const float div) constraylib::Vector3inline
operator/=(const ::Vector3 &vector3)raylib::Vector3inline
operator/=(const float div)raylib::Vector3inline
operator=(const ::Vector3 &vector3) (defined in raylib::Vector3)raylib::Vector3inline
operator==(const ::Vector3 &other) const (defined in raylib::Vector3)raylib::Vector3inline
OrthoNormalize(::Vector3 *vector3) (defined in raylib::Vector3)raylib::Vector3inline
Perpendicular() const (defined in raylib::Vector3)raylib::Vector3inline
Project(const ::Vector3 &vector3) const (defined in raylib::Vector3)raylib::Vector3inline
Reflect(const ::Vector3 &normal) const (defined in raylib::Vector3)raylib::Vector3inline
Reject(const ::Vector3 &vector3) const (defined in raylib::Vector3)raylib::Vector3inline
RotateByQuaternion(const ::Quaternion &quaternion) const (defined in raylib::Vector3)raylib::Vector3inline
Scale(const float scaler) constraylib::Vector3inline
set(const ::Vector3 &vec) (defined in raylib::Vector3)raylib::Vector3inlineprotected
SetX(float value)raylib::Vector3inline
SetY(float value)raylib::Vector3inline
SetZ(float value)raylib::Vector3inline
Subtract(const ::Vector3 &vector3) constraylib::Vector3inline
ToString() const (defined in raylib::Vector3)raylib::Vector3inline
Transform(const ::Matrix &matrix) const (defined in raylib::Vector3)raylib::Vector3inline
Vector3(const ::Vector3 &vec) (defined in raylib::Vector3)raylib::Vector3inline
Vector3(float x, float y, float z) (defined in raylib::Vector3)raylib::Vector3inline
Vector3(float x, float y) (defined in raylib::Vector3)raylib::Vector3inline
Vector3(float x) (defined in raylib::Vector3)raylib::Vector3inline
Vector3() (defined in raylib::Vector3)raylib::Vector3inline
Vector3(::Color color) (defined in raylib::Vector3)raylib::Vector3inline
Zero() (defined in raylib::Vector3)raylib::Vector3inlinestatic
+ + + + diff --git a/classraylib_1_1_vector3.html b/classraylib_1_1_vector3.html new file mode 100644 index 00000000..7415243d --- /dev/null +++ b/classraylib_1_1_vector3.html @@ -0,0 +1,533 @@ + + + + + + + +raylib-cpp: raylib::Vector3 Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Vector3 type. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Vector3 (::Color color)
 
Vector3 (const ::Vector3 &vec)
 
Vector3 (float x)
 
Vector3 (float x, float y)
 
Vector3 (float x, float y, float z)
 
+Vector3 Add (const ::Vector3 &vector3) const
 Add two vectors.
 
+Vector3 Barycenter (const ::Vector3 &a, const ::Vector3 &b, const ::Vector3 &c) const
 
+bool CheckCollision (float radius1, const ::Vector3 &center2, float radius2) const
 Detect collision between two spheres.
 
+Vector3 CrossProduct (const ::Vector3 &vector3) const
 
+float Distance (const ::Vector3 &vector3) const
 
+Vector3 Divide (const ::Vector3 &vector3) const
 Divide vector by vector.
 
+Vector3 Divide (const float div) const
 Divide a vector by a value.
 
+float DotProduct (const ::Vector3 &vector3) const
 
+void DrawCircle3D (float radius, const ::Vector3 &rotationAxis, float rotationAngle, Color color) const
 
+void DrawCube (const ::Vector3 &size, ::Color color) const
 
+void DrawCube (float width, float height, float length, ::Color color) const
 
+void DrawCubeWires (const ::Vector3 &size, ::Color color) const
 
+void DrawCubeWires (float width, float height, float length, ::Color color) const
 
+void DrawCylinder (float radiusTop, float radiusBottom, float height, int slices, ::Color color) const
 
+void DrawCylinderWires (float radiusTop, float radiusBottom, float height, int slices, ::Color color) const
 
+void DrawLine3D (const ::Vector3 &endPos, ::Color color) const
 
+void DrawPlane (const ::Vector2 &size, ::Color color) const
 
+void DrawPoint3D (::Color color) const
 
+void DrawSphere (float radius, ::Color color) const
 
+void DrawSphere (float radius, int rings, int slices, ::Color color) const
 
+void DrawSphereWires (float radius, int rings, int slices, ::Color color) const
 
float GetX () const
 Retrieves the x value for the object. More...
 
float GetY () const
 Retrieves the y value for the object. More...
 
float GetZ () const
 Retrieves the z value for the object. More...
 
+float Length () const
 Calculate vector length.
 
+float LengthSqr () const
 Calculate vector square length.
 
+Vector3 Lerp (const ::Vector3 &vector3, const float amount) const
 
+Vector3 Max (const ::Vector3 &vector3) const
 
+Vector3 Min (const ::Vector3 &vector3) const
 
+Vector3 Multiply (const ::Vector3 &vector3) const
 Multiply vector by vector.
 
+Vector3 Negate () const
 Negate provided vector (invert direction)
 
+Vector3 Normalize () const
 
operator std::string () const
 
+bool operator!= (const ::Vector3 &other) const
 
+Vector3 operator* (const ::Vector3 &vector3) const
 Multiply vector by vector.
 
+Vector3 operator* (const float scaler) const
 Multiply vector by scalar.
 
+Vector3operator*= (const ::Vector3 &vector3)
 Multiply vector by vector.
 
+Vector3operator*= (const float scaler)
 Multiply vector by scalar.
 
+Vector3 operator+ (const ::Vector3 &vector3) const
 Add two vectors.
 
+Vector3operator+= (const ::Vector3 &vector3)
 
+Vector3 operator- () const
 Negate provided vector (invert direction)
 
+Vector3 operator- (const ::Vector3 &vector3) const
 Subtract two vectors.
 
+Vector3operator-= (const ::Vector3 &vector3)
 
+Vector3 operator/ (const ::Vector3 &vector3) const
 Divide vector by vector.
 
+Vector3 operator/ (const float div) const
 Divide a vector by a value.
 
+Vector3operator/= (const ::Vector3 &vector3)
 Divide vector by vector.
 
+Vector3operator/= (const float div)
 Divide a vector by a value.
 
+Vector3operator= (const ::Vector3 &vector3)
 
+bool operator== (const ::Vector3 &other) const
 
+void OrthoNormalize (::Vector3 *vector3)
 
+Vector3 Perpendicular () const
 
+Vector3 Project (const ::Vector3 &vector3) const
 
+Vector3 Reflect (const ::Vector3 &normal) const
 
+Vector3 Reject (const ::Vector3 &vector3) const
 
+Vector3 RotateByQuaternion (const ::Quaternion &quaternion) const
 
+Vector3 Scale (const float scaler) const
 Multiply vector by scalar.
 
void SetX (float value)
 Sets the x value for the object. More...
 
void SetY (float value)
 Sets the y value for the object. More...
 
void SetZ (float value)
 Sets the z value for the object. More...
 
+Vector3 Subtract (const ::Vector3 &vector3) const
 Subtract two vectors.
 
+std::string ToString () const
 
+Vector3 Transform (const ::Matrix &matrix) const
 
+ + + + + +

+Static Public Member Functions

+static Vector3 One ()
 
+static Vector3 Zero ()
 
+ + + +

+Protected Member Functions

+void set (const ::Vector3 &vec)
 
+

Detailed Description

+

Vector3 type.

+ +

Definition at line 18 of file Vector3.hpp.

+

Member Function Documentation

+ +

◆ GetX()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Vector3::GetX () const
+
+inline
+
+ +

Retrieves the x value for the object.

+
Returns
The x value of the object.
+ +

Definition at line 29 of file Vector3.hpp.

+ +
+
+ +

◆ GetY()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Vector3::GetY () const
+
+inline
+
+ +

Retrieves the y value for the object.

+
Returns
The y value of the object.
+ +

Definition at line 30 of file Vector3.hpp.

+ +
+
+ +

◆ GetZ()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Vector3::GetZ () const
+
+inline
+
+ +

Retrieves the z value for the object.

+
Returns
The z value of the object.
+ +

Definition at line 31 of file Vector3.hpp.

+ +
+
+ +

◆ SetX()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Vector3::SetX (float value)
+
+inline
+
+ +

Sets the x value for the object.

+
Parameters
+ + +
valueThe value of which to set x to.
+
+
+ +

Definition at line 29 of file Vector3.hpp.

+ +
+
+ +

◆ SetY()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Vector3::SetY (float value)
+
+inline
+
+ +

Sets the y value for the object.

+
Parameters
+ + +
valueThe value of which to set y to.
+
+
+ +

Definition at line 30 of file Vector3.hpp.

+ +
+
+ +

◆ SetZ()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Vector3::SetZ (float value)
+
+inline
+
+ +

Sets the z value for the object.

+
Parameters
+ + +
valueThe value of which to set z to.
+
+
+ +

Definition at line 31 of file Vector3.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_vector4-members.html b/classraylib_1_1_vector4-members.html new file mode 100644 index 00000000..ba2b42df --- /dev/null +++ b/classraylib_1_1_vector4-members.html @@ -0,0 +1,129 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Vector4 Member List
+
+
+ +

This is the complete list of members for raylib::Vector4, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ColorFromNormalized() const (defined in raylib::Vector4)raylib::Vector4inline
FromAxisAngle(const ::Vector3 &axis, const float angle) (defined in raylib::Vector4)raylib::Vector4inlinestatic
FromEuler(const float pitch, const float yaw, const float roll) (defined in raylib::Vector4)raylib::Vector4inlinestatic
FromEuler(const ::Vector3 &vector3) (defined in raylib::Vector4)raylib::Vector4inlinestatic
FromMatrix(const ::Matrix &matrix) (defined in raylib::Vector4)raylib::Vector4inlinestatic
FromVector3ToVector3(const ::Vector3 &from, const ::Vector3 &to) (defined in raylib::Vector4)raylib::Vector4inlinestatic
GetW() constraylib::Vector4inline
GetX() constraylib::Vector4inline
GetY() constraylib::Vector4inline
GetZ() constraylib::Vector4inline
Identity() (defined in raylib::Vector4)raylib::Vector4inlinestatic
Invert() const (defined in raylib::Vector4)raylib::Vector4inline
Length() const (defined in raylib::Vector4)raylib::Vector4inline
Lerp(const ::Vector4 &vector4, float amount) const (defined in raylib::Vector4)raylib::Vector4inline
Multiply(const ::Vector4 &vector4) const (defined in raylib::Vector4)raylib::Vector4inline
Nlerp(const ::Vector4 &vector4, float amount) const (defined in raylib::Vector4)raylib::Vector4inline
Normalize() const (defined in raylib::Vector4)raylib::Vector4inline
operator Color() const (defined in raylib::Vector4)raylib::Vector4inline
operator std::string() const (defined in raylib::Vector4)raylib::Vector4inline
operator!=(const ::Vector4 &other) const (defined in raylib::Vector4)raylib::Vector4inline
operator*(const ::Vector4 &vector4) const (defined in raylib::Vector4)raylib::Vector4inline
operator::Rectangle() const (defined in raylib::Vector4)raylib::Vector4inline
operator=(const ::Vector4 &vector4) (defined in raylib::Vector4)raylib::Vector4inline
operator==(const ::Vector4 &other) const (defined in raylib::Vector4)raylib::Vector4inline
set(const ::Vector4 &vec4) (defined in raylib::Vector4)raylib::Vector4inlineprotected
SetW(float value)raylib::Vector4inline
SetX(float value)raylib::Vector4inline
SetY(float value)raylib::Vector4inline
SetZ(float value)raylib::Vector4inline
Slerp(const ::Vector4 &vector4, float amount) const (defined in raylib::Vector4)raylib::Vector4inline
ToAxisAngle(::Vector3 *outAxis, float *outAngle) const (defined in raylib::Vector4)raylib::Vector4inline
ToAxisAngle() constraylib::Vector4inline
ToEuler() const (defined in raylib::Vector4)raylib::Vector4inline
ToMatrix() const (defined in raylib::Vector4)raylib::Vector4inline
ToRectangle() const (defined in raylib::Vector4)raylib::Vector4inline
ToString() const (defined in raylib::Vector4)raylib::Vector4inline
Transform(const ::Matrix &matrix) const (defined in raylib::Vector4)raylib::Vector4inline
Vector4(const ::Vector4 &vec) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(float x, float y, float z, float w) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(float x, float y, float z) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(float x, float y) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(float x) (defined in raylib::Vector4)raylib::Vector4inline
Vector4() (defined in raylib::Vector4)raylib::Vector4inline
Vector4(::Rectangle rectangle) (defined in raylib::Vector4)raylib::Vector4inline
Vector4(::Color color) (defined in raylib::Vector4)raylib::Vector4inline
+ + + + diff --git a/classraylib_1_1_vector4.html b/classraylib_1_1_vector4.html new file mode 100644 index 00000000..df7dc8cd --- /dev/null +++ b/classraylib_1_1_vector4.html @@ -0,0 +1,501 @@ + + + + + + + +raylib-cpp: raylib::Vector4 Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Vector4 type. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Vector4 (::Color color)
 
Vector4 (::Rectangle rectangle)
 
Vector4 (const ::Vector4 &vec)
 
Vector4 (float x)
 
Vector4 (float x, float y)
 
Vector4 (float x, float y, float z)
 
Vector4 (float x, float y, float z, float w)
 
+Color ColorFromNormalized () const
 
float GetW () const
 Retrieves the w value for the object. More...
 
float GetX () const
 Retrieves the x value for the object. More...
 
float GetY () const
 Retrieves the y value for the object. More...
 
float GetZ () const
 Retrieves the z value for the object. More...
 
+Vector4 Invert () const
 
+float Length () const
 
+Vector4 Lerp (const ::Vector4 &vector4, float amount) const
 
+Vector4 Multiply (const ::Vector4 &vector4) const
 
+Vector4 Nlerp (const ::Vector4 &vector4, float amount) const
 
+Vector4 Normalize () const
 
operator Color () const
 
operator std::string () const
 
+bool operator!= (const ::Vector4 &other) const
 
+Vector4 operator* (const ::Vector4 &vector4) const
 
operator::Rectangle () const
 
+Vector4operator= (const ::Vector4 &vector4)
 
+bool operator== (const ::Vector4 &other) const
 
void SetW (float value)
 Sets the w value for the object. More...
 
void SetX (float value)
 Sets the x value for the object. More...
 
void SetY (float value)
 Sets the y value for the object. More...
 
void SetZ (float value)
 Sets the z value for the object. More...
 
+Vector4 Slerp (const ::Vector4 &vector4, float amount) const
 
+std::pair< Vector3, float > ToAxisAngle () const
 Get the rotation angle and axis for a given quaternion.
 
+void ToAxisAngle (::Vector3 *outAxis, float *outAngle) const
 
+Vector3 ToEuler () const
 
+Matrix ToMatrix () const
 
+::Rectangle ToRectangle () const
 
+std::string ToString () const
 
+Vector4 Transform (const ::Matrix &matrix) const
 
+ + + + + + + + + + + + + +

+Static Public Member Functions

+static Vector4 FromAxisAngle (const ::Vector3 &axis, const float angle)
 
+static Vector4 FromEuler (const ::Vector3 &vector3)
 
+static Vector4 FromEuler (const float pitch, const float yaw, const float roll)
 
+static Vector4 FromMatrix (const ::Matrix &matrix)
 
+static Vector4 FromVector3ToVector3 (const ::Vector3 &from, const ::Vector3 &to)
 
+static Vector4 Identity ()
 
+ + + +

+Protected Member Functions

+void set (const ::Vector4 &vec4)
 
+

Detailed Description

+

Vector4 type.

+ +

Definition at line 19 of file Vector4.hpp.

+

Member Function Documentation

+ +

◆ GetW()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Vector4::GetW () const
+
+inline
+
+ +

Retrieves the w value for the object.

+
Returns
The w value of the object.
+ +

Definition at line 35 of file Vector4.hpp.

+ +
+
+ +

◆ GetX()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Vector4::GetX () const
+
+inline
+
+ +

Retrieves the x value for the object.

+
Returns
The x value of the object.
+ +

Definition at line 32 of file Vector4.hpp.

+ +
+
+ +

◆ GetY()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Vector4::GetY () const
+
+inline
+
+ +

Retrieves the y value for the object.

+
Returns
The y value of the object.
+ +

Definition at line 33 of file Vector4.hpp.

+ +
+
+ +

◆ GetZ()

+ +
+
+ + + + + +
+ + + + + + + +
float raylib::Vector4::GetZ () const
+
+inline
+
+ +

Retrieves the z value for the object.

+
Returns
The z value of the object.
+ +

Definition at line 34 of file Vector4.hpp.

+ +
+
+ +

◆ SetW()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Vector4::SetW (float value)
+
+inline
+
+ +

Sets the w value for the object.

+
Parameters
+ + +
valueThe value of which to set w to.
+
+
+ +

Definition at line 35 of file Vector4.hpp.

+ +
+
+ +

◆ SetX()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Vector4::SetX (float value)
+
+inline
+
+ +

Sets the x value for the object.

+
Parameters
+ + +
valueThe value of which to set x to.
+
+
+ +

Definition at line 32 of file Vector4.hpp.

+ +
+
+ +

◆ SetY()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Vector4::SetY (float value)
+
+inline
+
+ +

Sets the y value for the object.

+
Parameters
+ + +
valueThe value of which to set y to.
+
+
+ +

Definition at line 33 of file Vector4.hpp.

+ +
+
+ +

◆ SetZ()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Vector4::SetZ (float value)
+
+inline
+
+ +

Sets the z value for the object.

+
Parameters
+ + +
valueThe value of which to set z to.
+
+
+ +

Definition at line 34 of file Vector4.hpp.

+ +
+
+
+ + + + diff --git a/classraylib_1_1_vr_stereo_config-members.html b/classraylib_1_1_vr_stereo_config-members.html new file mode 100644 index 00000000..285d20e5 --- /dev/null +++ b/classraylib_1_1_vr_stereo_config-members.html @@ -0,0 +1,91 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::VrStereoConfig Member List
+
+
+ +

This is the complete list of members for raylib::VrStereoConfig, including all inherited members.

+ + + + + + + + +
BeginMode()raylib::VrStereoConfiginline
EndMode()raylib::VrStereoConfiginline
Load(const ::VrDeviceInfo &info)raylib::VrStereoConfiginline
set(const ::VrStereoConfig &config) (defined in raylib::VrStereoConfig)raylib::VrStereoConfiginlineprotected
Unload()raylib::VrStereoConfiginline
VrStereoConfig(const ::VrDeviceInfo &info) (defined in raylib::VrStereoConfig)raylib::VrStereoConfiginline
~VrStereoConfig()raylib::VrStereoConfiginline
+ + + + diff --git a/classraylib_1_1_vr_stereo_config.html b/classraylib_1_1_vr_stereo_config.html new file mode 100644 index 00000000..4e4fef5e --- /dev/null +++ b/classraylib_1_1_vr_stereo_config.html @@ -0,0 +1,125 @@ + + + + + + + +raylib-cpp: raylib::VrStereoConfig Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::VrStereoConfig Class Reference
+
+
+ +

VR stereo config functions for VR simulator. + More...

+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

VrStereoConfig (const ::VrDeviceInfo &info)
 
~VrStereoConfig ()
 Unload VR stereo config.
 
+VrStereoConfigBeginMode ()
 Begin stereo rendering.
 
+VrStereoConfigEndMode ()
 End stereo rendering.
 
+void Load (const ::VrDeviceInfo &info)
 Load VR stereo config for VR simulator device parameters.
 
+void Unload ()
 Unload VR stereo config.
 
+ + + +

+Protected Member Functions

+void set (const ::VrStereoConfig &config)
 
+

Detailed Description

+

VR stereo config functions for VR simulator.

+ +

Definition at line 11 of file VrStereoConfig.hpp.

+
+ + + + diff --git a/classraylib_1_1_wave-members.html b/classraylib_1_1_wave-members.html new file mode 100644 index 00000000..6d9533e1 --- /dev/null +++ b/classraylib_1_1_wave-members.html @@ -0,0 +1,113 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Wave Member List
+
+
+ +

This is the complete list of members for raylib::Wave, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Copy() constraylib::Waveinline
Crop(int initSample, int finalSample)raylib::Waveinline
Export(const std::string &fileName)raylib::Waveinline
ExportAsCode(const std::string &fileName)raylib::Waveinline
Format(int SampleRate, int SampleSize, int Channels=2)raylib::Waveinline
GetChannels() constraylib::Waveinline
GetData() constraylib::Waveinline
GetFrameCount() constraylib::Waveinline
GetSampleRate() constraylib::Waveinline
GetSampleSize() constraylib::Waveinline
IsValid() constraylib::Waveinline
Load(const std::string &fileName)raylib::Waveinline
Load(const std::string &fileType, const unsigned char *fileData, int dataSize)raylib::Waveinline
LoadSamples()raylib::Waveinline
LoadSound()raylib::Waveinline
operator::Sound()raylib::Waveinline
operator=(const ::Wave &wave) (defined in raylib::Wave)raylib::Waveinline
operator=(const Wave &other) (defined in raylib::Wave)raylib::Waveinline
operator=(Wave &&other) noexcept (defined in raylib::Wave)raylib::Waveinline
set(const ::Wave &wave) (defined in raylib::Wave)raylib::Waveinlineprotected
Unload()raylib::Waveinline
UnloadSamples(float *samples)raylib::Waveinlinestatic
Wave(const ::Wave &wave) (defined in raylib::Wave)raylib::Waveinline
Wave(unsigned int frameCount=0, unsigned int sampleRate=0, unsigned int sampleSize=0, unsigned int channels=0, void *data=nullptr) (defined in raylib::Wave)raylib::Waveinline
Wave(const std::string &fileName)raylib::Waveinline
Wave(const std::string &fileType, const unsigned char *fileData, int dataSize)raylib::Waveinline
Wave(const Wave &other) (defined in raylib::Wave)raylib::Waveinline
Wave(Wave &&other) (defined in raylib::Wave)raylib::Waveinline
~Wave()raylib::Waveinline
+ + + + diff --git a/classraylib_1_1_wave.html b/classraylib_1_1_wave.html new file mode 100644 index 00000000..349b2b91 --- /dev/null +++ b/classraylib_1_1_wave.html @@ -0,0 +1,573 @@ + + + + + + + +raylib-cpp: raylib::Wave Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+ +

Wave type, defines audio wave data. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Wave (const ::Wave &wave)
 
 Wave (const std::string &fileName)
 Load wave data from file. More...
 
 Wave (const std::string &fileType, const unsigned char *fileData, int dataSize)
 Load wave from memory buffer, fileType refers to extension: i.e. More...
 
Wave (const Wave &other)
 
Wave (unsigned int frameCount=0, unsigned int sampleRate=0, unsigned int sampleSize=0, unsigned int channels=0, void *data=nullptr)
 
Wave (Wave &&other)
 
~Wave ()
 Unload wave data.
 
+::Wave Copy () const
 Copy a wave to a new wave.
 
+WaveCrop (int initSample, int finalSample)
 Crop a wave to defined samples range.
 
+bool Export (const std::string &fileName)
 Export wave data to file, returns true on success.
 
+bool ExportAsCode (const std::string &fileName)
 Export wave sample data to code (.h), returns true on success.
 
+WaveFormat (int SampleRate, int SampleSize, int Channels=2)
 Convert wave data to desired format.
 
unsigned int GetChannels () const
 Retrieves the channels value for the object. More...
 
void * GetData () const
 Retrieves the data value for the object. More...
 
unsigned int GetFrameCount () const
 Retrieves the frameCount value for the object. More...
 
unsigned int GetSampleRate () const
 Retrieves the sampleRate value for the object. More...
 
unsigned int GetSampleSize () const
 Retrieves the sampleSize value for the object. More...
 
bool IsValid () const
 Retrieve whether or not the Wave data has been loaded. More...
 
void Load (const std::string &fileName)
 Load wave data from file. More...
 
void Load (const std::string &fileType, const unsigned char *fileData, int dataSize)
 Load wave from memory buffer, fileType refers to extension: i.e. More...
 
+float * LoadSamples ()
 Load samples data from wave as a floats array.
 
+::Sound LoadSound ()
 Load sound from wave data.
 
operator::Sound ()
 Load sound from wave data.
 
+Waveoperator= (const ::Wave &wave)
 
+Waveoperator= (const Wave &other)
 
+Waveoperator= (Wave &&other) noexcept
 
+void Unload ()
 Unload wave data.
 
+ + + + +

+Static Public Member Functions

+static void UnloadSamples (float *samples)
 Unload samples data loaded with LoadWaveSamples()
 
+ + + +

+Protected Member Functions

+void set (const ::Wave &wave)
 
+

Detailed Description

+

Wave type, defines audio wave data.

+ +

Definition at line 14 of file Wave.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Wave() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
raylib::Wave::Wave (const std::string & fileName)
+
+inline
+
+ +

Load wave data from file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the Wave failed to load.
+
+
+ +

Definition at line 33 of file Wave.hpp.

+ +

References Load().

+ +
+
+ +

◆ Wave() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Wave::Wave (const std::string & fileType,
const unsigned char * fileData,
int dataSize 
)
+
+inline
+
+ +

Load wave from memory buffer, fileType refers to extension: i.e.

+

"wav"

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the Wave failed to load.
+
+
+ +

Definition at line 40 of file Wave.hpp.

+ +

References Load().

+ +
+
+

Member Function Documentation

+ +

◆ GetChannels()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::Wave::GetChannels () const
+
+inline
+
+ +

Retrieves the channels value for the object.

+
Returns
The channels value of the object.
+ +

Definition at line 64 of file Wave.hpp.

+ +
+
+ +

◆ GetData()

+ +
+
+ + + + + +
+ + + + + + + +
void* raylib::Wave::GetData () const
+
+inline
+
+ +

Retrieves the data value for the object.

+
Returns
The data value of the object.
+ +

Definition at line 65 of file Wave.hpp.

+ +
+
+ +

◆ GetFrameCount()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::Wave::GetFrameCount () const
+
+inline
+
+ +

Retrieves the frameCount value for the object.

+
Returns
The frameCount value of the object.
+ +

Definition at line 61 of file Wave.hpp.

+ +
+
+ +

◆ GetSampleRate()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::Wave::GetSampleRate () const
+
+inline
+
+ +

Retrieves the sampleRate value for the object.

+
Returns
The sampleRate value of the object.
+ +

Definition at line 62 of file Wave.hpp.

+ +
+
+ +

◆ GetSampleSize()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int raylib::Wave::GetSampleSize () const
+
+inline
+
+ +

Retrieves the sampleSize value for the object.

+
Returns
The sampleSize value of the object.
+ +

Definition at line 63 of file Wave.hpp.

+ +
+
+ +

◆ IsValid()

+ +
+
+ + + + + +
+ + + + + + + +
bool raylib::Wave::IsValid () const
+
+inline
+
+ +

Retrieve whether or not the Wave data has been loaded.

+
Returns
True or false depending on whether the wave data has been loaded.
+ +

Definition at line 197 of file Wave.hpp.

+ +

Referenced by Load().

+ +
+
+ +

◆ Load() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Wave::Load (const std::string & fileName)
+
+inline
+
+ +

Load wave data from file.

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the Wave failed to load.
+
+
+ +

Definition at line 173 of file Wave.hpp.

+ +

References IsValid().

+ +

Referenced by Wave().

+ +
+
+ +

◆ Load() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::Wave::Load (const std::string & fileType,
const unsigned char * fileData,
int dataSize 
)
+
+inline
+
+ +

Load wave from memory buffer, fileType refers to extension: i.e.

+

"wav"

+
Exceptions
+ + +
raylib::RaylibExceptionThrows if the Wave failed to load.
+
+
+ +

Definition at line 185 of file Wave.hpp.

+ +

References IsValid().

+ +
+
+
+ + + + diff --git a/classraylib_1_1_window-members.html b/classraylib_1_1_window-members.html new file mode 100644 index 00000000..e018052c --- /dev/null +++ b/classraylib_1_1_window-members.html @@ -0,0 +1,139 @@ + + + + + + + +raylib-cpp: Member List + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raylib::Window Member List
+
+
+ +

This is the complete list of members for raylib::Window, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BeginDrawing()raylib::Windowinline
ClearBackground(const ::Color &color=BLACK)raylib::Windowinline
ClearState(unsigned int flag)raylib::Windowinline
Close()raylib::Windowinline
DrawFPS(int posX=10, int posY=10) constraylib::Windowinline
EndDrawing()raylib::Windowinline
GetClipboardText()raylib::Windowinline
GetFPS() constraylib::Windowinline
GetFrameTime() constraylib::Windowinline
GetHandle() constraylib::Windowinline
GetHeight() constraylib::Windowinline
GetPosition() constraylib::Windowinline
GetRenderHeight() constraylib::Windowinline
GetRenderWidth() constraylib::Windowinline
GetScaleDPI() constraylib::Windowinline
GetSize() constraylib::Windowinline
GetTime() constraylib::Windowinline
GetWidth() constraylib::Windowinline
Init(int width=800, int height=450, const std::string &title="raylib", unsigned int flags=0)raylib::Windowinline
IsCursorOnScreen() constraylib::Windowinline
IsFocused() constraylib::Windowinline
IsFullscreen() constraylib::Windowinline
IsHidden() constraylib::Windowinline
IsMaximized() constraylib::Windowinline
IsMinimized() constraylib::Windowinline
IsReady()raylib::Windowinlinestatic
IsResized() constraylib::Windowinline
IsState(unsigned int flag) constraylib::Windowinline
Maximize()raylib::Windowinline
Minimize()raylib::Windowinline
Restore()raylib::Windowinline
SetClipboardText(const std::string &text)raylib::Windowinline
SetConfigFlags(unsigned int flags)raylib::Windowinline
SetExitKey(int key)raylib::Windowinline
SetFocused()raylib::Windowinline
SetFullscreen(bool fullscreen)raylib::Windowinline
SetIcon(const ::Image &image)raylib::Windowinline
SetIcons(Image *images, int count)raylib::Windowinline
SetMinSize(int width, int height)raylib::Windowinline
SetMinSize(const ::Vector2 &size)raylib::Windowinline
SetMonitor(int monitor)raylib::Windowinline
SetOpacity(float opacity)raylib::Windowinline
SetPosition(int x, int y)raylib::Windowinline
SetPosition(const ::Vector2 &position)raylib::Windowinline
SetSize(int width, int height)raylib::Windowinline
SetSize(const ::Vector2 &size)raylib::Windowinline
SetState(unsigned int flag)raylib::Windowinline
SetTargetFPS(int fps)raylib::Windowinline
SetTitle(const std::string &title)raylib::Windowinline
ShouldClose() constraylib::Windowinline
ToggleBorderless()raylib::Windowinline
ToggleFullscreen()raylib::Windowinline
Window()raylib::Windowinline
Window(int width, int height, const std::string &title="raylib", unsigned int flags=0)raylib::Windowinline
~Window()raylib::Windowinline
+ + + + diff --git a/classraylib_1_1_window.html b/classraylib_1_1_window.html new file mode 100644 index 00000000..37fd9951 --- /dev/null +++ b/classraylib_1_1_window.html @@ -0,0 +1,533 @@ + + + + + + + +raylib-cpp: raylib::Window Class Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raylib::Window Class Reference
+
+
+ +

Window and Graphics Device Functions. + More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Window ()
 Build a Window object, but defer the initialization. More...
 
 Window (int width, int height, const std::string &title="raylib", unsigned int flags=0)
 Initialize window and OpenGL context. More...
 
~Window ()
 Close window and unload OpenGL context.
 
+WindowBeginDrawing ()
 Setup canvas (framebuffer) to start drawing.
 
+WindowClearBackground (const ::Color &color=BLACK)
 Clear window with given color.
 
+WindowClearState (unsigned int flag)
 Clear window configuration state flags.
 
+void Close ()
 Close window and unload OpenGL context.
 
+void DrawFPS (int posX=10, int posY=10) const
 Draw current FPS.
 
+WindowEndDrawing ()
 End canvas drawing and swap buffers (double buffering)
 
+const std::string GetClipboardText ()
 Get clipboard text content.
 
+int GetFPS () const
 Returns current FPS.
 
+float GetFrameTime () const
 Returns time in seconds for last frame drawn.
 
+void * GetHandle () const
 Get native window handle.
 
+int GetHeight () const
 Get current screen height.
 
+Vector2 GetPosition () const
 Get window position XY on monitor.
 
+int GetRenderHeight () const
 Get current render height (it considers HiDPI)
 
+int GetRenderWidth () const
 Get current render width (it considers HiDPI)
 
+Vector2 GetScaleDPI () const
 Get window scale DPI factor.
 
+Vector2 GetSize () const
 Get the screen's width and height.
 
+double GetTime () const
 Returns elapsed time in seconds since InitWindow()
 
+int GetWidth () const
 Get current screen width.
 
void Init (int width=800, int height=450, const std::string &title="raylib", unsigned int flags=0)
 Initializes the window. More...
 
+bool IsCursorOnScreen () const
 Check if cursor is on the current screen.
 
+bool IsFocused () const
 Check if window is currently focused.
 
+bool IsFullscreen () const
 Check if window is currently fullscreen.
 
+bool IsHidden () const
 Check if window is currently hidden.
 
+bool IsMaximized () const
 Check if window is currently minimized.
 
+bool IsMinimized () const
 Check if window is currently minimized.
 
+bool IsResized () const
 Check if window has been resized last frame.
 
+bool IsState (unsigned int flag) const
 Check if one specific window flag is enabled.
 
+WindowMaximize ()
 Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
 
+WindowMinimize ()
 Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
 
+WindowRestore ()
 Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
 
+void SetClipboardText (const std::string &text)
 Set clipboard text content.
 
void SetConfigFlags (unsigned int flags)
 Sets the configuration flags for raylib. More...
 
+void SetExitKey (int key)
 Set a custom key to exit program (default is ESC)
 
+WindowSetFocused ()
 Set window focused (only PLATFORM_DESKTOP)
 
+WindowSetFullscreen (bool fullscreen)
 Set whether or not the application should be fullscreen.
 
+WindowSetIcon (const ::Image &image)
 Set icon for window.
 
+WindowSetIcons (Image *images, int count)
 Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
 
+WindowSetMinSize (const ::Vector2 &size)
 Set window minimum dimensions.
 
+WindowSetMinSize (int width, int height)
 Set window minimum dimensions.
 
+WindowSetMonitor (int monitor)
 Set monitor for the current window.
 
+WindowSetOpacity (float opacity)
 Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
 
+WindowSetPosition (const ::Vector2 &position)
 Set window position on screen.
 
+WindowSetPosition (int x, int y)
 Set window position on screen.
 
+WindowSetSize (const ::Vector2 &size)
 Set window dimensions.
 
+WindowSetSize (int width, int height)
 Set window dimensions.
 
+WindowSetState (unsigned int flag)
 Set window configuration state using flags.
 
+WindowSetTargetFPS (int fps)
 Set target FPS (maximum)
 
+WindowSetTitle (const std::string &title)
 Set title for window.
 
+bool ShouldClose () const
 Check if KEY_ESCAPE pressed or Close icon pressed.
 
+WindowToggleBorderless ()
 Toggle window state: borderless/windowed.
 
+WindowToggleFullscreen ()
 Toggle window state: fullscreen/windowed.
 
+ + + + +

+Static Public Member Functions

+static bool IsReady ()
 Check if window has been initialized successfully.
 
+

Detailed Description

+

Window and Graphics Device Functions.

+ +

Definition at line 14 of file Window.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Window() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
raylib::Window::Window ()
+
+inline
+
+ +

Build a Window object, but defer the initialization.

+

Ensure you call Init() manually.

+
See also
Init()
+ +

Definition at line 21 of file Window.hpp.

+ +
+
+ +

◆ Window() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
raylib::Window::Window (int width,
int height,
const std::string & title = "raylib",
unsigned int flags = 0 
)
+
+inline
+
+ +

Initialize window and OpenGL context.

+
Parameters
+ + + + + +
widthThe width of the window.
heightThe height of the window.
titleThe desired title of the window.
flagsThe ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details.
+
+
+
See also
::SetConfigFlags()
+
+ConfigFlags
+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the window failed to initiate.
+
+
+ +

Definition at line 38 of file Window.hpp.

+ +

References Init().

+ +
+
+

Member Function Documentation

+ +

◆ Init()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void raylib::Window::Init (int width = 800,
int height = 450,
const std::string & title = "raylib",
unsigned int flags = 0 
)
+
+inline
+
+ +

Initializes the window.

+
Parameters
+ + + + + +
widthThe width of the window.
heightThe height of the window.
titleThe desired title of the window.
flagsThe ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details.
+
+
+
See also
::SetConfigFlags()
+
+ConfigFlags
+
Exceptions
+ + +
raylib::RaylibExceptionThrown if the window failed to initiate.
+
+
+ +

Definition at line 60 of file Window.hpp.

+ +

References raylib::InitWindow(), and SetConfigFlags().

+ +

Referenced by Window().

+ +
+
+ +

◆ SetConfigFlags()

+ +
+
+ + + + + +
+ + + + + + + + +
void raylib::Window::SetConfigFlags (unsigned int flags)
+
+inline
+
+ +

Sets the configuration flags for raylib.

+
Parameters
+ + +
flagsThe ConfigFlags to apply to the configuration.
+
+
+
See also
::SetConfigFlags
+ +

Definition at line 409 of file Window.hpp.

+ +

Referenced by Init().

+ +
+
+
+ + + + diff --git a/clib.json b/clib.json deleted file mode 100644 index 66e52e15..00000000 --- a/clib.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "raylib-cpp", - "version": "5.5.0", - "repo": "RobLoach/raylib-cpp", - "description": "raylib-cpp: C++ Object-Oriented Wrapper for raylib", - "homepage": "https://github.com/robloach/raylib-cpp", - "bugs": { - "url": "https://github.com/robloach/raylib-cpp/issues" - }, - "directories": { - "lib": "include", - "doc": "docs", - "example": "examples", - "test": "tests" - }, - "keywords": [ - "raylib" - ], - "license": "Zlib", - "scripts": { - "test": "mkdir build && cd build && cmake .. && make && make test" - }, - "src": [ - "include/AudioDevice.hpp", - "include/AudioStream.hpp", - "include/AutomationEventList.hpp", - "include/BoundingBox.hpp", - "include/Camera2D.hpp", - "include/Camera3D.hpp", - "include/Color.hpp", - "include/Font.hpp", - "include/Functions.hpp", - "include/Gamepad.hpp", - "include/Image.hpp", - "include/Keyboard.hpp", - "include/Material.hpp", - "include/Matrix.hpp", - "include/Mesh.hpp", - "include/Model.hpp", - "include/ModelAnimation.hpp", - "include/Mouse.hpp", - "include/Music.hpp", - "include/physac.hpp", - "include/Ray.hpp", - "include/RayCollision.hpp", - "include/RaylibException.hpp", - "include/raylib-cpp-utils.hpp", - "include/raylib-cpp.hpp", - "include/raylib.hpp", - "include/raymath.hpp", - "include/Rectangle.hpp", - "include/RenderTexture.hpp", - "include/Shader.hpp", - "include/Sound.hpp", - "include/Text.hpp", - "include/Texture.hpp", - "include/TextureUnmanaged.hpp", - "include/Touch.hpp", - "include/Vector2.hpp", - "include/Vector3.hpp", - "include/Vector4.hpp", - "include/VrStereoConfig.hpp", - "include/Wave.hpp", - "include/Window.hpp" - ] -} diff --git a/closed.png b/closed.png new file mode 100644 index 00000000..98cc2c90 Binary files /dev/null and b/closed.png differ diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html new file mode 100644 index 00000000..5d13d6c2 --- /dev/null +++ b/dir_d44c64559bbebec7f509842c48db8b23.html @@ -0,0 +1,81 @@ + + + + + + + +raylib-cpp: include Directory Reference + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
include Directory Reference
+
+
+
+ + + + diff --git a/doc.png b/doc.png new file mode 100644 index 00000000..17edabff Binary files /dev/null and b/doc.png differ diff --git a/doxygen-awesome.css b/doxygen-awesome.css new file mode 100644 index 00000000..c2f41142 --- /dev/null +++ b/doxygen-awesome.css @@ -0,0 +1,2681 @@ +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2023 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +html { + /* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */ + --primary-color: #1779c4; + --primary-dark-color: #335c80; + --primary-light-color: #70b1e9; + + /* page base colors */ + --page-background-color: #ffffff; + --page-foreground-color: #2f4153; + --page-secondary-foreground-color: #6f7e8e; + + /* color for all separators on the website: hr, borders, ... */ + --separator-color: #dedede; + + /* border radius for all rounded components. Will affect many components, like dropdowns, memitems, codeblocks, ... */ + --border-radius-large: 8px; + --border-radius-small: 4px; + --border-radius-medium: 6px; + + /* default spacings. Most components reference these values for spacing, to provide uniform spacing on the page. */ + --spacing-small: 5px; + --spacing-medium: 10px; + --spacing-large: 16px; + + /* default box shadow used for raising an element above the normal content. Used in dropdowns, search result, ... */ + --box-shadow: 0 2px 8px 0 rgba(0,0,0,.075); + + --odd-color: rgba(0,0,0,.028); + + /* font-families. will affect all text on the website + * font-family: the normal font for text, headlines, menus + * font-family-monospace: used for preformatted text in memtitle, code, fragments + */ + --font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif; + --font-family-monospace: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + + /* font sizes */ + --page-font-size: 15.6px; + --navigation-font-size: 14.4px; + --toc-font-size: 13.4px; + --code-font-size: 14px; /* affects code, fragment */ + --title-font-size: 22px; + + /* content text properties. These only affect the page content, not the navigation or any other ui elements */ + --content-line-height: 27px; + /* The content is centered and constraint in it's width. To make the content fill the whole page, set the variable to auto.*/ + --content-maxwidth: 1050px; + --table-line-height: 24px; + --toc-sticky-top: var(--spacing-medium); + --toc-width: 200px; + --toc-max-height: calc(100vh - 2 * var(--spacing-medium) - 85px); + + /* colors for various content boxes: @warning, @note, @deprecated @bug */ + --warning-color: #faf3d8; + --warning-color-dark: #f3a600; + --warning-color-darker: #5f4204; + --note-color: #e4f3ff; + --note-color-dark: #1879C4; + --note-color-darker: #274a5c; + --todo-color: #e4dafd; + --todo-color-dark: #5b2bdd; + --todo-color-darker: #2a0d72; + --deprecated-color: #ecf0f3; + --deprecated-color-dark: #5b6269; + --deprecated-color-darker: #43454a; + --bug-color: #f8d1cc; + --bug-color-dark: #b61825; + --bug-color-darker: #75070f; + --invariant-color: #d8f1e3; + --invariant-color-dark: #44b86f; + --invariant-color-darker: #265532; + + /* blockquote colors */ + --blockquote-background: #f8f9fa; + --blockquote-foreground: #636568; + + /* table colors */ + --tablehead-background: #f1f1f1; + --tablehead-foreground: var(--page-foreground-color); + + /* menu-display: block | none + * Visibility of the top navigation on screens >= 768px. On smaller screen the menu is always visible. + * `GENERATE_TREEVIEW` MUST be enabled! + */ + --menu-display: block; + + --menu-focus-foreground: var(--page-background-color); + --menu-focus-background: var(--primary-color); + --menu-selected-background: rgba(0,0,0,.05); + + + --header-background: var(--page-background-color); + --header-foreground: var(--page-foreground-color); + + /* searchbar colors */ + --searchbar-background: var(--side-nav-background); + --searchbar-foreground: var(--page-foreground-color); + + /* searchbar size + * (`searchbar-width` is only applied on screens >= 768px. + * on smaller screens the searchbar will always fill the entire screen width) */ + --searchbar-height: 33px; + --searchbar-width: 210px; + --searchbar-border-radius: var(--searchbar-height); + + /* code block colors */ + --code-background: #f5f5f5; + --code-foreground: var(--page-foreground-color); + + /* fragment colors */ + --fragment-background: #F8F9FA; + --fragment-foreground: #37474F; + --fragment-keyword: #bb6bb2; + --fragment-keywordtype: #8258b3; + --fragment-keywordflow: #d67c3b; + --fragment-token: #438a59; + --fragment-comment: #969696; + --fragment-link: #5383d6; + --fragment-preprocessor: #46aaa5; + --fragment-linenumber-color: #797979; + --fragment-linenumber-background: #f4f4f5; + --fragment-linenumber-border: #e3e5e7; + --fragment-lineheight: 20px; + + /* sidebar navigation (treeview) colors */ + --side-nav-background: #fbfbfb; + --side-nav-foreground: var(--page-foreground-color); + --side-nav-arrow-opacity: 0; + --side-nav-arrow-hover-opacity: 0.9; + + --toc-background: var(--side-nav-background); + --toc-foreground: var(--side-nav-foreground); + + /* height of an item in any tree / collapsible table */ + --tree-item-height: 30px; + + --memname-font-size: var(--code-font-size); + --memtitle-font-size: 18px; + + --webkit-scrollbar-size: 7px; + --webkit-scrollbar-padding: 4px; + --webkit-scrollbar-color: var(--separator-color); + + --animation-duration: .12s +} + +@media screen and (max-width: 767px) { + html { + --page-font-size: 16px; + --navigation-font-size: 16px; + --toc-font-size: 15px; + --code-font-size: 15px; /* affects code, fragment */ + --title-font-size: 22px; + } +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) { + color-scheme: dark; + + --primary-color: #1982d2; + --primary-dark-color: #86a9c4; + --primary-light-color: #4779ac; + + --box-shadow: 0 2px 8px 0 rgba(0,0,0,.35); + + --odd-color: rgba(100,100,100,.06); + + --menu-selected-background: rgba(0,0,0,.4); + + --page-background-color: #1C1D1F; + --page-foreground-color: #d2dbde; + --page-secondary-foreground-color: #859399; + --separator-color: #38393b; + --side-nav-background: #252628; + + --code-background: #2a2c2f; + + --tablehead-background: #2a2c2f; + + --blockquote-background: #222325; + --blockquote-foreground: #7e8c92; + + --warning-color: #3b2e04; + --warning-color-dark: #f1b602; + --warning-color-darker: #ceb670; + --note-color: #163750; + --note-color-dark: #1982D2; + --note-color-darker: #dcf0fa; + --todo-color: #2a2536; + --todo-color-dark: #7661b3; + --todo-color-darker: #ae9ed6; + --deprecated-color: #2e323b; + --deprecated-color-dark: #738396; + --deprecated-color-darker: #abb0bd; + --bug-color: #2e1917; + --bug-color-dark: #ad2617; + --bug-color-darker: #f5b1aa; + --invariant-color: #303a35; + --invariant-color-dark: #76ce96; + --invariant-color-darker: #cceed5; + + --fragment-background: #282c34; + --fragment-foreground: #dbe4eb; + --fragment-keyword: #cc99cd; + --fragment-keywordtype: #ab99cd; + --fragment-keywordflow: #e08000; + --fragment-token: #7ec699; + --fragment-comment: #999999; + --fragment-link: #98c0e3; + --fragment-preprocessor: #65cabe; + --fragment-linenumber-color: #cccccc; + --fragment-linenumber-background: #35393c; + --fragment-linenumber-border: #1f1f1f; + } +} + +/* dark mode variables are defined twice, to support both the dark-mode without and with doxygen-awesome-darkmode-toggle.js */ +html.dark-mode { + color-scheme: dark; + + --primary-color: #1982d2; + --primary-dark-color: #86a9c4; + --primary-light-color: #4779ac; + + --box-shadow: 0 2px 8px 0 rgba(0,0,0,.30); + + --odd-color: rgba(100,100,100,.06); + + --menu-selected-background: rgba(0,0,0,.4); + + --page-background-color: #1C1D1F; + --page-foreground-color: #d2dbde; + --page-secondary-foreground-color: #859399; + --separator-color: #38393b; + --side-nav-background: #252628; + + --code-background: #2a2c2f; + + --tablehead-background: #2a2c2f; + + --blockquote-background: #222325; + --blockquote-foreground: #7e8c92; + + --warning-color: #3b2e04; + --warning-color-dark: #f1b602; + --warning-color-darker: #ceb670; + --note-color: #163750; + --note-color-dark: #1982D2; + --note-color-darker: #dcf0fa; + --todo-color: #2a2536; + --todo-color-dark: #7661b3; + --todo-color-darker: #ae9ed6; + --deprecated-color: #2e323b; + --deprecated-color-dark: #738396; + --deprecated-color-darker: #abb0bd; + --bug-color: #2e1917; + --bug-color-dark: #ad2617; + --bug-color-darker: #f5b1aa; + --invariant-color: #303a35; + --invariant-color-dark: #76ce96; + --invariant-color-darker: #cceed5; + + --fragment-background: #282c34; + --fragment-foreground: #dbe4eb; + --fragment-keyword: #cc99cd; + --fragment-keywordtype: #ab99cd; + --fragment-keywordflow: #e08000; + --fragment-token: #7ec699; + --fragment-comment: #999999; + --fragment-link: #98c0e3; + --fragment-preprocessor: #65cabe; + --fragment-linenumber-color: #cccccc; + --fragment-linenumber-background: #35393c; + --fragment-linenumber-border: #1f1f1f; +} + +body { + color: var(--page-foreground-color); + background-color: var(--page-background-color); + font-size: var(--page-font-size); +} + +body, table, div, p, dl, #nav-tree .label, .title, +.sm-dox a, .sm-dox a:hover, .sm-dox a:focus, #projectname, +.SelectItem, #MSearchField, .navpath li.navelem a, +.navpath li.navelem a:hover, p.reference, p.definition, div.toc li, div.toc h3 { + font-family: var(--font-family); +} + +h1, h2, h3, h4, h5 { + margin-top: 1em; + font-weight: 600; + line-height: initial; +} + +p, div, table, dl, p.reference, p.definition { + font-size: var(--page-font-size); +} + +p.reference, p.definition { + color: var(--page-secondary-foreground-color); +} + +a:link, a:visited, a:hover, a:focus, a:active { + color: var(--primary-color) !important; + font-weight: 500; + background: none; +} + +a.anchor { + scroll-margin-top: var(--spacing-large); + display: block; +} + +/* + Title and top navigation + */ + +#top { + background: var(--header-background); + border-bottom: 1px solid var(--separator-color); +} + +@media screen and (min-width: 768px) { + #top { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + } +} + +#main-nav { + flex-grow: 5; + padding: var(--spacing-small) var(--spacing-medium); +} + +#titlearea { + width: auto; + padding: var(--spacing-medium) var(--spacing-large); + background: none; + color: var(--header-foreground); + border-bottom: none; +} + +@media screen and (max-width: 767px) { + #titlearea { + padding-bottom: var(--spacing-small); + } +} + +#titlearea table tbody tr { + height: auto !important; +} + +#projectname { + font-size: var(--title-font-size); + font-weight: 600; +} + +#projectnumber { + font-family: inherit; + font-size: 60%; +} + +#projectbrief { + font-family: inherit; + font-size: 80%; +} + +#projectlogo { + vertical-align: middle; +} + +#projectlogo img { + max-height: calc(var(--title-font-size) * 2); + margin-right: var(--spacing-small); +} + +.sm-dox, .tabs, .tabs2, .tabs3 { + background: none; + padding: 0; +} + +.tabs, .tabs2, .tabs3 { + border-bottom: 1px solid var(--separator-color); + margin-bottom: -1px; +} + +.main-menu-btn-icon, .main-menu-btn-icon:before, .main-menu-btn-icon:after { + background: var(--page-secondary-foreground-color); +} + +@media screen and (max-width: 767px) { + .sm-dox a span.sub-arrow { + background: var(--code-background); + } + + #main-menu a.has-submenu span.sub-arrow { + color: var(--page-secondary-foreground-color); + border-radius: var(--border-radius-medium); + } + + #main-menu a.has-submenu:hover span.sub-arrow { + color: var(--page-foreground-color); + } +} + +@media screen and (min-width: 768px) { + .sm-dox li, .tablist li { + display: var(--menu-display); + } + + .sm-dox a span.sub-arrow { + border-color: var(--header-foreground) transparent transparent transparent; + } + + .sm-dox a:hover span.sub-arrow { + border-color: var(--menu-focus-foreground) transparent transparent transparent; + } + + .sm-dox ul a span.sub-arrow { + border-color: transparent transparent transparent var(--page-foreground-color); + } + + .sm-dox ul a:hover span.sub-arrow { + border-color: transparent transparent transparent var(--menu-focus-foreground); + } +} + +.sm-dox ul { + background: var(--page-background-color); + box-shadow: var(--box-shadow); + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium) !important; + padding: var(--spacing-small); + animation: ease-out 150ms slideInMenu; +} + +@keyframes slideInMenu { + from { + opacity: 0; + transform: translate(0px, -2px); + } + + to { + opacity: 1; + transform: translate(0px, 0px); + } +} + +.sm-dox ul a { + color: var(--page-foreground-color) !important; + background: var(--page-background-color); + font-size: var(--navigation-font-size); +} + +.sm-dox>li>ul:after { + border-bottom-color: var(--page-background-color) !important; +} + +.sm-dox>li>ul:before { + border-bottom-color: var(--separator-color) !important; +} + +.sm-dox ul a:hover, .sm-dox ul a:active, .sm-dox ul a:focus { + font-size: var(--navigation-font-size) !important; + color: var(--menu-focus-foreground) !important; + text-shadow: none; + background-color: var(--menu-focus-background); + border-radius: var(--border-radius-small) !important; +} + +.sm-dox a, .sm-dox a:focus, .tablist li, .tablist li a, .tablist li.current a { + text-shadow: none; + background: transparent; + background-image: none !important; + color: var(--header-foreground) !important; + font-weight: normal; + font-size: var(--navigation-font-size); + border-radius: var(--border-radius-small) !important; +} + +.sm-dox a:focus { + outline: auto; +} + +.sm-dox a:hover, .sm-dox a:active, .tablist li a:hover { + text-shadow: none; + font-weight: normal; + background: var(--menu-focus-background); + color: var(--menu-focus-foreground) !important; + border-radius: var(--border-radius-small) !important; + font-size: var(--navigation-font-size); +} + +.tablist li.current { + border-radius: var(--border-radius-small); + background: var(--menu-selected-background); +} + +.tablist li { + margin: var(--spacing-small) 0 var(--spacing-small) var(--spacing-small); +} + +.tablist a { + padding: 0 var(--spacing-large); +} + + +/* + Search box + */ + +#MSearchBox { + height: var(--searchbar-height); + background: var(--searchbar-background); + border-radius: var(--searchbar-border-radius); + border: 1px solid var(--separator-color); + overflow: hidden; + width: var(--searchbar-width); + position: relative; + box-shadow: none; + display: block; + margin-top: 0; +} + +/* until Doxygen 1.9.4 */ +.left img#MSearchSelect { + left: 0; + user-select: none; + padding-left: 8px; +} + +/* Doxygen 1.9.5 */ +.left span#MSearchSelect { + left: 0; + user-select: none; + margin-left: 8px; + padding: 0; +} + +.left #MSearchSelect[src$=".png"] { + padding-left: 0 +} + +.SelectionMark { + user-select: none; +} + +.tabs .left #MSearchSelect { + padding-left: 0; +} + +.tabs #MSearchBox { + position: absolute; + right: var(--spacing-medium); +} + +@media screen and (max-width: 767px) { + .tabs #MSearchBox { + position: relative; + right: 0; + margin-left: var(--spacing-medium); + margin-top: 0; + } +} + +#MSearchSelectWindow, #MSearchResultsWindow { + z-index: 9999; +} + +#MSearchBox.MSearchBoxActive { + border-color: var(--primary-color); + box-shadow: inset 0 0 0 1px var(--primary-color); +} + +#main-menu > li:last-child { + margin-right: 0; +} + +@media screen and (max-width: 767px) { + #main-menu > li:last-child { + height: 50px; + } +} + +#MSearchField { + font-size: var(--navigation-font-size); + height: calc(var(--searchbar-height) - 2px); + background: transparent; + width: calc(var(--searchbar-width) - 64px); +} + +.MSearchBoxActive #MSearchField { + color: var(--searchbar-foreground); +} + +#MSearchSelect { + top: calc(calc(var(--searchbar-height) / 2) - 11px); +} + +#MSearchBox span.left, #MSearchBox span.right { + background: none; + background-image: none; +} + +#MSearchBox span.right { + padding-top: calc(calc(var(--searchbar-height) / 2) - 12px); + position: absolute; + right: var(--spacing-small); +} + +.tabs #MSearchBox span.right { + top: calc(calc(var(--searchbar-height) / 2) - 12px); +} + +@keyframes slideInSearchResults { + from { + opacity: 0; + transform: translate(0, 15px); + } + + to { + opacity: 1; + transform: translate(0, 20px); + } +} + +#MSearchResultsWindow { + left: auto !important; + right: var(--spacing-medium); + border-radius: var(--border-radius-large); + border: 1px solid var(--separator-color); + transform: translate(0, 20px); + box-shadow: var(--box-shadow); + animation: ease-out 280ms slideInSearchResults; + background: var(--page-background-color); +} + +iframe#MSearchResults { + margin: 4px; +} + +iframe { + color-scheme: normal; +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) iframe#MSearchResults { + filter: invert() hue-rotate(180deg); + } +} + +html.dark-mode iframe#MSearchResults { + filter: invert() hue-rotate(180deg); +} + +#MSearchResults .SRPage { + background-color: transparent; +} + +#MSearchResults .SRPage .SREntry { + font-size: 10pt; + padding: var(--spacing-small) var(--spacing-medium); +} + +#MSearchSelectWindow { + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + box-shadow: var(--box-shadow); + background: var(--page-background-color); + padding-top: var(--spacing-small); + padding-bottom: var(--spacing-small); +} + +#MSearchSelectWindow a.SelectItem { + font-size: var(--navigation-font-size); + line-height: var(--content-line-height); + margin: 0 var(--spacing-small); + border-radius: var(--border-radius-small); + color: var(--page-foreground-color) !important; + font-weight: normal; +} + +#MSearchSelectWindow a.SelectItem:hover { + background: var(--menu-focus-background); + color: var(--menu-focus-foreground) !important; +} + +@media screen and (max-width: 767px) { + #MSearchBox { + margin-top: var(--spacing-medium); + margin-bottom: var(--spacing-medium); + width: calc(100vw - 30px); + } + + #main-menu > li:last-child { + float: none !important; + } + + #MSearchField { + width: calc(100vw - 110px); + } + + @keyframes slideInSearchResultsMobile { + from { + opacity: 0; + transform: translate(0, 15px); + } + + to { + opacity: 1; + transform: translate(0, 20px); + } + } + + #MSearchResultsWindow { + left: var(--spacing-medium) !important; + right: var(--spacing-medium); + overflow: auto; + transform: translate(0, 20px); + animation: ease-out 280ms slideInSearchResultsMobile; + width: auto !important; + } + + /* + * Overwrites for fixing the searchbox on mobile in doxygen 1.9.2 + */ + label.main-menu-btn ~ #searchBoxPos1 { + top: 3px !important; + right: 6px !important; + left: 45px; + display: flex; + } + + label.main-menu-btn ~ #searchBoxPos1 > #MSearchBox { + margin-top: 0; + margin-bottom: 0; + flex-grow: 2; + float: left; + } +} + +/* + Tree view + */ + +#side-nav { + padding: 0 !important; + background: var(--side-nav-background); + min-width: 8px; + max-width: 50vw; +} + +@media screen and (max-width: 767px) { + #side-nav { + display: none; + } + + #doc-content { + margin-left: 0 !important; + } +} + +#nav-tree { + background: transparent; + margin-right: 1px; +} + +#nav-tree .label { + font-size: var(--navigation-font-size); +} + +#nav-tree .item { + height: var(--tree-item-height); + line-height: var(--tree-item-height); + overflow: hidden; + text-overflow: ellipsis; +} + +#nav-tree .item > a:focus { + outline: none; +} + +#nav-sync { + bottom: 12px; + right: 12px; + top: auto !important; + user-select: none; +} + +#nav-tree .selected { + text-shadow: none; + background-image: none; + background-color: transparent; + position: relative; + color: var(--primary-color) !important; + font-weight: 500; +} + +#nav-tree .selected::after { + content: ""; + position: absolute; + top: 1px; + bottom: 1px; + left: 0; + width: 4px; + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; + background: var(--primary-color); +} + + +#nav-tree a { + color: var(--side-nav-foreground) !important; + font-weight: normal; +} + +#nav-tree a:focus { + outline-style: auto; +} + +#nav-tree .arrow { + opacity: var(--side-nav-arrow-opacity); + background: none; +} + +.arrow { + color: inherit; + cursor: pointer; + font-size: 45%; + vertical-align: middle; + margin-right: 2px; + font-family: serif; + height: auto; + text-align: right; +} + +#nav-tree div.item:hover .arrow, #nav-tree a:focus .arrow { + opacity: var(--side-nav-arrow-hover-opacity); +} + +#nav-tree .selected a { + color: var(--primary-color) !important; + font-weight: bolder; + font-weight: 600; +} + +.ui-resizable-e { + width: 4px; + background: transparent; + box-shadow: inset -1px 0 0 0 var(--separator-color); +} + +/* + Contents + */ + +div.header { + border-bottom: 1px solid var(--separator-color); + background-color: var(--page-background-color); + background-image: none; +} + +@media screen and (min-width: 1000px) { + #doc-content > div > div.contents, + .PageDoc > div.contents { + display: flex; + flex-direction: row-reverse; + flex-wrap: nowrap; + align-items: flex-start; + } + + div.contents .textblock { + min-width: 200px; + flex-grow: 1; + } +} + +div.contents, div.header .title, div.header .summary { + max-width: var(--content-maxwidth); +} + +div.contents, div.header .title { + line-height: initial; + margin: calc(var(--spacing-medium) + .2em) auto var(--spacing-medium) auto; +} + +div.header .summary { + margin: var(--spacing-medium) auto 0 auto; +} + +div.headertitle { + padding: 0; +} + +div.header .title { + font-weight: 600; + font-size: 225%; + padding: var(--spacing-medium) var(--spacing-large); + word-break: break-word; +} + +div.header .summary { + width: auto; + display: block; + float: none; + padding: 0 var(--spacing-large); +} + +td.memSeparator { + border-color: var(--separator-color); +} + +span.mlabel { + background: var(--primary-color); + border: none; + padding: 4px 9px; + border-radius: 12px; + margin-right: var(--spacing-medium); +} + +span.mlabel:last-of-type { + margin-right: 2px; +} + +div.contents { + padding: 0 var(--spacing-large); +} + +div.contents p, div.contents li { + line-height: var(--content-line-height); +} + +div.contents div.dyncontent { + margin: var(--spacing-medium) 0; +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) div.contents div.dyncontent img, + html:not(.light-mode) div.contents center img, + html:not(.light-mode) div.contents > table img, + html:not(.light-mode) div.contents div.dyncontent iframe, + html:not(.light-mode) div.contents center iframe, + html:not(.light-mode) div.contents table iframe, + html:not(.light-mode) div.contents .dotgraph iframe { + filter: brightness(89%) hue-rotate(180deg) invert(); + } +} + +html.dark-mode div.contents div.dyncontent img, +html.dark-mode div.contents center img, +html.dark-mode div.contents > table img, +html.dark-mode div.contents div.dyncontent iframe, +html.dark-mode div.contents center iframe, +html.dark-mode div.contents table iframe, +html.dark-mode div.contents .dotgraph iframe + { + filter: brightness(89%) hue-rotate(180deg) invert(); +} + +h2.groupheader { + border-bottom: 0px; + color: var(--page-foreground-color); + box-shadow: + 100px 0 var(--page-background-color), + -100px 0 var(--page-background-color), + 100px 0.75px var(--separator-color), + -100px 0.75px var(--separator-color), + 500px 0 var(--page-background-color), + -500px 0 var(--page-background-color), + 500px 0.75px var(--separator-color), + -500px 0.75px var(--separator-color), + 900px 0 var(--page-background-color), + -900px 0 var(--page-background-color), + 900px 0.75px var(--separator-color), + -900px 0.75px var(--separator-color), + 1400px 0 var(--page-background-color), + -1400px 0 var(--page-background-color), + 1400px 0.75px var(--separator-color), + -1400px 0.75px var(--separator-color), + 1900px 0 var(--page-background-color), + -1900px 0 var(--page-background-color), + 1900px 0.75px var(--separator-color), + -1900px 0.75px var(--separator-color); +} + +blockquote { + margin: 0 var(--spacing-medium) 0 var(--spacing-medium); + padding: var(--spacing-small) var(--spacing-large); + background: var(--blockquote-background); + color: var(--blockquote-foreground); + border-left: 0; + overflow: visible; + border-radius: var(--border-radius-medium); + overflow: visible; + position: relative; +} + +blockquote::before, blockquote::after { + font-weight: bold; + font-family: serif; + font-size: 360%; + opacity: .15; + position: absolute; +} + +blockquote::before { + content: "“"; + left: -10px; + top: 4px; +} + +blockquote::after { + content: "”"; + right: -8px; + bottom: -25px; +} + +blockquote p { + margin: var(--spacing-small) 0 var(--spacing-medium) 0; +} +.paramname, .paramname em { + font-weight: 600; + color: var(--primary-dark-color); +} + +.paramname > code { + border: 0; +} + +table.params .paramname { + font-weight: 600; + font-family: var(--font-family-monospace); + font-size: var(--code-font-size); + padding-right: var(--spacing-small); + line-height: var(--table-line-height); +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--primary-light-color); +} + +.alphachar a { + color: var(--page-foreground-color); +} + +.dotgraph { + max-width: 100%; + overflow-x: scroll; +} + +.dotgraph .caption { + position: sticky; + left: 0; +} + +/* Wrap Graphviz graphs with the `interactive_dotgraph` class if `INTERACTIVE_SVG = YES` */ +.interactive_dotgraph .dotgraph iframe { + max-width: 100%; +} + +/* + Table of Contents + */ + +div.contents .toc { + max-height: var(--toc-max-height); + min-width: var(--toc-width); + border: 0; + border-left: 1px solid var(--separator-color); + border-radius: 0; + background-color: var(--page-background-color); + box-shadow: none; + position: sticky; + top: var(--toc-sticky-top); + padding: 0 var(--spacing-large); + margin: var(--spacing-small) 0 var(--spacing-large) var(--spacing-large); +} + +div.toc h3 { + color: var(--toc-foreground); + font-size: var(--navigation-font-size); + margin: var(--spacing-large) 0 var(--spacing-medium) 0; +} + +div.toc li { + padding: 0; + background: none; + line-height: var(--toc-font-size); + margin: var(--toc-font-size) 0 0 0; +} + +div.toc li::before { + display: none; +} + +div.toc ul { + margin-top: 0 +} + +div.toc li a { + font-size: var(--toc-font-size); + color: var(--page-foreground-color) !important; + text-decoration: none; +} + +div.toc li a:hover, div.toc li a.active { + color: var(--primary-color) !important; +} + +div.toc li a.aboveActive { + color: var(--page-secondary-foreground-color) !important; +} + + +@media screen and (max-width: 999px) { + div.contents .toc { + max-height: 45vh; + float: none; + width: auto; + margin: 0 0 var(--spacing-medium) 0; + position: relative; + top: 0; + position: relative; + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + background-color: var(--toc-background); + box-shadow: var(--box-shadow); + } + + div.contents .toc.interactive { + max-height: calc(var(--navigation-font-size) + 2 * var(--spacing-large)); + overflow: hidden; + } + + div.contents .toc > h3 { + -webkit-tap-highlight-color: transparent; + cursor: pointer; + position: sticky; + top: 0; + background-color: var(--toc-background); + margin: 0; + padding: var(--spacing-large) 0; + display: block; + } + + div.contents .toc.interactive > h3::before { + content: ""; + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 5px solid var(--primary-color); + display: inline-block; + margin-right: var(--spacing-small); + margin-bottom: calc(var(--navigation-font-size) / 4); + transform: rotate(-90deg); + transition: transform var(--animation-duration) ease-out; + } + + div.contents .toc.interactive.open > h3::before { + transform: rotate(0deg); + } + + div.contents .toc.interactive.open { + max-height: 45vh; + overflow: auto; + transition: max-height 0.2s ease-in-out; + } + + div.contents .toc a, div.contents .toc a.active { + color: var(--primary-color) !important; + } + + div.contents .toc a:hover { + text-decoration: underline; + } +} + +/* + Code & Fragments + */ + +code, div.fragment, pre.fragment { + border-radius: var(--border-radius-small); + border: 1px solid var(--separator-color); + overflow: hidden; +} + +code { + display: inline; + background: var(--code-background); + color: var(--code-foreground); + padding: 2px 6px; +} + +div.fragment, pre.fragment { + margin: var(--spacing-medium) 0; + padding: calc(var(--spacing-large) - (var(--spacing-large) / 6)) var(--spacing-large); + background: var(--fragment-background); + color: var(--fragment-foreground); + overflow-x: auto; +} + +@media screen and (max-width: 767px) { + div.fragment, pre.fragment { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: 0; + } + + .contents > div.fragment, + .textblock > div.fragment, + .textblock > pre.fragment, + .textblock > .tabbed > ul > li > div.fragment, + .textblock > .tabbed > ul > li > pre.fragment, + .contents > .doxygen-awesome-fragment-wrapper > div.fragment, + .textblock > .doxygen-awesome-fragment-wrapper > div.fragment, + .textblock > .doxygen-awesome-fragment-wrapper > pre.fragment, + .textblock > .tabbed > ul > li > .doxygen-awesome-fragment-wrapper > div.fragment, + .textblock > .tabbed > ul > li > .doxygen-awesome-fragment-wrapper > pre.fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-large)); + border-radius: 0; + border-left: 0; + } + + .textblock li > .fragment, + .textblock li > .doxygen-awesome-fragment-wrapper > .fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-large)); + } + + .memdoc li > .fragment, + .memdoc li > .doxygen-awesome-fragment-wrapper > .fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-medium)); + } + + .textblock ul, .memdoc ul { + overflow: initial; + } + + .memdoc > div.fragment, + .memdoc > pre.fragment, + dl dd > div.fragment, + dl dd pre.fragment, + .memdoc > .doxygen-awesome-fragment-wrapper > div.fragment, + .memdoc > .doxygen-awesome-fragment-wrapper > pre.fragment, + dl dd > .doxygen-awesome-fragment-wrapper > div.fragment, + dl dd .doxygen-awesome-fragment-wrapper > pre.fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-medium)); + border-radius: 0; + border-left: 0; + } +} + +code, code a, pre.fragment, div.fragment, div.fragment .line, div.fragment span, div.fragment .line a, div.fragment .line span { + font-family: var(--font-family-monospace); + font-size: var(--code-font-size) !important; +} + +div.line:after { + margin-right: var(--spacing-medium); +} + +div.fragment .line, pre.fragment { + white-space: pre; + word-wrap: initial; + line-height: var(--fragment-lineheight); +} + +div.fragment span.keyword { + color: var(--fragment-keyword); +} + +div.fragment span.keywordtype { + color: var(--fragment-keywordtype); +} + +div.fragment span.keywordflow { + color: var(--fragment-keywordflow); +} + +div.fragment span.stringliteral { + color: var(--fragment-token) +} + +div.fragment span.comment { + color: var(--fragment-comment); +} + +div.fragment a.code { + color: var(--fragment-link) !important; +} + +div.fragment span.preprocessor { + color: var(--fragment-preprocessor); +} + +div.fragment span.lineno { + display: inline-block; + width: 27px; + border-right: none; + background: var(--fragment-linenumber-background); + color: var(--fragment-linenumber-color); +} + +div.fragment span.lineno a { + background: none; + color: var(--fragment-link) !important; +} + +div.fragment > .line:first-child .lineno { + box-shadow: -999999px 0px 0 999999px var(--fragment-linenumber-background), -999998px 0px 0 999999px var(--fragment-linenumber-border); + background-color: var(--fragment-linenumber-background) !important; +} + +div.line { + border-radius: var(--border-radius-small); +} + +div.line.glow { + background-color: var(--primary-light-color); + box-shadow: none; +} + +/* + dl warning, attention, note, deprecated, bug, ... + */ + +dl.bug dt a, dl.deprecated dt a, dl.todo dt a { + font-weight: bold !important; +} + +dl.warning, dl.attention, dl.note, dl.deprecated, dl.bug, dl.invariant, dl.pre, dl.post, dl.todo, dl.remark { + padding: var(--spacing-medium); + margin: var(--spacing-medium) 0; + color: var(--page-background-color); + overflow: hidden; + margin-left: 0; + border-radius: var(--border-radius-small); +} + +dl.section dd { + margin-bottom: 2px; +} + +dl.warning, dl.attention { + background: var(--warning-color); + border-left: 8px solid var(--warning-color-dark); + color: var(--warning-color-darker); +} + +dl.warning dt, dl.attention dt { + color: var(--warning-color-dark); +} + +dl.note, dl.remark { + background: var(--note-color); + border-left: 8px solid var(--note-color-dark); + color: var(--note-color-darker); +} + +dl.note dt, dl.remark dt { + color: var(--note-color-dark); +} + +dl.todo { + background: var(--todo-color); + border-left: 8px solid var(--todo-color-dark); + color: var(--todo-color-darker); +} + +dl.todo dt a { + color: var(--todo-color-dark) !important; +} + +dl.bug dt a { + color: var(--todo-color-dark) !important; +} + +dl.bug { + background: var(--bug-color); + border-left: 8px solid var(--bug-color-dark); + color: var(--bug-color-darker); +} + +dl.bug dt a { + color: var(--bug-color-dark) !important; +} + +dl.deprecated { + background: var(--deprecated-color); + border-left: 8px solid var(--deprecated-color-dark); + color: var(--deprecated-color-darker); +} + +dl.deprecated dt a { + color: var(--deprecated-color-dark) !important; +} + +dl.section dd, dl.bug dd, dl.deprecated dd, dl.todo dd { + margin-inline-start: 0px; +} + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color); + border-left: 8px solid var(--invariant-color-dark); + color: var(--invariant-color-darker); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-dark); +} + +/* + memitem + */ + +div.memdoc, div.memproto, h2.memtitle { + box-shadow: none; + background-image: none; + border: none; +} + +div.memdoc { + padding: 0 var(--spacing-medium); + background: var(--page-background-color); +} + +h2.memtitle, div.memitem { + border: 1px solid var(--separator-color); + box-shadow: var(--box-shadow); +} + +h2.memtitle { + box-shadow: 0px var(--spacing-medium) 0 -1px var(--fragment-background), var(--box-shadow); +} + +div.memitem { + transition: none; +} + +div.memproto, h2.memtitle { + background: var(--fragment-background); +} + +h2.memtitle { + font-weight: 500; + font-size: var(--memtitle-font-size); + font-family: var(--font-family-monospace); + border-bottom: none; + border-top-left-radius: var(--border-radius-medium); + border-top-right-radius: var(--border-radius-medium); + word-break: break-all; + position: relative; +} + +h2.memtitle:after { + content: ""; + display: block; + background: var(--fragment-background); + height: var(--spacing-medium); + bottom: calc(0px - var(--spacing-medium)); + left: 0; + right: -14px; + position: absolute; + border-top-right-radius: var(--border-radius-medium); +} + +h2.memtitle > span.permalink { + font-size: inherit; +} + +h2.memtitle > span.permalink > a { + text-decoration: none; + padding-left: 3px; + margin-right: -4px; + user-select: none; + display: inline-block; + margin-top: -6px; +} + +h2.memtitle > span.permalink > a:hover { + color: var(--primary-dark-color) !important; +} + +a:target + h2.memtitle, a:target + h2.memtitle + div.memitem { + border-color: var(--primary-light-color); +} + +div.memitem { + border-top-right-radius: var(--border-radius-medium); + border-bottom-right-radius: var(--border-radius-medium); + border-bottom-left-radius: var(--border-radius-medium); + overflow: hidden; + display: block !important; +} + +div.memdoc { + border-radius: 0; +} + +div.memproto { + border-radius: 0 var(--border-radius-small) 0 0; + overflow: auto; + border-bottom: 1px solid var(--separator-color); + padding: var(--spacing-medium); + margin-bottom: -1px; +} + +div.memtitle { + border-top-right-radius: var(--border-radius-medium); + border-top-left-radius: var(--border-radius-medium); +} + +div.memproto table.memname { + font-family: var(--font-family-monospace); + color: var(--page-foreground-color); + font-size: var(--memname-font-size); + text-shadow: none; +} + +div.memproto div.memtemplate { + font-family: var(--font-family-monospace); + color: var(--primary-dark-color); + font-size: var(--memname-font-size); + margin-left: 2px; + text-shadow: none; +} + +table.mlabels, table.mlabels > tbody { + display: block; +} + +td.mlabels-left { + width: auto; +} + +td.mlabels-right { + margin-top: 3px; + position: sticky; + left: 0; +} + +table.mlabels > tbody > tr:first-child { + display: flex; + justify-content: space-between; + flex-wrap: wrap; +} + +.memname, .memitem span.mlabels { + margin: 0 +} + +/* + reflist + */ + +dl.reflist { + box-shadow: var(--box-shadow); + border-radius: var(--border-radius-medium); + border: 1px solid var(--separator-color); + overflow: hidden; + padding: 0; +} + + +dl.reflist dt, dl.reflist dd { + box-shadow: none; + text-shadow: none; + background-image: none; + border: none; + padding: 12px; +} + + +dl.reflist dt { + font-weight: 500; + border-radius: 0; + background: var(--code-background); + border-bottom: 1px solid var(--separator-color); + color: var(--page-foreground-color) +} + + +dl.reflist dd { + background: none; +} + +/* + Table + */ + +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname), +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody { + display: inline-block; + max-width: 100%; +} + +.contents > table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname):not(.classindex) { + margin-left: calc(0px - var(--spacing-large)); + margin-right: calc(0px - var(--spacing-large)); + max-width: calc(100% + 2 * var(--spacing-large)); +} + +table.fieldtable, +table.markdownTable tbody, +table.doxtable tbody { + border: none; + margin: var(--spacing-medium) 0; + box-shadow: 0 0 0 1px var(--separator-color); + border-radius: var(--border-radius-small); +} + +table.markdownTable, table.doxtable, table.fieldtable { + padding: 1px; +} + +table.doxtable caption { + display: block; +} + +table.fieldtable { + border-collapse: collapse; + width: 100%; +} + +th.markdownTableHeadLeft, +th.markdownTableHeadRight, +th.markdownTableHeadCenter, +th.markdownTableHeadNone, +table.doxtable th { + background: var(--tablehead-background); + color: var(--tablehead-foreground); + font-weight: 600; + font-size: var(--page-font-size); +} + +th.markdownTableHeadLeft:first-child, +th.markdownTableHeadRight:first-child, +th.markdownTableHeadCenter:first-child, +th.markdownTableHeadNone:first-child, +table.doxtable tr th:first-child { + border-top-left-radius: var(--border-radius-small); +} + +th.markdownTableHeadLeft:last-child, +th.markdownTableHeadRight:last-child, +th.markdownTableHeadCenter:last-child, +th.markdownTableHeadNone:last-child, +table.doxtable tr th:last-child { + border-top-right-radius: var(--border-radius-small); +} + +table.markdownTable td, +table.markdownTable th, +table.fieldtable td, +table.fieldtable th, +table.doxtable td, +table.doxtable th { + border: 1px solid var(--separator-color); + padding: var(--spacing-small) var(--spacing-medium); +} + +table.markdownTable td:last-child, +table.markdownTable th:last-child, +table.fieldtable td:last-child, +table.fieldtable th:last-child, +table.doxtable td:last-child, +table.doxtable th:last-child { + border-right: none; +} + +table.markdownTable td:first-child, +table.markdownTable th:first-child, +table.fieldtable td:first-child, +table.fieldtable th:first-child, +table.doxtable td:first-child, +table.doxtable th:first-child { + border-left: none; +} + +table.markdownTable tr:first-child td, +table.markdownTable tr:first-child th, +table.fieldtable tr:first-child td, +table.fieldtable tr:first-child th, +table.doxtable tr:first-child td, +table.doxtable tr:first-child th { + border-top: none; +} + +table.markdownTable tr:last-child td, +table.markdownTable tr:last-child th, +table.fieldtable tr:last-child td, +table.fieldtable tr:last-child th, +table.doxtable tr:last-child td, +table.doxtable tr:last-child th { + border-bottom: none; +} + +table.markdownTable tr, table.doxtable tr { + border-bottom: 1px solid var(--separator-color); +} + +table.markdownTable tr:last-child, table.doxtable tr:last-child { + border-bottom: none; +} + +.full_width_table table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) { + display: block; +} + +.full_width_table table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody { + display: table; + width: 100%; +} + +table.fieldtable th { + font-size: var(--page-font-size); + font-weight: 600; + background-image: none; + background-color: var(--tablehead-background); + color: var(--tablehead-foreground); +} + +table.fieldtable td.fieldtype, .fieldtable td.fieldname, .fieldtable td.fieldinit, .fieldtable td.fielddoc, .fieldtable th { + border-bottom: 1px solid var(--separator-color); + border-right: 1px solid var(--separator-color); +} + +table.fieldtable tr:last-child td:first-child { + border-bottom-left-radius: var(--border-radius-small); +} + +table.fieldtable tr:last-child td:last-child { + border-bottom-right-radius: var(--border-radius-small); +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--primary-light-color); + box-shadow: none; +} + +table.memberdecls { + display: block; + -webkit-tap-highlight-color: transparent; +} + +table.memberdecls tr[class^='memitem'] { + font-family: var(--font-family-monospace); + font-size: var(--code-font-size); +} + +table.memberdecls tr[class^='memitem'] .memTemplParams { + font-family: var(--font-family-monospace); + font-size: var(--code-font-size); + color: var(--primary-dark-color); + white-space: normal; +} + +table.memberdecls .memItemLeft, +table.memberdecls .memItemRight, +table.memberdecls .memTemplItemLeft, +table.memberdecls .memTemplItemRight, +table.memberdecls .memTemplParams { + transition: none; + padding-top: var(--spacing-small); + padding-bottom: var(--spacing-small); + border-top: 1px solid var(--separator-color); + border-bottom: 1px solid var(--separator-color); + background-color: var(--fragment-background); +} + +table.memberdecls .memTemplItemLeft, +table.memberdecls .memTemplItemRight { + padding-top: 2px; +} + +table.memberdecls .memTemplParams { + border-bottom: 0; + border-left: 1px solid var(--separator-color); + border-right: 1px solid var(--separator-color); + border-radius: var(--border-radius-small) var(--border-radius-small) 0 0; + padding-bottom: var(--spacing-small); +} + +table.memberdecls .memTemplItemLeft { + border-radius: 0 0 0 var(--border-radius-small); + border-left: 1px solid var(--separator-color); + border-top: 0; +} + +table.memberdecls .memTemplItemRight { + border-radius: 0 0 var(--border-radius-small) 0; + border-right: 1px solid var(--separator-color); + padding-left: 0; + border-top: 0; +} + +table.memberdecls .memItemLeft { + border-radius: var(--border-radius-small) 0 0 var(--border-radius-small); + border-left: 1px solid var(--separator-color); + padding-left: var(--spacing-medium); + padding-right: 0; +} + +table.memberdecls .memItemRight { + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; + border-right: 1px solid var(--separator-color); + padding-right: var(--spacing-medium); + padding-left: 0; + +} + +table.memberdecls .mdescLeft, table.memberdecls .mdescRight { + background: none; + color: var(--page-foreground-color); + padding: var(--spacing-small) 0; +} + +table.memberdecls .memItemLeft, +table.memberdecls .memTemplItemLeft { + padding-right: var(--spacing-medium); +} + +table.memberdecls .memSeparator { + background: var(--page-background-color); + height: var(--spacing-large); + border: 0; + transition: none; +} + +table.memberdecls .groupheader { + margin-bottom: var(--spacing-large); +} + +table.memberdecls .inherit_header td { + padding: 0 0 var(--spacing-medium) 0; + text-indent: -12px; + color: var(--page-secondary-foreground-color); +} + +table.memberdecls img[src="closed.png"], +table.memberdecls img[src="open.png"], +div.dynheader img[src="open.png"], +div.dynheader img[src="closed.png"] { + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 5px solid var(--primary-color); + margin-top: 8px; + display: block; + float: left; + margin-left: -10px; + transition: transform var(--animation-duration) ease-out; +} + +table.memberdecls img { + margin-right: 10px; +} + +table.memberdecls img[src="closed.png"], +div.dynheader img[src="closed.png"] { + transform: rotate(-90deg); + +} + +.compoundTemplParams { + font-family: var(--font-family-monospace); + color: var(--primary-dark-color); + font-size: var(--code-font-size); +} + +@media screen and (max-width: 767px) { + + table.memberdecls .memItemLeft, + table.memberdecls .memItemRight, + table.memberdecls .mdescLeft, + table.memberdecls .mdescRight, + table.memberdecls .memTemplItemLeft, + table.memberdecls .memTemplItemRight, + table.memberdecls .memTemplParams { + display: block; + text-align: left; + padding-left: var(--spacing-large); + margin: 0 calc(0px - var(--spacing-large)) 0 calc(0px - var(--spacing-large)); + border-right: none; + border-left: none; + border-radius: 0; + white-space: normal; + } + + table.memberdecls .memItemLeft, + table.memberdecls .mdescLeft, + table.memberdecls .memTemplItemLeft { + border-bottom: 0; + padding-bottom: 0; + } + + table.memberdecls .memTemplItemLeft { + padding-top: 0; + } + + table.memberdecls .mdescLeft { + margin-bottom: calc(0px - var(--page-font-size)); + } + + table.memberdecls .memItemRight, + table.memberdecls .mdescRight, + table.memberdecls .memTemplItemRight { + border-top: 0; + padding-top: 0; + padding-right: var(--spacing-large); + overflow-x: auto; + } + + table.memberdecls tr[class^='memitem']:not(.inherit) { + display: block; + width: calc(100vw - 2 * var(--spacing-large)); + } + + table.memberdecls .mdescRight { + color: var(--page-foreground-color); + } + + table.memberdecls tr.inherit { + visibility: hidden; + } + + table.memberdecls tr[style="display: table-row;"] { + display: block !important; + visibility: visible; + width: calc(100vw - 2 * var(--spacing-large)); + animation: fade .5s; + } + + @keyframes fade { + 0% { + opacity: 0; + max-height: 0; + } + + 100% { + opacity: 1; + max-height: 200px; + } + } +} + + +/* + Horizontal Rule + */ + +hr { + margin-top: var(--spacing-large); + margin-bottom: var(--spacing-large); + height: 1px; + background-color: var(--separator-color); + border: 0; +} + +.contents hr { + box-shadow: 100px 0 var(--separator-color), + -100px 0 var(--separator-color), + 500px 0 var(--separator-color), + -500px 0 var(--separator-color), + 900px 0 var(--separator-color), + -900px 0 var(--separator-color), + 1400px 0 var(--separator-color), + -1400px 0 var(--separator-color), + 1900px 0 var(--separator-color), + -1900px 0 var(--separator-color); +} + +.contents img, .contents .center, .contents center, .contents div.image object { + max-width: 100%; + overflow: auto; +} + +@media screen and (max-width: 767px) { + .contents .dyncontent > .center, .contents > center { + margin-left: calc(0px - var(--spacing-large)); + margin-right: calc(0px - var(--spacing-large)); + max-width: calc(100% + 2 * var(--spacing-large)); + } +} + +/* + Directories + */ +div.directory { + border-top: 1px solid var(--separator-color); + border-bottom: 1px solid var(--separator-color); + width: auto; +} + +table.directory { + font-family: var(--font-family); + font-size: var(--page-font-size); + font-weight: normal; + width: 100%; +} + +table.directory td.entry, table.directory td.desc { + padding: calc(var(--spacing-small) / 2) var(--spacing-small); + line-height: var(--table-line-height); +} + +table.directory tr.even td:last-child { + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; +} + +table.directory tr.even td:first-child { + border-radius: var(--border-radius-small) 0 0 var(--border-radius-small); +} + +table.directory tr.even:last-child td:last-child { + border-radius: 0 var(--border-radius-small) 0 0; +} + +table.directory tr.even:last-child td:first-child { + border-radius: var(--border-radius-small) 0 0 0; +} + +table.directory td.desc { + min-width: 250px; +} + +table.directory tr.even { + background-color: var(--odd-color); +} + +table.directory tr.odd { + background-color: transparent; +} + +.icona { + width: auto; + height: auto; + margin: 0 var(--spacing-small); +} + +.icon { + background: var(--primary-color); + border-radius: var(--border-radius-small); + font-size: var(--page-font-size); + padding: calc(var(--page-font-size) / 5); + line-height: var(--page-font-size); + transform: scale(0.8); + height: auto; + width: var(--page-font-size); + user-select: none; +} + +.iconfopen, .icondoc, .iconfclosed { + background-position: center; + margin-bottom: 0; + height: var(--table-line-height); +} + +.icondoc { + filter: saturate(0.2); +} + +@media screen and (max-width: 767px) { + div.directory { + margin-left: calc(0px - var(--spacing-large)); + margin-right: calc(0px - var(--spacing-large)); + } +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) .iconfopen, html:not(.light-mode) .iconfclosed { + filter: hue-rotate(180deg) invert(); + } +} + +html.dark-mode .iconfopen, html.dark-mode .iconfclosed { + filter: hue-rotate(180deg) invert(); +} + +/* + Class list + */ + +.classindex dl.odd { + background: var(--odd-color); + border-radius: var(--border-radius-small); +} + +.classindex dl.even { + background-color: transparent; +} + +/* + Class Index Doxygen 1.8 +*/ + +table.classindex { + margin-left: 0; + margin-right: 0; + width: 100%; +} + +table.classindex table div.ah { + background-image: none; + background-color: initial; + border-color: var(--separator-color); + color: var(--page-foreground-color); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius-large); + padding: var(--spacing-small); +} + +div.qindex { + background-color: var(--odd-color); + border-radius: var(--border-radius-small); + border: 1px solid var(--separator-color); + padding: var(--spacing-small) 0; +} + +/* + Footer and nav-path + */ + +#nav-path { + width: 100%; +} + +#nav-path ul { + background-image: none; + background: var(--page-background-color); + border: none; + border-top: 1px solid var(--separator-color); + border-bottom: 1px solid var(--separator-color); + border-bottom: 0; + box-shadow: 0 0.75px 0 var(--separator-color); + font-size: var(--navigation-font-size); +} + +img.footer { + width: 60px; +} + +.navpath li.footer { + color: var(--page-secondary-foreground-color); +} + +address.footer { + color: var(--page-secondary-foreground-color); + margin-bottom: var(--spacing-large); +} + +#nav-path li.navelem { + background-image: none; + display: flex; + align-items: center; +} + +.navpath li.navelem a { + text-shadow: none; + display: inline-block; + color: var(--primary-color) !important; +} + +.navpath li.navelem b { + color: var(--primary-dark-color); + font-weight: 500; +} + +li.navelem { + padding: 0; + margin-left: -8px; +} + +li.navelem:first-child { + margin-left: var(--spacing-large); +} + +li.navelem:first-child:before { + display: none; +} + +#nav-path li.navelem:after { + content: ''; + border: 5px solid var(--page-background-color); + border-bottom-color: transparent; + border-right-color: transparent; + border-top-color: transparent; + transform: translateY(-1px) scaleY(4.2); + z-index: 10; + margin-left: 6px; +} + +#nav-path li.navelem:before { + content: ''; + border: 5px solid var(--separator-color); + border-bottom-color: transparent; + border-right-color: transparent; + border-top-color: transparent; + transform: translateY(-1px) scaleY(3.2); + margin-right: var(--spacing-small); +} + +.navpath li.navelem a:hover { + color: var(--primary-color); +} + +/* + Scrollbars for Webkit +*/ + +#nav-tree::-webkit-scrollbar, +div.fragment::-webkit-scrollbar, +pre.fragment::-webkit-scrollbar, +div.memproto::-webkit-scrollbar, +.contents center::-webkit-scrollbar, +.contents .center::-webkit-scrollbar, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody::-webkit-scrollbar, +div.contents .toc::-webkit-scrollbar, +.contents .dotgraph::-webkit-scrollbar, +.contents .tabs-overview-container::-webkit-scrollbar { + background: transparent; + width: calc(var(--webkit-scrollbar-size) + var(--webkit-scrollbar-padding) + var(--webkit-scrollbar-padding)); + height: calc(var(--webkit-scrollbar-size) + var(--webkit-scrollbar-padding) + var(--webkit-scrollbar-padding)); +} + +#nav-tree::-webkit-scrollbar-thumb, +div.fragment::-webkit-scrollbar-thumb, +pre.fragment::-webkit-scrollbar-thumb, +div.memproto::-webkit-scrollbar-thumb, +.contents center::-webkit-scrollbar-thumb, +.contents .center::-webkit-scrollbar-thumb, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody::-webkit-scrollbar-thumb, +div.contents .toc::-webkit-scrollbar-thumb, +.contents .dotgraph::-webkit-scrollbar-thumb, +.contents .tabs-overview-container::-webkit-scrollbar-thumb { + background-color: transparent; + border: var(--webkit-scrollbar-padding) solid transparent; + border-radius: calc(var(--webkit-scrollbar-padding) + var(--webkit-scrollbar-padding)); + background-clip: padding-box; +} + +#nav-tree:hover::-webkit-scrollbar-thumb, +div.fragment:hover::-webkit-scrollbar-thumb, +pre.fragment:hover::-webkit-scrollbar-thumb, +div.memproto:hover::-webkit-scrollbar-thumb, +.contents center:hover::-webkit-scrollbar-thumb, +.contents .center:hover::-webkit-scrollbar-thumb, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody:hover::-webkit-scrollbar-thumb, +div.contents .toc:hover::-webkit-scrollbar-thumb, +.contents .dotgraph:hover::-webkit-scrollbar-thumb, +.contents .tabs-overview-container:hover::-webkit-scrollbar-thumb { + background-color: var(--webkit-scrollbar-color); +} + +#nav-tree::-webkit-scrollbar-track, +div.fragment::-webkit-scrollbar-track, +pre.fragment::-webkit-scrollbar-track, +div.memproto::-webkit-scrollbar-track, +.contents center::-webkit-scrollbar-track, +.contents .center::-webkit-scrollbar-track, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody::-webkit-scrollbar-track, +div.contents .toc::-webkit-scrollbar-track, +.contents .dotgraph::-webkit-scrollbar-track, +.contents .tabs-overview-container::-webkit-scrollbar-track { + background: transparent; +} + +#nav-tree::-webkit-scrollbar-corner { + background-color: var(--side-nav-background); +} + +#nav-tree, +div.fragment, +pre.fragment, +div.memproto, +.contents center, +.contents .center, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody, +div.contents .toc { + overflow-x: auto; + overflow-x: overlay; +} + +#nav-tree { + overflow-x: auto; + overflow-y: auto; + overflow-y: overlay; +} + +/* + Scrollbars for Firefox +*/ + +#nav-tree, +div.fragment, +pre.fragment, +div.memproto, +.contents center, +.contents .center, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody, +div.contents .toc, +.contents .dotgraph, +.contents .tabs-overview-container { + scrollbar-width: thin; +} + +/* + Optional Dark mode toggle button +*/ + +doxygen-awesome-dark-mode-toggle { + display: inline-block; + margin: 0 0 0 var(--spacing-small); + padding: 0; + width: var(--searchbar-height); + height: var(--searchbar-height); + background: none; + border: none; + border-radius: var(--searchbar-height); + vertical-align: middle; + text-align: center; + line-height: var(--searchbar-height); + font-size: 22px; + display: flex; + align-items: center; + justify-content: center; + user-select: none; + cursor: pointer; +} + +doxygen-awesome-dark-mode-toggle > svg { + transition: transform var(--animation-duration) ease-in-out; +} + +doxygen-awesome-dark-mode-toggle:active > svg { + transform: scale(.5); +} + +doxygen-awesome-dark-mode-toggle:hover { + background-color: rgba(0,0,0,.03); +} + +html.dark-mode doxygen-awesome-dark-mode-toggle:hover { + background-color: rgba(0,0,0,.18); +} + +/* + Optional fragment copy button +*/ +.doxygen-awesome-fragment-wrapper { + position: relative; +} + +doxygen-awesome-fragment-copy-button { + opacity: 0; + background: var(--fragment-background); + width: 28px; + height: 28px; + position: absolute; + right: calc(var(--spacing-large) - (var(--spacing-large) / 2.5)); + top: calc(var(--spacing-large) - (var(--spacing-large) / 2.5)); + border: 1px solid var(--fragment-foreground); + cursor: pointer; + border-radius: var(--border-radius-small); + display: flex; + justify-content: center; + align-items: center; +} + +.doxygen-awesome-fragment-wrapper:hover doxygen-awesome-fragment-copy-button, doxygen-awesome-fragment-copy-button.success { + opacity: .28; +} + +doxygen-awesome-fragment-copy-button:hover, doxygen-awesome-fragment-copy-button.success { + opacity: 1 !important; +} + +doxygen-awesome-fragment-copy-button:active:not([class~=success]) svg { + transform: scale(.91); +} + +doxygen-awesome-fragment-copy-button svg { + fill: var(--fragment-foreground); + width: 18px; + height: 18px; +} + +doxygen-awesome-fragment-copy-button.success svg { + fill: rgb(14, 168, 14); +} + +doxygen-awesome-fragment-copy-button.success { + border-color: rgb(14, 168, 14); +} + +@media screen and (max-width: 767px) { + .textblock > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + .textblock li > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + .memdoc li > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + .memdoc > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + dl dd > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button { + right: 0; + } +} + +/* + Optional paragraph link button +*/ + +a.anchorlink { + font-size: 90%; + margin-left: var(--spacing-small); + color: var(--page-foreground-color) !important; + text-decoration: none; + opacity: .15; + display: none; + transition: opacity var(--animation-duration) ease-in-out, color var(--animation-duration) ease-in-out; +} + +a.anchorlink svg { + fill: var(--page-foreground-color); +} + +h3 a.anchorlink svg, h4 a.anchorlink svg { + margin-bottom: -3px; + margin-top: -4px; +} + +a.anchorlink:hover { + opacity: .45; +} + +h2:hover a.anchorlink, h1:hover a.anchorlink, h3:hover a.anchorlink, h4:hover a.anchorlink { + display: inline-block; +} + +/* + Optional tab feature +*/ + +.tabbed > ul { + padding-inline-start: 0px; + margin: 0; + padding: var(--spacing-small) 0; +} + +.tabbed > ul > li { + display: none; +} + +.tabbed > ul > li.selected { + display: block; +} + +.tabs-overview-container { + overflow-x: auto; + display: block; + overflow-y: visible; +} + +.tabs-overview { + border-bottom: 1px solid var(--separator-color); + display: flex; + flex-direction: row; +} + +@media screen and (max-width: 767px) { + .tabs-overview-container { + margin: 0 calc(0px - var(--spacing-large)); + } + .tabs-overview { + padding: 0 var(--spacing-large) + } +} + +.tabs-overview button.tab-button { + color: var(--page-foreground-color); + margin: 0; + border: none; + background: transparent; + padding: calc(var(--spacing-large) / 2) 0; + display: inline-block; + font-size: var(--page-font-size); + cursor: pointer; + box-shadow: 0 1px 0 0 var(--separator-color); + position: relative; + + -webkit-tap-highlight-color: transparent; +} + +.tabs-overview button.tab-button .tab-title::before { + display: block; + content: attr(title); + font-weight: 600; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.tabs-overview button.tab-button .tab-title { + float: left; + white-space: nowrap; + font-weight: normal; + padding: calc(var(--spacing-large) / 2) var(--spacing-large); + border-radius: var(--border-radius-medium); + transition: background-color var(--animation-duration) ease-in-out, font-weight var(--animation-duration) ease-in-out; +} + +.tabs-overview button.tab-button:not(:last-child) .tab-title { + box-shadow: 8px 0 0 -7px var(--separator-color); +} + +.tabs-overview button.tab-button:hover .tab-title { + background: var(--separator-color); + box-shadow: none; +} + +.tabs-overview button.tab-button.active .tab-title { + font-weight: 600; +} + +.tabs-overview button.tab-button::after { + content: ''; + display: block; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 0; + width: 0%; + margin: 0 auto; + border-radius: var(--border-radius-small) var(--border-radius-small) 0 0; + background-color: var(--primary-color); + transition: width var(--animation-duration) ease-in-out, height var(--animation-duration) ease-in-out; +} + +.tabs-overview button.tab-button.active::after { + width: 100%; + box-sizing: border-box; + height: 3px; +} + + +/* + Navigation Buttons +*/ + +.section_buttons:not(:empty) { + margin-top: calc(var(--spacing-large) * 3); +} + +.section_buttons table.markdownTable { + display: block; + width: 100%; +} + +.section_buttons table.markdownTable tbody { + display: table !important; + width: 100%; + box-shadow: none; + border-spacing: 10px; +} + +.section_buttons table.markdownTable td { + padding: 0; +} + +.section_buttons table.markdownTable th { + display: none; +} + +.section_buttons table.markdownTable tr.markdownTableHead { + border: none; +} + +.section_buttons tr th, .section_buttons tr td { + background: none; + border: none; + padding: var(--spacing-large) 0 var(--spacing-small); +} + +.section_buttons a { + display: inline-block; + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + color: var(--page-secondary-foreground-color) !important; + text-decoration: none; + transition: color var(--animation-duration) ease-in-out, background-color var(--animation-duration) ease-in-out; +} + +.section_buttons a:hover { + color: var(--page-foreground-color) !important; + background-color: var(--odd-color); +} + +.section_buttons tr td.markdownTableBodyLeft a { + padding: var(--spacing-medium) var(--spacing-large) var(--spacing-medium) calc(var(--spacing-large) / 2); +} + +.section_buttons tr td.markdownTableBodyRight a { + padding: var(--spacing-medium) calc(var(--spacing-large) / 2) var(--spacing-medium) var(--spacing-large); +} + +.section_buttons tr td.markdownTableBodyLeft a::before, +.section_buttons tr td.markdownTableBodyRight a::after { + color: var(--page-secondary-foreground-color) !important; + display: inline-block; + transition: color .08s ease-in-out, transform .09s ease-in-out; +} + +.section_buttons tr td.markdownTableBodyLeft a::before { + content: '〈'; + padding-right: var(--spacing-large); +} + + +.section_buttons tr td.markdownTableBodyRight a::after { + content: '〉'; + padding-left: var(--spacing-large); +} + + +.section_buttons tr td.markdownTableBodyLeft a:hover::before { + color: var(--page-foreground-color) !important; + transform: translateX(-3px); +} + +.section_buttons tr td.markdownTableBodyRight a:hover::after { + color: var(--page-foreground-color) !important; + transform: translateX(3px); +} + +@media screen and (max-width: 450px) { + .section_buttons a { + width: 100%; + box-sizing: border-box; + } + + .section_buttons tr td:nth-of-type(1).markdownTableBodyLeft a { + border-radius: var(--border-radius-medium) 0 0 var(--border-radius-medium); + border-right: none; + } + + .section_buttons tr td:nth-of-type(2).markdownTableBodyRight a { + border-radius: 0 var(--border-radius-medium) var(--border-radius-medium) 0; + } +} diff --git a/doxygen.css b/doxygen.css new file mode 100644 index 00000000..ffbff022 --- /dev/null +++ b/doxygen.css @@ -0,0 +1,1793 @@ +/* The standard CSS for doxygen 1.9.1 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + border-right: 1px solid #A3B4D7; + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: #A0A0A0; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.odd { + background-color: #F8F9FC; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +.contents a.qindexHL:visited { + color: #FFFFFF; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #FFFFFF; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #9CAFD4; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +.DocNodeRTL { + text-align: right; + direction: rtl; +} + +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/doxygen.svg b/doxygen.svg new file mode 100644 index 00000000..d42dad52 --- /dev/null +++ b/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dynsections.js b/dynsections.js new file mode 100644 index 00000000..88f2c27e --- /dev/null +++ b/dynsections.js @@ -0,0 +1,128 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l 400) music.Stop(); - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY); - - DrawRectangle(200, 200, 400, 12, LIGHTGRAY); - DrawRectangle(200, 200, static_cast(timePlayed), 12, MAROON); - DrawRectangleLines(200, 200, 400, 12, GRAY); - - DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY); - DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 280, 20, LIGHTGRAY); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/audio/audio_sound_loading.cpp b/examples/audio/audio_sound_loading.cpp deleted file mode 100644 index fbc97034..00000000 --- a/examples/audio/audio_sound_loading.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************************* -* -* raylib [audio] example - Sound loading and playing -* -* This example has been created using raylib 1.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2014 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [audio] example - sound loading and playing"); - - raylib::AudioDevice audiodevice; // Initialize audio device - - raylib::Sound fxWav("resources/sound.wav"); // Load WAV audio file - raylib::Sound fxOgg("resources/target.ogg"); // Load OGG audio file - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - if (IsKeyPressed(KEY_SPACE)) fxWav.Play(); // Play WAV sound - if (IsKeyPressed(KEY_ENTER)) fxOgg.Play(); // Play OGG sound - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - DrawText("Press SPACE to PLAY the WAV sound!", 200, 180, 20, LIGHTGRAY); - DrawText("Press ENTER to PLAY the OGG sound!", 200, 220, 20, LIGHTGRAY); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/audio/resources/LICENSE.md b/examples/audio/resources/LICENSE.md deleted file mode 100644 index c94731c9..00000000 --- a/examples/audio/resources/LICENSE.md +++ /dev/null @@ -1,10 +0,0 @@ -| resource | author | licence | notes | -| :------------------- | :---------: | :------ | :---- | -| country.mp3 | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game | -| target.ogg | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game | -| target.flac | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game | -| coin.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) | -| sound.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) | -| spring.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) | -| weird.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) | -| mini1111.xm | [tPORt](https://modarchive.org/index.php?request=view_by_moduleid&query=51891) | [Mod Archive Distribution license](https://modarchive.org/index.php?terms-upload) | - | diff --git a/examples/audio/resources/coin.wav b/examples/audio/resources/coin.wav deleted file mode 100644 index 6007509b..00000000 Binary files a/examples/audio/resources/coin.wav and /dev/null differ diff --git a/examples/audio/resources/country.mp3 b/examples/audio/resources/country.mp3 deleted file mode 100644 index 91066cce..00000000 Binary files a/examples/audio/resources/country.mp3 and /dev/null differ diff --git a/examples/audio/resources/mini1111.xm b/examples/audio/resources/mini1111.xm deleted file mode 100644 index a185c1a2..00000000 Binary files a/examples/audio/resources/mini1111.xm and /dev/null differ diff --git a/examples/audio/resources/sound.wav b/examples/audio/resources/sound.wav deleted file mode 100644 index b5d01c9b..00000000 Binary files a/examples/audio/resources/sound.wav and /dev/null differ diff --git a/examples/audio/resources/spring.wav b/examples/audio/resources/spring.wav deleted file mode 100644 index c7fbf1b9..00000000 Binary files a/examples/audio/resources/spring.wav and /dev/null differ diff --git a/examples/audio/resources/target.flac b/examples/audio/resources/target.flac deleted file mode 100644 index 5fad22c8..00000000 Binary files a/examples/audio/resources/target.flac and /dev/null differ diff --git a/examples/audio/resources/target.ogg b/examples/audio/resources/target.ogg deleted file mode 100644 index 2b73e1c7..00000000 Binary files a/examples/audio/resources/target.ogg and /dev/null differ diff --git a/examples/audio/resources/weird.wav b/examples/audio/resources/weird.wav deleted file mode 100644 index 101029c5..00000000 Binary files a/examples/audio/resources/weird.wav and /dev/null differ diff --git a/examples/core/core_basic_window.cpp b/examples/core/core_basic_window.cpp deleted file mode 100644 index 7df35381..00000000 --- a/examples/core/core_basic_window.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************************* -* -* raylib [core] example - Basic window -* -* Welcome to raylib! -* -* To test examples, just press F6 and execute raylib_compile_execute script -* Note that compiled executable is placed in the same folder as .c file -* -* You can find all basic examples on C:\raylib\raylib\examples folder or -* raylib official webpage: www.raylib.com -* -* Enjoy using raylib. :) -* -* This example has been created using raylib 1.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2014 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - int screenWidth = 800; - int screenHeight = 450; - raylib::Color textColor = raylib::Color::LightGray(); - raylib::Window window(screenWidth, screenHeight, "raylib [core] example - basic window"); - - SetTargetFPS(60); - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - // Update your variables here - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - while (window.Drawing()) { - window.ClearBackground(RAYWHITE); - textColor.DrawText("Congrats! You created your first window!", 190, 200, 20); - } - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/core/core_basic_window_web.cpp b/examples/core/core_basic_window_web.cpp deleted file mode 100644 index 7d43df6f..00000000 --- a/examples/core/core_basic_window_web.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************************* -* -* raylib-cpp [core] example - Basic window (adapted for HTML5 platform) -* -* This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI -* As you will notice, code structure is slightly diferent to the other examples... -* To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning -* -* This example has been created using raylib 1.3 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2015 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -#if defined(PLATFORM_WEB) - #include -#endif - -//---------------------------------------------------------------------------------- -// Global Variables Definition -//---------------------------------------------------------------------------------- -int screenWidth = 800; -int screenHeight = 450; - -//---------------------------------------------------------------------------------- -// Module Functions Declaration -//---------------------------------------------------------------------------------- -void UpdateDrawFrame(void); // Update and Draw one frame - -//---------------------------------------------------------------------------------- -// Main Enry Point -//---------------------------------------------------------------------------------- -int main() -{ - // Initialization - //-------------------------------------------------------------------------------------- - raylib::Window window(screenWidth, screenHeight, "raylib-cpp [core] example - basic window"); - -#if defined(PLATFORM_WEB) - emscripten_set_main_loop(UpdateDrawFrame, 0, 1); -#else - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) // Detect window close button or ESC key - { - UpdateDrawFrame(); - } -#endif - - return 0; -} - -//---------------------------------------------------------------------------------- -// Module Functions Definition -//---------------------------------------------------------------------------------- -void UpdateDrawFrame(void) -{ - // Update - //---------------------------------------------------------------------------------- - // TODO: Update your variables here - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - - ClearBackground(RAYWHITE); - - raylib::DrawText("Congrats! You created your first raylib-cpp window!", 190, 200, 20, LIGHTGRAY); - - EndDrawing(); - //---------------------------------------------------------------------------------- -} diff --git a/examples/core/core_drop_files.cpp b/examples/core/core_drop_files.cpp deleted file mode 100644 index fd4806ee..00000000 --- a/examples/core/core_drop_files.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************************* -* -* raylib [core] example - Windows drop files -* -* This example only works on platforms that support drag & drop (Windows, Linux, OSX, Html5?) -* -* This example has been created using raylib-cpp (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2020 Rob Loach (@RobLoach) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [core] example - drop files"); - - std::vector droppedFiles; - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - if (IsFileDropped()) { - droppedFiles = raylib::LoadDroppedFiles(); - } - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - // Check if there are files to process. - if (droppedFiles.empty()) { - raylib::DrawText("Drop your files to this window!", 100, 40, 20, DARKGRAY); - } else { - raylib::DrawText("Dropped files:", 100, 40, 20, DARKGRAY); - - // Iterate through all the dropped files. - for (int i = 0; i < (int)droppedFiles.size(); i++) { - if (i % 2 == 0) - DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f)); - else - DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f)); - - // Display the path to the dropped file. - raylib::DrawText(droppedFiles[i].c_str(), 120, 100 + 40 * i, 10, GRAY); - } - - raylib::DrawText("Drop new files...", 100, 110 + 40 * droppedFiles.size(), 20, DARKGRAY); - } - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/core/core_input_mouse.cpp b/examples/core/core_input_mouse.cpp deleted file mode 100644 index 833f621d..00000000 --- a/examples/core/core_input_mouse.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************************* -* -* raylib [core] example - Mouse input -* -* This example has been created using raylib 1.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2014 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [core] example - mouse input"); - - raylib::Vector2 ballPosition(-100.0f, -100.0f); - raylib::Color ballColor = raylib::Color::DarkBlue(); - raylib::Color textColor = raylib::Color::DarkGray(); - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //--------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - ballPosition = GetMousePosition(); - - if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) ballColor = MAROON; - else if (IsMouseButtonPressed(MOUSE_MIDDLE_BUTTON)) ballColor = LIME; - else if (IsMouseButtonPressed(MOUSE_RIGHT_BUTTON)) ballColor = DARKBLUE; - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - ballPosition.DrawCircle(40, ballColor); - - textColor.DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/core/core_loading_thread.cpp b/examples/core/core_loading_thread.cpp deleted file mode 100644 index c0e7fef6..00000000 --- a/examples/core/core_loading_thread.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/******************************************************************************* -* -* raylib example - loading thread -* -* This example has been created using raylib-cpp (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license -* (View raylib.h for details) -* -* Copyright (c) 2014-2019 Ramon Santamaria (@raysan5) -* Copyright (c) 2021 Paul Keir (University of the West of Scotland) -* -*******************************************************************************/ - -#include // C++11 standard library threads -#include // C++ atomic data types -#include // For: chrono::steady_clock::now() -#include // May be thrown by thread c'tor - -#include "raylib-cpp.hpp" - -// Using C++ std::atomic_bool (aka. std::atomic) for synchronization. -// n.b. A plain built-in type can't be used for inter-thread synchronization -std::atomic_bool dataLoaded{false}; -static void LoadDataThread(); // Loading data thread function declaration -static int dataProgress = 0; // Data progress accumulator - -int main(void) -{ - // Initialization - //-------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, - "raylib [core] example - loading thread"); - - std::thread threadId; // Loading data thread id - - enum { STATE_WAITING, STATE_LOADING, STATE_FINISHED } state = STATE_WAITING; - int framesCounter = 0; - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------- - switch (state) - { - case STATE_WAITING: - if (IsKeyPressed(KEY_ENTER)) - { - try { - threadId = std::thread(LoadDataThread); - TraceLog(LOG_INFO, - "Loading thread initialized successfully"); - } catch (std::system_error& e) { - TraceLog(LOG_ERROR, "Error: %s", e.what()); - } - - state = STATE_LOADING; - } - break; - - case STATE_LOADING: - framesCounter++; - if (dataLoaded.load()) - { - framesCounter = 0; - state = STATE_FINISHED; - } - break; - - case STATE_FINISHED: - if (IsKeyPressed(KEY_ENTER)) - { - // Reset everything to launch again - dataLoaded = false; - dataProgress = 0; - state = STATE_WAITING; - } - break; - - default: - break; - } - //---------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------- - BeginDrawing(); - { - - window.ClearBackground(RAYWHITE); - - switch (state) - { - case STATE_WAITING: - raylib::DrawText("PRESS ENTER to START LOADING DATA", - 150, 170, 20, DARKGRAY); - break; - - case STATE_LOADING: - DrawRectangle(150, 200, dataProgress, 60, SKYBLUE); - if ((framesCounter/15)%2) - raylib::DrawText("LOADING DATA...", 240, 210, 40, DARKBLUE); - break; - - case STATE_FINISHED: - DrawRectangle(150, 200, 500, 60, LIME); - raylib::DrawText("DATA LOADED!", 250, 210, 40, GREEN); - break; - } - - DrawRectangleLines(150, 200, 500, 60, DARKGRAY); - } - - EndDrawing(); - //---------------------------------------------------------------------- - } - - if (threadId.joinable()) // The user might quit without creating a thread. - threadId.join(); // Good etiquette, but may take a second. - - return 0; -} - -// Loading data thread function definition -static void LoadDataThread() -{ - using namespace std::chrono; - int timeCounter = 0; // Time counted in ms - - auto prevTime = steady_clock::now(); - - // We simulate data loading with a time counter for 5 seconds - while (timeCounter < 5000) - { - auto currentTime = steady_clock::now() - prevTime; - timeCounter = duration_cast(currentTime).count(); - - // We accumulate time over a global variable to be used in - // main thread as a progress bar - dataProgress = timeCounter/10; - } - - // When data has finished loading, we set global variable - dataLoaded = true; -} diff --git a/examples/core/core_random_values.cpp b/examples/core/core_random_values.cpp deleted file mode 100644 index 1522b847..00000000 --- a/examples/core/core_random_values.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************************* -* -* raylib [core] example - Generate random values -* -* This example has been created using raylib 1.1 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2014 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [core] example - generate random values"); - - int framesCounter = 0; // Variable used to count frames - - int randValue = GetRandomValue(-8, 5); // Get a random integer number between -8 and 5 (both included) - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - framesCounter++; - - // Every two seconds (120 frames) a new random value is generated - if (((framesCounter / 120) % 2) == 1) { - randValue = GetRandomValue(-8, 5); - framesCounter = 0; - } - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - raylib::DrawText("Every 2 seconds a new random value is generated:", 130, 100, 20, MAROON); - - raylib::DrawText(TextFormat("%i", randValue), 360, 180, 80, LIGHTGRAY); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/core/core_window_letterbox.cpp b/examples/core/core_window_letterbox.cpp deleted file mode 100644 index d5a15bc8..00000000 --- a/examples/core/core_window_letterbox.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/******************************************************************************************* -* -* raylib [core] example - window scale letterbox (and virtual mouse) -* -* Example originally created with raylib 2.5, last time updated with raylib 4.0 -* -* Example contributed by Anata (@anatagawa) and reviewed by Ramon Santamaria (@raysan5) -* -* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, -* BSD-like license that allows static linking with closed source software -* -* Copyright (c) 2019-2023 Anata (@anatagawa) and Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -#include "raymath.hpp" // Required for: Vector2Clamp() - -#define MAX(a, b) ((a)>(b)? (a) : (b)) -#define MIN(a, b) ((a)<(b)? (a) : (b)) - -//------------------------------------------------------------------------------------ -// Program main entry point -//------------------------------------------------------------------------------------ -int main(void) -{ - const int windowWidth = 800; - const int windowHeight = 450; - - // Enable config flags for resizable window and vertical synchro - raylib::Window window(windowWidth, windowHeight, - "raylib [core] example - window scale letterbox", - FLAG_WINDOW_RESIZABLE | FLAG_VSYNC_HINT); - window.SetMinSize(320, 240); - - int gameScreenWidth = 640; - int gameScreenHeight = 480; - - // Render texture initialization, used to hold the rendering result so we can easily resize it - raylib::RenderTexture2D target(gameScreenWidth, gameScreenHeight); - target.GetTexture().SetFilter(TEXTURE_FILTER_BILINEAR); // Texture scale filter to use - - raylib::Color colors[10]; - for (int i = 0; i < 10; i++) { - colors[i] = raylib::Color((unsigned char)GetRandomValue(100, 250), (unsigned char)GetRandomValue(50, 150), (unsigned char)GetRandomValue(10, 100), 255); - } - - window.SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) // Detect window close button or ESC key - { - // Update - //---------------------------------------------------------------------------------- - // Compute required framebuffer scaling - float scale = MIN((float)GetScreenWidth()/gameScreenWidth, (float)GetScreenHeight()/gameScreenHeight); - - if (IsKeyPressed(KEY_SPACE)) - { - // Recalculate random colors for the bars - for (int i = 0; i < 10; i++) { - colors[i] = raylib::Color((unsigned char)GetRandomValue(100, 250), (unsigned char)GetRandomValue(50, 150), (unsigned char)GetRandomValue(10, 100), 255); - } - } - - // Update virtual mouse (clamped mouse value behind game screen) - raylib::Vector2 mouse = raylib::Mouse::GetPosition(); - raylib::Vector2 virtualMouse( - (mouse.x - (GetScreenWidth() - (gameScreenWidth*scale))*0.5f)/scale, - (mouse.y - (GetScreenHeight() - (gameScreenHeight*scale))*0.5f)/scale - ); - virtualMouse = virtualMouse.Clamp(raylib::Vector2::Zero(), raylib::Vector2(gameScreenWidth, gameScreenHeight)); - - // Apply the same transformation as the virtual mouse to the real mouse (i.e. to work with raygui) - //SetMouseOffset(-(GetScreenWidth() - (gameScreenWidth*scale))*0.5f, -(GetScreenHeight() - (gameScreenHeight*scale))*0.5f); - //SetMouseScale(1/scale, 1/scale); - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - // Draw everything in the render texture, note this will not be rendered on screen, yet - target.BeginMode(); - ClearBackground(RAYWHITE); // Clear render texture background color - - for (int i = 0; i < 10; i++) DrawRectangle(0, (gameScreenHeight/10)*i, gameScreenWidth, gameScreenHeight/10, colors[i]); - - DrawText("If executed inside a window,\nyou can resize the window,\nand see the screen scaling!", 10, 25, 20, WHITE); - DrawText(TextFormat("Default Mouse: [%i , %i]", (int)mouse.x, (int)mouse.y), 350, 25, 20, GREEN); - DrawText(TextFormat("Virtual Mouse: [%i , %i]", (int)virtualMouse.x, (int)virtualMouse.y), 350, 55, 20, YELLOW); - target.EndMode(); - - BeginDrawing(); - ClearBackground(BLACK); // Clear screen background - - // Draw render texture to screen, properly scaled - target.GetTexture().Draw(raylib::Rectangle(0.0f, 0.0f, target.texture.width, -target.texture.height), - raylib::Rectangle( - (GetScreenWidth() - (gameScreenWidth*scale))*0.5f, - (GetScreenHeight() - (gameScreenHeight*scale))*0.5f, - gameScreenWidth*scale, gameScreenHeight*scale - ), - raylib::Vector2::Zero(), 0.0f, WHITE); - EndDrawing(); - //-------------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/core/core_world_screen.cpp b/examples/core/core_world_screen.cpp deleted file mode 100644 index 2b91a5ca..00000000 --- a/examples/core/core_world_screen.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************************* -* -* raylib [core] example - World to screen -* -* This example has been created using raylib 1.3 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2015 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [core] example - 3d camera free"); - - // Define the camera to look into our 3d world - raylib::Camera camera( - raylib::Vector3(10.0f, 10.0f, 10.0f), - raylib::Vector3(), - raylib::Vector3(0.0f, 1.0f, 0.0f), - 45.0f, - CAMERA_PERSPECTIVE); - - Vector3 cubePosition; - Vector2 cubeScreenPosition; - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - camera.Update(CAMERA_THIRD_PERSON); // Update camera - - // Calculate cube screen space position (with a little offset to be in top) - cubeScreenPosition = GetWorldToScreen(Vector3{cubePosition.x, cubePosition.y + 2.5f, cubePosition.z}, camera); - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - camera.BeginMode(); - { - DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED); - DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON); - - DrawGrid(10, 1.0f); - } - camera.EndMode(); - - raylib::DrawText("Enemy: 100 / 100", - cubeScreenPosition.x - MeasureText("Enemy: 100/100", 20) / 2, - cubeScreenPosition.y, 20, - BLACK); - raylib::DrawText("Text is always on top of the cube", - (screenWidth - MeasureText("Text is always on top of the cube", 20)) / 2, - 25, 20, GRAY); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/core/resources/LICENSE b/examples/core/resources/LICENSE deleted file mode 100644 index d7d797ad..00000000 --- a/examples/core/resources/LICENSE +++ /dev/null @@ -1,4 +0,0 @@ -| resource | author | licence | notes | -| :------------ | :---------: | :------ | :---- | -| ps3.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - | -| xbox.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - | diff --git a/examples/core/resources/core_basic_window_web.html b/examples/core/resources/core_basic_window_web.html deleted file mode 100644 index 825aa9ff..00000000 --- a/examples/core/resources/core_basic_window_web.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - raylib-cpp [core] example - basic window - - - - - - - - - - - - - - - - - diff --git a/examples/core/resources/distortion100.fs b/examples/core/resources/distortion100.fs deleted file mode 100644 index 112cbcb5..00000000 --- a/examples/core/resources/distortion100.fs +++ /dev/null @@ -1,52 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables -uniform vec2 leftLensCenter; -uniform vec2 rightLensCenter; -uniform vec2 leftScreenCenter; -uniform vec2 rightScreenCenter; -uniform vec2 scale; -uniform vec2 scaleIn; -uniform vec4 hmdWarpParam; -uniform vec4 chromaAbParam; - -void main() -{ - // Compute lens distortion - vec2 lensCenter = fragTexCoord.x < 0.5? leftLensCenter : rightLensCenter; - vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter; - vec2 theta = (fragTexCoord - lensCenter)*scaleIn; - float rSq = theta.x*theta.x + theta.y*theta.y; - vec2 theta1 = theta*(hmdWarpParam.x + hmdWarpParam.y*rSq + hmdWarpParam.z*rSq*rSq + hmdWarpParam.w*rSq*rSq*rSq); - vec2 thetaBlue = theta1*(chromaAbParam.z + chromaAbParam.w*rSq); - vec2 tcBlue = lensCenter + scale*thetaBlue; - - if (any(bvec2(clamp(tcBlue, screenCenter - vec2(0.25, 0.5), screenCenter + vec2(0.25, 0.5)) - tcBlue))) - { - // Set black fragment for everything outside the lens border - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } - else - { - // Compute color chroma aberration - float blue = texture2D(texture0, tcBlue).b; - vec2 tcGreen = lensCenter + scale*theta1; - float green = texture2D(texture0, tcGreen).g; - - vec2 thetaRed = theta1*(chromaAbParam.x + chromaAbParam.y*rSq); - vec2 tcRed = lensCenter + scale*thetaRed; - - float red = texture2D(texture0, tcRed).r; - gl_FragColor = vec4(red, green, blue, 1.0); - } -} diff --git a/examples/core/resources/distortion330.fs b/examples/core/resources/distortion330.fs deleted file mode 100644 index 15d03ccf..00000000 --- a/examples/core/resources/distortion330.fs +++ /dev/null @@ -1,53 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables -uniform vec2 leftLensCenter = vec2(0.288, 0.5); -uniform vec2 rightLensCenter = vec2(0.712, 0.5); -uniform vec2 leftScreenCenter = vec2(0.25, 0.5); -uniform vec2 rightScreenCenter = vec2(0.75, 0.5); -uniform vec2 scale = vec2(0.25, 0.45); -uniform vec2 scaleIn = vec2(4, 2.2222); -uniform vec4 hmdWarpParam = vec4(1, 0.22, 0.24, 0); -uniform vec4 chromaAbParam = vec4(0.996, -0.004, 1.014, 0.0); - -void main() -{ - // Compute lens distortion - vec2 lensCenter = fragTexCoord.x < 0.5? leftLensCenter : rightLensCenter; - vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter; - vec2 theta = (fragTexCoord - lensCenter)*scaleIn; - float rSq = theta.x*theta.x + theta.y*theta.y; - vec2 theta1 = theta*(hmdWarpParam.x + hmdWarpParam.y*rSq + hmdWarpParam.z*rSq*rSq + hmdWarpParam.w*rSq*rSq*rSq); - vec2 thetaBlue = theta1*(chromaAbParam.z + chromaAbParam.w*rSq); - vec2 tcBlue = lensCenter + scale*thetaBlue; - - if (any(bvec2(clamp(tcBlue, screenCenter - vec2(0.25, 0.5), screenCenter + vec2(0.25, 0.5)) - tcBlue))) - { - // Set black fragment for everything outside the lens border - finalColor = vec4(0.0, 0.0, 0.0, 1.0); - } - else - { - // Compute color chroma aberration - float blue = texture(texture0, tcBlue).b; - vec2 tcGreen = lensCenter + scale*theta1; - float green = texture(texture0, tcGreen).g; - - vec2 thetaRed = theta1*(chromaAbParam.x + chromaAbParam.y*rSq); - vec2 tcRed = lensCenter + scale*thetaRed; - - float red = texture(texture0, tcRed).r; - finalColor = vec4(red, green, blue, 1.0); - } -} diff --git a/examples/core/resources/ps3.png b/examples/core/resources/ps3.png deleted file mode 100644 index 59c0b35c..00000000 Binary files a/examples/core/resources/ps3.png and /dev/null differ diff --git a/examples/core/resources/xbox.png b/examples/core/resources/xbox.png deleted file mode 100644 index 1a570589..00000000 Binary files a/examples/core/resources/xbox.png and /dev/null differ diff --git a/examples/models/models_billboard.cpp b/examples/models/models_billboard.cpp deleted file mode 100644 index 111d9af4..00000000 --- a/examples/models/models_billboard.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************************* -* -* raylib [models] example - Drawing billboards -* -* This example has been created using raylib 1.3 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2015 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [models] example - drawing billboards"); - - // Define the camera to look into our 3d world - raylib::Camera camera( - raylib::Vector3(5.0f, 4.0f, 5.0f), - raylib::Vector3(0.0f, 2.0f, 0.0f), - raylib::Vector3(0.0f, 1.0f, 0.0f), - 45.0f, - CAMERA_PERSPECTIVE); - - raylib::Texture2D bill("resources/billboard.png"); // Our texture billboard - raylib::Vector3 billPosition(0.0f, 2.0f, 0.0f); // Position where draw billboard - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - camera.Update(CAMERA_ORBITAL); // Update camera - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - camera.BeginMode(); - { - DrawGrid(10, 1.0f); // Draw a grid - bill.DrawBillboard(camera, billPosition, 2.0f); - } - camera.EndMode(); - - DrawFPS(10, 10); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/models/models_first_person_maze.cpp b/examples/models/models_first_person_maze.cpp deleted file mode 100644 index 4910aa79..00000000 --- a/examples/models/models_first_person_maze.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/******************************************************************************************* -* -* raylib [models] example - first person maze -* -* This example has been created using raylib 2.5 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2019 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main(void) -{ - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [models] example - first person maze"); - - // Define the camera to look into our 3d world - raylib::Camera camera({ 0.2f, 0.4f, 0.2f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f); - - raylib::Image imMap("resources/cubicmap.png"); // Load cubicmap image (RAM) - raylib::Texture cubicmap(imMap); // Convert image to texture to display (VRAM) - raylib::MeshUnmanaged mesh = raylib::MeshUnmanaged::Cubicmap(imMap, Vector3{ 1.0f, 1.0f, 1.0f }); // Use MeshUnmanaged, Mesh will be handled by Model - raylib::Model model(mesh); - - // NOTE: By default each cube is mapped to one part of texture atlas - raylib::Texture texture("resources/cubicmap_atlas.png"); // Load map texture - model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set map diffuse texture - - // Get map image data to be used for collision detection - Color *mapPixels = imMap.LoadColors(); - - imMap.Unload(); // Unload image from RAM - - raylib::Vector3 mapPosition(-16.0f, 0.0f, -8.0f); // Set model position - raylib::Vector3 playerPosition(camera.position); // Set player position - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - raylib::Vector3 oldCamPos(camera.position); // Store old camera position - - camera.Update(CAMERA_FIRST_PERSON); // Update camera - - // Check player collision (we simplify to 2D collision detection) - raylib::Vector2 playerPos(camera.position.x, camera.position.z); - float playerRadius = 0.1f; // Collision radius (player is modelled as a cilinder for collision) - - int playerCellX = static_cast(playerPos.x - mapPosition.x + 0.5f); - int playerCellY = static_cast(playerPos.y - mapPosition.z + 0.5f); - - // Out-of-limits security check - if (playerCellX < 0) playerCellX = 0; - else if (playerCellX >= cubicmap.width) playerCellX = cubicmap.width - 1; - - if (playerCellY < 0) playerCellY = 0; - else if (playerCellY >= cubicmap.height) playerCellY = cubicmap.height - 1; - - // Check map collisions using image data and player position - // TODO: Improvement: Just check player surrounding cells for collision - for (int y = 0; y < cubicmap.height; y++) - { - for (int x = 0; x < cubicmap.width; x++) - { - if ((mapPixels[y*cubicmap.width + x].r == 255) && // Collision: white pixel, only check R channel - (playerPos.CheckCollisionCircle(playerRadius, - Rectangle{ mapPosition.x - 0.5f + x*1.0f, mapPosition.z - 0.5f + y*1.0f, 1.0f, 1.0f }))) - { - // Collision detected, reset camera position - camera.position = oldCamPos; - } - } - } - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - camera.BeginMode(); - { - model.Draw(mapPosition); // Draw maze map - // playerPosition.DrawCube((Vector3){ 0.2f, 0.4f, 0.2f }, RED); // Draw player - } - camera.EndMode(); - - cubicmap.Draw(Vector2{ static_cast(GetScreenWidth() - cubicmap.width*4 - 20), 20 }, 0.0f, 4.0f, WHITE); - DrawRectangleLines(GetScreenWidth() - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN); - - // Draw player position radar - DrawRectangle(GetScreenWidth() - cubicmap.width*4 - 20 + playerCellX*4, 20 + playerCellY*4, 4, 4, RED); - - DrawFPS(10, 10); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - // De-Initialization - //-------------------------------------------------------------------------------------- - - UnloadImageColors(mapPixels); // Unload color array - - //---------------------------------------------------------------------------------- - - return 0; -} diff --git a/examples/models/resources/billboard.png b/examples/models/resources/billboard.png deleted file mode 100644 index 8c99118b..00000000 Binary files a/examples/models/resources/billboard.png and /dev/null differ diff --git a/examples/models/resources/cubicmap.png b/examples/models/resources/cubicmap.png deleted file mode 100644 index 392dbf2e..00000000 Binary files a/examples/models/resources/cubicmap.png and /dev/null differ diff --git a/examples/models/resources/cubicmap_atlas.png b/examples/models/resources/cubicmap_atlas.png deleted file mode 100644 index 9fc404a7..00000000 Binary files a/examples/models/resources/cubicmap_atlas.png and /dev/null differ diff --git a/examples/multiple/Player.cpp b/examples/multiple/Player.cpp deleted file mode 100644 index f923d3a5..00000000 --- a/examples/multiple/Player.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "Player.hpp" -#include "raylib-cpp.hpp" - -Player::Player() { - position = Rectangle{ - GetScreenWidth() / 2.0f - 50, - GetScreenHeight() / 2.0f - 50, - 100, - 100 - }; - speed = 3; -} - -void Player::Draw() { - position.Draw(RED); -} - -void Player::Update() { - if (IsKeyDown(KEY_UP)) { - position.y -= speed; - } - if (IsKeyDown(KEY_DOWN)) { - position.y += speed; - } - if (IsKeyDown(KEY_RIGHT)) { - position.x += speed; - } - if (IsKeyDown(KEY_LEFT)) { - position.x -= speed; - } -} diff --git a/examples/multiple/Player.hpp b/examples/multiple/Player.hpp deleted file mode 100644 index af8c3c47..00000000 --- a/examples/multiple/Player.hpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "raylib-cpp.hpp" - -class Player { - public: - Player(); - raylib::Rectangle position; - int speed; - void Draw(); - void Update(); -}; diff --git a/examples/multiple/README.md b/examples/multiple/README.md deleted file mode 100644 index 74ec0a64..00000000 --- a/examples/multiple/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Multiple Files Example - -This provides an example of including raylib-cpp.hpp in multiple files. diff --git a/examples/multiple/main.cpp b/examples/multiple/main.cpp deleted file mode 100644 index 118a04fb..00000000 --- a/examples/multiple/main.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************************* -* -* raylib-cpp [multiple] example - Includes raylib-cpp.hpp from multiple sources. -* -* Welcome to raylib! -* -* To test examples, just press F6 and execute raylib_compile_execute script -* Note that compiled executable is placed in the same folder as .c file -* -* You can find all basic examples on C:\raylib\raylib\examples folder or -* raylib official webpage: www.raylib.com -* -* Enjoy using raylib. :) -* -* This example has been created using raylib-cpp -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2021 Rob Loach (https://robloach.net) -* -********************************************************************************************/ - -#include "Player.hpp" -#include "raylib-cpp.hpp" - -int main() { - raylib::Window window(640, 480, "raylib-cpp [multiple] example"); - SetTargetFPS(60); - - Player player; - while (!window.ShouldClose()) { - window.BeginDrawing(); - { - window.ClearBackground(SKYBLUE); - player.Update(); - player.Draw(); - } - window.EndDrawing(); - } -} diff --git a/examples/shaders/resources/models/old_car_new.glb b/examples/shaders/resources/models/old_car_new.glb deleted file mode 100644 index 119995ca..00000000 Binary files a/examples/shaders/resources/models/old_car_new.glb and /dev/null differ diff --git a/examples/shaders/resources/models/plane.glb b/examples/shaders/resources/models/plane.glb deleted file mode 100644 index 452e1c5b..00000000 Binary files a/examples/shaders/resources/models/plane.glb and /dev/null differ diff --git a/examples/shaders/resources/old_car_d.png b/examples/shaders/resources/old_car_d.png deleted file mode 100644 index d8b3c833..00000000 Binary files a/examples/shaders/resources/old_car_d.png and /dev/null differ diff --git a/examples/shaders/resources/old_car_e.png b/examples/shaders/resources/old_car_e.png deleted file mode 100644 index 23f01c0f..00000000 Binary files a/examples/shaders/resources/old_car_e.png and /dev/null differ diff --git a/examples/shaders/resources/old_car_mra.png b/examples/shaders/resources/old_car_mra.png deleted file mode 100644 index 0fb46b33..00000000 Binary files a/examples/shaders/resources/old_car_mra.png and /dev/null differ diff --git a/examples/shaders/resources/old_car_n.png b/examples/shaders/resources/old_car_n.png deleted file mode 100644 index 11f689fe..00000000 Binary files a/examples/shaders/resources/old_car_n.png and /dev/null differ diff --git a/examples/shaders/resources/road_a.png b/examples/shaders/resources/road_a.png deleted file mode 100644 index 10377739..00000000 Binary files a/examples/shaders/resources/road_a.png and /dev/null differ diff --git a/examples/shaders/resources/road_mra.png b/examples/shaders/resources/road_mra.png deleted file mode 100644 index 988c839c..00000000 Binary files a/examples/shaders/resources/road_mra.png and /dev/null differ diff --git a/examples/shaders/resources/road_n.png b/examples/shaders/resources/road_n.png deleted file mode 100644 index a5f3548c..00000000 Binary files a/examples/shaders/resources/road_n.png and /dev/null differ diff --git a/examples/shaders/resources/shaders/glsl100/ighting.fs b/examples/shaders/resources/shaders/glsl100/ighting.fs deleted file mode 100644 index e6faece7..00000000 --- a/examples/shaders/resources/shaders/glsl100/ighting.fs +++ /dev/null @@ -1,75 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec3 fragPosition; -varying vec2 fragTexCoord; -varying vec4 fragColor; -varying vec3 fragNormal; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -#define MAX_LIGHTS 4 -#define LIGHT_DIRECTIONAL 0 -#define LIGHT_POINT 1 - -struct Light { - int enabled; - int type; - vec3 position; - vec3 target; - vec4 color; -}; - -// Input lighting values -uniform Light lights[MAX_LIGHTS]; -uniform vec4 ambient; -uniform vec3 viewPos; - -void main() -{ - // Texel color fetching from texture sampler - vec4 texelColor = texture2D(texture0, fragTexCoord); - vec3 lightDot = vec3(0.0); - vec3 normal = normalize(fragNormal); - vec3 viewD = normalize(viewPos - fragPosition); - vec3 specular = vec3(0.0); - - // NOTE: Implement here your fragment shader code - - for (int i = 0; i < MAX_LIGHTS; i++) - { - if (lights[i].enabled == 1) - { - vec3 light = vec3(0.0); - - if (lights[i].type == LIGHT_DIRECTIONAL) - { - light = -normalize(lights[i].target - lights[i].position); - } - - if (lights[i].type == LIGHT_POINT) - { - light = normalize(lights[i].position - fragPosition); - } - - float NdotL = max(dot(normal, light), 0.0); - lightDot += lights[i].color.rgb*NdotL; - - float specCo = 0.0; - if (NdotL > 0.0) specCo = pow(max(0.0, dot(viewD, reflect(-(light), normal))), 16.0); // 16 refers to shine - specular += specCo; - } - } - - vec4 finalColor = (texelColor*((colDiffuse + vec4(specular, 1.0))*vec4(lightDot, 1.0))); - finalColor += texelColor*(ambient/10.0); - - // Gamma correction - gl_FragColor = pow(finalColor, vec4(1.0/2.2)); -} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/lighting.vs b/examples/shaders/resources/shaders/glsl100/lighting.vs deleted file mode 100644 index f973d2cd..00000000 --- a/examples/shaders/resources/shaders/glsl100/lighting.vs +++ /dev/null @@ -1,59 +0,0 @@ -#version 100 - -// Input vertex attributes -attribute vec3 vertexPosition; -attribute vec2 vertexTexCoord; -attribute vec3 vertexNormal; -attribute vec4 vertexColor; - -// Input uniform values -uniform mat4 mvp; -uniform mat4 matModel; - -// Output vertex attributes (to fragment shader) -varying vec3 fragPosition; -varying vec2 fragTexCoord; -varying vec4 fragColor; -varying vec3 fragNormal; - -// NOTE: Add here your custom variables - -// https://github.com/glslify/glsl-inverse -mat3 inverse(mat3 m) -{ - float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2]; - float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2]; - float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2]; - - float b01 = a22*a11 - a12*a21; - float b11 = -a22*a10 + a12*a20; - float b21 = a21*a10 - a11*a20; - - float det = a00*b01 + a01*b11 + a02*b21; - - return mat3(b01, (-a22*a01 + a02*a21), (a12*a01 - a02*a11), - b11, (a22*a00 - a02*a20), (-a12*a00 + a02*a10), - b21, (-a21*a00 + a01*a20), (a11*a00 - a01*a10))/det; -} - -// https://github.com/glslify/glsl-transpose -mat3 transpose(mat3 m) -{ - return mat3(m[0][0], m[1][0], m[2][0], - m[0][1], m[1][1], m[2][1], - m[0][2], m[1][2], m[2][2]); -} - -void main() -{ - // Send vertex attributes to fragment shader - fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - - mat3 normalMatrix = transpose(inverse(mat3(matModel))); - fragNormal = normalize(normalMatrix*vertexNormal); - - // Calculate final vertex position - gl_Position = mvp*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/pbr.fs b/examples/shaders/resources/shaders/glsl100/pbr.fs deleted file mode 100644 index b94974d7..00000000 --- a/examples/shaders/resources/shaders/glsl100/pbr.fs +++ /dev/null @@ -1,156 +0,0 @@ -#version 100 - -precision mediump float; - -#define MAX_LIGHTS 4 -#define LIGHT_DIRECTIONAL 0 -#define LIGHT_POINT 1 -#define PI 3.14159265358979323846 - -struct Light { - int enabled; - int type; - vec3 position; - vec3 target; - vec4 color; - float intensity; -}; - -// Input vertex attributes (from vertex shader) -varying in vec3 fragPosition; -varying in vec2 fragTexCoord; -varying in vec4 fragColor; -varying in vec3 fragNormal; -varying in vec4 shadowPos; -varying in mat3 TBN; - - -// Input uniform values -uniform int numOfLights; -uniform sampler2D albedoMap; -uniform sampler2D mraMap; -uniform sampler2D normalMap; -uniform sampler2D emissiveMap; // r: Hight g:emissive - -uniform vec2 tiling; -uniform vec2 offset; - -uniform int useTexAlbedo; -uniform int useTexNormal; -uniform int useTexMRA; -uniform int useTexEmissive; - -uniform vec4 albedoColor; -uniform vec4 emissiveColor; -uniform float normalValue; -uniform float metallicValue; -uniform float roughnessValue; -uniform float aoValue; -uniform float emissivePower; - -// Input lighting values -uniform Light lights[MAX_LIGHTS]; -uniform vec3 viewPos; - -uniform vec3 ambientColor; -uniform float ambient; - -// refl in range 0 to 1 -// returns base reflectivity to 1 -// incrase reflectivity when surface view at larger angle -vec3 schlickFresnel(float hDotV,vec3 refl) -{ - return refl + (1.0 - refl) * pow(1.0 - hDotV,5.0); -} - -float ggxDistribution(float nDotH,float roughness) -{ - float a = roughness * roughness * roughness * roughness; - float d = nDotH * nDotH * (a - 1.0) + 1.0; - d = PI * d * d; - return a / max(d,0.0000001); -} - -float geomSmith(float nDotV,float nDotL,float roughness) -{ - float r = roughness + 1.0; - float k = r * r / 8.0; - float ik = 1.0 - k; - float ggx1 = nDotV / (nDotV * ik + k); - float ggx2 = nDotL / (nDotL * ik + k); - return ggx1 * ggx2; -} - -vec3 pbr(){ - vec3 albedo = texture2D(albedoMap,vec2(fragTexCoord.x*tiling.x+offset.x,fragTexCoord.y*tiling.y+offset.y)).rgb; - albedo = vec3(albedoColor.x*albedo.x,albedoColor.y*albedo.y,albedoColor.z*albedo.z); - float metallic = clamp(metallicValue,0.0,1.0); - float roughness = clamp(roughnessValue,0.0,1.0); - float ao = clamp(aoValue,0.0,1.0); - if(useTexMRA == 1) { - vec4 mra = texture2D(mraMap, vec2(fragTexCoord.x * tiling.x + offset.x, fragTexCoord.y * tiling.y + offset.y)); - metallic = clamp(mra.r+metallicValue,0.04,1.0); - roughness = clamp(mra.g+roughnessValue,0.04,1.0); - ao = (mra.b+aoValue)*0.5; - } - - - - vec3 N = normalize(fragNormal); - if(useTexNormal == 1) { - N = texture2D(normalMap, vec2(fragTexCoord.x * tiling.x + offset.y, fragTexCoord.y * tiling.y + offset.y)).rgb; - N = normalize(N * 2.0 - 1.0); - N = normalize(N * TBN); - } - - vec3 V = normalize(viewPos - fragPosition); - - vec3 e = vec3(0); - e = (texture2D(emissiveMap, vec2(fragTexCoord.x*tiling.x+offset.x, fragTexCoord.y*tiling.y+offset.y)).rgb).g * emissiveColor.rgb*emissivePower * float(useTexEmissive); - - //return N;//vec3(metallic,metallic,metallic); - //if dia-electric use base reflectivity of 0.04 otherwise ut is a metal use albedo as base reflectivity - vec3 baseRefl = mix(vec3(0.04),albedo.rgb,metallic); - vec3 Lo = vec3(0.0); // acumulate lighting lum - - for(int i=0;i 0.0) specCo = pow(max(0.0, dot(viewD, reflect(-(light), normal))), 16.0); // 16 refers to shine - specular += specCo; - } - } - - vec4 finalColor = (texelColor*((colDiffuse + vec4(specular, 1.0))*vec4(lightDot, 1.0))); - finalColor += texelColor*(ambient/10.0); - - // Gamma correction - gl_FragColor = pow(finalColor, vec4(1.0/2.2)); -} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl330/lighting.vs b/examples/shaders/resources/shaders/glsl330/lighting.vs deleted file mode 100644 index 6b176354..00000000 --- a/examples/shaders/resources/shaders/glsl330/lighting.vs +++ /dev/null @@ -1,32 +0,0 @@ -#version 330 - -// Input vertex attributes -in vec3 vertexPosition; -in vec2 vertexTexCoord; -in vec3 vertexNormal; -in vec4 vertexColor; - -// Input uniform values -uniform mat4 mvp; -uniform mat4 matModel; -uniform mat4 matNormal; - -// Output vertex attributes (to fragment shader) -out vec3 fragPosition; -out vec2 fragTexCoord; -out vec4 fragColor; -out vec3 fragNormal; - -// NOTE: Add here your custom variables - -void main() -{ - // Send vertex attributes to fragment shader - fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0))); - - // Calculate final vertex position - gl_Position = mvp*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl330/pbr.fs b/examples/shaders/resources/shaders/glsl330/pbr.fs deleted file mode 100644 index d3e08473..00000000 --- a/examples/shaders/resources/shaders/glsl330/pbr.fs +++ /dev/null @@ -1,162 +0,0 @@ -#version 330 - -#define MAX_LIGHTS 4 -#define LIGHT_DIRECTIONAL 0 -#define LIGHT_POINT 1 -#define PI 3.14159265358979323846 - -struct Light { - int enabled; - int type; - vec3 position; - vec3 target; - vec4 color; - float intensity; -}; - -// Input vertex attributes (from vertex shader) -in vec3 fragPosition; -in vec2 fragTexCoord; -in vec4 fragColor; -in vec3 fragNormal; -in vec4 shadowPos; -in mat3 TBN; - -// Output fragment color -out vec4 finalColor; - -// Input uniform values -uniform int numOfLights; -uniform sampler2D albedoMap; -uniform sampler2D mraMap; -uniform sampler2D normalMap; -uniform sampler2D emissiveMap; // r: Hight g:emissive - -uniform vec2 tiling; -uniform vec2 offset; - -uniform int useTexAlbedo; -uniform int useTexNormal; -uniform int useTexMRA; -uniform int useTexEmissive; - -uniform vec4 albedoColor; -uniform vec4 emissiveColor; -uniform float normalValue; -uniform float metallicValue; -uniform float roughnessValue; -uniform float aoValue; -uniform float emissivePower; - -// Input lighting values -uniform Light lights[MAX_LIGHTS]; -uniform vec3 viewPos; - -uniform vec3 ambientColor; -uniform float ambient; - -// Reflectivity in range 0.0 to 1.0 -// NOTE: Reflectivity is increased when surface view at larger angle -vec3 SchlickFresnel(float hDotV,vec3 refl) -{ - return refl + (1.0 - refl)*pow(1.0 - hDotV, 5.0); -} - -float GgxDistribution(float nDotH,float roughness) -{ - float a = roughness * roughness * roughness * roughness; - float d = nDotH * nDotH * (a - 1.0) + 1.0; - d = PI * d * d; - return a / max(d,0.0000001); -} - -float GeomSmith(float nDotV,float nDotL,float roughness) -{ - float r = roughness + 1.0; - float k = r*r / 8.0; - float ik = 1.0 - k; - float ggx1 = nDotV/(nDotV*ik + k); - float ggx2 = nDotL/(nDotL*ik + k); - return ggx1*ggx2; -} - -vec3 ComputePBR() -{ - vec3 albedo = texture(albedoMap,vec2(fragTexCoord.x*tiling.x + offset.x, fragTexCoord.y*tiling.y + offset.y)).rgb; - albedo = vec3(albedoColor.x*albedo.x, albedoColor.y*albedo.y, albedoColor.z*albedo.z); - - float metallic = clamp(metallicValue, 0.0, 1.0); - float roughness = clamp(roughnessValue, 0.0, 1.0); - float ao = clamp(aoValue, 0.0, 1.0); - - if (useTexMRA == 1) - { - vec4 mra = texture(mraMap, vec2(fragTexCoord.x*tiling.x + offset.x, fragTexCoord.y*tiling.y + offset.y))*useTexMRA; - metallic = clamp(mra.r + metallicValue, 0.04, 1.0); - roughness = clamp(mra.g + roughnessValue, 0.04, 1.0); - ao = (mra.b + aoValue)*0.5; - } - - vec3 N = normalize(fragNormal); - if (useTexNormal == 1) - { - N = texture(normalMap, vec2(fragTexCoord.x*tiling.x + offset.y, fragTexCoord.y*tiling.y + offset.y)).rgb; - N = normalize(N*2.0 - 1.0); - N = normalize(N*TBN); - } - - vec3 V = normalize(viewPos - fragPosition); - - vec3 emissive = vec3(0); - emissive = (texture(emissiveMap, vec2(fragTexCoord.x*tiling.x+offset.x, fragTexCoord.y*tiling.y+offset.y)).rgb).g * emissiveColor.rgb*emissivePower * useTexEmissive; - - // return N;//vec3(metallic,metallic,metallic); - // if dia-electric use base reflectivity of 0.04 otherwise ut is a metal use albedo as base reflectivity - vec3 baseRefl = mix(vec3(0.04), albedo.rgb, metallic); - vec3 lightAccum = vec3(0.0); // Acumulate lighting lum - - for (int i = 0; i < numOfLights; i++) - { - vec3 L = normalize(lights[i].position - fragPosition); // Compute light vector - vec3 H = normalize(V + L); // Compute halfway bisecting vector - float dist = length(lights[i].position - fragPosition); // Compute distance to light - float attenuation = 1.0/(dist*dist*0.23); // Compute attenuation - vec3 radiance = lights[i].color.rgb*lights[i].intensity*attenuation; // Compute input radiance, light energy comming in - - // Cook-Torrance BRDF distribution function - float nDotV = max(dot(N,V), 0.0000001); - float nDotL = max(dot(N,L), 0.0000001); - float hDotV = max(dot(H,V), 0.0); - float nDotH = max(dot(N,H), 0.0); - float D = GgxDistribution(nDotH, roughness); // Larger the more micro-facets aligned to H - float G = GeomSmith(nDotV, nDotL, roughness); // Smaller the more micro-facets shadow - vec3 F = SchlickFresnel(hDotV, baseRefl); // Fresnel proportion of specular reflectance - - vec3 spec = (D*G*F)/(4.0*nDotV*nDotL); - - // Difuse and spec light can't be above 1.0 - // kD = 1.0 - kS diffuse component is equal 1.0 - spec comonent - vec3 kD = vec3(1.0) - F; - - // Mult kD by the inverse of metallnes, only non-metals should have diffuse light - kD *= 1.0 - metallic; - lightAccum += ((kD*albedo.rgb/PI + spec)*radiance*nDotL)*lights[i].enabled; // Angle of light has impact on result - } - - vec3 ambientFinal = (ambientColor + albedo)*ambient*0.5; - - return ambientFinal + lightAccum*ao + emissive; -} - -void main() -{ - vec3 color = ComputePBR(); - - // HDR tonemapping - color = pow(color, color + vec3(1.0)); - - // Gamma correction - color = pow(color, vec3(1.0/2.2)); - - finalColor = vec4(color, 1.0); -} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl330/pbr.vs b/examples/shaders/resources/shaders/glsl330/pbr.vs deleted file mode 100644 index 2842a944..00000000 --- a/examples/shaders/resources/shaders/glsl330/pbr.vs +++ /dev/null @@ -1,48 +0,0 @@ -#version 330 - -// Input vertex attributes -in vec3 vertexPosition; -in vec2 vertexTexCoord; -in vec3 vertexNormal; -in vec3 vertexTangent; -in vec4 vertexColor; - -// Input uniform values -uniform mat4 mvp; -uniform mat4 matModel; -uniform mat4 matNormal; -uniform vec3 lightPos; -uniform vec4 difColor; - -// Output vertex attributes (to fragment shader) -out vec3 fragPosition; -out vec2 fragTexCoord; -out vec4 fragColor; -out vec3 fragNormal; -out mat3 TBN; - -const float normalOffset = 0.1; - -void main() -{ - // Compute binormal from vertex normal and tangent - vec3 vertexBinormal = cross(vertexNormal, vertexTangent); - - // Compute fragment normal based on normal transformations - mat3 normalMatrix = transpose(inverse(mat3(matModel))); - - // Compute fragment position based on model transformations - fragPosition = vec3(matModel*vec4(vertexPosition, 1.0f)); - - fragTexCoord = vertexTexCoord*2.0; - fragNormal = normalize(normalMatrix*vertexNormal); - vec3 fragTangent = normalize(normalMatrix*vertexTangent); - fragTangent = normalize(fragTangent - dot(fragTangent, fragNormal)*fragNormal); - vec3 fragBinormal = normalize(normalMatrix*vertexBinormal); - fragBinormal = cross(fragNormal, fragTangent); - - TBN = transpose(mat3(fragTangent, fragBinormal, fragNormal)); - - // Calculate final vertex position - gl_Position = mvp*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl330/wave.fs b/examples/shaders/resources/shaders/glsl330/wave.fs deleted file mode 100644 index 43efee23..00000000 --- a/examples/shaders/resources/shaders/glsl330/wave.fs +++ /dev/null @@ -1,37 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -uniform float secondes; - -uniform vec2 size; - -uniform float freqX; -uniform float freqY; -uniform float ampX; -uniform float ampY; -uniform float speedX; -uniform float speedY; - -void main() { - float pixelWidth = 1.0 / size.x; - float pixelHeight = 1.0 / size.y; - float aspect = pixelHeight / pixelWidth; - float boxLeft = 0.0; - float boxTop = 0.0; - - vec2 p = fragTexCoord; - p.x += cos((fragTexCoord.y - boxTop) * freqX / ( pixelWidth * 750.0) + (secondes * speedX)) * ampX * pixelWidth; - p.y += sin((fragTexCoord.x - boxLeft) * freqY * aspect / ( pixelHeight * 750.0) + (secondes * speedY)) * ampY * pixelHeight; - - finalColor = texture(texture0, p)*colDiffuse*fragColor; -} diff --git a/examples/shaders/resources/space.png b/examples/shaders/resources/space.png deleted file mode 100644 index 5d016e41..00000000 Binary files a/examples/shaders/resources/space.png and /dev/null differ diff --git a/examples/shaders/rlights.h b/examples/shaders/rlights.h deleted file mode 100644 index 0ebc43af..00000000 --- a/examples/shaders/rlights.h +++ /dev/null @@ -1,170 +0,0 @@ -/********************************************************************************************** -* -* raylib.lights - Some useful functions to deal with lights data -* -* CONFIGURATION: -* -* #define RLIGHTS_IMPLEMENTATION -* Generates the implementation of the library into the included file. -* If not defined, the library is in header only mode and can be included in other headers -* or source files without problems. But only ONE file should hold the implementation. -* -* LICENSE: zlib/libpng -* -* Copyright (c) 2017-2024 Victor Fisac (@victorfisac) and Ramon Santamaria (@raysan5) -* -* This software is provided "as-is", without any express or implied warranty. In no event -* will the authors be held liable for any damages arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, including commercial -* applications, and to alter it and redistribute it freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not claim that you -* wrote the original software. If you use this software in a product, an acknowledgment -* in the product documentation would be appreciated but is not required. -* -* 2. Altered source versions must be plainly marked as such, and must not be misrepresented -* as being the original software. -* -* 3. This notice may not be removed or altered from any source distribution. -* -**********************************************************************************************/ - -#ifndef RLIGHTS_H -#define RLIGHTS_H - -//---------------------------------------------------------------------------------- -// Defines and Macros -//---------------------------------------------------------------------------------- -#define MAX_LIGHTS 4 // Max dynamic lights supported by shader - -//---------------------------------------------------------------------------------- -// Types and Structures Definition -//---------------------------------------------------------------------------------- - -// Light data -typedef struct { - int type; - bool enabled; - Vector3 position; - Vector3 target; - Color color; - float attenuation; - - // Shader locations - int enabledLoc; - int typeLoc; - int positionLoc; - int targetLoc; - int colorLoc; - int attenuationLoc; -} Light; - -// Light type -typedef enum { - LIGHT_DIRECTIONAL = 0, - LIGHT_POINT -} LightType; - -#ifdef __cplusplus -extern "C" { // Prevents name mangling of functions -#endif - -//---------------------------------------------------------------------------------- -// Module Functions Declaration -//---------------------------------------------------------------------------------- -Light CreateLight(int type, Vector3 position, Vector3 target, Color color, Shader shader); // Create a light and get shader locations -void UpdateLightValues(Shader shader, Light light); // Send light properties to shader - -#ifdef __cplusplus -} -#endif - -#endif // RLIGHTS_H - - -/*********************************************************************************** -* -* RLIGHTS IMPLEMENTATION -* -************************************************************************************/ - -#if defined(RLIGHTS_IMPLEMENTATION) - -#include "raylib.h" - -//---------------------------------------------------------------------------------- -// Defines and Macros -//---------------------------------------------------------------------------------- -// ... - -//---------------------------------------------------------------------------------- -// Types and Structures Definition -//---------------------------------------------------------------------------------- -// ... - -//---------------------------------------------------------------------------------- -// Global Variables Definition -//---------------------------------------------------------------------------------- -static int lightsCount = 0; // Current amount of created lights - -//---------------------------------------------------------------------------------- -// Module specific Functions Declaration -//---------------------------------------------------------------------------------- -// ... - -//---------------------------------------------------------------------------------- -// Module Functions Definition -//---------------------------------------------------------------------------------- - -// Create a light and get shader locations -Light CreateLight(int type, Vector3 position, Vector3 target, Color color, Shader shader) -{ - Light light = { 0 }; - - if (lightsCount < MAX_LIGHTS) - { - light.enabled = true; - light.type = type; - light.position = position; - light.target = target; - light.color = color; - - // NOTE: Lighting shader naming must be the provided ones - light.enabledLoc = GetShaderLocation(shader, TextFormat("lights[%i].enabled", lightsCount)); - light.typeLoc = GetShaderLocation(shader, TextFormat("lights[%i].type", lightsCount)); - light.positionLoc = GetShaderLocation(shader, TextFormat("lights[%i].position", lightsCount)); - light.targetLoc = GetShaderLocation(shader, TextFormat("lights[%i].target", lightsCount)); - light.colorLoc = GetShaderLocation(shader, TextFormat("lights[%i].color", lightsCount)); - - UpdateLightValues(shader, light); - - lightsCount++; - } - - return light; -} - -// Send light properties to shader -// NOTE: Light shader locations should be available -void UpdateLightValues(Shader shader, Light light) -{ - // Send to shader light enabled state and type - SetShaderValue(shader, light.enabledLoc, &light.enabled, SHADER_UNIFORM_INT); - SetShaderValue(shader, light.typeLoc, &light.type, SHADER_UNIFORM_INT); - - // Send to shader light position values - float position[3] = { light.position.x, light.position.y, light.position.z }; - SetShaderValue(shader, light.positionLoc, position, SHADER_UNIFORM_VEC3); - - // Send to shader light target position values - float target[3] = { light.target.x, light.target.y, light.target.z }; - SetShaderValue(shader, light.targetLoc, target, SHADER_UNIFORM_VEC3); - - // Send to shader light color values - float color[4] = { (float)light.color.r/(float)255, (float)light.color.g/(float)255, - (float)light.color.b/(float)255, (float)light.color.a/(float)255 }; - SetShaderValue(shader, light.colorLoc, color, SHADER_UNIFORM_VEC4); -} - -#endif // RLIGHTS_IMPLEMENTATION \ No newline at end of file diff --git a/examples/shaders/shaders_basic_lighting.cpp b/examples/shaders/shaders_basic_lighting.cpp deleted file mode 100644 index 1ef00ce5..00000000 --- a/examples/shaders/shaders_basic_lighting.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/******************************************************************************************* -* -* raylib [shaders] example - basic lighting -* -* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support, -* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version. -* -* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3). -* -* Example originally created with raylib 3.0, last time updated with raylib 4.2 -* -* Example contributed by Chris Camacho (@codifies) and reviewed by Ramon Santamaria (@raysan5) -* -* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, -* BSD-like license that allows static linking with closed source software -* -* Copyright (c) 2019-2024 Chris Camacho (@codifies) and Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -#include "raymath.h" - -#define RLIGHTS_IMPLEMENTATION -#include "rlights.h" - -#if defined(PLATFORM_DESKTOP) -#define GLSL_VERSION 330 -#else // PLATFORM_ANDROID, PLATFORM_WEB -#define GLSL_VERSION 100 -#endif - -#include - -//------------------------------------------------------------------------------------ -// Program main entry point -//------------------------------------------------------------------------------------ -int main(void) -{ - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - SetConfigFlags(FLAG_MSAA_4X_HINT); // Enable Multi Sampling Anti Aliasing 4x (if available) - InitWindow(screenWidth, screenHeight, "raylib [shaders] example - basic lighting"); - - // Define the camera to look into our 3d world - raylib::Camera camera; - camera.position = (Vector3){ 2.0f, 4.0f, 6.0f }; // Camera position - camera.target = (Vector3){ 0.0f, 0.5f, 0.0f }; // Camera looking at point - camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) - camera.fovy = 45.0f; // Camera field-of-view Y - camera.projection = CAMERA_PERSPECTIVE; // Camera projection type - - // Load basic lighting shader - raylib::Shader shader (TextFormat("resources/shaders/glsl%i/lighting.vs", GLSL_VERSION), - TextFormat("resources/shaders/glsl%i/lighting.fs", GLSL_VERSION)); - // Get some required shader locations - shader.locs[SHADER_LOC_VECTOR_VIEW] = shader.GetLocation("viewPos"); - // NOTE: "matModel" location name is automatically assigned on shader loading, - // no need to get the location again if using that uniform name - //shader.locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocation(shader, "matModel"); - - // Ambient light level (some basic lighting) - int ambientLoc = shader.GetLocation("ambient"); - std::array ambientValues = {0.1f, 0.1f, 0.1f, 1.0f}; - shader.SetValue(ambientLoc, ambientValues.data(), SHADER_UNIFORM_VEC4); - - // Create lights - std::array lights = { - CreateLight(LIGHT_POINT, (Vector3) {-2, 1, -2}, Vector3Zero(), YELLOW, shader), - CreateLight(LIGHT_POINT, (Vector3) {2, 1, 2}, Vector3Zero(), RED, shader), - CreateLight(LIGHT_POINT, (Vector3) {-2, 1, 2}, Vector3Zero(), GREEN, shader), - CreateLight(LIGHT_POINT, (Vector3) {2, 1, -2}, Vector3Zero(), BLUE, shader), - }; - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!WindowShouldClose()) // Detect window close button or ESC key - { - // Update - //---------------------------------------------------------------------------------- - camera.Update(CAMERA_ORBITAL); - - // Update the shader with the camera view vector (points towards { 0.0f, 0.0f, 0.0f }) - std::array cameraPos = { camera.position.x, camera.position.y, camera.position.z }; - SetShaderValue(shader, shader.locs[SHADER_LOC_VECTOR_VIEW], cameraPos.data(), SHADER_UNIFORM_VEC3); - - // Check key inputs to enable/disable lights - if (IsKeyPressed(KEY_Y)) { lights[0].enabled = !lights[0].enabled; } - if (IsKeyPressed(KEY_R)) { lights[1].enabled = !lights[1].enabled; } - if (IsKeyPressed(KEY_G)) { lights[2].enabled = !lights[2].enabled; } - if (IsKeyPressed(KEY_B)) { lights[3].enabled = !lights[3].enabled; } - - // Update light values (actually, only enable/disable them) - for (const auto& light : lights) UpdateLightValues(shader, light); - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - - ClearBackground(RAYWHITE); - - BeginMode3D(camera); - - BeginShaderMode(shader); - - DrawPlane(Vector3Zero(), (Vector2) { 10.0, 10.0 }, WHITE); - DrawCube(Vector3Zero(), 2.0, 4.0, 2.0, WHITE); - - EndShaderMode(); - - // Draw spheres to show where the lights are - for (const auto& light : lights) - { - if (light.enabled) DrawSphereEx(light.position, 0.2f, 8, 8, light.color); - else DrawSphereWires(light.position, 0.2f, 8, 8, ColorAlpha(light.color, 0.3f)); - } - - DrawGrid(10, 1.0f); - - EndMode3D(); - - DrawFPS(10, 10); - - DrawText("Use keys [Y][R][G][B] to toggle lights", 10, 40, 20, DARKGRAY); - - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - // De-Initialization - //-------------------------------------------------------------------------------------- - //UnloadShader(shader); // Unload shader - - CloseWindow(); // Close window and OpenGL context - //-------------------------------------------------------------------------------------- - - return 0; -} diff --git a/examples/shaders/shaders_basic_pbr.cpp b/examples/shaders/shaders_basic_pbr.cpp deleted file mode 100644 index 3afeb8ff..00000000 --- a/examples/shaders/shaders_basic_pbr.cpp +++ /dev/null @@ -1,333 +0,0 @@ -/******************************************************************************************* -* -* raylib [shaders] example - Basic PBR -* -* Example originally created with raylib 5.0, last time updated with raylib 5.1-dev -* -* Example contributed by Afan OLOVCIC (@_DevDad) and reviewed by Ramon Santamaria (@raysan5) -* -* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, -* BSD-like license that allows static linking with closed source software -* -* Copyright (c) 2023-2024 Afan OLOVCIC (@_DevDad) -* -* Model: "Old Rusty Car" (https://skfb.ly/LxRy) by Renafox, -* licensed under Creative Commons Attribution-NonCommercial -* (http://creativecommons.org/licenses/by-nc/4.0/) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -#if defined(PLATFORM_DESKTOP) -#define GLSL_VERSION 330 -#else // PLATFORM_ANDROID, PLATFORM_WEB -#define GLSL_VERSION 120 -#endif - -#include - -static const int MAX_LIGHTS = 4; // Max dynamic lights supported by shader - -//---------------------------------------------------------------------------------- -// Types and Structures Definition -//---------------------------------------------------------------------------------- - -// Light type -enum class LightType { - DIRECTIONAL = 0, - POINT, - SPOT -}; - -// Light data -struct Light { - LightType type; - int enabled; - raylib::Vector3 position; - raylib::Vector3 target; - std::array color; - float intensity; - - // Shader light parameters locations - int typeLoc; - int enabledLoc; - int positionLoc; - int targetLoc; - int colorLoc; - int intensityLoc; -}; - -//---------------------------------------------------------------------------------- -// Global Variables Definition -//---------------------------------------------------------------------------------- -static int lightCount = 0; // Current number of dynamic lights that have been created - -//---------------------------------------------------------------------------------- -// Module specific Functions Declaration -//---------------------------------------------------------------------------------- -// Create a light and get shader locations -static Light CreateLight(size_t index, LightType type, Vector3 position, Vector3 target, Color color, float intensity, Shader shader); - -// Update light properties on shader -// NOTE: Light shader locations should be available -static void UpdateLight(Shader shader, const Light& light); - -//---------------------------------------------------------------------------------- -// Main Entry Point -//---------------------------------------------------------------------------------- -int main() -{ - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - SetConfigFlags(FLAG_MSAA_4X_HINT); - InitWindow(screenWidth, screenHeight, "raylib [shaders] example - basic pbr"); - - // Define the camera to look into our 3d world - raylib::Camera camera; - camera.position = (Vector3){ 2.0f, 2.0f, 6.0f }; // Camera position - camera.target = (Vector3){ 0.0f, 0.5f, 0.0f }; // Camera looking at point - camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) - camera.fovy = 45.0f; // Camera field-of-view Y - camera.projection = CAMERA_PERSPECTIVE; // Camera projection type - - // Load PBR shader and setup all required locations - raylib::Shader shader (TextFormat("resources/shaders/glsl%i/pbr.vs", GLSL_VERSION), - TextFormat("resources/shaders/glsl%i/pbr.fs", GLSL_VERSION)); - shader.locs[SHADER_LOC_MAP_ALBEDO] = GetShaderLocation(shader, "albedoMap"); - // WARNING: Metalness, roughness, and ambient occlusion are all packed into a MRA texture - // They are passed as to the SHADER_LOC_MAP_METALNESS location for convenience, - // shader already takes care of it accordingly - shader.locs[SHADER_LOC_MAP_METALNESS] = GetShaderLocation(shader, "mraMap"); - shader.locs[SHADER_LOC_MAP_NORMAL] = GetShaderLocation(shader, "normalMap"); - // WARNING: Similar to the MRA map, the emissive map packs different information - // into a single texture: it stores height and emission data - // It is binded to SHADER_LOC_MAP_EMISSION location an properly processed on shader - shader.locs[SHADER_LOC_MAP_EMISSION] = GetShaderLocation(shader, "emissiveMap"); - shader.locs[SHADER_LOC_COLOR_DIFFUSE] = GetShaderLocation(shader, "albedoColor"); - - // Setup additional required shader locations, including lights data - shader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos"); - int lightCountLoc = GetShaderLocation(shader, "numOfLights"); - int maxLightCount = MAX_LIGHTS; - shader.SetValue(lightCountLoc, &maxLightCount, SHADER_UNIFORM_INT); - - // Setup ambient color and intensity parameters - float ambientIntensity = 0.02f; - raylib::Color ambientColor = (Color){ 26, 32, 135, 255 }; - raylib::Vector3 ambientColorNormalized = (Vector3){ ambientColor.r/255.0f, ambientColor.g/255.0f, ambientColor.b/255.0f }; - shader.SetValue(shader.GetLocation("ambientColor"), &ambientColorNormalized, SHADER_UNIFORM_VEC3); - shader.SetValue(shader.GetLocation("ambient"), &ambientIntensity, SHADER_UNIFORM_FLOAT); - - // Get location for shader parameters that can be modified in real time - int emissiveIntensityLoc = shader.GetLocation("emissivePower"); - int emissiveColorLoc = shader.GetLocation("emissiveColor"); - int textureTilingLoc = shader.GetLocation("tiling"); - - // Load old car model using PBR maps and shader - // WARNING: We know this model consists of a single model.meshes[0] and - // that model.materials[0] is by default assigned to that mesh - // There could be more complex models consisting of multiple meshes and - // multiple materials defined for those meshes... but always 1 mesh = 1 material - raylib::Model car ("resources/models/old_car_new.glb"); - - // Assign already setup PBR shader to model.materials[0], used by models.meshes[0] - car.materials[0].shader = shader; - - // Setup materials[0].maps default parameters - car.materials[0].maps[MATERIAL_MAP_ALBEDO].color = WHITE; - car.materials[0].maps[MATERIAL_MAP_METALNESS].value = 0.0f; - car.materials[0].maps[MATERIAL_MAP_ROUGHNESS].value = 0.0f; - car.materials[0].maps[MATERIAL_MAP_OCCLUSION].value = 1.0f; - car.materials[0].maps[MATERIAL_MAP_EMISSION].color = (Color){ 255, 162, 0, 255 }; - - // Setup materials[0].maps default textures - car.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = LoadTexture("resources/old_car_d.png"); - car.materials[0].maps[MATERIAL_MAP_METALNESS].texture = LoadTexture("resources/old_car_mra.png"); - car.materials[0].maps[MATERIAL_MAP_NORMAL].texture = LoadTexture("resources/old_car_n.png"); - car.materials[0].maps[MATERIAL_MAP_EMISSION].texture = LoadTexture("resources/old_car_e.png"); - - // Load floor model mesh and assign material parameters - // NOTE: A basic plane shape can be generated instead of being loaded from a model file - raylib::Model floor ("resources/models/plane.glb"); - //Mesh floorMesh = GenMeshPlane(10, 10, 10, 10); - //GenMeshTangents(&floorMesh); // TODO: Review tangents generation - //Model floor = LoadModelFromMesh(floorMesh); - - // Assign material shader for our floor model, same PBR shader - floor.materials[0].shader = shader; - - floor.materials[0].maps[MATERIAL_MAP_ALBEDO].color = WHITE; - floor.materials[0].maps[MATERIAL_MAP_METALNESS].value = 0.0f; - floor.materials[0].maps[MATERIAL_MAP_ROUGHNESS].value = 0.0f; - floor.materials[0].maps[MATERIAL_MAP_OCCLUSION].value = 1.0f; - floor.materials[0].maps[MATERIAL_MAP_EMISSION].color = BLACK; - - floor.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = LoadTexture("resources/road_a.png"); - floor.materials[0].maps[MATERIAL_MAP_METALNESS].texture = LoadTexture("resources/road_mra.png"); - floor.materials[0].maps[MATERIAL_MAP_NORMAL].texture = LoadTexture("resources/road_n.png"); - - // Models texture tiling parameter can be stored in the Material struct if required (CURRENTLY NOT USED) - // NOTE: Material.params[4] are available for generic parameters storage (float) - Vector2 carTextureTiling = (Vector2){ 0.5f, 0.5f }; - Vector2 floorTextureTiling = (Vector2){ 0.5f, 0.5f }; - - // Create some lights - std::array lights = { - CreateLight(0, LightType::POINT, (Vector3) {-1.0f, 1.0f, -2.0f}, (Vector3) {0.0f, 0.0f, 0.0f}, YELLOW, 4.0f, shader), - CreateLight(1, LightType::POINT, (Vector3){ 2.0f, 1.0f, 1.0f }, (Vector3){ 0.0f, 0.0f, 0.0f }, GREEN, 3.3f, shader), - CreateLight(2, LightType::POINT, (Vector3){ -2.0f, 1.0f, 1.0f }, (Vector3){ 0.0f, 0.0f, 0.0f }, RED, 8.3f, shader), - CreateLight(3, LightType::POINT, (Vector3){ 1.0f, 1.0f, -2.0f }, (Vector3){ 0.0f, 0.0f, 0.0f }, BLUE, 2.0f, shader), - }; - - // Setup material texture maps usage in shader - // NOTE: By default, the texture maps are always used - int usage = 1; - SetShaderValue(shader, GetShaderLocation(shader, "useTexAlbedo"), &usage, SHADER_UNIFORM_INT); - SetShaderValue(shader, GetShaderLocation(shader, "useTexNormal"), &usage, SHADER_UNIFORM_INT); - SetShaderValue(shader, GetShaderLocation(shader, "useTexMRA"), &usage, SHADER_UNIFORM_INT); - SetShaderValue(shader, GetShaderLocation(shader, "useTexEmissive"), &usage, SHADER_UNIFORM_INT); - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //--------------------------------------------------------------------------------------- - - // Main game loop - while (!WindowShouldClose()) // Detect window close button or ESC key - { - // Update - //---------------------------------------------------------------------------------- - camera.Update(CAMERA_ORBITAL); - - // Update the shader with the camera view vector (points towards { 0.0f, 0.0f, 0.0f }) - std::array cameraPos = {camera.position.x, camera.position.y, camera.position.z}; - SetShaderValue(shader, shader.locs[SHADER_LOC_VECTOR_VIEW], cameraPos.data(), SHADER_UNIFORM_VEC3); - - // Check key inputs to enable/disable lights - if (IsKeyPressed(KEY_ONE)) { lights[2].enabled = !lights[2].enabled; } - if (IsKeyPressed(KEY_TWO)) { lights[1].enabled = !lights[1].enabled; } - if (IsKeyPressed(KEY_THREE)) { lights[3].enabled = !lights[3].enabled; } - if (IsKeyPressed(KEY_FOUR)) { lights[0].enabled = !lights[0].enabled; } - - // Update light values on shader (actually, only enable/disable them) - for (int i = 0; i < MAX_LIGHTS; i++) UpdateLight(shader, lights[i]); - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - - ClearBackground(BLACK); - - BeginMode3D(camera); - - // Set floor model texture tiling and emissive color parameters on shader - SetShaderValue(shader, textureTilingLoc, &floorTextureTiling, SHADER_UNIFORM_VEC2); - raylib::Vector4 floorEmissiveColor = ColorNormalize(floor.materials[0].maps[MATERIAL_MAP_EMISSION].color); - SetShaderValue(shader, emissiveColorLoc, &floorEmissiveColor, SHADER_UNIFORM_VEC4); - - DrawModel(floor, (Vector3){ 0.0f, 0.0f, 0.0f }, 5.0f, WHITE); // Draw floor model - - // Set old car model texture tiling, emissive color and emissive intensity parameters on shader - SetShaderValue(shader, textureTilingLoc, &carTextureTiling, SHADER_UNIFORM_VEC2); - raylib::Vector4 carEmissiveColor = ColorNormalize(car.materials[0].maps[MATERIAL_MAP_EMISSION].color); - SetShaderValue(shader, emissiveColorLoc, &carEmissiveColor, SHADER_UNIFORM_VEC4); - float emissiveIntensity = 0.01f; - SetShaderValue(shader, emissiveIntensityLoc, &emissiveIntensity, SHADER_UNIFORM_FLOAT); - - car.Draw((Vector3){ 0.0f, 0.0f, 0.0f }, 0.005f, WHITE); // Draw car model - - // Draw spheres to show the lights positions - for (const auto& light : lights) - { - Color lightColor = (Color){ static_cast(light.color[0]*255), - static_cast(light.color[1]*255), - static_cast(light.color[2]*255), - static_cast(light.color[3]*255) }; - - if (light.enabled) DrawSphereEx(light.position, 0.2f, 8, 8, lightColor); - else DrawSphereWires(light.position, 0.2f, 8, 8, ColorAlpha(lightColor, 0.3f)); - } - - EndMode3D(); - - DrawText("Toggle lights: [1][2][3][4]", 10, 40, 20, LIGHTGRAY); - - DrawText("(c) Old Rusty Car model by Renafox (https://skfb.ly/LxRy)", screenWidth - 320, screenHeight - 20, 10, LIGHTGRAY); - - DrawFPS(10, 10); - - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - // De-Initialization - //-------------------------------------------------------------------------------------- - // Unbind (disconnect) shader from car.material[0] - // to avoid UnloadMaterial() trying to unload it automatically - car.materials[0].shader = (Shader){ 0 }; - UnloadMaterial(car.materials[0]); - car.materials[0].maps = NULL; - //UnloadModel(car); - - floor.materials[0].shader = (Shader){ 0 }; - UnloadMaterial(floor.materials[0]); - floor.materials[0].maps = NULL; - //UnloadModel(floor); - - //UnloadShader(shader); // Unload Shader - - CloseWindow(); // Close window and OpenGL context - //-------------------------------------------------------------------------------------- - - return 0; -} - -// Create light with provided data -// NOTE: It updated the global lightCount and it's limited to MAX_LIGHTS -static Light CreateLight(size_t index, LightType type, Vector3 position, Vector3 target, Color color, float intensity, Shader shader) -{ - Light light; - - light.enabled = 1; - light.type = type; - light.position = position; - light.target = target; - light.color[0] = (float)color.r/255.0f; - light.color[1] = (float)color.g/255.0f; - light.color[2] = (float)color.b/255.0f; - light.color[3] = (float)color.a/255.0f; - light.intensity = intensity; - - // NOTE: Shader parameters names for lights must match the requested ones - light.enabledLoc = GetShaderLocation(shader, TextFormat("lights[%i].enabled", index)); - light.typeLoc = GetShaderLocation(shader, TextFormat("lights[%i].type", index)); - light.positionLoc = GetShaderLocation(shader, TextFormat("lights[%i].position", index)); - light.targetLoc = GetShaderLocation(shader, TextFormat("lights[%i].target", index)); - light.colorLoc = GetShaderLocation(shader, TextFormat("lights[%i].color", index)); - light.intensityLoc = GetShaderLocation(shader, TextFormat("lights[%i].intensity", index)); - - UpdateLight(shader, light); - - return light; -} - -// Send light properties to shader -// NOTE: Light shader locations should be available -static void UpdateLight(Shader shader, const Light& light) -{ - SetShaderValue(shader, light.enabledLoc, &light.enabled, SHADER_UNIFORM_INT); - SetShaderValue(shader, light.typeLoc, &light.type, SHADER_UNIFORM_INT); - - // Send to shader light position values - std::array position = { light.position.x, light.position.y, light.position.z }; - SetShaderValue(shader, light.positionLoc, position.data(), SHADER_UNIFORM_VEC3); - - // Send to shader light target position values - std::array target = { light.target.x, light.target.y, light.target.z }; - SetShaderValue(shader, light.targetLoc, target.data(), SHADER_UNIFORM_VEC3); - SetShaderValue(shader, light.colorLoc, light.color.data(), SHADER_UNIFORM_VEC4); - SetShaderValue(shader, light.intensityLoc, &light.intensity, SHADER_UNIFORM_FLOAT); -} \ No newline at end of file diff --git a/examples/shaders/shaders_texture_waves.cpp b/examples/shaders/shaders_texture_waves.cpp deleted file mode 100644 index 48778067..00000000 --- a/examples/shaders/shaders_texture_waves.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************************* -* -* raylib [shaders] example - Texture Waves -* -* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support, -* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version. -* -* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test this example -* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders -* raylib comes with shaders ready for both versions, check raylib/shaders install folder -* -* This example has been created using raylib 2.5 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Example contributed by Anata (@anatagawa) and reviewed by Ramon Santamaria (@raysan5) -* -* Copyright (c) 2019 Anata (@anatagawa) and Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -#if defined(PLATFORM_DESKTOP) - #define GLSL_VERSION 330 -#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB - #define GLSL_VERSION 100 -#endif - -int main(void) -{ - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib-cpp [shaders] example - texture waves"); - - // Load texture texture to apply shaders - raylib::Texture2D texture("resources/space.png"); - - // Load shader and setup location points and values - raylib::Shader shader(0, TextFormat("resources/shaders/glsl%i/wave.fs", GLSL_VERSION)); - - int secondsLoc = shader.GetLocation("secondes"); - int freqXLoc = shader.GetLocation("freqX"); - int freqYLoc = shader.GetLocation("freqY"); - int ampXLoc = shader.GetLocation("ampX"); - int ampYLoc = shader.GetLocation("ampY"); - int speedXLoc = shader.GetLocation("speedX"); - int speedYLoc = shader.GetLocation("speedY"); - - // Shader uniform values that can be updated at any time - float freqX = 25.0f; - float freqY = 25.0f; - float ampX = 5.0f; - float ampY = 5.0f; - float speedX = 8.0f; - float speedY = 8.0f; - - float screenSize[2] = { (float)window.GetWidth(), (float)window.GetHeight() }; - shader.SetValue(shader.GetLocation("size"), &screenSize, SHADER_UNIFORM_VEC2); - shader.SetValue(freqXLoc, &freqX, SHADER_UNIFORM_FLOAT); - shader.SetValue(freqYLoc, &freqY, SHADER_UNIFORM_FLOAT); - shader.SetValue(ampXLoc, &X, SHADER_UNIFORM_FLOAT); - shader.SetValue(ampYLoc, &Y, SHADER_UNIFORM_FLOAT); - shader.SetValue(speedXLoc, &speedX, SHADER_UNIFORM_FLOAT); - shader.SetValue(speedYLoc, &speedY, SHADER_UNIFORM_FLOAT); - - float seconds = 0.0f; - - window.SetTargetFPS(60); // Set our game to run at 60 frames-per-second - // ------------------------------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) // Detect window close button or ESC key - { - // Update - //---------------------------------------------------------------------------------- - seconds += GetFrameTime(); - - shader.SetValue(secondsLoc, &seconds, SHADER_UNIFORM_FLOAT); - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - - ClearBackground(RAYWHITE); - - shader.BeginMode(); - - texture.Draw(0, 0, WHITE); - texture.Draw(texture.GetWidth(), 0, WHITE); - - EndShaderMode(); - - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/shapes/resources/shapes_logo_raylib.png b/examples/shapes/resources/shapes_logo_raylib.png deleted file mode 100644 index 16c635cc..00000000 Binary files a/examples/shapes/resources/shapes_logo_raylib.png and /dev/null differ diff --git a/examples/shapes/shapes_collision_area.cpp b/examples/shapes/shapes_collision_area.cpp deleted file mode 100644 index 8c758bf5..00000000 --- a/examples/shapes/shapes_collision_area.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************************* -* -* raylib [shapes] example - collision area -* -* This example has been created using raylib 2.5 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -#include // NOLINT - -int main(void) -{ - // Initialization - //--------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [shapes] example - collision area"); - - // Box A: Moving box - raylib::Rectangle boxA(10, GetScreenHeight()/2 - 50, 200, 100); - int boxASpeedX = 4; - - // Box B: Mouse moved box - raylib::Rectangle boxB(GetScreenWidth()/2 - 30, GetScreenHeight()/2 - 30, 60, 60); - - raylib::Rectangle boxCollision(0); // Collision rectangle - - int screenUpperLimit = 40; // Top menu limits - - bool pause = false; // Movement pause - bool collision = false; // Collision detection - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //---------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //----------------------------------------------------- - // Move box if not paused - if (!pause) boxA.x += boxASpeedX; - - // Bounce box on x screen limits - if (((boxA.x + boxA.width) >= GetScreenWidth()) || (boxA.x <= 0)) boxASpeedX *= -1; - - // Update player-controlled-box (box02) - boxB.x = GetMouseX() - boxB.width/2; - boxB.y = GetMouseY() - boxB.height/2; - - // Make sure Box B does not go out of move area limits - if ((boxB.x + boxB.width) >= GetScreenWidth()) boxB.x = GetScreenWidth() - boxB.width; - else if (boxB.x <= 0) boxB.x = 0; - - if ((boxB.y + boxB.height) >= GetScreenHeight()) boxB.y = GetScreenHeight() - boxB.height; - else if (boxB.y <= screenUpperLimit) boxB.y = screenUpperLimit; - - // Check boxes collision - collision = boxA.CheckCollision(boxB); - - // Get collision rectangle (only on collision) - if (collision) boxCollision = boxA.GetCollision(boxB); - - // Pause Box A movement - if (IsKeyPressed(KEY_SPACE)) pause = !pause; - //----------------------------------------------------- - - // Draw - //----------------------------------------------------- - BeginDrawing(); - - window.ClearBackground(RAYWHITE); - - DrawRectangle(0, 0, screenWidth, screenUpperLimit, collision? RED : BLACK); - - boxA.Draw(GOLD); - boxB.Draw(BLUE); - - if (collision) { - // Draw collision area - boxCollision.Draw(LIME); - - // Draw collision message - raylib::DrawText("COLLISION!", GetScreenWidth()/2 - MeasureText("COLLISION!", 20)/2, screenUpperLimit/2 - 10, 20, BLACK); - - // Draw collision area - raylib::DrawText(TextFormat("Collision Area: %i", (int)boxCollision.width*(int)boxCollision.height), GetScreenWidth()/2 - 100, screenUpperLimit + 10, 20, BLACK); - } - - DrawFPS(10, 10); - - EndDrawing(); - //----------------------------------------------------- - } - - return 0; -} diff --git a/examples/shapes/shapes_logo_raylib.cpp b/examples/shapes/shapes_logo_raylib.cpp deleted file mode 100644 index 82bd59a3..00000000 --- a/examples/shapes/shapes_logo_raylib.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************************* -* -* raylib [shapes] example - Draw raylib logo using basic shapes -* -* This example has been created using raylib 1.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2014 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [shapes] example - raylib logo using shapes"); - raylib::Color foreground(0, 68, 130); - raylib::Color background = RAYWHITE; - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - // Update your variables here - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(background); - - foreground.DrawRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256); - background.DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224); - foreground.DrawText("raylib", screenWidth/2 - 44, screenHeight/2 + 24, 50); - foreground.DrawText("cpp", screenWidth/2 - 74, screenHeight/2 + 54, 50); - - DrawText("this is NOT a texture!", 350, 370, 10, GRAY); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/text/resources/KAISG.ttf b/examples/text/resources/KAISG.ttf deleted file mode 100644 index 04478b25..00000000 Binary files a/examples/text/resources/KAISG.ttf and /dev/null differ diff --git a/examples/text/resources/LICENSE b/examples/text/resources/LICENSE deleted file mode 100644 index 25b15402..00000000 --- a/examples/text/resources/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -All fonts used in examples are provided under a free and permissive license. -Check individual licenses for details: - - - [Alpha Beta] by Brian Kent (AEnigma) - https://www.dafont.com/es/alpha-beta.font - - [Setback] by Brian Kent (AEnigma) - https://www.dafont.com/es/setback.font - - [Jupiter Crash] by Brian Kent (AEnigma) - https://www.dafont.com/es/jupiter-crash.font - - [Alagard] by Hewett Tsoi - https://www.dafont.com/es/alagard.font - - [Romulus] by Hewett Tsoi - https://www.dafont.com/es/romulus.font - - [Mecha] by Captain Falcon - https://www.dafont.com/es/mecha-cf.font - - [PixelPlay] by Aleksander Shevchuk - https://www.dafont.com/es/pixelplay.font - - [PixAntiqua] by Gerhard Großmann - https://www.dafont.com/es/pixantiqua.font - - [Kaiserzeit Gotisch] by Dieter Steffmann - https://www.dafont.com/es/kaiserzeit-gotisch.font - - [Noto CJK] by Google Fonts - https://www.google.com/get/noto/help/cjk/ - - [Anonymous Pro] by Mark Simonson - https://fonts.google.com/specimen/Anonymous+Pro - - [DejaVu] by DejaVu Fonts - https://dejavu-fonts.github.io/ - - [Symbola] by George Douros - https://fontlibrary.org/en/font/symbola diff --git a/examples/text/resources/custom_alagard.png b/examples/text/resources/custom_alagard.png deleted file mode 100644 index bbe688ec..00000000 Binary files a/examples/text/resources/custom_alagard.png and /dev/null differ diff --git a/examples/text/resources/custom_jupiter_crash.png b/examples/text/resources/custom_jupiter_crash.png deleted file mode 100644 index c89572e7..00000000 Binary files a/examples/text/resources/custom_jupiter_crash.png and /dev/null differ diff --git a/examples/text/resources/custom_mecha.png b/examples/text/resources/custom_mecha.png deleted file mode 100644 index 5e20313d..00000000 Binary files a/examples/text/resources/custom_mecha.png and /dev/null differ diff --git a/examples/text/resources/fonts/alagard.png b/examples/text/resources/fonts/alagard.png deleted file mode 100644 index c0c54273..00000000 Binary files a/examples/text/resources/fonts/alagard.png and /dev/null differ diff --git a/examples/text/resources/fonts/alpha_beta.png b/examples/text/resources/fonts/alpha_beta.png deleted file mode 100644 index 8a0c2733..00000000 Binary files a/examples/text/resources/fonts/alpha_beta.png and /dev/null differ diff --git a/examples/text/resources/fonts/jupiter_crash.png b/examples/text/resources/fonts/jupiter_crash.png deleted file mode 100644 index 4972c02e..00000000 Binary files a/examples/text/resources/fonts/jupiter_crash.png and /dev/null differ diff --git a/examples/text/resources/fonts/mecha.png b/examples/text/resources/fonts/mecha.png deleted file mode 100644 index 9213fa2d..00000000 Binary files a/examples/text/resources/fonts/mecha.png and /dev/null differ diff --git a/examples/text/resources/fonts/pixantiqua.png b/examples/text/resources/fonts/pixantiqua.png deleted file mode 100644 index 17ad1ab7..00000000 Binary files a/examples/text/resources/fonts/pixantiqua.png and /dev/null differ diff --git a/examples/text/resources/fonts/pixelplay.png b/examples/text/resources/fonts/pixelplay.png deleted file mode 100644 index fbf6430d..00000000 Binary files a/examples/text/resources/fonts/pixelplay.png and /dev/null differ diff --git a/examples/text/resources/fonts/romulus.png b/examples/text/resources/fonts/romulus.png deleted file mode 100644 index 648aa8b0..00000000 Binary files a/examples/text/resources/fonts/romulus.png and /dev/null differ diff --git a/examples/text/resources/fonts/setback.png b/examples/text/resources/fonts/setback.png deleted file mode 100644 index 1630a733..00000000 Binary files a/examples/text/resources/fonts/setback.png and /dev/null differ diff --git a/examples/text/resources/pixantiqua.fnt b/examples/text/resources/pixantiqua.fnt deleted file mode 100644 index fd9f9dbb..00000000 --- a/examples/text/resources/pixantiqua.fnt +++ /dev/null @@ -1,188 +0,0 @@ -info face="PixAntiqua" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=2,2,2,2 spacing=2,2 outline=0 -common lineHeight=32 base=27 scaleW=512 scaleH=512 pages=1 packed=0 alphaChnl=0 redChnl=4 greenChnl=4 blueChnl=4 -page id=0 file="pixantiqua.png" -chars count=184 -char id=32 x=9 y=304 width=7 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=33 x=391 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=34 x=240 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=35 x=468 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=36 x=152 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=37 x=176 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=38 x=303 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=39 x=495 y=266 width=8 height=36 xoffset=-3 yoffset=-2 xadvance=5 page=0 chnl=15 -char id=40 x=256 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=199 x=432 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=200 x=126 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=201 x=147 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=202 x=288 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=203 x=189 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=204 x=468 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=205 x=486 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=206 x=0 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=207 x=72 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=208 x=329 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=209 x=277 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=210 x=182 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=211 x=26 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=41 x=272 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=42 x=288 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=43 x=414 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=44 x=378 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=45 x=414 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=46 x=443 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=47 x=392 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=48 x=485 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=49 x=450 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=50 x=21 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=51 x=42 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=59 x=456 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=60 x=168 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=61 x=309 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=62 x=336 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=63 x=315 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=64 x=364 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=65 x=390 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=66 x=120 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=67 x=144 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=68 x=168 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=69 x=294 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=52 x=488 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=53 x=63 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=54 x=24 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=55 x=48 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=56 x=72 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=57 x=96 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=58 x=404 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=70 x=252 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=71 x=192 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=72 x=78 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=78 x=78 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=79 x=355 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=80 x=264 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=81 x=381 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=82 x=288 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=83 x=312 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=91 x=144 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=92 x=108 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=93 x=304 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=94 x=34 y=0 width=32 height=36 xoffset=-3 yoffset=-2 xadvance=29 page=0 chnl=15 -char id=95 x=231 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=96 x=442 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=97 x=408 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=98 x=432 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=99 x=210 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=84 x=336 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=85 x=360 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=86 x=0 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=87 x=68 y=0 width=30 height=36 xoffset=-3 yoffset=-2 xadvance=27 page=0 chnl=15 -char id=88 x=26 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=89 x=384 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=90 x=84 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=100 x=456 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=101 x=480 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=102 x=54 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=103 x=0 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=104 x=24 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=105 x=469 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=106 x=18 y=266 width=16 height=36 xoffset=-8 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=107 x=48 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=108 x=417 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=109 x=161 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=110 x=72 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=111 x=96 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=117 x=192 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=118 x=216 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=119 x=248 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=120 x=240 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=121 x=264 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=122 x=288 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=123 x=432 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=124 x=365 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=125 x=378 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=126 x=393 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=127 x=132 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=160 x=0 y=304 width=7 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=161 x=352 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=162 x=351 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=163 x=336 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=165 x=360 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=167 x=384 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=169 x=433 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=170 x=224 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=171 x=105 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=172 x=0 y=0 width=32 height=36 xoffset=-3 yoffset=-2 xadvance=29 page=0 chnl=15 -char id=173 x=494 y=38 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=174 x=52 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=175 x=52 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=176 x=126 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=177 x=435 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=178 x=320 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=179 x=336 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=181 x=459 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=112 x=120 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=113 x=144 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=114 x=396 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=115 x=168 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=116 x=36 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=182 x=408 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=183 x=498 y=190 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=185 x=192 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=186 x=208 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=187 x=477 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=191 x=456 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=192 x=407 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=193 x=234 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=194 x=416 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=195 x=156 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=196 x=130 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=197 x=104 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=198 x=190 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=212 x=0 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=213 x=338 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=214 x=312 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=215 x=357 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=216 x=286 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=217 x=456 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=218 x=480 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=219 x=0 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=220 x=24 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=221 x=48 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=222 x=260 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=223 x=72 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=224 x=96 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=225 x=120 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=226 x=144 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=227 x=168 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=228 x=192 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=229 x=216 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=230 x=219 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=231 x=372 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=73 x=90 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=74 x=216 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=75 x=240 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=76 x=273 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=77 x=100 y=0 width=30 height=36 xoffset=-3 yoffset=-2 xadvance=27 page=0 chnl=15 -char id=232 x=312 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=233 x=240 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=234 x=264 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=235 x=104 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=236 x=430 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=237 x=482 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=238 x=160 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=239 x=176 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=240 x=128 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=241 x=200 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=242 x=224 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=243 x=248 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=244 x=272 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=245 x=296 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=246 x=320 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=247 x=330 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=248 x=208 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=249 x=344 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=250 x=368 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=251 x=416 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=252 x=440 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=253 x=464 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=254 x=0 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=255 x=0 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 diff --git a/examples/text/resources/pixantiqua.png b/examples/text/resources/pixantiqua.png deleted file mode 100644 index 2aa2870f..00000000 Binary files a/examples/text/resources/pixantiqua.png and /dev/null differ diff --git a/examples/text/resources/pixantiqua.ttf b/examples/text/resources/pixantiqua.ttf deleted file mode 100644 index e012875d..00000000 Binary files a/examples/text/resources/pixantiqua.ttf and /dev/null differ diff --git a/examples/text/text_font_filters.cpp b/examples/text/text_font_filters.cpp deleted file mode 100644 index ce5679c4..00000000 --- a/examples/text/text_font_filters.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/******************************************************************************************* -* -* raylib [text] example - Font filters -* -* After font loading, font texture atlas filter could be configured for a softer -* display of the font when scaling it to different sizes, that way, it's not required -* to generate multiple fonts at multiple sizes (as long as the scaling is not very different) -* -* This example has been created using raylib 1.3.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2015 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main(void) -{ - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [text] example - font filters"); - - // TTF Font loading with custom generation parameters - raylib::Font font("resources/KAISG.ttf", 96); - - // Generate mipmap levels to use trilinear filtering - // NOTE: On 2D drawing it won't be noticeable, it looks like FILTER_BILINEAR - font.GetTexture().GenMipmaps(); - - raylib::Text msg("Loaded Font", font.GetBaseSize(), BLACK, font); - - Vector2 fontPosition = { 40.0f, screenHeight/2.0f - 80.0f }; - Vector2 textSize = { 0.0f, 0.0f }; - - // Setup texture scaling filter - font.GetTexture().SetFilter(TEXTURE_FILTER_POINT); - int currentFontFilter = 0; // TEXTURE_FILTER_POINT - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!WindowShouldClose()) // Detect window close button or ESC key - { - // Update - //---------------------------------------------------------------------------------- - msg.fontSize += GetMouseWheelMove() * 4.0f; - - // Choose font texture filter method - if (IsKeyPressed(KEY_ONE)) - { - font.GetTexture().SetFilter(TEXTURE_FILTER_POINT); - currentFontFilter = 0; - } - else if (IsKeyPressed(KEY_TWO)) - { - font.GetTexture().SetFilter(TEXTURE_FILTER_BILINEAR); - currentFontFilter = 1; - } - else if (IsKeyPressed(KEY_THREE)) - { - // NOTE: Trilinear filter won't be noticed on 2D drawing - font.GetTexture().SetFilter(TEXTURE_FILTER_TRILINEAR); - currentFontFilter = 2; - } - - textSize = msg.MeasureEx(); - - if (IsKeyDown(KEY_LEFT)) fontPosition.x -= 10; - else if (IsKeyDown(KEY_RIGHT)) fontPosition.x += 10; - - // Load a dropped TTF file dynamically (at current fontSize) - for (const auto& file : raylib::LoadDroppedFiles()) { - if (raylib::IsFileExtension(file, ".ttf")) { - msg.font = font = raylib::Font(file, font.GetBaseSize()); - } - } - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - - ClearBackground(RAYWHITE); - - DrawText("Use mouse wheel to change font size", 20, 20, 10, GRAY); - DrawText("Use KEY_RIGHT and KEY_LEFT to move text", 20, 40, 10, GRAY); - DrawText("Use 1, 2, 3 to change texture filter", 20, 60, 10, GRAY); - DrawText("Drop a new TTF font for dynamic loading", 20, 80, 10, DARKGRAY); - - msg.Draw(fontPosition); - - // TODO: It seems texSize measurement is not accurate due to chars offsets... - //DrawRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED); - - DrawRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY); - DrawText(TextFormat("Font size: %02.02f", msg.GetFontSize()), 20, screenHeight - 50, 10, DARKGRAY); - DrawText(TextFormat("Text size: [%02.02f, %02.02f]", textSize.x, textSize.y), 20, screenHeight - 30, 10, DARKGRAY); - DrawText("CURRENT TEXTURE FILTER:", 250, 400, 20, GRAY); - - if (currentFontFilter == 0) DrawText("POINT", 570, 400, 20, BLACK); - else if (currentFontFilter == 1) DrawText("BILINEAR", 570, 400, 20, BLACK); - else if (currentFontFilter == 2) DrawText("TRILINEAR", 570, 400, 20, BLACK); - - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/text/text_font_loading.cpp b/examples/text/text_font_loading.cpp deleted file mode 100644 index 31f0dfdb..00000000 --- a/examples/text/text_font_loading.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************************* -* -* raylib [text] example - Font loading -* -* raylib can load fonts from multiple file formats: -* -* - TTF/OTF > Sprite font atlas is generated on loading, user can configure -* some of the generation parameters (size, characters to include) -* - BMFonts > Angel code font fileformat, sprite font image must be provided -* together with the .fnt file, font generation cna not be configured -* - XNA Spritefont > Sprite font image, following XNA Spritefont conventions, -* Characters in image must follow some spacing and order rules -* -* This example has been created using raylib 2.6 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2016-2019 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [text] example - font loading"); - - // Define characters to draw - // NOTE: raylib supports UTF-8 encoding, following list is actually codified as UTF8 internally - std::string msg = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI\nJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmn\nopqrstuvwxyz{|}~¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓ\nÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷\nøùúûüýþÿ"; - - // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required) - - // BMFont (AngelCode) : Font data and image atlas have been generated using external program - raylib::Font fontBm("resources/pixantiqua.fnt"); - - // TTF font : Font data and atlas are generated directly from TTF - // NOTE: We define a font base size of 32 pixels tall and up-to 250 characters - raylib::Font fontTtf("resources/pixantiqua.ttf", 32, 0, 250); - - bool useTtf = false; - - window.SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - if (IsKeyDown(KEY_SPACE)) useTtf = true; - else useTtf = false; - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - window.BeginDrawing(); - { - - window.ClearBackground(RAYWHITE); - - raylib::DrawText("Hold SPACE to use TTF generated font", 20, 20, 20, LIGHTGRAY); - - if (!useTtf) - { - fontBm.DrawText(msg, Vector2{ 20.0f, 100.0f }, fontBm.baseSize, 2, MAROON); - raylib::DrawText("Using BMFont (Angelcode) imported", 20, GetScreenHeight() - 30, 20, GRAY); - } - else - { - fontTtf.DrawText(msg, Vector2{ 20.0f, 100.0f }, fontTtf.baseSize, 2, LIME); - raylib::DrawText("Using TTF font generated", 20, GetScreenHeight() - 30, 20, GRAY); - } - } - window.EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/text/text_font_spritefont.cpp b/examples/text/text_font_spritefont.cpp deleted file mode 100644 index f7e2c33d..00000000 --- a/examples/text/text_font_spritefont.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************************* -* -* raylib [text] example - Font loading and usage -* -* This example has been created using raylib 1.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2014 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include - -#include "raylib-cpp.hpp" - -int main(void) -{ - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [text] example - sprite fonts usage"); - - std::string msg1 = "THIS IS A custom SPRITE FONT..."; - std::string msg2 = "...and this is ANOTHER CUSTOM font..."; - std::string msg3 = "...and a THIRD one! GREAT! :D"; - - // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required) - raylib::Font font1("resources/custom_mecha.png"); // Font loading - raylib::Font font2("resources/custom_alagard.png"); // Font loading - raylib::Font font3("resources/custom_jupiter_crash.png"); // Font loading - - raylib::Vector2 fontPosition1(screenWidth/2 - MeasureTextEx(font1, msg1.c_str(), font1.baseSize, -3).x/2, - screenHeight/2 - font1.baseSize/2 - 80); - - raylib::Vector2 fontPosition2(screenWidth/2 - MeasureTextEx(font2, msg2.c_str(), font2.baseSize, -2).x/2, - screenHeight/2 - font2.baseSize/2 - 10); - - raylib::Vector2 fontPosition3(screenWidth/2 - MeasureTextEx(font3, msg3.c_str(), font3.baseSize, 2).x/2, - screenHeight/2 - font3.baseSize/2 + 50); - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - // TODO: Update variables here... - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - font1.DrawText(msg1, fontPosition1, font1.baseSize, -3); - font2.DrawText(msg2, fontPosition2, font2.baseSize, -2); - font3.DrawText(msg3, fontPosition3, font3.baseSize, 2); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/text/text_raylib_fonts.cpp b/examples/text/text_raylib_fonts.cpp deleted file mode 100644 index be354aa6..00000000 --- a/examples/text/text_raylib_fonts.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************************* -* -* raylib [text] example - raylib font loading and usage -* -* NOTE: raylib is distributed with some free to use fonts (even for commercial pourposes!) -* To view details and credits for those fonts, check raylib license file -* -* This example has been created using raylib 1.7 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2017 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include -#include - -#include "raylib-cpp.hpp" - -#define MAX_FONTS 8 - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - int screenWidth = 800; - int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [text] example - raylib fonts"); - raylib::Color textColor = DARKGRAY; - - // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) - std::array fonts = { - raylib::Font("resources/fonts/alagard.png"), - raylib::Font("resources/fonts/pixelplay.png"), - raylib::Font("resources/fonts/mecha.png"), - raylib::Font("resources/fonts/setback.png"), - raylib::Font("resources/fonts/romulus.png"), - raylib::Font("resources/fonts/pixantiqua.png"), - raylib::Font("resources/fonts/alpha_beta.png"), - raylib::Font("resources/fonts/jupiter_crash.png") - }; - - std::array messages = { - "ALAGARD FONT designed by Hewett Tsoi", - "PIXELPLAY FONT designed by Aleksander Shevchuk", - "MECHA FONT designed by Captain Falcon", - "SETBACK FONT designed by Brian Kent (AEnigma)", - "ROMULUS FONT designed by Hewett Tsoi", - "PIXANTIQUA FONT designed by Gerhard Grossmann", - "ALPHA_BETA FONT designed by Brian Kent (AEnigma)", - "JUPITER_CRASH FONT designed by Brian Kent (AEnigma)" - }; - - std::array spacings = { 2, 4, 8, 4, 3, 4, 4, 1 }; - - std::array positions; - - for (int i = 0; i < fonts.size(); i++) - { - auto size = fonts[i].MeasureText(messages[i], fonts[i].baseSize * 2, spacings[i]); - positions[i].x = screenWidth/2 - size.x/2; - positions[i].y = 60 + fonts[i].baseSize + 45*i; - } - - // Small Y position corrections - positions[3].y += 8; - positions[4].y += 2; - positions[7].y -= 8; - - std::array colors = { MAROON, ORANGE, DARKGREEN, DARKBLUE, DARKPURPLE, LIME, GOLD, RED }; - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - // Update your variables here - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - textColor.DrawText("free fonts included with raylib", 250, 20, 20); - textColor.DrawLine(220, 50, 590, 50); - - for (int i = 0; i < fonts.size(); i++) - { - fonts[i].DrawText(messages[i], positions[i], fonts[i].baseSize*2, spacings[i], colors[i]); - } - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/textures/resources/KAISG.ttf b/examples/textures/resources/KAISG.ttf deleted file mode 100644 index 04478b25..00000000 Binary files a/examples/textures/resources/KAISG.ttf and /dev/null differ diff --git a/examples/textures/resources/LICENSE b/examples/textures/resources/LICENSE deleted file mode 100644 index 16cdfa34..00000000 --- a/examples/textures/resources/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -Art used in examples is provided under a free and permissive license. -Check individual licenses for details: - - - [Jupiter Crash] font by Brian Kent (AEnigma) - https://www.dafont.com/es/jupiter-crash.font - - [Kaiserzeit Gotisch] font by Dieter Steffmann - https://www.dafont.com/es/kaiserzeit-gotisch.font - - [Scarfy spritesheet](scarfy.png) by [Eiden Marsal](https://www.artstation.com/artist/marshall_z), licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode) - - [Fudesumi image](fudesumi.png) by [Eiden Marsal](https://www.artstation.com/artist/marshall_z), licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode) - - [Cyberpunk Street Environment](https://ansimuz.itch.io/cyberpunk-street-environment) by Luis Zuno ([@ansimuz](https://twitter.com/ansimuz)), licensed as [CC-BY-3.0](http://creativecommons.org/licenses/by/3.0/) diff --git a/examples/textures/resources/boom.wav b/examples/textures/resources/boom.wav deleted file mode 100644 index fd18137d..00000000 Binary files a/examples/textures/resources/boom.wav and /dev/null differ diff --git a/examples/textures/resources/button.png b/examples/textures/resources/button.png deleted file mode 100644 index 99a383b6..00000000 Binary files a/examples/textures/resources/button.png and /dev/null differ diff --git a/examples/textures/resources/buttonfx.wav b/examples/textures/resources/buttonfx.wav deleted file mode 100644 index b93b0ca0..00000000 Binary files a/examples/textures/resources/buttonfx.wav and /dev/null differ diff --git a/examples/textures/resources/cat.png b/examples/textures/resources/cat.png deleted file mode 100644 index db56b9ea..00000000 Binary files a/examples/textures/resources/cat.png and /dev/null differ diff --git a/examples/textures/resources/custom_jupiter_crash.png b/examples/textures/resources/custom_jupiter_crash.png deleted file mode 100644 index c89572e7..00000000 Binary files a/examples/textures/resources/custom_jupiter_crash.png and /dev/null differ diff --git a/examples/textures/resources/cyberpunk_street_background.png b/examples/textures/resources/cyberpunk_street_background.png deleted file mode 100644 index 838d08aa..00000000 Binary files a/examples/textures/resources/cyberpunk_street_background.png and /dev/null differ diff --git a/examples/textures/resources/cyberpunk_street_foreground.png b/examples/textures/resources/cyberpunk_street_foreground.png deleted file mode 100644 index 528b4ae6..00000000 Binary files a/examples/textures/resources/cyberpunk_street_foreground.png and /dev/null differ diff --git a/examples/textures/resources/cyberpunk_street_midground.png b/examples/textures/resources/cyberpunk_street_midground.png deleted file mode 100644 index 73f24fe7..00000000 Binary files a/examples/textures/resources/cyberpunk_street_midground.png and /dev/null differ diff --git a/examples/textures/resources/explosion.png b/examples/textures/resources/explosion.png deleted file mode 100644 index 6df1cf36..00000000 Binary files a/examples/textures/resources/explosion.png and /dev/null differ diff --git a/examples/textures/resources/fudesumi.png b/examples/textures/resources/fudesumi.png deleted file mode 100644 index c77c2876..00000000 Binary files a/examples/textures/resources/fudesumi.png and /dev/null differ diff --git a/examples/textures/resources/fudesumi.raw b/examples/textures/resources/fudesumi.raw deleted file mode 100644 index dad6ff0a..00000000 Binary files a/examples/textures/resources/fudesumi.raw and /dev/null differ diff --git a/examples/textures/resources/ninepatch_button.png b/examples/textures/resources/ninepatch_button.png deleted file mode 100644 index f10037a0..00000000 Binary files a/examples/textures/resources/ninepatch_button.png and /dev/null differ diff --git a/examples/textures/resources/parrots.png b/examples/textures/resources/parrots.png deleted file mode 100644 index 9a0e7f80..00000000 Binary files a/examples/textures/resources/parrots.png and /dev/null differ diff --git a/examples/textures/resources/patterns.png b/examples/textures/resources/patterns.png deleted file mode 100644 index 58b3c372..00000000 Binary files a/examples/textures/resources/patterns.png and /dev/null differ diff --git a/examples/textures/resources/raylib_logo.png b/examples/textures/resources/raylib_logo.png deleted file mode 100644 index 15bbaa2f..00000000 Binary files a/examples/textures/resources/raylib_logo.png and /dev/null differ diff --git a/examples/textures/resources/scarfy.png b/examples/textures/resources/scarfy.png deleted file mode 100644 index be3b83d0..00000000 Binary files a/examples/textures/resources/scarfy.png and /dev/null differ diff --git a/examples/textures/resources/smoke.png b/examples/textures/resources/smoke.png deleted file mode 100644 index 7bad8c68..00000000 Binary files a/examples/textures/resources/smoke.png and /dev/null differ diff --git a/examples/textures/resources/spark_flame.png b/examples/textures/resources/spark_flame.png deleted file mode 100644 index 72cea2e9..00000000 Binary files a/examples/textures/resources/spark_flame.png and /dev/null differ diff --git a/examples/textures/resources/wabbit_alpha.png b/examples/textures/resources/wabbit_alpha.png deleted file mode 100644 index db4081fe..00000000 Binary files a/examples/textures/resources/wabbit_alpha.png and /dev/null differ diff --git a/examples/textures/textures_bunnymark.cpp b/examples/textures/textures_bunnymark.cpp deleted file mode 100644 index 34975d62..00000000 --- a/examples/textures/textures_bunnymark.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************************* -* -* raylib [textures] example - Bunnymark -* -* This example has been created using raylib 1.6 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2014-2019 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include - -#include "raylib-cpp.hpp" - -// This is the maximum amount of elements (quads) per batch -// NOTE: This value is defined in [rlgl] module and can be changed there -#define MAX_BATCH_ELEMENTS 8192 - -class Bunny { - public: - Bunny() { - position = GetMousePosition(); - speed.x = static_cast(GetRandomValue(-250, 250)) / 60.0f; - speed.y = static_cast(GetRandomValue(-250, 250)) / 60.0f; - color = raylib::Color( - GetRandomValue(50, 240), - GetRandomValue(80, 240), - GetRandomValue(100, 240)); - } - - void Update(const raylib::Texture2D& texBunny) { - position.x += speed.x; - position.y += speed.y; - - if (((position.x + texBunny.width/2) > GetScreenWidth()) || - ((position.x + texBunny.width/2) < 0)) speed.x *= -1; - if (((position.y + texBunny.height/2) > GetScreenHeight()) || - ((position.y + texBunny.height/2 - 40) < 0)) speed.y *= -1; - } - - Vector2 position; - Vector2 speed; - Color color; -}; - -int main(void) -{ - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [textures] example - bunnymark"); - - // Load bunny texture - raylib::Texture2D texBunny("resources/wabbit_alpha.png"); - - std::list bunnies; - - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) { - // Create more bunnies - for (int i = 0; i < 100; i++) { - bunnies.emplace_back(); - } - } - - // Update bunnies - - for (Bunny& bunny: bunnies) { - bunny.Update(texBunny); - } - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - for (Bunny& bunny : bunnies) { - // NOTE: When internal batch buffer limit is reached (MAX_BATCH_ELEMENTS), - // a draw call is launched and buffer starts being filled again; - // before issuing a draw call, updated vertex data from internal CPU buffer is send to GPU... - // Process of sending data is costly and it could happen that GPU data has not been completely - // processed for drawing while new data is tried to be sent (updating current in-use buffers) - // it could generates a stall and consequently a frame drop, limiting the number of drawn bunnies - texBunny.Draw(bunny.position, bunny.color); - } - - DrawRectangle(0, 0, screenWidth, 40, BLACK); - raylib::DrawText(TextFormat("bunnies: %i", bunnies.size()), 120, 10, 20, GREEN); - raylib::DrawText(TextFormat("batched draw calls: %i", 1 + bunnies.size()/MAX_BATCH_ELEMENTS), 320, 10, 20, MAROON); - - DrawFPS(10, 10); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/textures/textures_image_drawing.cpp b/examples/textures/textures_image_drawing.cpp deleted file mode 100644 index b4538337..00000000 --- a/examples/textures/textures_image_drawing.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/******************************************************************************************* -* -* raylib [textures] example - Image loading and drawing on it -* -* NOTE: Images are loaded in CPU memory (RAM); textures are loaded in GPU memory (VRAM) -* -* This example has been created using raylib 1.4 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2016 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main(void) { - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [textures] example - image drawing"); - raylib::Color darkGray = DARKGRAY; - - // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) - raylib::Image cat("resources/cat.png"); // Load image in CPU memory (RAM) - cat.Crop(raylib::Rectangle(100, 10, 280, 380)) // Crop an image piece - .FlipHorizontal() // Flip cropped image horizontally - .Resize(150, 200); // Resize flipped-cropped image - - raylib::Image parrots("resources/parrots.png"); // Load image in CPU memory (RAM) - - // Draw one image over the other with a scaling of 1.5f - parrots - .Draw(cat, - raylib::Rectangle(0, 0, cat.GetWidth(), cat.GetHeight()), - raylib::Rectangle(30, 40, cat.GetWidth() * 1.5f, cat.GetHeight() * 1.5f)); - parrots.Crop(raylib::Rectangle(0, 50, parrots.GetWidth(), parrots.GetHeight() - 100)); // Crop resulting image - - // Load custom font for frawing on image - raylib::Font font("resources/custom_jupiter_crash.png"); - - // Draw over image using custom font - parrots.DrawText(font, "PARROTS & CAT", raylib::Vector2(300, 230), font.baseSize, -2); - - raylib::Texture2D texture(parrots); // Image converted to texture, uploaded to GPU memory (VRAM) - - SetTargetFPS(60); - //--------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - // Update your variables here - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(RAYWHITE); - - texture.Draw(screenWidth / 2 - texture.width / 2, - screenHeight / 2 - texture.height / 2 - 40); - darkGray.DrawRectangleLines(screenWidth / 2 - texture.width / 2, - screenHeight / 2 - texture.height / 2 - 40, - texture.width, texture.height); - - darkGray.DrawText("We are drawing only one texture from various images composed!", - 240, 350, 10); - darkGray.DrawText("Source images have been cropped, scaled, flipped and copied one over the other.", - 190, 370, 10); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/examples/textures/textures_image_loading.cpp b/examples/textures/textures_image_loading.cpp deleted file mode 100644 index 68b019ea..00000000 --- a/examples/textures/textures_image_loading.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************************* -* -* raylib [textures] example - Image loading and texture creation -* -* NOTE: Images are loaded in CPU memory (RAM); textures are loaded in GPU memory (VRAM) -* -* This example has been created using raylib 1.3 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2015 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -int main() { - // Initialization - //-------------------------------------------------------------------------------------- - int screenWidth = 800; - int screenHeight = 450; - - raylib::Window window(screenWidth, screenHeight, "raylib [textures] example - image loading"); - raylib::Texture texture("resources/raylib_logo.png"); - raylib::Color textColor = raylib::Color::LightGray(); - - // Main game loop - while (!window.ShouldClose()) { // Detect window close button or ESC key - // Update - //---------------------------------------------------------------------------------- - // Update your variables here - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - { - window.ClearBackground(raylib::Color::RayWhite()); - - texture.Draw(screenWidth / 2 - texture.GetWidth() / 2, screenHeight / 2 - texture.GetHeight() / 2); - - textColor.DrawText("this IS a texture loaded from an image!", 300, 370, 10); - } - EndDrawing(); - //---------------------------------------------------------------------------------- - } - - return 0; -} diff --git a/folderclosed.png b/folderclosed.png new file mode 100644 index 00000000..bb8ab35e Binary files /dev/null and b/folderclosed.png differ diff --git a/folderopen.png b/folderopen.png new file mode 100644 index 00000000..d6c7f676 Binary files /dev/null and b/folderopen.png differ diff --git a/functions.html b/functions.html new file mode 100644 index 00000000..aa2e2f87 --- /dev/null +++ b/functions.html @@ -0,0 +1,114 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- a -

+
+ + + + diff --git a/functions_b.html b/functions_b.html new file mode 100644 index 00000000..c8c548c6 --- /dev/null +++ b/functions_b.html @@ -0,0 +1,93 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- b -

+
+ + + + diff --git a/functions_c.html b/functions_c.html new file mode 100644 index 00000000..9cff54f8 --- /dev/null +++ b/functions_c.html @@ -0,0 +1,167 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- c -

+
+ + + + diff --git a/functions_d.html b/functions_d.html new file mode 100644 index 00000000..374aaf23 --- /dev/null +++ b/functions_d.html @@ -0,0 +1,135 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- d -

+
+ + + + diff --git a/functions_e.html b/functions_e.html new file mode 100644 index 00000000..4a3009c7 --- /dev/null +++ b/functions_e.html @@ -0,0 +1,104 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- e -

+
+ + + + diff --git a/functions_f.html b/functions_f.html new file mode 100644 index 00000000..b4ce0bb4 --- /dev/null +++ b/functions_f.html @@ -0,0 +1,105 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- f -

+
+ + + + diff --git a/functions_func.html b/functions_func.html new file mode 100644 index 00000000..2307209b --- /dev/null +++ b/functions_func.html @@ -0,0 +1,114 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- a -

+
+ + + + diff --git a/functions_func_b.html b/functions_func_b.html new file mode 100644 index 00000000..bbc71278 --- /dev/null +++ b/functions_func_b.html @@ -0,0 +1,93 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- b -

+
+ + + + diff --git a/functions_func_c.html b/functions_func_c.html new file mode 100644 index 00000000..5cc2e497 --- /dev/null +++ b/functions_func_c.html @@ -0,0 +1,164 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- c -

+
+ + + + diff --git a/functions_func_d.html b/functions_func_d.html new file mode 100644 index 00000000..3d313d50 --- /dev/null +++ b/functions_func_d.html @@ -0,0 +1,135 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- d -

+
+ + + + diff --git a/functions_func_e.html b/functions_func_e.html new file mode 100644 index 00000000..3448e733 --- /dev/null +++ b/functions_func_e.html @@ -0,0 +1,104 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- e -

+
+ + + + diff --git a/functions_func_f.html b/functions_func_f.html new file mode 100644 index 00000000..eb7c0665 --- /dev/null +++ b/functions_func_f.html @@ -0,0 +1,99 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- f -

+
+ + + + diff --git a/functions_func_g.html b/functions_func_g.html new file mode 100644 index 00000000..9c3b1918 --- /dev/null +++ b/functions_func_g.html @@ -0,0 +1,510 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- g -

+
+ + + + diff --git a/functions_func_h.html b/functions_func_h.html new file mode 100644 index 00000000..aeb9a8a7 --- /dev/null +++ b/functions_func_h.html @@ -0,0 +1,83 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- h -

+
+ + + + diff --git a/functions_func_i.html b/functions_func_i.html new file mode 100644 index 00000000..fd4bf34d --- /dev/null +++ b/functions_func_i.html @@ -0,0 +1,159 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- i -

+
+ + + + diff --git a/functions_func_k.html b/functions_func_k.html new file mode 100644 index 00000000..b081aa9f --- /dev/null +++ b/functions_func_k.html @@ -0,0 +1,83 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- k -

+
+ + + + diff --git a/functions_func_l.html b/functions_func_l.html new file mode 100644 index 00000000..e305f09b --- /dev/null +++ b/functions_func_l.html @@ -0,0 +1,128 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- l -

+
+ + + + diff --git a/functions_func_m.html b/functions_func_m.html new file mode 100644 index 00000000..5a7300fd --- /dev/null +++ b/functions_func_m.html @@ -0,0 +1,118 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- m -

+
+ + + + diff --git a/functions_func_n.html b/functions_func_n.html new file mode 100644 index 00000000..60971b53 --- /dev/null +++ b/functions_func_n.html @@ -0,0 +1,85 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- n -

+
+ + + + diff --git a/functions_func_o.html b/functions_func_o.html new file mode 100644 index 00000000..6fe3d7fe --- /dev/null +++ b/functions_func_o.html @@ -0,0 +1,145 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- o -

+
+ + + + diff --git a/functions_func_p.html b/functions_func_p.html new file mode 100644 index 00000000..e50fa617 --- /dev/null +++ b/functions_func_p.html @@ -0,0 +1,93 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- p -

+
+ + + + diff --git a/functions_func_r.html b/functions_func_r.html new file mode 100644 index 00000000..50498435 --- /dev/null +++ b/functions_func_r.html @@ -0,0 +1,116 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- r -

+
+ + + + diff --git a/functions_func_s.html b/functions_func_s.html new file mode 100644 index 00000000..a2cf2f79 --- /dev/null +++ b/functions_func_s.html @@ -0,0 +1,432 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- s -

+
+ + + + diff --git a/functions_func_t.html b/functions_func_t.html new file mode 100644 index 00000000..b7176781 --- /dev/null +++ b/functions_func_t.html @@ -0,0 +1,123 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- t -

+
+ + + + diff --git a/functions_func_u.html b/functions_func_u.html new file mode 100644 index 00000000..008cf10c --- /dev/null +++ b/functions_func_u.html @@ -0,0 +1,124 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ + + + + + diff --git a/functions_func_w.html b/functions_func_w.html new file mode 100644 index 00000000..eced0705 --- /dev/null +++ b/functions_func_w.html @@ -0,0 +1,86 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- w -

+
+ + + + diff --git a/functions_func_z.html b/functions_func_z.html new file mode 100644 index 00000000..e4ab0c69 --- /dev/null +++ b/functions_func_z.html @@ -0,0 +1,80 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- z -

+
+ + + + diff --git a/functions_func_~.html b/functions_func_~.html new file mode 100644 index 00000000..c719c53e --- /dev/null +++ b/functions_func_~.html @@ -0,0 +1,98 @@ + + + + + + + +raylib-cpp: Class Members - Functions + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- ~ -

+
+ + + + diff --git a/functions_g.html b/functions_g.html new file mode 100644 index 00000000..945bf2a8 --- /dev/null +++ b/functions_g.html @@ -0,0 +1,510 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- g -

+
+ + + + diff --git a/functions_h.html b/functions_h.html new file mode 100644 index 00000000..fc52c3fa --- /dev/null +++ b/functions_h.html @@ -0,0 +1,83 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- h -

+
+ + + + diff --git a/functions_i.html b/functions_i.html new file mode 100644 index 00000000..d3da3721 --- /dev/null +++ b/functions_i.html @@ -0,0 +1,159 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- i -

+
+ + + + diff --git a/functions_k.html b/functions_k.html new file mode 100644 index 00000000..bc2b815f --- /dev/null +++ b/functions_k.html @@ -0,0 +1,83 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- k -

+
+ + + + diff --git a/functions_l.html b/functions_l.html new file mode 100644 index 00000000..b586d4dd --- /dev/null +++ b/functions_l.html @@ -0,0 +1,128 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- l -

+
+ + + + diff --git a/functions_m.html b/functions_m.html new file mode 100644 index 00000000..f34b4b33 --- /dev/null +++ b/functions_m.html @@ -0,0 +1,118 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- m -

+
+ + + + diff --git a/functions_n.html b/functions_n.html new file mode 100644 index 00000000..27fa7a71 --- /dev/null +++ b/functions_n.html @@ -0,0 +1,85 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- n -

+
+ + + + diff --git a/functions_o.html b/functions_o.html new file mode 100644 index 00000000..7f4c23b8 --- /dev/null +++ b/functions_o.html @@ -0,0 +1,145 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- o -

+
+ + + + diff --git a/functions_p.html b/functions_p.html new file mode 100644 index 00000000..090f860c --- /dev/null +++ b/functions_p.html @@ -0,0 +1,93 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- p -

+
+ + + + diff --git a/functions_r.html b/functions_r.html new file mode 100644 index 00000000..9fe373d4 --- /dev/null +++ b/functions_r.html @@ -0,0 +1,116 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- r -

+
+ + + + diff --git a/functions_s.html b/functions_s.html new file mode 100644 index 00000000..268fb1a9 --- /dev/null +++ b/functions_s.html @@ -0,0 +1,435 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- s -

+
+ + + + diff --git a/functions_t.html b/functions_t.html new file mode 100644 index 00000000..49b9bd5e --- /dev/null +++ b/functions_t.html @@ -0,0 +1,129 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- t -

+
+ + + + diff --git a/functions_u.html b/functions_u.html new file mode 100644 index 00000000..24fc0b92 --- /dev/null +++ b/functions_u.html @@ -0,0 +1,124 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- u -

+
+ + + + diff --git a/functions_vars.html b/functions_vars.html new file mode 100644 index 00000000..bd7d7987 --- /dev/null +++ b/functions_vars.html @@ -0,0 +1,90 @@ + + + + + + + +raylib-cpp: Class Members - Variables + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/functions_w.html b/functions_w.html new file mode 100644 index 00000000..fda0243f --- /dev/null +++ b/functions_w.html @@ -0,0 +1,86 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- w -

+
+ + + + diff --git a/functions_z.html b/functions_z.html new file mode 100644 index 00000000..ac151353 --- /dev/null +++ b/functions_z.html @@ -0,0 +1,80 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- z -

+
+ + + + diff --git a/functions_~.html b/functions_~.html new file mode 100644 index 00000000..09d4ba3e --- /dev/null +++ b/functions_~.html @@ -0,0 +1,98 @@ + + + + + + + +raylib-cpp: Class Members + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- ~ -

+
+ + + + diff --git a/hierarchy.html b/hierarchy.html new file mode 100644 index 00000000..4ff184ed --- /dev/null +++ b/hierarchy.html @@ -0,0 +1,117 @@ + + + + + + + +raylib-cpp: Class Hierarchy + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 123]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Craylib::AudioDeviceAudio device management functions
 Craylib::AudioStreamAudioStream management functions
 Craylib::AutomationEventListAutomationEventList management functions
 Craylib::BoundingBoxBounding box type
 Craylib::Camera2DCamera2D type, defines a 2d camera
 Craylib::Camera3DCamera type, defines a camera position/orientation in 3d space
 Craylib::ColorColor type, RGBA (32bit)
 Cstd::exceptionSTL class
 Cstd::runtime_errorSTL class
 Craylib::RaylibExceptionException used for most raylib-related exceptions
 Craylib::FontFont type, includes texture and charSet array data
 Craylib::GamepadInput-related functions: gamepads
 Craylib::ImageImage type, bpp always RGBA (32bit)
 Craylib::MaterialMaterial type (generic)
 Craylib::MatrixMatrix type (OpenGL style 4x4 - right handed, column major)
 Craylib::MeshUnmanagedVertex data defining a mesh, not managed by C++ RAII
 Craylib::MeshVertex data defining a mesh
 Craylib::ModelModel type
 Craylib::ModelAnimationModel animation
 Craylib::MusicMusic stream type (audio file streaming from memory)
 Craylib::RayRay type (useful for raycast)
 Craylib::RayCollisionRaycast hit information
 Craylib::RectangleRectangle type
 Craylib::RenderTextureRenderTexture type, for texture rendering
 Craylib::ShaderUnmanagedShader type (generic), not managed by C++ RAII
 Craylib::ShaderShader type (generic)
 Craylib::SoundWave/Sound management functions
 Craylib::TextText Functions
 Craylib::TextureUnmanagedA Texture that is not managed by C++ RAII
 Craylib::TextureTexture type
 Craylib::Vector2Vector2 type
 Craylib::Vector3Vector3 type
 Craylib::Vector4Vector4 type
 Craylib::VrStereoConfigVR stereo config functions for VR simulator
 Craylib::WaveWave type, defines audio wave data
 Craylib::WindowWindow and Graphics Device Functions
+
+
+ + + + diff --git a/include/AudioDevice.hpp b/include/AudioDevice.hpp deleted file mode 100644 index bb475a39..00000000 --- a/include/AudioDevice.hpp +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_ -#define RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_ - -#include "./RaylibException.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Audio device management functions. - */ -class AudioDevice { -public: - /** - * Initialize audio device and context. - * - * @param lateInit Whether or not to post-pone initializing the context. - * - * @throws raylib::RaylibException Throws if the AudioDevice failed to initialize. - */ - explicit AudioDevice(bool lateInit = false) { - if (!lateInit) { - Init(); - } - } - - /** - * Close the audio device and context. - */ - ~AudioDevice() { Close(); } - - /** - * Initialize audio device and context. - * - * @throws raylib::RaylibException Throws if the AudioDevice failed to initialize. - */ - static void Init() { - ::InitAudioDevice(); - if (!IsReady()) { - throw RaylibException("Failed to initialize AudioDevice"); - } - } - - /** - * Close the audio device and context. - */ - static void Close() { ::CloseAudioDevice(); } - - /** - * Check if audio device has been initialized successfully. - */ - static bool IsReady() { return ::IsAudioDeviceReady(); } - - /** - * Set master volume (listener). - * - * @param volume The desired volume to set. - */ - AudioDevice& SetVolume(float volume) { - ::SetMasterVolume(volume); - return *this; - } -}; -} // namespace raylib - -using RAudioDevice = raylib::AudioDevice; - -#endif // RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_ diff --git a/include/AudioStream.hpp b/include/AudioStream.hpp deleted file mode 100644 index a9c8a4ee..00000000 --- a/include/AudioStream.hpp +++ /dev/null @@ -1,215 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_ -#define RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_ - -#include "./RaylibException.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * AudioStream management functions - */ -class AudioStream : public ::AudioStream { -public: - AudioStream(const ::AudioStream& music) - : ::AudioStream(music) { - // Nothing. - } - - AudioStream( - rAudioBuffer* buffer = nullptr, - rAudioProcessor* processor = nullptr, - unsigned int sampleRate = 0, - unsigned int sampleSize = 0, - unsigned int channels = 0) - : ::AudioStream{buffer, processor, sampleRate, sampleSize, channels} { - // Nothing. - } - - /** - * Init audio stream (to stream raw audio pcm data) - * - * @throws raylib::RaylibException Throws if the AudioStream failed to load. - */ - AudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels = 2) { - Load(sampleRate, sampleSize, channels); - } - - AudioStream(const AudioStream&) = delete; - - AudioStream(AudioStream&& other) noexcept { - set(other); - - other.buffer = nullptr; - other.processor = nullptr; - other.sampleRate = 0; - other.sampleSize = 0; - other.channels = 0; - } - - ~AudioStream() { Unload(); } - - GETTER(rAudioBuffer*, Buffer, buffer) - GETTER(rAudioProcessor*, Processor, processor) - GETTER(unsigned int, SampleRate, sampleRate) - GETTER(unsigned int, SampleSize, sampleSize) - GETTER(unsigned int, Channels, channels) - - AudioStream& operator=(const ::AudioStream& stream) { - set(stream); - return *this; - } - - AudioStream& operator=(const AudioStream&) = delete; - - AudioStream& operator=(AudioStream&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.buffer = nullptr; - other.processor = nullptr; - other.sampleRate = 0; - other.sampleSize = 0; - other.channels = 0; - - return *this; - } - - /** - * Update audio stream buffers with data - */ - AudioStream& Update(const void* data, int samplesCount) { - ::UpdateAudioStream(*this, data, samplesCount); - return *this; - } - - /** - * Unload audio stream and free memory - */ - void Unload() { - if (IsValid()) { - ::UnloadAudioStream(*this); - } - } - - /** - * Check if any audio stream buffers requires refill - */ - [[nodiscard]] bool IsProcessed() const { return ::IsAudioStreamProcessed(*this); } - - /** - * Play audio stream - */ - AudioStream& Play() { - ::PlayAudioStream(*this); - return *this; - } - - /** - * Pause audio stream - */ - AudioStream& Pause() { - ::PauseAudioStream(*this); - return *this; - } - - /** - * Resume audio stream - */ - AudioStream& Resume() { - ::ResumeAudioStream(*this); - return *this; - } - - /** - * Check if audio stream is playing - */ - [[nodiscard]] bool IsPlaying() const { return ::IsAudioStreamPlaying(*this); } - - /** - * Stop audio stream - */ - AudioStream& Stop() { - ::StopAudioStream(*this); - return *this; - } - - /** - * Set volume for audio stream (1.0 is max level) - */ - AudioStream& SetVolume(float volume = 1.0f) { - ::SetAudioStreamVolume(*this, volume); - return *this; - } - - /** - * Set pitch for audio stream (1.0 is base level) - */ - AudioStream& SetPitch(float pitch) { - ::SetAudioStreamPitch(*this, pitch); - return *this; - } - - /** - * Set pan for audio stream (0.5 is centered) - */ - AudioStream& SetPan(float pan = 0.5f) { - ::SetAudioStreamPan(*this, pan); - return *this; - } - - /** - * Default size for new audio streams - */ - static void SetBufferSizeDefault(int size) { ::SetAudioStreamBufferSizeDefault(size); } - - /** - * Audio thread callback to request new data - */ - void SetCallback(::AudioCallback callback) { ::SetAudioStreamCallback(*this, callback); } - - /** - * Attach audio stream processor to stream - */ - void AttachProcessor(::AudioCallback processor) { ::AttachAudioStreamProcessor(*this, processor); } - - /** - * Detach audio stream processor from stream - */ - void DetachProcessor(::AudioCallback processor) { ::DetachAudioStreamProcessor(*this, processor); } - - /** - * Retrieve whether or not the audio stream is ready. - */ - [[nodiscard]] bool IsValid() const { return ::IsAudioStreamValid(*this); } - - /** - * Load audio stream (to stream raw audio pcm data) - * - * @throws raylib::RaylibException Throws if the AudioStream failed to load. - */ - void Load(unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels = 2) { - Unload(); - set(::LoadAudioStream(SampleRate, SampleSize, Channels)); - if (!IsValid()) { - throw RaylibException("Failed to load audio stream"); - } - } -protected: - void set(const ::AudioStream& stream) { - buffer = stream.buffer; - processor = stream.processor; - sampleRate = stream.sampleRate; - sampleSize = stream.sampleSize; - channels = stream.channels; - } -}; -} // namespace raylib - -using RAudioStream = raylib::AudioStream; - -#endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_ diff --git a/include/AutomationEventList.hpp b/include/AutomationEventList.hpp deleted file mode 100644 index 52cd74f5..00000000 --- a/include/AutomationEventList.hpp +++ /dev/null @@ -1,142 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_AUTOMATIONEVENTLIST_HPP_ -#define RAYLIB_CPP_INCLUDE_AUTOMATIONEVENTLIST_HPP_ - -#include "./RaylibException.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * AutomationEventList management functions - */ -class AutomationEventList : public ::AutomationEventList { -public: - AutomationEventList(const ::AutomationEventList& automationEventList) - : ::AutomationEventList(automationEventList) { - // Nothing. - } - - /** - * Load an empty automation events list. - */ - AutomationEventList() { set(::LoadAutomationEventList(0)); } - - /** - * Load automation events list from file. - * - * @param fileName The file path to load the automation events list from. - */ - AutomationEventList(const char* fileName) { Load(fileName); } - - AutomationEventList(const AutomationEventList&) = delete; - - AutomationEventList(AutomationEventList&& other) noexcept { - set(other); - - other.capacity = 0; - other.count = 0; - other.events = nullptr; - } - - ~AutomationEventList() { Unload(); } - - GETTER(unsigned int, Capacity, capacity) - GETTER(unsigned int, Count, count) - GETTER(AutomationEvent*, Events, events) - - AutomationEventList& operator=(const ::AutomationEventList& other) { - set(other); - return *this; - } - - AutomationEventList& operator=(const AutomationEventList&) = delete; - - AutomationEventList& operator=(AutomationEventList&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.capacity = 0; - other.count = 0; - other.events = nullptr; - - return *this; - } - - /** - * Load audio stream (to stream raw audio pcm data) - * - * @throws raylib::RaylibException Throws if the AutomationEventList failed to load. - */ - void Load(const char* fileName) { - Unload(); - set(::LoadAutomationEventList(fileName)); - if (!IsValid()) { - throw RaylibException("Failed to load automation event list"); - } - } - - /** - * Update audio stream buffers with data - */ - void Unload() { - if (!IsValid()) { - return; - } - -// The function signature of UnloadAutomationEventList() changes from raylib 5.0. -#if RAYLIB_VERSION_MAJOR == 5 -#if RAYLIB_VERSION_MINOR == 0 - ::UnloadAutomationEventList(this); -#elif RAYLIB_VERSION_MINOR >= 1 - ::UnloadAutomationEventList(*this); -#endif -#else - ::UnloadAutomationEventList(*this); -#endif - } - - bool IsValid() { return events != nullptr; } - - bool Export(const char* fileName) { return ::ExportAutomationEventList(*this, fileName); } - - void Set() { ::SetAutomationEventList(this); } - - void SetBaseFrame(int frame) { - Set(); - ::SetAutomationEventBaseFrame(frame); - } - - void StartRecording() { - Set(); - ::StartAutomationEventRecording(); - } - - void StopRecording() { - Set(); - ::StopAutomationEventRecording(); - } - - void Play(int index) { - if (index < 0 || static_cast(index) >= this->count) { - return; - } - - Set(); - ::PlayAutomationEvent(this->events[index]); - } -protected: - void set(const ::AutomationEventList& other) { - capacity = other.capacity; - count = other.count; - events = other.events; - } -}; -} // namespace raylib - -using RAutomationEventList = raylib::AutomationEventList; - -#endif // RAYLIB_CPP_INCLUDE_AUTOMATIONEVENTLIST_HPP_ diff --git a/include/BoundingBox.hpp b/include/BoundingBox.hpp deleted file mode 100644 index 4edafe49..00000000 --- a/include/BoundingBox.hpp +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_ -#define RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_ - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Bounding box type - */ -class BoundingBox : public ::BoundingBox { -public: - /* - * Copy a bounding box from another bounding box. - */ - BoundingBox(const ::BoundingBox& box) : ::BoundingBox{box.min, box.max} { - // Nothing. - } - - /** - * Compute mesh bounding box limits - */ - BoundingBox(const ::Mesh& mesh) { set(::GetMeshBoundingBox(mesh)); } - - BoundingBox(::Vector3 minMax = ::Vector3{0.0f, 0.0f, 0.0f}) : ::BoundingBox{minMax, minMax} {} - BoundingBox(::Vector3 min, ::Vector3 max) : ::BoundingBox{min, max} {} - - GETTERSETTER(::Vector3, Min, min) - GETTERSETTER(::Vector3, Max, max) - - BoundingBox& operator=(const ::BoundingBox& box) { - set(box); - return *this; - } - - /** - * Draw a bounding box with wires - */ - void Draw(::Color color = {255, 255, 255, 255}) const { ::DrawBoundingBox(*this, color); } - - /** - * Detect collision between two boxes - */ - [[nodiscard]] bool CheckCollision(const ::BoundingBox& box2) const { return CheckCollisionBoxes(*this, box2); } - - /** - * Detect collision between box and sphere - */ - [[nodiscard]] bool CheckCollision(::Vector3 center, float radius) const { return CheckCollisionBoxSphere(*this, center, radius); } - - /** - * Detect collision between ray and bounding box - */ - [[nodiscard]] bool CheckCollision(const ::Ray& ray) const { return GetRayCollisionBox(ray, *this).hit; } - - /** - * Get collision information between ray and bounding box - */ - RayCollision GetCollision(const ::Ray& ray) const { return GetRayCollisionBox(ray, *this); } -protected: - void set(const ::BoundingBox& box) { - min = box.min; - max = box.max; - } - void set(const ::Vector3& _min, const ::Vector3& _max) { - min = _min; - max = _max; - } -}; -} // namespace raylib - -using RBoundingBox = raylib::BoundingBox; - -#endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_ diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt deleted file mode 100644 index 0a812930..00000000 --- a/include/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -add_library(raylib_cpp INTERFACE) - -set(RAYLIB_CPP_HEADERS - ${CMAKE_CURRENT_SOURCE_DIR}/AudioDevice.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/AudioStream.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/AutomationEventList.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/BoundingBox.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Camera2D.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Camera3D.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Color.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/FileData.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/FileText.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Font.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Functions.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Gamepad.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Image.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Keyboard.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Material.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Matrix.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Mesh.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/MeshUnmanaged.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Model.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/ModelAnimation.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Mouse.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Music.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Ray.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/RayCollision.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/RaylibException.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/raylib-cpp-utils.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/raylib-cpp.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/raylib.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/raymath.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Rectangle.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/RenderTexture.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/ShaderUnmanaged.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Shader.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Sound.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Text.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Texture.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/TextureUnmanaged.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Touch.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Vector2.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Vector3.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Vector4.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/VrStereoConfig.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Wave.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/Window.hpp -) - -# Include Directory -target_include_directories(raylib_cpp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/) - -# Set the header files as install files. -install(FILES - ${RAYLIB_CPP_HEADERS} - DESTINATION include -) - -if (RAYLIB_CPP_IS_MAIN) - # @TODO: add examples files - add_custom_target(format - COMMAND clang-format - -i - ${RAYLIB_CPP_HEADERS} - ) -endif() \ No newline at end of file diff --git a/include/Camera2D.hpp b/include/Camera2D.hpp deleted file mode 100644 index e6ca6ce0..00000000 --- a/include/Camera2D.hpp +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_ -#define RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_ - -#include "./Vector2.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Camera2D type, defines a 2d camera - */ -class Camera2D : public ::Camera2D { -public: - Camera2D(const ::Camera2D& camera) - : ::Camera2D(camera) { - // Nothing. - } - - Camera2D() : ::Camera2D() {} - Camera2D(::Vector2 offset, ::Vector2 target, float rotation = 0.0f, float zoom = 1.0f) - : ::Camera2D{offset, target, rotation, zoom} {} - - Camera2D& BeginMode() { - ::BeginMode2D(*this); - return *this; - } - - Camera2D& EndMode() { - ::EndMode2D(); - return *this; - } - - GETTERSETTER(::Vector2, Offset, offset) - GETTERSETTER(::Vector2, Target, target) - GETTERSETTER(float, Rotation, rotation) - GETTERSETTER(float, Zoom, zoom) - - Camera2D& operator=(const ::Camera2D& camera) { - set(camera); - return *this; - } - - /** - * Returns camera 2d transform matrix - */ - [[nodiscard]] Matrix GetMatrix() const { return ::GetCameraMatrix2D(*this); } - - /** - * Returns the world space position for a 2d camera screen space position - */ - [[nodiscard]] Vector2 GetScreenToWorld(::Vector2 position) const { return ::GetScreenToWorld2D(position, *this); } - - /** - * Returns the screen space position for a 2d world space position - */ - [[nodiscard]] Vector2 GetWorldToScreen(::Vector2 position) const { return ::GetWorldToScreen2D(position, *this); } -protected: - void set(const ::Camera2D& camera) { - offset = camera.offset; - target = camera.target; - rotation = camera.rotation; - zoom = camera.zoom; - } -}; -} // namespace raylib - -using RCamera2D = raylib::Camera2D; - -#endif // RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_ diff --git a/include/Camera3D.hpp b/include/Camera3D.hpp deleted file mode 100644 index 42b180c8..00000000 --- a/include/Camera3D.hpp +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_ -#define RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_ - -#include "./Vector3.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Camera type, defines a camera position/orientation in 3d space - */ -class Camera3D : public ::Camera3D { -public: - Camera3D(const ::Camera3D& camera) : ::Camera3D(camera) { } - - /** - * Create a new Camera3D. - * - * @param position Camera position - * @param target Camera target it looks-at - * @param up Camera up vector (rotation over its axis) - * @param fovy Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in - * orthographic - * @param projection Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC - */ - Camera3D( - ::Vector3 position, - ::Vector3 target = ::Vector3{0.0f, 0.0f, -1.0f}, - ::Vector3 up = ::Vector3{0.0f, 1.0f, 0.0f}, - float fovy = 45.0f, - int projection = CAMERA_PERSPECTIVE) - : ::Camera3D{position, target, up, fovy, projection} {} - - Camera3D() {} - - GETTERSETTER(::Vector3, Position, position) - GETTERSETTER(::Vector3, Target, target) - GETTERSETTER(::Vector3, Up, up) - GETTERSETTER(float, Fovy, fovy) - GETTERSETTER(int, Projection, projection) - - Camera3D& operator=(const ::Camera3D& camera) { - set(camera); - return *this; - } - - /** - * Initializes 3D mode with custom camera (3D) - */ - Camera3D& BeginMode() { - ::BeginMode3D(*this); - return *this; - } - - /** - * Ends 3D mode and returns to default 2D orthographic mode - */ - Camera3D& EndMode() { - ::EndMode3D(); - return *this; - } - - /** - * Get camera transform matrix (view matrix) - */ - Matrix GetMatrix() const { return ::GetCameraMatrix(*this); } - - /** - * Update camera position for selected mode - */ - Camera3D& Update(int mode) { - ::UpdateCamera(this, mode); - return *this; - } - - /** - * Update camera movement/rotation - */ - Camera3D& Update(::Vector3 movement, ::Vector3 rotation, float zoom = 1.0f) { - ::UpdateCameraPro(this, movement, rotation, zoom); - return *this; - } - - /** - * Returns a ray trace from mouse position - */ - Ray GetMouseRay(::Vector2 mousePosition) const { return ::GetMouseRay(mousePosition, *this); } - - /** - * Returns the screen space position for a 3d world space position - */ - Vector2 GetWorldToScreen(::Vector3 position) const { return ::GetWorldToScreen(position, *this); } - - /** - * Get a ray trace from screen position (i.e mouse) in a viewport - */ - Ray GetScreenToWorldRay(::Vector2 position, int width, int height) { - return ::GetScreenToWorldRayEx(position, *this, width, height); - } - - /** - * Draw a billboard texture. - */ - void - DrawBillboard(const ::Texture2D& texture, ::Vector3 center, float size, ::Color tint = {255, 255, 255, 255}) const { - ::DrawBillboard(*this, texture, center, size, tint); - } - - /** - * Draw a billboard texture defined by source. - */ - void DrawBillboard( - const ::Texture2D& texture, - ::Rectangle sourceRec, - ::Vector3 center, - ::Vector2 size, - ::Color tint = {255, 255, 255, 255}) const { - ::DrawBillboardRec(*this, texture, sourceRec, center, size, tint); - } -protected: - void set(const ::Camera3D& camera) { - position = camera.position; - target = camera.target; - up = camera.up; - fovy = camera.fovy; - projection = camera.projection; - } -}; - -using Camera = Camera3D; - -} // namespace raylib - -using RCamera = raylib::Camera; -using RCamera3D = raylib::Camera3D; - -#endif // RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_ diff --git a/include/Color.hpp b/include/Color.hpp deleted file mode 100644 index 8bb52c7e..00000000 --- a/include/Color.hpp +++ /dev/null @@ -1,259 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_COLOR_HPP_ -#define RAYLIB_CPP_INCLUDE_COLOR_HPP_ - -#include - -#include "./Vector4.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Color type, RGBA (32bit) - */ -class Color : public ::Color { -public: - Color(const ::Color& color) : ::Color{color.r, color.g, color.b, color.a} {} - - Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = 255) - : ::Color{red, green, blue, alpha} {}; - - /** - * Black. - */ - Color() : ::Color{0, 0, 0, 255} {}; - - /** - * Returns a Color from HSV values - */ - Color(::Vector3 hsv) { set(::ColorFromHSV(hsv.x, hsv.y, hsv.z)); } - - /** - * Returns a Color from HSV values - */ - static ::Color FromHSV(float hue, float saturation, float value) { return ::ColorFromHSV(hue, saturation, value); } - - /** - * Get Color structure from hexadecimal value - */ - explicit Color(unsigned int hexValue) : ::Color(::GetColor(hexValue)) { } - - Color(void* srcPtr, int format) : ::Color(::GetPixelColor(srcPtr, format)) { } - - /** - * Returns hexadecimal value for a Color - */ - [[nodiscard]] int ToInt() const { return ::ColorToInt(*this); } - - /** - * Returns hexadecimal value for a Color - */ - explicit operator int() const { return ::ColorToInt(*this); } - - [[nodiscard]] std::string ToString() const { return TextFormat("Color(%d, %d, %d, %d)", r, g, b, a); } - - explicit operator std::string() const { return ToString(); } - - /** - * Returns color with alpha applied, alpha goes from 0.0f to 1.0f - */ - [[nodiscard]] Color Fade(float alpha) const { return ::Fade(*this, alpha); } - - /** - * Returns Color normalized as float [0..1] - */ - [[nodiscard]] Vector4 Normalize() const { return ::ColorNormalize(*this); } - - /** - * Returns Color from normalized values [0..1] - */ - explicit Color(::Vector4 normalized) : Color(::ColorFromNormalized(normalized)) { } - - /** - * Returns HSV values for a Color - */ - [[nodiscard]] Vector3 ToHSV() const { return ::ColorToHSV(*this); } - - GETTERSETTER(unsigned char, R, r) - GETTERSETTER(unsigned char, G, g) - GETTERSETTER(unsigned char, B, b) - GETTERSETTER(unsigned char, A, a) - - Color& operator=(const ::Color& color) { - set(color); - return *this; - } - - /** - * Set background color (framebuffer clear color) - */ - Color& ClearBackground() { - ::ClearBackground(*this); - return *this; - } - - void DrawPixel(int x, int y) const { ::DrawPixel(x, y, *this); } - - /** - * Draw a pixel - */ - void DrawPixel(::Vector2 pos) const { ::DrawPixelV(pos, *this); } - - /** - * Draw a line - */ - void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY) const { - ::DrawLine(startPosX, startPosY, endPosX, endPosY, *this); - } - - /** - * Draw a line using Vector points - */ - void DrawLine(::Vector2 startPos, ::Vector2 endPos) const { ::DrawLineV(startPos, endPos, *this); } - - /** - * Draw a line using Vector points, with a given thickness - */ - void DrawLine(::Vector2 startPos, ::Vector2 endPos, float thick) const { - ::DrawLineEx(startPos, endPos, thick, *this); - } - - void DrawLineBezier(::Vector2 startPos, ::Vector2 endPos, float thick = 1.0f) const { - ::DrawLineBezier(startPos, endPos, thick, *this); - } - - void DrawLineStrip(::Vector2* points, int numPoints) const { ::DrawLineStrip(points, numPoints, *this); } - - void DrawText(const char* text, int posX = 0, int posY = 0, int fontSize = 10.0f) const { - ::DrawText(text, posX, posY, fontSize, *this); - } - - void DrawText(const std::string& text, int posX = 0, int posY = 0, int fontSize = 10.0f) const { - ::DrawText(text.c_str(), posX, posY, fontSize, *this); - } - - void DrawText(const ::Font& font, const char* text, ::Vector2 position, float fontSize, float spacing) const { - ::DrawTextEx(font, text, position, fontSize, spacing, *this); - } - - void - DrawText(const ::Font& font, const std::string& text, ::Vector2 position, float fontSize, float spacing) const { - ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, *this); - } - - void DrawText( - const ::Font& font, - const char* text, - ::Vector2 position, - ::Vector2 origin, - float rotation, - float fontSize, - float spacing) const { - ::DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, *this); - } - - void DrawText( - const ::Font& font, - const std::string& text, - ::Vector2 position, - ::Vector2 origin, - float rotation, - float fontSize, - float spacing) const { - ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, *this); - } - - void DrawRectangle(int posX, int posY, int width, int height) const { - ::DrawRectangle(posX, posY, width, height, *this); - } - - void DrawRectangle(::Vector2 position, ::Vector2 size) const { ::DrawRectangleV(position, size, *this); } - - void DrawRectangle(::Rectangle rec) const { ::DrawRectangleRec(rec, *this); } - - void DrawRectangle(::Rectangle rec, ::Vector2 origin, float rotation) const { - ::DrawRectanglePro(rec, origin, rotation, *this); - } - - void DrawRectangleLines(int posX, int posY, int width, int height) const { - ::DrawRectangleLines(posX, posY, width, height, *this); - } - - void DrawRectangleLines(::Rectangle rec, float lineThick) const { ::DrawRectangleLinesEx(rec, lineThick, *this); } - - bool IsEqual(::Color color) { - return ::ColorIsEqual(*this, color); - } - - bool operator==(const ::Color& other) const { return ::ColorIsEqual(*this, other); } - bool operator!=(const ::Color& other) const { return !::ColorIsEqual(*this, other); } - - /** - * Get color multiplied with another color - */ - Color Tint(::Color tint) { return ::ColorTint(*this, tint); } - - /** - * Get color with brightness correction, brightness factor goes from -1.0f to 1.0f - */ - Color Brightness(float factor) { return ::ColorBrightness(*this, factor); } - - /** - * Get color with contrast correction, contrast values between -1.0f and 1.0f - */ - Color Contrast(float contrast) { return ::ColorContrast(*this, contrast); } - - /** - * Returns color with alpha applied, alpha goes from 0.0f to 1.0f - */ - [[nodiscard]] Color Alpha(float alpha) const { return ::ColorAlpha(*this, alpha); } - - Color Lerp(::Color color2, float factor) { - return ::ColorLerp(*this, color2, factor); - } - - /** - * Returns src alpha-blended into dst color with tint - */ - [[nodiscard]] Color AlphaBlend(::Color dst, ::Color tint) const { return ::ColorAlphaBlend(dst, *this, tint); } - - static Color LightGray() { return LIGHTGRAY; } - static Color Gray() { return GRAY; } - static Color DarkGray() { return DARKGRAY; } - static Color Yellow() { return YELLOW; } - static Color Gold() { return GOLD; } - static Color Orange() { return ORANGE; } - static Color Pink() { return PINK; } - static Color Red() { return RED; } - static Color Maroon() { return MAROON; } - static Color Green() { return GREEN; } - static Color Lime() { return LIME; } - static Color DarkGreen() { return DARKGREEN; } - static Color SkyBlue() { return SKYBLUE; } - static Color Blue() { return BLUE; } - static Color DarkBlue() { return DARKBLUE; } - static Color Purple() { return PURPLE; } - static Color Violet() { return VIOLET; } - static Color DarkPurple() { return DARKPURPLE; } - static Color Beige() { return BEIGE; } - static Color Brown() { return BROWN; } - static Color DarkBrown() { return DARKBROWN; } - static Color White() { return WHITE; } - static Color Black() { return BLACK; } - static Color Blank() { return BLANK; } - static Color Magenta() { return MAGENTA; } - static Color RayWhite() { return RAYWHITE; } -protected: - void set(const ::Color& color) { - r = color.r; - g = color.g; - b = color.b; - a = color.a; - } -}; - -} // namespace raylib - -using RColor = raylib::Color; - -#endif // RAYLIB_CPP_INCLUDE_COLOR_HPP_ diff --git a/include/FileData.hpp b/include/FileData.hpp deleted file mode 100644 index 979179fb..00000000 --- a/include/FileData.hpp +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_FILEDATA_HPP_ -#define RAYLIB_CPP_INCLUDE_FILEDATA_HPP_ - -#include -#include - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { - -class FileData { -public: - FileData() = default; - FileData(const FileData&) = delete; - FileData(FileData&& other) noexcept : data(other.data), bytesRead(other.bytesRead) { - other.data = nullptr; - other.bytesRead = 0; - } - FileData& operator=(const FileData&) = delete; - FileData& operator=(FileData&& other) noexcept { - std::swap(data, other.data); - std::swap(bytesRead, other.bytesRead); - return *this; - } - ~FileData() { Unload(); } - - explicit FileData(const std::string& fileName) { Load(fileName); } - - GETTER(const unsigned char*, Data, data) - GETTER(int, BytesRead, bytesRead) - - void Load(const std::string& fileName) { Load(fileName.c_str()); } - void Load(const char* fileName) { - Unload(); - data = ::LoadFileData(fileName, &bytesRead); - } - - void Unload() { - if (data != nullptr) { - ::UnloadFileData(data); - data = nullptr; - bytesRead = 0; - } - } -private: - unsigned char* data{nullptr}; - int bytesRead{0}; -}; - -} // namespace raylib - -using RFileData = raylib::FileData; - -#endif // RAYLIB_CPP_INCLUDE_FILEDATA_HPP_ diff --git a/include/FileText.hpp b/include/FileText.hpp deleted file mode 100644 index c45fc212..00000000 --- a/include/FileText.hpp +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_FILETEXT_HPP_ -#define RAYLIB_CPP_INCLUDE_FILETEXT_HPP_ - -#include -#include - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { - -class FileText { -public: - FileText() = default; - FileText(const FileText&) = delete; - FileText(FileText&& other) noexcept : data(other.data), length(other.length) { - other.data = nullptr; - other.length = 0; - } - FileText& operator=(const FileText&) = delete; - FileText& operator=(FileText&& other) noexcept { - std::swap(data, other.data); - std::swap(length, other.length); - return *this; - } - ~FileText() { Unload(); } - - explicit FileText(const std::string& fileName) { Load(fileName); } - - GETTER(const char*, Data, data) - GETTER(unsigned int, Length, length) - - [[nodiscard]] const char* c_str() const { return data; } - - [[nodiscard]] std::string ToString() const { return data; } - explicit operator std::string() const { return data; } - - void Load(const std::string& fileName) { Load(fileName.c_str()); } - void Load(const char* fileName) { - data = ::LoadFileText(fileName); - length = ::TextLength(data); - } - - void Unload() { - if (data != nullptr) { - ::UnloadFileText(data); - data = nullptr; - length = 0; - } - } -private: - char* data{nullptr}; - unsigned int length{0}; -}; - -} // namespace raylib - -using RFileText = raylib::FileText; - -#endif // RAYLIB_CPP_INCLUDE_FILETEXT_HPP_ diff --git a/include/Font.hpp b/include/Font.hpp deleted file mode 100644 index 748ef69d..00000000 --- a/include/Font.hpp +++ /dev/null @@ -1,332 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_FONT_HPP_ -#define RAYLIB_CPP_INCLUDE_FONT_HPP_ - -#include - -#include "./RaylibException.hpp" -#include "./TextureUnmanaged.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Font type, includes texture and charSet array data - */ -class Font : public ::Font { -public: - Font( - int baseSize, - int glyphCount, - int glyphPadding, - ::Texture2D texture, - ::Rectangle* recs = nullptr, - ::GlyphInfo* glyphs = nullptr) - : ::Font{baseSize, glyphCount, glyphPadding, texture, recs, glyphs} { - // Nothing. - } - - /** - * Retrieves the default Font. - */ - Font() : ::Font(::GetFontDefault()) { } - - Font(const ::Font& font) : ::Font(font) { } - - /** - * Loads a Font from the given file. - * - * @param fileName The file name of the font to load. - * - * @throws raylib::RaylibException Throws if the given font failed to initialize. - */ - Font(const std::string& fileName) { Load(fileName); } - - /** - * Loads a Font from the given file, with generation parameters. - * - * @param fileName The file name of the font to load. - * - * @throws raylib::RaylibException Throws if the given font failed to initialize. - * - * @see ::LoadFontEx - */ - Font(const std::string& fileName, int fontSize, int* fontChars = 0, int charCount = 0) { - Load(fileName, fontSize, fontChars, charCount); - } - - /** - * Loads a Font from the given image with a color key. - * - * @param image The image to load the fond from. - * - * @throws raylib::RaylibException Throws if the given font failed to initialize. - * - * @see ::LoadFontFromImage() - */ - Font(const ::Image& image, ::Color key, int firstChar) { Load(image, key, firstChar); } - - /** - * Loads a font from memory, based on the given file type and file data. - * - * @throws raylib::RaylibException Throws if the given font failed to initialize. - * - * @see ::LoadFontFromMemory() - */ - Font( - const std::string& fileType, - const unsigned char* fileData, - int dataSize, - int fontSize, - int* fontChars, - int charsCount) { - Load(fileType, fileData, dataSize, fontSize, fontChars, charsCount); - } - - Font(const Font&) = delete; - - Font(Font&& other) noexcept { - set(other); - - other.baseSize = 0; - other.glyphCount = 0; - other.glyphPadding = 0; - other.texture = {}; - other.recs = nullptr; - other.glyphs = nullptr; - } - - ~Font() { Unload(); } - - void Unload() { - // Protect against calling UnloadFont() twice. - if (baseSize != 0) { - UnloadFont(*this); - baseSize = 0; - } - } - - GETTER(int, BaseSize, baseSize) - GETTER(int, GlyphCount, glyphCount) - GETTER(int, GlyphPadding, glyphPadding) - GETTER(::Rectangle*, Recs, recs) - GETTER(::GlyphInfo*, Glyphs, glyphs) - - /** - * Get the texture atlas containing the glyphs. - */ - TextureUnmanaged GetTexture() { return texture; } - - /** - * Set the texture atlas containing the glyphs. - */ - void SetTexture(const ::Texture& newTexture) { texture = newTexture; } - - Font& operator=(const ::Font& font) { - Unload(); - set(font); - return *this; - } - - Font& operator=(const Font&) = delete; - - Font& operator=(Font&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.baseSize = 0; - other.glyphCount = 0; - other.glyphPadding = 0; - other.texture = {}; - other.recs = nullptr; - other.glyphs = nullptr; - - return *this; - } - - /** - * Loads a font from a given file. - * - * @param fileName The filename of the font to load. - * - * @throws raylib::RaylibException Throws if the given font failed to initialize. - * - * @see ::LoadFont() - */ - void Load(const std::string& fileName) { - set(::LoadFont(fileName.c_str())); - if (!IsValid()) { - throw RaylibException("Failed to load Font with from file: " + fileName); - } - } - - /** - * Loads a font from a given file with generation parameters. - * - * @param fileName The filename of the font to load. - * @param fontSize The desired size of the font. - * - * @throws raylib::RaylibException Throws if the given font failed to initialize. - * - * @see ::LoadFontEx() - */ - void Load(const std::string& fileName, int fontSize, int* fontChars, int charCount) { - set(::LoadFontEx(fileName.c_str(), fontSize, fontChars, charCount)); - if (!IsValid()) { - throw RaylibException("Failed to load Font with from file with font size: " + fileName); - } - } - - void Load(const ::Image& image, ::Color key, int firstChar) { - set(::LoadFontFromImage(image, key, firstChar)); - if (!IsValid()) { - throw RaylibException("Failed to load Font with from image"); - } - } - - void Load( - const std::string& fileType, - const unsigned char* fileData, - int dataSize, - int fontSize, - int* fontChars, - int charsCount) { - set(::LoadFontFromMemory(fileType.c_str(), fileData, dataSize, fontSize, fontChars, charsCount)); - if (!IsValid()) { - throw RaylibException("Failed to load Font " + fileType + " with from file data"); - } - } - - /** - * Returns if the font is ready to be used. - */ - [[nodiscard]] bool IsValid() const { return ::IsFontValid(*this); } - - /** - * Draw text using font and additional parameters. - */ - void DrawText(const char* text, ::Vector2 position, float fontSize, float spacing, ::Color tint = WHITE) const { - ::DrawTextEx(*this, text, position, fontSize, spacing, tint); - } - - /** - * Draw text using font and additional parameters. - */ - void - DrawText(const std::string& text, ::Vector2 position, float fontSize, float spacing, ::Color tint = WHITE) const { - ::DrawTextEx(*this, text.c_str(), position, fontSize, spacing, tint); - } - - /** - * Draw text using font and additional parameters. - */ - void DrawText(const char* text, int posX, int posY, float fontSize, float spacing, ::Color tint = WHITE) const { - ::DrawTextEx(*this, text, {static_cast(posX), static_cast(posY)}, fontSize, spacing, tint); - } - - /** - * Draw text using font and additional parameters. - */ - void - DrawText(const std::string& text, int posX, int posY, float fontSize, float spacing, ::Color tint = WHITE) const { - ::DrawTextEx( - *this, - text.c_str(), - {static_cast(posX), static_cast(posY)}, - fontSize, - spacing, - tint); - } - - void DrawText( - const char* text, - ::Vector2 position, - ::Vector2 origin, - float rotation, - float fontSize, - float spacing, - ::Color tint = WHITE) const { - ::DrawTextPro(*this, text, position, origin, rotation, fontSize, spacing, tint); - } - - void DrawText( - const std::string& text, - ::Vector2 position, - ::Vector2 origin, - float rotation, - float fontSize, - float spacing, - ::Color tint = WHITE) const { - ::DrawTextPro(*this, text.c_str(), position, origin, rotation, fontSize, spacing, tint); - } - - /** - * Draw one character (codepoint) - */ - void DrawText(int codepoint, ::Vector2 position, float fontSize, ::Color tint = {255, 255, 255, 255}) const { - ::DrawTextCodepoint(*this, codepoint, position, fontSize, tint); - } - - /** - * Draw multiple character (codepoint) - */ - void DrawText( - const int* codepoints, - int count, - ::Vector2 position, - float fontSize, - float spacing, - ::Color tint = {255, 255, 255, 255}) const { - ::DrawTextCodepoints(*this, codepoints, count, position, fontSize, spacing, tint); - } - - /** - * Measure string size for Font - */ - [[nodiscard]] Vector2 MeasureText(const char* text, float fontSize, float spacing) const { - return ::MeasureTextEx(*this, text, fontSize, spacing); - } - - /** - * Measure string size for Font - */ - [[nodiscard]] Vector2 MeasureText(const std::string& text, float fontSize, float spacing) const { - return ::MeasureTextEx(*this, text.c_str(), fontSize, spacing); - } - - /** - * Get index position for a unicode character on font - */ - [[nodiscard]] int GetGlyphIndex(int character) const { return ::GetGlyphIndex(*this, character); } - - /** - * Create an image from text (custom sprite font) - */ - [[nodiscard]] ::Image ImageText(const char* text, float fontSize, float spacing, ::Color tint) const { - return ::ImageTextEx(*this, text, fontSize, spacing, tint); - } - - /** - * Create an image from text (custom sprite font) - */ - [[nodiscard]] ::Image ImageText(const std::string& text, float fontSize, float spacing, ::Color tint) const { - return ::ImageTextEx(*this, text.c_str(), fontSize, spacing, tint); - } -protected: - void set(const ::Font& font) { - baseSize = font.baseSize; - glyphCount = font.glyphCount; - glyphPadding = font.glyphPadding; - texture = font.texture; - recs = font.recs; - glyphs = font.glyphs; - } -}; -} // namespace raylib - -using RFont = raylib::Font; - -#endif // RAYLIB_CPP_INCLUDE_FONT_HPP_ diff --git a/include/Functions.hpp b/include/Functions.hpp deleted file mode 100644 index 27b083ca..00000000 --- a/include/Functions.hpp +++ /dev/null @@ -1,437 +0,0 @@ -/** - * C++ wrapper functions for raylib. - */ -#ifndef RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_ -#define RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_ - -#include -#include - -#include "./raylib.hpp" - -/** - * Allow changing the declare type for all raylib-cpp global functions. Defaults to static. - */ -#ifndef RLCPPAPI -#define RLCPPAPI static -#endif - -namespace raylib { - -/** - * Initialize window and OpenGL context - */ -[[maybe_unused]] RLCPPAPI inline void InitWindow(int width, int height, const std::string& title = "raylib") { - ::InitWindow(width, height, title.c_str()); -} - -/** - * Set title for window - */ -[[maybe_unused]] RLCPPAPI inline void SetWindowTitle(const std::string& title) { - ::SetWindowTitle(title.c_str()); -} - -/** - * Get the human-readable, UTF-8 encoded name of the primary monitor - */ -[[maybe_unused]] RLCPPAPI inline std::string GetMonitorName(int monitor = 0) { - return ::GetMonitorName(monitor); -} - -/** - * Set clipboard text content - */ -[[maybe_unused]] RLCPPAPI inline void SetClipboardText(const std::string& text) { - ::SetClipboardText(text.c_str()); -} - -/** - * Get clipboard text content - */ -[[maybe_unused]] RLCPPAPI inline std::string GetClipboardText() { - return ::GetClipboardText(); -} - -/** - * Takes a screenshot of current screen (saved a .png) - */ -[[maybe_unused]] RLCPPAPI inline void TakeScreenshot(const std::string& fileName) { - ::TakeScreenshot(fileName.c_str()); -} - -/** - * Get gamepad internal name id - */ -[[maybe_unused]] RLCPPAPI inline std::string GetGamepadName(int gamepad) { - return ::GetGamepadName(gamepad); -} - -/** - * Load text data from file (read) - */ -[[maybe_unused]] RLCPPAPI std::string LoadFileText(const std::string& fileName) { - char* text = ::LoadFileText(fileName.c_str()); - std::string output(text); - ::UnloadFileText(text); - return output; -} - -/** - * Save text data to file (write) - */ -[[maybe_unused]] RLCPPAPI inline bool SaveFileText(const std::string& fileName, const std::string& text) { - return ::SaveFileText(fileName.c_str(), const_cast(text.c_str())); -} - -/** - * Check if file exists - */ -[[maybe_unused]] RLCPPAPI inline bool FileExists(const std::string& fileName) { - return ::FileExists(fileName.c_str()); -} - -/** - * Check if directory path exists - */ -[[maybe_unused]] RLCPPAPI inline bool DirectoryExists(const std::string& dirPath) { - return ::DirectoryExists(dirPath.c_str()); -} - -/** - * Check file extension (including point: .png, .wav) - */ -[[maybe_unused]] RLCPPAPI inline bool IsFileExtension(const std::string& fileName, const std::string& ext) { - return ::IsFileExtension(fileName.c_str(), ext.c_str()); -} - -/** - * Get pointer to extension for a filename string (including point: ".png") - */ -[[maybe_unused]] RLCPPAPI inline std::string GetFileExtension(const std::string& fileName) { - return ::GetFileExtension(fileName.c_str()); -} - -/** - * Get pointer to filename for a path string - */ -[[maybe_unused]] RLCPPAPI inline std::string GetFileName(const std::string& filePath) { - return ::GetFileName(filePath.c_str()); -} - -/** - * Get filename string without extension - */ -[[maybe_unused]] RLCPPAPI inline std::string GetFileNameWithoutExt(const std::string& filePath) { - return ::GetFileNameWithoutExt(filePath.c_str()); -} - -/** - * Get full path for a given fileName with path - */ -[[maybe_unused]] RLCPPAPI inline std::string GetDirectoryPath(const std::string& filePath) { - return ::GetDirectoryPath(filePath.c_str()); -} - -/** - * Get previous directory path for a given path - */ -[[maybe_unused]] RLCPPAPI inline std::string GetPrevDirectoryPath(const std::string& dirPath) { - return ::GetPrevDirectoryPath(dirPath.c_str()); -} - -/** - * Get current working directory - */ -[[maybe_unused]] RLCPPAPI inline std::string GetWorkingDirectory() { - return ::GetWorkingDirectory(); -} - -/** - * Get filenames in a directory path - */ -[[maybe_unused]] RLCPPAPI std::vector LoadDirectoryFiles(const std::string& dirPath) { - FilePathList files = ::LoadDirectoryFiles(dirPath.c_str()); - std::vector output(files.paths, files.paths + files.count); - ::UnloadDirectoryFiles(files); - return output; -} - -/** - * Change working directory, return true on success - */ -[[maybe_unused]] RLCPPAPI inline bool ChangeDirectory(const std::string& dir) { - return ::ChangeDirectory(dir.c_str()); -} - -/** - * Get dropped files names - */ -[[maybe_unused]] RLCPPAPI std::vector LoadDroppedFiles() { - if (!::IsFileDropped()) { - return std::vector(); - } - FilePathList files = ::LoadDroppedFiles(); - std::vector output(files.paths, files.paths + files.count); - ::UnloadDroppedFiles(files); - return output; -} - -/** - * Get file modification time (last write time) - */ -[[maybe_unused]] RLCPPAPI inline long GetFileModTime(const std::string& fileName) { // NOLINT - return ::GetFileModTime(fileName.c_str()); -} - -/** - * Open URL with default system browser (if available) - */ -[[maybe_unused]] RLCPPAPI inline void OpenURL(const std::string& url) { - return ::OpenURL(url.c_str()); -} - -/** - * Load an image. - */ -[[maybe_unused]] RLCPPAPI inline ::Image LoadImage(const std::string& fileName) { - return ::LoadImage(fileName.c_str()); -} - -/** - * Load an image from RAW file data - */ -[[maybe_unused]] RLCPPAPI inline ::Image -LoadImageRaw(const std::string& fileName, int width, int height, int format, int headerSize) { - return ::LoadImageRaw(fileName.c_str(), width, height, format, headerSize); -} - -/** - * Load animated image data - */ -[[maybe_unused]] RLCPPAPI inline ::Image LoadImageAnim(const std::string& fileName, int* frames) { - return ::LoadImageAnim(fileName.c_str(), frames); -} - -/** - * Load image from memory buffer, fileType refers to extension like "png" - */ -[[maybe_unused]] RLCPPAPI inline ::Image -LoadImageFromMemory(const std::string& fileType, const unsigned char* fileData, int dataSize) { - return ::LoadImageFromMemory(fileType.c_str(), fileData, dataSize); -} - -/** - * Export image data to file - */ -[[maybe_unused]] RLCPPAPI inline bool ExportImage(const Image& image, const std::string& fileName) { - return ::ExportImage(image, fileName.c_str()); -} - -/** - * Export image as code file (.h) defining an array of bytes - */ -[[maybe_unused]] RLCPPAPI inline bool ExportImageAsCode(const Image& image, const std::string& fileName) { - return ::ExportImageAsCode(image, fileName.c_str()); -} - -/** - * Draw text (using default font) - */ -[[maybe_unused]] RLCPPAPI inline void DrawText(const char* text, int posX, int posY, int fontSize, ::Color color) { - ::DrawText(text, posX, posY, fontSize, color); -} - -/** - * Draw text (using default font) - */ -[[maybe_unused]] RLCPPAPI inline void -DrawText(const std::string& text, int posX, int posY, int fontSize, ::Color color) { - ::DrawText(text.c_str(), posX, posY, fontSize, color); -} - -/** - * Draw text using font and additional parameters - */ -[[maybe_unused]] RLCPPAPI inline void -DrawTextEx(const Font& font, char* text, Vector2 position, float fontSize, float spacing, ::Color tint) { - ::DrawTextEx(font, text, position, fontSize, spacing, tint); -} - -/** - * Draw text using font and additional parameters - */ -[[maybe_unused]] RLCPPAPI inline void -DrawTextEx(const Font& font, const std::string& text, Vector2 position, float fontSize, float spacing, ::Color tint) { - ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, tint); -} - -/** - * Draw text using Font and pro parameters (rotation) - */ -[[maybe_unused]] RLCPPAPI inline void DrawTextPro( - const Font& font, - const char* text, - Vector2 position, - Vector2 origin, - float rotation, - float fontSize, - float spacing, - ::Color tint) { - ::DrawTextPro(font, text, position, origin, rotation, fontSize, spacing, tint); -} - -/** - * Draw text using Font and pro parameters (rotation) - */ -[[maybe_unused]] RLCPPAPI inline void DrawTextPro( - const Font& font, - const std::string& text, - Vector2 position, - Vector2 origin, - float rotation, - float fontSize, - float spacing, - ::Color tint) { - ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, tint); -} - -/** - * Load font from file (filename must include file extension) - */ -[[maybe_unused]] RLCPPAPI inline ::Font LoadFont(const std::string& fileName) { - return ::LoadFont(fileName.c_str()); -} - -/** - * Load font from file (filename must include file extension) - */ -[[maybe_unused]] RLCPPAPI inline ::Font -LoadFontEx(const std::string& fileName, int fontSize, int* fontChars, int charsCount) { - return ::LoadFontEx(fileName.c_str(), fontSize, fontChars, charsCount); -} - -/** - * Measure string width for default font - */ -[[maybe_unused]] RLCPPAPI inline int MeasureText(const char* text, int fontSize) { - return ::MeasureText(text, fontSize); -} - -/** - * Measure string width for default font - */ -[[maybe_unused]] RLCPPAPI inline int MeasureText(const std::string& text, int fontSize) { - return ::MeasureText(text.c_str(), fontSize); -} - -/** - * Check if two text string are equal - */ -[[maybe_unused]] RLCPPAPI inline bool TextIsEqual(const char* text1, const char* text2) { - return ::TextIsEqual(text1, text2); -} - -/** - * Check if two text string are equal - */ -[[maybe_unused]] RLCPPAPI inline bool TextIsEqual(const std::string& text1, const std::string& text2) { - return ::TextIsEqual(text1.c_str(), text2.c_str()); -} - -/** - * Check if two text string are equal - */ -[[maybe_unused]] RLCPPAPI inline unsigned int TextLength(const char* text) { - return ::TextLength(text); -} - -/** - * Check if two text string are equal - */ -[[maybe_unused]] RLCPPAPI inline unsigned int TextLength(const std::string& text) { - return ::TextLength(text.c_str()); -} - -/** - * Get text length, checks for '\0' ending - */ -[[maybe_unused]] RLCPPAPI inline std::string TextSubtext(const std::string& text, int position, int length) { - return ::TextSubtext(text.c_str(), position, length); -} - -/** - * Replace text string - */ -[[maybe_unused]] RLCPPAPI std::string -TextReplace(const std::string& text, const std::string& replace, const std::string& by) { - const char* input = text.c_str(); - char* output = ::TextReplace(const_cast(input), replace.c_str(), by.c_str()); - if (output != NULL) { - std::string stringOutput(output); - free(output); - return stringOutput; - } - return ""; -} - -/** - * Insert text in a position - */ -[[maybe_unused]] RLCPPAPI std::string TextInsert(const std::string& text, const std::string& insert, int position) { - char* output = ::TextInsert(text.c_str(), insert.c_str(), position); - if (output != NULL) { - std::string stringOutput(output); - free(output); - return stringOutput; - } - return ""; -} - -/** - * Split text into multiple strings - */ -[[maybe_unused]] RLCPPAPI std::vector TextSplit(const std::string& text, char delimiter) { - int count; - const char* const* split = ::TextSplit(text.c_str(), delimiter, &count); - return std::vector(split, split + count); -} - -/** - * Find first text occurrence within a string - */ -[[maybe_unused]] RLCPPAPI inline int TextFindIndex(const std::string& text, const std::string& find) { - return ::TextFindIndex(text.c_str(), find.c_str()); -} - -/** - * Get upper case version of provided string - */ -[[maybe_unused]] RLCPPAPI inline std::string TextToUpper(const std::string& text) { - return ::TextToUpper(text.c_str()); -} - -/** - * Get lower case version of provided string - */ -[[maybe_unused]] RLCPPAPI inline std::string TextToLower(const std::string& text) { - return ::TextToLower(text.c_str()); -} - -/** - * Get Pascal case notation version of provided string - */ -[[maybe_unused]] RLCPPAPI inline std::string TextToPascal(const std::string& text) { - return ::TextToPascal(text.c_str()); -} - -/** - * Get integer value from text (negative values not supported) - */ -[[maybe_unused]] RLCPPAPI inline int TextToInteger(const std::string& text) { - return ::TextToInteger(text.c_str()); -} - -} // namespace raylib - -#endif // RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_ diff --git a/include/Gamepad.hpp b/include/Gamepad.hpp deleted file mode 100644 index 0362020c..00000000 --- a/include/Gamepad.hpp +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_ -#define RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_ - -#include - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Input-related functions: gamepads - */ -class Gamepad { -public: - Gamepad(int gamepadNumber = 0) : number(gamepadNumber) {}; - int number; - - GETTERSETTER(int, Number, number) - - Gamepad& operator=(const Gamepad& gamepad) { - if (this != &gamepad) { - set(static_cast(gamepad)); - } - return *this; - } - - Gamepad& operator=(int gamepadNumber) { - if (this->number != gamepadNumber) { - set(gamepadNumber); - } - return *this; - } - - explicit operator int() const { return number; } - - /** - * Detect if a gamepad is available - */ - [[nodiscard]] bool IsAvailable() const { return ::IsGamepadAvailable(number); } - - /** - * Detect if a gamepad is available - */ - static bool IsAvailable(int number) { return ::IsGamepadAvailable(number); } - - /** - * Return gamepad internal name id - */ - [[nodiscard]] std::string GetName() const { return ::GetGamepadName(number); } - - /** - * Return gamepad internal name id - */ - explicit operator std::string() const { return GetName(); } - - /** - * Detect if a gamepad button has been pressed once - */ - [[nodiscard]] bool IsButtonPressed(int button) const { return ::IsGamepadButtonPressed(number, button); } - - /** - * Detect if a gamepad button is being pressed - */ - [[nodiscard]] bool IsButtonDown(int button) const { return ::IsGamepadButtonDown(number, button); } - - /** - * Detect if a gamepad button has been released once - */ - [[nodiscard]] bool IsButtonReleased(int button) const { return ::IsGamepadButtonReleased(number, button); } - - /** - * Detect if a gamepad button is NOT being pressed - */ - [[nodiscard]] bool IsButtonUp(int button) const { return ::IsGamepadButtonUp(number, button); } - - /** - * Get the last gamepad button pressed - */ - static int GetButtonPressed() { return ::GetGamepadButtonPressed(); } - - /** - * Return gamepad axis count for a gamepad - */ - [[nodiscard]] int GetAxisCount() const { return ::GetGamepadAxisCount(number); } - - /** - * Return axis movement value for a gamepad axis - */ - [[nodiscard]] float GetAxisMovement(int axis) const { return ::GetGamepadAxisMovement(number, axis); } - - static int SetMappings(const std::string& mappings) { return SetGamepadMappings(mappings.c_str()); } - - /** - * Set gamepad vibration for both motors (duration in seconds) - */ - void SetVibration(float leftMotor, float rightMotor, float duration) const { - ::SetGamepadVibration(number, leftMotor, rightMotor, duration); - } -protected: - void set(int gamepadNumber) { number = gamepadNumber; } -}; -} // namespace raylib - -using RGamepad = raylib::Gamepad; - -#endif // RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_ diff --git a/include/Image.hpp b/include/Image.hpp deleted file mode 100644 index 2d3224fc..00000000 --- a/include/Image.hpp +++ /dev/null @@ -1,771 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_IMAGE_HPP_ -#define RAYLIB_CPP_INCLUDE_IMAGE_HPP_ - -#include - -#include "./Color.hpp" -#include "./RaylibException.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Image type, bpp always RGBA (32bit) - * - * Data stored in CPU memory (RAM) - */ -class Image : public ::Image { -public: - Image( - void* data = nullptr, - int width = 0, - int height = 0, - int mipmaps = 1, - int format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8) - : ::Image{data, width, height, mipmaps, format} { - // Nothing. - } - - Image(const ::Image& image) : ::Image(image) { } - - /** - * Load an image from the given file. - * - * @throws raylib::RaylibException Thrown if the image failed to load from the file. - * - * @see Load() - */ - Image(const std::string& fileName) { Load(fileName); } - - /** - * Load a raw image from the given file, with the provided width, height, and formats. - * - * @throws raylib::RaylibException Thrown if the image failed to load from the file. - * - * @see LoadRaw() - */ - Image(const std::string& fileName, int width, int height, int format, int headerSize = 0) { - Load(fileName, width, height, format, headerSize); - } - - /** - * Load an animation image from the given file. - * - * @throws raylib::RaylibException Thrown if the image failed to load from the file. - * - * @see LoadAnim() - */ - Image(const std::string& fileName, int* frames) { Load(fileName, frames); } - - /** - * Load an image from the given file. - * - * @throws raylib::RaylibException Thrown if the image failed to load from the file. - */ - Image(const std::string& fileType, const unsigned char* fileData, int dataSize) { - Load(fileType, fileData, dataSize); - } - - /** - * Load an image from the given file. - * - * @throws raylib::RaylibException Thrown if the image failed to load from the file. - */ - Image(const ::Texture2D& texture) { Load(texture); } - - Image(int width, int height, ::Color color = {255, 255, 255, 255}) { set(::GenImageColor(width, height, color)); } - - Image(const std::string& text, int fontSize, ::Color color = {255, 255, 255, 255}) { - set(::ImageText(text.c_str(), fontSize, color)); - } - - Image( - const ::Font& font, - const std::string& text, - float fontSize, - float spacing, - ::Color tint = {255, 255, 255, 255}) { - set(::ImageTextEx(font, text.c_str(), fontSize, spacing, tint)); - } - - Image(const Image& other) { set(other.Copy()); } - - Image(Image&& other) noexcept { - set(other); - - other.data = nullptr; - other.width = 0; - other.height = 0; - other.mipmaps = 0; - other.format = 0; - } - - static ::Image Text(const std::string& text, int fontSize, ::Color color = {255, 255, 255, 255}) { - return ::ImageText(text.c_str(), fontSize, color); - } - - static ::Image Text( - const ::Font& font, - const std::string& text, - float fontSize, - float spacing, - ::Color tint = {255, 255, 255, 255}) { - return ::ImageTextEx(font, text.c_str(), fontSize, spacing, tint); - } - - /** - * Get pixel data from screen buffer and return an Image (screenshot) - */ - static ::Image LoadFromScreen() { return ::LoadImageFromScreen(); } - - /** - * Generate image: plain color - */ - static ::Image Color(int width, int height, ::Color color = {255, 255, 255, 255}) { - return ::GenImageColor(width, height, color); - } - - /** - * Generate image: linear gradient - */ - static ::Image GradientLinear(int width, int height, int direction, ::Color start, ::Color end) { - return ::GenImageGradientLinear(width, height, direction, start, end); - } - - /** - * Generate image: radial gradient - */ - static ::Image GradientRadial(int width, int height, float density, ::Color inner, ::Color outer) { - return ::GenImageGradientRadial(width, height, density, inner, outer); - } - - /** - * Generate image: checked - */ - static ::Image Checked( - int width, - int height, - int checksX, - int checksY, - ::Color col1 = {255, 255, 255, 255}, - ::Color col2 = {0, 0, 0, 255}) { - return ::GenImageChecked(width, height, checksX, checksY, col1, col2); - } - - /** - * Generate image: white noise - */ - static ::Image WhiteNoise(int width, int height, float factor) { - return ::GenImageWhiteNoise(width, height, factor); - } - - /** - * Generate image: cellular algorithm. Bigger tileSize means bigger cells - */ - static ::Image Cellular(int width, int height, int tileSize) { return ::GenImageCellular(width, height, tileSize); } - - /** - * Get clipboard image content. - */ - static ::Image GetClipboard() { return ::GetClipboardImage(); } - - ~Image() { Unload(); } - - Image& operator=(const ::Image& image) { - set(image); - return *this; - } - - Image& operator=(const Image& other) { - if (this == &other) { - return *this; - } - - Unload(); - set(other.Copy()); - - return *this; - } - - Image& operator=(Image&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.data = nullptr; - other.width = 0; - other.height = 0; - other.mipmaps = 0; - other.format = 0; - - return *this; - } - - /** - * Load image from file into CPU memory (RAM) - * - * @throws raylib::RaylibException Thrown if the image failed to load from the file. - * - * @see ::LoadImage() - */ - void Load(const std::string& fileName) { - set(::LoadImage(fileName.c_str())); - if (!IsValid()) { - throw RaylibException("Failed to load Image from file: " + fileName); - } - } - - /** - * Load image from RAW file data. - * - * @throws raylib::RaylibException Thrown if the image failed to load from the file. - * - * @see ::LoadImageRaw() - */ - void Load(const std::string& fileName, int width, int height, int format, int headerSize) { - set(::LoadImageRaw(fileName.c_str(), width, height, format, headerSize)); - if (!IsValid()) { - throw RaylibException("Failed to load Image from file: " + fileName); - } - } - - /** - * Load image sequence from file (frames appended to image.data). - * - * @throws raylib::RaylibException Thrown if the image animation to load from the file. - * - * @see ::LoadImageAnim() - */ - void Load(const std::string& fileName, int* frames) { - set(::LoadImageAnim(fileName.c_str(), frames)); - if (!IsValid()) { - throw RaylibException("Failed to load Image from file: " + fileName); - } - } - - /** - * Load image from memory buffer, fileType refers to extension: i.e. "png". - * - * @throws raylib::RaylibException Thrown if the image animation to load from the file. - * - * @see ::LoadImageFromMemory() - */ - void Load(const std::string& fileType, const unsigned char* fileData, int dataSize) { - set(::LoadImageFromMemory(fileType.c_str(), fileData, dataSize)); - if (!IsValid()) { - throw RaylibException("Failed to load Image data with file type: " + fileType); - } - } - - /** - * Load an image from the given file. - * - * @throws raylib::RaylibException Thrown if the image animation to load from the file. - * - * @see ::LoadImageFromTexture() - */ - void Load(const ::Texture2D& texture) { - set(::LoadImageFromTexture(texture)); - if (!IsValid()) { - throw RaylibException("Failed to load Image from texture."); - } - } - - /** - * Unload image from CPU memory (RAM) - */ - void Unload() { - if (data != nullptr) { - ::UnloadImage(*this); - data = nullptr; - } - } - - /** - * Export image data to file, returns true on success - * - * @throws raylib::RaylibException Thrown if the image failed to load from the file. - */ - void Export(const std::string& fileName) const { - if (!::ExportImage(*this, fileName.c_str())) { - throw RaylibException(TextFormat("Failed to export Image to file: %s", fileName.c_str())); - } - } - - /** - * Export image to memory buffer - */ - unsigned char* ExportToMemory(const char* fileType, int* fileSize) { - return ::ExportImageToMemory(*this, fileType, fileSize); - } - - /** - * Export image as code file defining an array of bytes, returns true on success - * - * @throws raylib::RaylibException Thrown if the image failed to load from the file. - */ - void ExportAsCode(const std::string& fileName) const { - if (!::ExportImageAsCode(*this, fileName.c_str())) { - throw RaylibException(TextFormat("Failed to export Image code to file: %s", fileName.c_str())); - } - } - - GETTER(void*, Data, data) - GETTER(int, Width, width) - GETTER(int, Height, height) - GETTER(int, Mipmaps, mipmaps) - GETTER(int, Format, format) - - /** - * Set the width of the image canvas. - * - * @see ResizeCanvas - */ - void SetWidth(int width, int offsetX = 0, int offsetY = 0, ::Color fill = {255, 255, 255, 255}) { - ResizeCanvas(width, height, offsetX, offsetY, fill); - } - - /** - * Set the height of the image canvas. - * - * @see ResizeCanvas - */ - void SetHeight(int height, int offsetX = 0, int offsetY = 0, ::Color fill = {255, 255, 255, 255}) { - ResizeCanvas(width, height, offsetX, offsetY, fill); - } - - /** - * Retrieve the width and height of the image. - */ - [[nodiscard]] ::Vector2 GetSize() const { return {static_cast(width), static_cast(height)}; } - - /** - * Create an image duplicate (useful for transformations) - */ - [[nodiscard]] ::Image Copy() const { return ::ImageCopy(*this); } - - /** - * Create an image from another image piece - */ - [[nodiscard]] ::Image FromImage(::Rectangle rec) const { return ::ImageFromImage(*this, rec); } - - /** - * Convert image data to desired format - */ - Image& Format(int newFormat) { - ::ImageFormat(this, newFormat); - return *this; - } - - /** - * Convert image to POT (power-of-two) - */ - Image& ToPOT(::Color fillColor) { - ::ImageToPOT(this, fillColor); - return *this; - } - - /** - * Crop an image to area defined by a rectangle - */ - Image& Crop(::Rectangle crop) { - ::ImageCrop(this, crop); - return *this; - } - - /** - * Crop image depending on alpha value - */ - Image& AlphaCrop(float threshold) { - ::ImageAlphaCrop(this, threshold); - return *this; - } - - /** - * Clear alpha channel to desired color - */ - Image& AlphaClear(::Color color, float threshold) { - ::ImageAlphaClear(this, color, threshold); - return *this; - } - - /** - * Apply alpha mask to image - */ - Image& AlphaMask(const ::Image& alphaMask) { - ::ImageAlphaMask(this, alphaMask); - return *this; - } - - /** - * Premultiply alpha channel - */ - Image& AlphaPremultiply() { - ::ImageAlphaPremultiply(this); - return *this; - } - - /** - * Crop an image to a new given width and height. - */ - Image& Crop(int newWidth, int newHeight) { return Crop(0, 0, newWidth, newHeight); } - - /** - * Crop an image to a new given width and height based on a vector. - */ - Image& Crop(::Vector2 size) { return Crop(0, 0, static_cast(size.x), static_cast(size.y)); } - - /** - * Crop an image to area defined by a rectangle - */ - Image& Crop(int offsetX, int offsetY, int newWidth, int newHeight) { - ::Rectangle rect{ - static_cast(offsetX), - static_cast(offsetY), - static_cast(newWidth), - static_cast(newHeight)}; - ::ImageCrop(this, rect); - return *this; - } - - /** - * Resize and image to new size - */ - Image& Resize(int newWidth, int newHeight) { - ::ImageResize(this, newWidth, newHeight); - return *this; - } - - /** - * Resize and image to new size using Nearest-Neighbor scaling algorithm - */ - Image& ResizeNN(int newWidth, int newHeight) { - ::ImageResizeNN(this, newWidth, newHeight); - return *this; - } - - /** - * Resize canvas and fill with color - */ - Image& - ResizeCanvas(int newWidth, int newHeight, int offsetX = 0, int offsetY = 0, ::Color color = {255, 255, 255, 255}) { - ::ImageResizeCanvas(this, newWidth, newHeight, offsetX, offsetY, color); - return *this; - } - - /** - * Generate all mipmap levels for a provided image - */ - Image& Mipmaps() { - ::ImageMipmaps(this); - return *this; - } - - /** - * Dither image data to 16bpp or lower (Floyd-Steinberg dithering) - */ - Image& Dither(int rBpp, int gBpp, int bBpp, int aBpp) { - ::ImageDither(this, rBpp, gBpp, bBpp, aBpp); - return *this; - } - - /** - * Flip image vertically - */ - Image& FlipVertical() { - ::ImageFlipVertical(this); - return *this; - } - - /** - * Flip image horizontally - */ - Image& FlipHorizontal() { - ::ImageFlipHorizontal(this); - return *this; - } - - /** - * Rotate image by input angle in degrees (-359 to 359) - */ - Image& Rotate(int degrees) { - ::ImageRotate(this, degrees); - return *this; - } - - /** - * Rotate image clockwise 90deg - */ - Image& RotateCW() { - ::ImageRotateCW(this); - return *this; - } - - /** - * Rotate image counter-clockwise 90deg - */ - Image& RotateCCW() { - ::ImageRotateCCW(this); - return *this; - } - - /** - * Modify image color: tint - */ - Image& ColorTint(::Color color = {255, 255, 255, 255}) { - ::ImageColorTint(this, color); - return *this; - } - - /** - * Modify image color: invert - */ - Image& ColorInvert() { - ::ImageColorInvert(this); - return *this; - } - - /** - * Modify image color: grayscale - */ - Image& ColorGrayscale() { - ::ImageColorGrayscale(this); - return *this; - } - - /** - * Modify image color: contrast - * - * @param contrast Contrast values between -100 and 100 - */ - Image& ColorContrast(float contrast) { - ::ImageColorContrast(this, contrast); - return *this; - } - - /** - * Modify image color: brightness - * - * @param brightness Brightness values between -255 and 255 - */ - Image& ColorBrightness(int brightness) { - ::ImageColorBrightness(this, brightness); - return *this; - } - - /** - * Modify image color: replace color - */ - Image& ColorReplace(::Color color, ::Color replace) { - ::ImageColorReplace(this, color, replace); - return *this; - } - - /** - * Get image alpha border rectangle - * - * @param threshold Threshold is defined as a percentatge: 0.0f -> 1.0f - */ - [[nodiscard]] Rectangle GetAlphaBorder(float threshold) const { return ::GetImageAlphaBorder(*this, threshold); } - - /** - * Get image pixel color at (x, y) position - */ - [[nodiscard]] raylib::Color GetColor(int x = 0, int y = 0) const { return ::GetImageColor(*this, x, y); } - - /** - * Get image pixel color at vector position - */ - [[nodiscard]] raylib::Color GetColor(::Vector2 position) const { - return ::GetImageColor(*this, static_cast(position.x), static_cast(position.y)); - } - - /** - * Clear image background with given color - */ - Image& ClearBackground(::Color color = {0, 0, 0, 255}) { - ::ImageClearBackground(this, color); - return *this; - } - - /** - * Draw pixel within an image - */ - void DrawPixel(int posX, int posY, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawPixel(this, posX, posY, color); - } - - void DrawPixel(::Vector2 position, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawPixelV(this, position, color); - } - - void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawLine(this, startPosX, startPosY, endPosX, endPosY, color); - } - - void DrawLine(::Vector2 start, ::Vector2 end, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawLineV(this, start, end, color); - } - - /** - * Description: Draw a line defining thickness within an image - */ - void DrawLine(::Vector2 start, ::Vector2 end, int thick, ::Color color = {255, 255, 255, 255}) { - ImageDrawLineEx(this, start, end, thick, color); - } - - void DrawCircle(int centerX, int centerY, int radius, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawCircle(this, centerX, centerY, radius, color); - } - - void DrawCircle(::Vector2 center, int radius, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawCircleV(this, center, radius, color); - } - - void DrawRectangle(int posX, int posY, int width, int height, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawRectangle(this, posX, posY, width, height, color); - } - - void DrawRectangle(Vector2 position, Vector2 size, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawRectangleV(this, position, size, color); - } - - void DrawRectangle(::Rectangle rec, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawRectangleRec(this, rec, color); - } - - void DrawRectangleLines(::Rectangle rec, int thick = 1, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawRectangleLines(this, rec, thick, color); - } - - // TODO: Add ImageDrawTriangle() - - void Draw(const ::Image& src, ::Rectangle srcRec, ::Rectangle dstRec, ::Color tint = {255, 255, 255, 255}) { - ::ImageDraw(this, src, srcRec, dstRec, tint); - } - - void DrawText(const char* text, ::Vector2 position, int fontSize, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawText(this, text, static_cast(position.x), static_cast(position.y), fontSize, color); - } - - void DrawText(const std::string& text, ::Vector2 position, int fontSize, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawText( - this, - text.c_str(), - static_cast(position.x), - static_cast(position.y), - fontSize, - color); - } - - void DrawText(const std::string& text, int x, int y, int fontSize, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawText(this, text.c_str(), x, y, fontSize, color); - } - - void DrawText(const char* text, int x, int y, int fontSize, ::Color color = {255, 255, 255, 255}) { - ::ImageDrawText(this, text, x, y, fontSize, color); - } - - void DrawText( - const ::Font& font, - const std::string& text, - ::Vector2 position, - float fontSize, - float spacing, - ::Color tint = {255, 255, 255, 255}) { - ::ImageDrawTextEx(this, font, text.c_str(), position, fontSize, spacing, tint); - } - - void DrawText( - const ::Font& font, - const char* text, - ::Vector2 position, - float fontSize, - float spacing, - ::Color tint = {255, 255, 255, 255}) { - ::ImageDrawTextEx(this, font, text, position, fontSize, spacing, tint); - } - - /** - * Load color data from image as a Color array (RGBA - 32bit) - */ - [[nodiscard]] ::Color* LoadColors() const { return ::LoadImageColors(*this); } - - /** - * Load colors palette from image as a Color array (RGBA - 32bit) - */ - ::Color* LoadPalette(int maxPaletteSize, int* colorsCount) const { - return ::LoadImagePalette(*this, maxPaletteSize, colorsCount); - } - - /** - * Unload color data loaded with LoadImageColors() - */ - void UnloadColors(::Color* colors) const { ::UnloadImageColors(colors); } - - /** - * Unload colors palette loaded with LoadImagePalette() - */ - void UnloadPalette(::Color* colors) const { ::UnloadImagePalette(colors); } - - /** - * Load texture from image data. - */ - [[nodiscard]] ::Texture2D LoadTexture() const { return ::LoadTextureFromImage(*this); } - - /** - * Loads a texture from the image data. - * - * @see LoadTexture() - */ - operator ::Texture2D() const { return LoadTexture(); } - - /** - * Get pixel data size in bytes for certain format - */ - static int GetPixelDataSize(int width, int height, int format = PIXELFORMAT_UNCOMPRESSED_R32G32B32A32) { - return ::GetPixelDataSize(width, height, format); - } - - /** - * Returns the pixel data size based on the current image. - * - * @return The pixel data size of the image. - */ - [[nodiscard]] int GetPixelDataSize() const { return ::GetPixelDataSize(width, height, format); } - - /** - * Retrieve whether or not the Image has been loaded. - * - * @return True or false depending on whether the Image has been loaded. - */ - [[nodiscard]] bool IsValid() const { return ::IsImageValid(*this); } - - /** - * Create an image from a selected channel of another image (GRAYSCALE) - */ - ::Image Channel(int selectedChannel) { return ::ImageFromChannel(*this, selectedChannel); } - - /** - * Apply custom square convolution kernel to image - */ - void KernelConvolution(const float* kernel, int kernelSize) { - ::ImageKernelConvolution(this, kernel, kernelSize); - } -protected: - void set(const ::Image& image) { - data = image.data; - width = image.width; - height = image.height; - mipmaps = image.mipmaps; - format = image.format; - } -}; -} // namespace raylib - -using RImage = raylib::Image; - -#endif // RAYLIB_CPP_INCLUDE_IMAGE_HPP_ diff --git a/include/Keyboard.hpp b/include/Keyboard.hpp deleted file mode 100644 index ac4f380c..00000000 --- a/include/Keyboard.hpp +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_KEYBOARD_HPP_ -#define RAYLIB_CPP_INCLUDE_KEYBOARD_HPP_ - -#include "./Functions.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Input-related functions: keyboard - */ -namespace Keyboard { -/** - * Detect if a key has been pressed once - */ -[[maybe_unused]] RLCPPAPI inline bool IsKeyPressed(int key) { - return ::IsKeyPressed(key); -} - -/** - * Detect if a key has been pressed again (Only PLATFORM_DESKTOP) - */ -[[maybe_unused]] RLCPPAPI inline bool IsKeyPressedRepeat(int key) { - return ::IsKeyPressedRepeat(key); -} - -/** - * Detect if a key is being pressed - */ -[[maybe_unused]] RLCPPAPI inline bool IsKeyDown(int key) { - return ::IsKeyDown(key); -} - -/** - * Detect if a key has been released once - */ -[[maybe_unused]] RLCPPAPI inline bool IsKeyReleased(int key) { - return ::IsKeyReleased(key); -} - -/** - * Detect if a key is NOT being pressed - */ -[[maybe_unused]] RLCPPAPI inline bool IsKeyUp(int key) { - return ::IsKeyUp(key); -} - -/** - * Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty - */ - -[[maybe_unused]] RLCPPAPI inline int GetKeyPressed() { - return ::GetKeyPressed(); -} - -/** - * Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty - */ -[[maybe_unused]] RLCPPAPI inline int GetCharPressed() { - return ::GetCharPressed(); -} -} // namespace Keyboard -} // namespace raylib - -namespace RKeyboard = raylib::Keyboard; - -#endif // RAYLIB_CPP_INCLUDE_KEYBOARD_HPP_ diff --git a/include/Material.hpp b/include/Material.hpp deleted file mode 100644 index 97f47f01..00000000 --- a/include/Material.hpp +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_MATERIAL_HPP_ -#define RAYLIB_CPP_INCLUDE_MATERIAL_HPP_ - -#include -#include - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Material type (generic) - */ -class Material : public ::Material { -public: - Material(const ::Material& material) : ::Material(material) { } - - /** - * Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) - */ - Material() : ::Material(LoadMaterialDefault()) { } - - Material(const Material&) = delete; - - Material(Material&& other) noexcept { - set(other); - - other.maps = nullptr; - other.shader = {}; - other.params[0] = 0.0f; - other.params[1] = 0.0f; - other.params[2] = 0.0f; - other.params[3] = 0.0f; - } - - ~Material() { Unload(); } - - /** - * Load materials from model file - */ - static std::vector Load(const std::string& fileName) { - int count = 0; - // TODO(RobLoach): Material::Load() possibly leaks the materials array. - ::Material* materials = ::LoadMaterials(fileName.c_str(), &count); - return std::vector(materials, materials + count); - } - - GETTERSETTER(::Shader, Shader, shader) - GETTERSETTER(::MaterialMap*, Maps, maps) - // TODO(RobLoach): Resolve the Material params being a float[4]. - // GETTERSETTER(float[4], Params, params) - - Material& operator=(const ::Material& material) { - set(material); - return *this; - } - - Material& operator=(const Material&) = delete; - - Material& operator=(Material&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.maps = nullptr; - other.shader = {}; - - return *this; - } - - /** - * Unload material from memory - */ - void Unload() { - if (maps != nullptr) { - ::UnloadMaterial(*this); - maps = nullptr; - } - } - - /** - * Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...) - */ - Material& SetTexture(int mapType, const ::Texture2D& texture) { - ::SetMaterialTexture(this, mapType, texture); - return *this; - } - - /** - * Draw a 3d mesh with material and transform - */ - void DrawMesh(const ::Mesh& mesh, ::Matrix transform) const { ::DrawMesh(mesh, *this, transform); } - - /** - * Draw multiple mesh instances with material and different transforms - */ - void DrawMesh(const ::Mesh& mesh, ::Matrix* transforms, int instances) const { - ::DrawMeshInstanced(mesh, *this, transforms, instances); - } - - /** - * Check if material is ready - */ - [[nodiscard]] bool IsValid() const { return ::IsMaterialValid(*this); } -protected: - void set(const ::Material& material) { - shader = material.shader; - maps = material.maps; - params[0] = material.params[0]; - params[1] = material.params[1]; - params[2] = material.params[2]; - params[3] = material.params[3]; - } -}; -} // namespace raylib - -using RMaterial = raylib::Material; - -#endif // RAYLIB_CPP_INCLUDE_MATERIAL_HPP_ diff --git a/include/Matrix.hpp b/include/Matrix.hpp deleted file mode 100644 index 7f82138d..00000000 --- a/include/Matrix.hpp +++ /dev/null @@ -1,180 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_MATRIX_HPP_ -#define RAYLIB_CPP_INCLUDE_MATRIX_HPP_ - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" -#include "./raymath.hpp" - -#ifndef RAYLIB_CPP_NO_MATH -#include -#endif - -namespace raylib { -/** - * Matrix type (OpenGL style 4x4 - right handed, column major) - */ -class Matrix : public ::Matrix { -public: - Matrix(const ::Matrix& mat) - : ::Matrix(mat) { - // Nothing. - } - - Matrix( - float m0 = 0, - float m4 = 0, - float m8 = 0, - float m12 = 0, - float m1 = 0, - float m5 = 0, - float m9 = 0, - float m13 = 0, - float m2 = 0, - float m6 = 0, - float m10 = 0, - float m14 = 0, - float m3 = 0, - float m7 = 0, - float m11 = 0, - float m15 = 0) - : ::Matrix{m0, m4, m8, m12, m1, m5, m9, m13, m2, m6, m10, m14, m3, m7, m11, m15} { - // Nothing. - } - - GETTERSETTER(float, M0, m0) - GETTERSETTER(float, M1, m1) - GETTERSETTER(float, M2, m2) - GETTERSETTER(float, M3, m3) - GETTERSETTER(float, M4, m4) - GETTERSETTER(float, M5, m5) - GETTERSETTER(float, M6, m6) - GETTERSETTER(float, M7, m7) - GETTERSETTER(float, M8, m8) - GETTERSETTER(float, M9, m9) - GETTERSETTER(float, M10, m10) - GETTERSETTER(float, M11, m11) - GETTERSETTER(float, M12, m12) - GETTERSETTER(float, M13, m13) - GETTERSETTER(float, M14, m14) - GETTERSETTER(float, M15, m15) - - Matrix& operator=(const ::Matrix& matrix) { - if (this != &matrix) { - set(matrix); - } - return *this; - } - - Matrix& operator=(const Matrix& matrix) { - if (this != &matrix) { - set(matrix); - } - return *this; - } - - bool operator==(const ::Matrix& other) { - return m0 == other.m0 && m1 == other.m1 && m2 == other.m2 && m3 == other.m3 && m4 == other.m4 && - m5 == other.m5 && m6 == other.m6 && m7 == other.m7 && m8 == other.m8 && m9 == other.m9 && - m10 == other.m10 && m11 == other.m11 && m12 == other.m12 && m13 == other.m13 && m14 == other.m14 && - m15 == other.m15; - } - - bool operator!=(const ::Matrix& other) { return !(*this == other); } - -#ifndef RAYLIB_CPP_NO_MATH - /** - * Returns the trace of the matrix (sum of the values along the diagonal) - */ - [[nodiscard]] float Trace() const { return ::MatrixTrace(*this); } - - /** - * Transposes provided matrix - */ - [[nodiscard]] Matrix Transpose() const { return ::MatrixTranspose(*this); } - - [[nodiscard]] Matrix Invert() const { return ::MatrixInvert(*this); } - - static Matrix Identity() { return ::MatrixIdentity(); } - - Matrix Add(const ::Matrix& right) { return ::MatrixAdd(*this, right); } - - Matrix operator+(const ::Matrix& matrix) { return ::MatrixAdd(*this, matrix); } - - Matrix Subtract(const ::Matrix& right) { return ::MatrixSubtract(*this, right); } - - Matrix operator-(const ::Matrix& matrix) { return ::MatrixSubtract(*this, matrix); } - - static Matrix Translate(float x, float y, float z) { return ::MatrixTranslate(x, y, z); } - - static Matrix Rotate(Vector3 axis, float angle) { return ::MatrixRotate(axis, angle); } - - static Matrix RotateXYZ(Vector3 angle) { return ::MatrixRotateXYZ(angle); } - - static Matrix RotateX(float angle) { return ::MatrixRotateX(angle); } - - static Matrix RotateY(float angle) { return ::MatrixRotateY(angle); } - - static Matrix RotateZ(float angle) { return ::MatrixRotateZ(angle); } - - static Matrix Scale(float x, float y, float z) { return ::MatrixScale(x, y, z); } - - [[nodiscard]] Matrix Multiply(const ::Matrix& right) const { return ::MatrixMultiply(*this, right); } - - Matrix operator*(const ::Matrix& matrix) { return ::MatrixMultiply(*this, matrix); } - - static Matrix Frustum(double left, double right, double bottom, double top, double near, double far) { - return ::MatrixFrustum(left, right, bottom, top, near, far); - } - - static Matrix Perspective(double fovy, double aspect, double near, double far) { - return ::MatrixPerspective(fovy, aspect, near, far); - } - - static Matrix Ortho(double left, double right, double bottom, double top, double near, double far) { - return ::MatrixOrtho(left, right, bottom, top, near, far); - } - - static Matrix LookAt(Vector3 eye, Vector3 target, Vector3 up) { return ::MatrixLookAt(eye, target, up); } - - [[nodiscard]] float16 ToFloatV() const { return ::MatrixToFloatV(*this); } - - operator float16() const { return ToFloatV(); } - - /** - * Set shader uniform value (matrix 4x4) - */ - Matrix& SetShaderValue(const ::Shader& shader, int uniformLoc) { - ::SetShaderValueMatrix(shader, uniformLoc, *this); - return *this; - } - - static Matrix GetCamera(const ::Camera& camera) { return ::GetCameraMatrix(camera); } - - static Matrix GetCamera(const ::Camera2D& camera) { return ::GetCameraMatrix2D(camera); } - -#endif -protected: - void set(const ::Matrix& mat) { - m0 = mat.m0; - m1 = mat.m1; - m2 = mat.m2; - m3 = mat.m3; - m4 = mat.m4; - m5 = mat.m5; - m6 = mat.m6; - m7 = mat.m7; - m8 = mat.m8; - m9 = mat.m9; - m10 = mat.m10; - m11 = mat.m11; - m12 = mat.m12; - m13 = mat.m13; - m14 = mat.m14; - m15 = mat.m15; - } -}; -} // namespace raylib - -using RMatrix = raylib::Matrix; - -#endif // RAYLIB_CPP_INCLUDE_MATRIX_HPP_ diff --git a/include/Mesh.hpp b/include/Mesh.hpp deleted file mode 100644 index ff960406..00000000 --- a/include/Mesh.hpp +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_MESH_HPP_ -#define RAYLIB_CPP_INCLUDE_MESH_HPP_ - -#include -#include - -#include "./MeshUnmanaged.hpp" -#include "./Model.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Vertex data defining a mesh - * - * The Mesh will be unloaded on object destruction. - * - * @see raylib::MeshUnmanaged - */ -class Mesh : public MeshUnmanaged { -public: - using MeshUnmanaged::MeshUnmanaged; - - /** - * Explicitly forbid the copy constructor. - */ - Mesh(const Mesh&) = delete; - - /** - * Explicitly forbid copy assignment. - */ - Mesh& operator=(const Mesh&) = delete; - - /** - * Move constructor. - */ - Mesh(Mesh&& other) noexcept { - set(other); - - other.vertexCount = 0; - other.triangleCount = 0; - other.vertices = nullptr; - other.texcoords = nullptr; - other.texcoords2 = nullptr; - other.normals = nullptr; - other.tangents = nullptr; - other.colors = nullptr; - other.indices = nullptr; - other.animVertices = nullptr; - other.animNormals = nullptr; - other.boneIds = nullptr; - other.boneWeights = nullptr; - other.vaoId = 0; - other.vboId = nullptr; - } - - Mesh& operator=(Mesh&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.vertexCount = 0; - other.triangleCount = 0; - other.vertices = nullptr; - other.texcoords = nullptr; - other.texcoords2 = nullptr; - other.normals = nullptr; - other.tangents = nullptr; - other.colors = nullptr; - other.indices = nullptr; - other.animVertices = nullptr; - other.animNormals = nullptr; - other.boneIds = nullptr; - other.boneWeights = nullptr; - other.vaoId = 0; - other.vboId = nullptr; - - return *this; - } - - ~Mesh() { Unload(); } -}; -} // namespace raylib - -using RMesh = raylib::Mesh; - -#endif // RAYLIB_CPP_INCLUDE_MESH_HPP_ diff --git a/include/MeshUnmanaged.hpp b/include/MeshUnmanaged.hpp deleted file mode 100644 index 386ae2a4..00000000 --- a/include/MeshUnmanaged.hpp +++ /dev/null @@ -1,256 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_MESHUNMANAGED_HPP_ -#define RAYLIB_CPP_INCLUDE_MESHUNMANAGED_HPP_ - -#include -#include - -#include "./BoundingBox.hpp" -#include "./Matrix.hpp" -#include "./Model.hpp" -#include "./raylib-cpp-utils.hpp" - -namespace raylib { - -/** - * Vertex data defining a mesh, not managed by C++ RAII. - * - * Make sure to Unload() this if needed, otherwise use raylib::Mesh. - * - * @see raylib::Mesh - */ -class MeshUnmanaged : public ::Mesh { -public: - /** - * Default texture constructor. - */ - MeshUnmanaged() { - vertexCount = 0; - triangleCount = 0; - vertices = nullptr; - texcoords = nullptr; - texcoords2 = nullptr; - normals = nullptr; - tangents = nullptr; - colors = nullptr; - indices = nullptr; - animVertices = nullptr; - animNormals = nullptr; - boneIds = nullptr; - boneWeights = nullptr; - boneMatrices = nullptr; - boneCount = 0; - vaoId = 0; - vboId = nullptr; - } - - MeshUnmanaged(const ::Mesh& mesh) { set(mesh); } - - MeshUnmanaged(::Mesh&& mesh) { set(mesh); } - - /** - * Load meshes from model file - */ - // static std::vector Load(const std::string& fileName) { - // int count = 0; - // ::Mesh* meshes = LoadMeshes(fileName.c_str(), &count); - // return std::vector(meshes, meshes + count); - // } - - /** - * Generate polygonal mesh - */ - static ::Mesh Poly(int sides, float radius) { return ::GenMeshPoly(sides, radius); } - - /** - * Generate plane mesh (with subdivisions) - */ - static ::Mesh Plane(float width, float length, int resX, int resZ) { - return ::GenMeshPlane(width, length, resX, resZ); - } - - /** - * Generate cuboid mesh - */ - static ::Mesh Cube(float width, float height, float length) { return ::GenMeshCube(width, height, length); } - - /** - * Generate sphere mesh (standard sphere) - */ - static ::Mesh Sphere(float radius, int rings, int slices) { return ::GenMeshSphere(radius, rings, slices); } - - /** - * Generate half-sphere mesh (no bottom cap) - */ - static ::Mesh HemiSphere(float radius, int rings, int slices) { return ::GenMeshHemiSphere(radius, rings, slices); } - - /** - * Generate cylinder mesh - */ - static ::Mesh Cylinder(float radius, float height, int slices) { return ::GenMeshCylinder(radius, height, slices); } - - /** - * Generate cone/pyramid mesh - */ - static ::Mesh Cone(float radius, float height, int slices) { return ::GenMeshCone(radius, height, slices); } - - /** - * Generate torus mesh - */ - static ::Mesh Torus(float radius, float size, int radSeg, int sides) { - return ::GenMeshTorus(radius, size, radSeg, sides); - } - - /** - * Generate trefoil knot mesh - */ - static ::Mesh Knot(float radius, float size, int radSeg, int sides) { - return ::GenMeshKnot(radius, size, radSeg, sides); - } - - /** - * Generate heightmap mesh from image data - */ - static ::Mesh Heightmap(const ::Image& heightmap, ::Vector3 size) { return ::GenMeshHeightmap(heightmap, size); } - - /** - * Generate cubes-based map mesh from image data - */ - static ::Mesh Cubicmap(const ::Image& cubicmap, ::Vector3 cubeSize) { - return ::GenMeshCubicmap(cubicmap, cubeSize); - } - - GETTERSETTER(int, VertexCount, vertexCount) - GETTERSETTER(int, TriangleCount, triangleCount) - GETTERSETTER(float*, Vertices, vertices) - GETTERSETTER(float*, TexCoords, texcoords) - GETTERSETTER(float*, TexCoords2, texcoords2) - GETTERSETTER(float*, Normals, normals) - GETTERSETTER(float*, Tangents, tangents) - GETTERSETTER(unsigned char*, Colors, colors) - GETTERSETTER(unsigned short*, Indices, indices) // NOLINT - GETTERSETTER(float*, AnimVertices, animVertices) - GETTERSETTER(float*, AnimNormals, animNormals) - GETTERSETTER(unsigned char*, BoneIds, boneIds) - GETTERSETTER(float*, BoneWeights, boneWeights) - GETTERSETTER(unsigned int, VaoId, vaoId) - GETTERSETTER(unsigned int*, VboId, vboId) - - MeshUnmanaged& operator=(const ::Mesh& mesh) { - set(mesh); - return *this; - } - - /** - * Unload mesh from memory (RAM and/or VRAM) - */ - void Unload() { - if (vboId != nullptr) { - ::UnloadMesh(*this); - vboId = nullptr; - } - } - - /** - * Upload mesh vertex data to GPU (VRAM) - */ - void Upload(bool dynamic = false) { ::UploadMesh(this, dynamic); } - - /** - * Upload mesh vertex data to GPU (VRAM) - */ - void UpdateBuffer(int index, void* data, int dataSize, int offset = 0) { - ::UpdateMeshBuffer(*this, index, data, dataSize, offset); - } - - /** - * Draw a 3d mesh with material and transform - */ - void Draw(const ::Material& material, const ::Matrix& transform) const { ::DrawMesh(*this, material, transform); } - - /** - * Draw multiple mesh instances with material and different transforms - */ - void Draw(const ::Material& material, ::Matrix* transforms, int instances) const { - ::DrawMeshInstanced(*this, material, transforms, instances); - } - - /** - * Export mesh data to file - * - * @throws raylib::RaylibException Throws if failed to export the Mesh. - */ - void Export(const std::string& fileName) { - if (!::ExportMesh(*this, fileName.c_str())) { - throw RaylibException("Failed to export the Mesh"); - } - } - - /** - * Export mesh as code file (.h) defining multiple arrays of vertex attributes - * - * @throws raylib::RaylibException Throws if failed to export the Mesh. - */ - void ExportCode(const std::string& fileName) { - if (!::ExportMeshAsCode(*this, fileName.c_str())) { - throw RaylibException("Failed to export the Mesh"); - } - } - - /** - * Compute mesh bounding box limits - */ - [[nodiscard]] raylib::BoundingBox BoundingBox() const { return ::GetMeshBoundingBox(*this); } - - /** - * Compute mesh bounding box limits - */ - operator raylib::BoundingBox() const { return BoundingBox(); } - - /** - * Compute mesh tangents - */ - Mesh& GenTangents() { - ::GenMeshTangents(this); - return *this; - } - - /** - * Load model from generated mesh - */ - [[nodiscard]] raylib::Model LoadModelFrom() const { return ::LoadModelFromMesh(*this); } - - /** - * Load model from generated mesh - */ - operator raylib::Model() { return ::LoadModelFromMesh(*this); } - - /** - * Returns whether or not the Mesh is valid. - */ - bool IsValid() { return ::IsModelValid(*this); } - -protected: - void set(const ::Mesh& mesh) { - vertexCount = mesh.vertexCount; - triangleCount = mesh.triangleCount; - vertices = mesh.vertices; - texcoords = mesh.texcoords; - texcoords2 = mesh.texcoords2; - normals = mesh.normals; - tangents = mesh.tangents; - colors = mesh.colors; - indices = mesh.indices; - animVertices = mesh.animVertices; - animNormals = mesh.animNormals; - boneIds = mesh.boneIds; - boneWeights = mesh.boneWeights; - boneMatrices = mesh.boneMatrices; - vaoId = mesh.vaoId; - vboId = mesh.vboId; - } -}; -} // namespace raylib - -using RMeshUnmanaged = raylib::MeshUnmanaged; - -#endif // RAYLIB_CPP_INCLUDE_MESHUNMANAGED_HPP_ diff --git a/include/Model.hpp b/include/Model.hpp deleted file mode 100644 index c8c65af5..00000000 --- a/include/Model.hpp +++ /dev/null @@ -1,253 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_MODEL_HPP_ -#define RAYLIB_CPP_INCLUDE_MODEL_HPP_ - -#include - -#include "./RaylibException.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -class Mesh; -/** - * Model type - */ -class Model : public ::Model { -public: - Model() { - // Nothing. - } - - /* - * Copy a model from another model. - */ - Model(const ::Model& model) : ::Model(model) { } - - /* - * Load a model from a file. - * - * @throws raylib::RaylibException Throws if failed to load the Modal. - */ - Model(const std::string& fileName) { Load(fileName); } - - /* - * Load a model from a mesh. - * - * @throws raylib::RaylibException Throws if failed to load the Modal. - */ - Model(const ::Mesh& mesh) { Load(mesh); } - - /** - * The Model constructor with a Mesh() is removed. - * - * Use `raylib::MeshUnmanaged` or `::Mesh` instead, as raylib will take ownership of the data. - * - * @see raylib::MeshUnmanaged - */ - Model(const raylib::Mesh& mesh) = delete; - - ~Model() { Unload(); } - - Model(const Model&) = delete; - - Model(Model&& other) noexcept { - set(other); - - other.meshCount = 0; - other.materialCount = 0; - other.meshes = nullptr; - other.materials = nullptr; - other.meshMaterial = nullptr; - other.boneCount = 0; - other.bones = nullptr; - other.bindPose = nullptr; - } - - GETTERSETTER(::Matrix, Transform, transform) - GETTERSETTER(int, MeshCount, meshCount) - GETTERSETTER(int, MaterialCount, materialCount) - GETTERSETTER(::Mesh*, Meshes, meshes) - GETTERSETTER(::Material*, Materials, materials) - GETTERSETTER(int*, MeshMaterial, meshMaterial) - GETTERSETTER(int, BoneCount, boneCount) - GETTERSETTER(::BoneInfo*, Bones, bones) - GETTERSETTER(::Transform*, BindPose, bindPose) - - Model& operator=(const ::Model& model) { - set(model); - return *this; - } - - Model& operator=(const Model&) = delete; - - Model& operator=(Model&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.meshCount = 0; - other.materialCount = 0; - other.meshes = nullptr; - other.materials = nullptr; - other.meshMaterial = nullptr; - other.boneCount = 0; - other.bones = nullptr; - other.bindPose = nullptr; - - return *this; - } - - /** - * Unload model (including meshes) from memory (RAM and/or VRAM) - */ - void Unload() { - if (meshes != nullptr || materials != nullptr) { - ::UnloadModel(*this); - meshes = nullptr; - materials = nullptr; - } - } - - /** - * Set material for a mesh - */ - Model& SetMeshMaterial(int meshId, int materialId) { - ::SetModelMeshMaterial(this, meshId, materialId); - return *this; - } - - /** - * Update model animation pose - */ - Model& UpdateAnimation(const ::ModelAnimation& anim, int frame) { - ::UpdateModelAnimation(*this, anim, frame); - return *this; - } - - /** - * Update model animation pose - */ - Model& UpdateAnimationBones(const ::ModelAnimation& anim, int frame) { - ::UpdateModelAnimationBones(*this, anim, frame); - return *this; - } - - /** - * Check model animation skeleton match - */ - [[nodiscard]] bool IsModelAnimationValid(const ::ModelAnimation& anim) const { return ::IsModelAnimationValid(*this, anim); } - - /** - * Draw a model (with texture if set) - */ - void Draw(::Vector3 position, float scale = 1.0f, ::Color tint = {255, 255, 255, 255}) const { - ::DrawModel(*this, position, scale, tint); - } - - /** - * Draw a model with extended parameters - */ - void Draw( - ::Vector3 position, - ::Vector3 rotationAxis, - float rotationAngle = 0.0f, - ::Vector3 scale = {1.0f, 1.0f, 1.0f}, - ::Color tint = {255, 255, 255, 255}) const { - ::DrawModelEx(*this, position, rotationAxis, rotationAngle, scale, tint); - } - - /** - * Draw a model wires (with texture if set) - */ - void DrawWires(::Vector3 position, float scale = 1.0f, ::Color tint = {255, 255, 255, 255}) const { - ::DrawModelWires(*this, position, scale, tint); - } - - /** - * Draw a model wires (with texture if set) with extended parameters - */ - void DrawWires( - ::Vector3 position, - ::Vector3 rotationAxis, - float rotationAngle = 0.0f, - ::Vector3 scale = {1.0f, 1.0f, 1.0f}, - ::Color tint = {255, 255, 255, 255}) const { - ::DrawModelWiresEx(*this, position, rotationAxis, rotationAngle, scale, tint); - } - - /** - * Draw a model as points - */ - void DrawPoints(::Vector3 position, float scale = 1.0f, ::Color tint = {255, 255, 255, 255}) { - ::DrawModelPoints(*this, position, scale, tint); - } - - /** - * Draw a model as points - */ - void DrawPoints(::Vector3 position, ::Vector3 rotationAxis, float rotationAngle = 0.0f, ::Vector3 scale = {1.0f, 1.0f, 1.0f}, ::Color tint = {255, 255, 255, 255}) { - ::DrawModelPointsEx(*this, position, rotationAxis, rotationAngle, scale, tint); - } - - /** - * Compute model bounding box limits (considers all meshes) - */ - [[nodiscard]] BoundingBox GetBoundingBox() const { return ::GetModelBoundingBox(*this); } - - /** - * Compute model bounding box limits (considers all meshes) - */ - explicit operator BoundingBox() const { return ::GetModelBoundingBox(*this); } - - /** - * Determines whether or not the Model has data in it. - */ - [[nodiscard]] bool IsValid() const { return ::IsModelValid(*this); } - - /** - * Loads a Model from the given file. - * - * @throws raylib::RaylibException Throws if failed to load the Modal. - */ - void Load(const std::string& fileName) { - set(::LoadModel(fileName.c_str())); - if (!IsValid()) { - throw RaylibException("Failed to load Model from " + fileName); - } - } - - /** - * Loads a Model from the given Mesh. - * - * @throws raylib::RaylibException Throws if failed to load the Modal. - */ - void Load(const ::Mesh& mesh) { - set(::LoadModelFromMesh(mesh)); - if (!IsValid()) { - throw RaylibException("Failed to load Model from Mesh"); - } - } -protected: - void set(const ::Model& model) { - transform = model.transform; - - meshCount = model.meshCount; - materialCount = model.materialCount; - meshes = model.meshes; - materials = model.materials; - meshMaterial = model.meshMaterial; - - boneCount = model.boneCount; - bones = model.bones; - bindPose = model.bindPose; - } -}; - -} // namespace raylib - -using RModel = raylib::Model; - -#endif // RAYLIB_CPP_INCLUDE_MODEL_HPP_ diff --git a/include/ModelAnimation.hpp b/include/ModelAnimation.hpp deleted file mode 100644 index f747244e..00000000 --- a/include/ModelAnimation.hpp +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_ -#define RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_ - -#include -#include - -#include "./Mesh.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Model animation - */ -class ModelAnimation : public ::ModelAnimation { -public: - ModelAnimation(const ::ModelAnimation& model) { set(model); } - - ModelAnimation(const ModelAnimation&) = delete; - - ModelAnimation(ModelAnimation&& other) noexcept { - set(other); - - other.boneCount = 0; - other.frameCount = 0; - other.bones = nullptr; - other.framePoses = nullptr; - } - - ~ModelAnimation() { Unload(); } - - /** - * Load model animations from file - */ - static std::vector Load(const std::string& fileName) { - int count = 0; - ::ModelAnimation* modelAnimations = ::LoadModelAnimations(fileName.c_str(), &count); - std::vector mats(modelAnimations, modelAnimations + count); - - RL_FREE(modelAnimations); - - return mats; - } - - GETTERSETTER(int, BoneCount, boneCount) - GETTERSETTER(::BoneInfo*, Bones, bones) - GETTERSETTER(int, FrameCount, frameCount) - GETTERSETTER(::Transform**, FramePoses, framePoses) - - ModelAnimation& operator=(const ::ModelAnimation& model) { - set(model); - return *this; - } - - ModelAnimation& operator=(const ModelAnimation&) = delete; - - ModelAnimation& operator=(ModelAnimation&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.boneCount = 0; - other.frameCount = 0; - other.bones = nullptr; - other.framePoses = nullptr; - - return *this; - } - - /** - * Unload animation data - */ - void Unload() { ::UnloadModelAnimation(*this); } - - /** - * Update model animation pose - */ - ModelAnimation& Update(const ::Model& model, int frame) { - ::UpdateModelAnimation(model, *this, frame); - return *this; - } - - /** - * Update model animation mesh bone matrices (GPU skinning) - */ - ModelAnimation& UpdateBones(const ::Model& model, int frame) { - ::UpdateModelAnimationBones(model, *this, frame); - return *this; - } - - /** - * Check model animation skeleton match - */ - [[nodiscard]] bool IsValid(const ::Model& model) const { return ::IsModelAnimationValid(model, *this); } -protected: - void set(const ::ModelAnimation& model) { - boneCount = model.boneCount; - frameCount = model.frameCount; - bones = model.bones; - framePoses = model.framePoses; - - // Duplicate the name. TextCopy() uses the null terminator, which we ignore here. - for (int i = 0; i < 32; i++) { - name[i] = model.name[i]; - } - } -}; -} // namespace raylib - -using RModelAnimation = raylib::ModelAnimation; - -#endif // RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_ diff --git a/include/Mouse.hpp b/include/Mouse.hpp deleted file mode 100644 index 882e47b1..00000000 --- a/include/Mouse.hpp +++ /dev/null @@ -1,153 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_MOUSE_HPP_ -#define RAYLIB_CPP_INCLUDE_MOUSE_HPP_ - -#include "./Functions.hpp" -#include "./Vector2.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Input-related functions: mouse - */ -namespace Mouse { -/** - * Detect if a mouse button has been pressed once - */ -[[maybe_unused]] RLCPPAPI inline bool IsButtonPressed(int button) { - return ::IsMouseButtonPressed(button); -} - -/** - * Detect if a mouse button is being pressed - */ -[[maybe_unused]] RLCPPAPI inline bool IsButtonDown(int button) { - return ::IsMouseButtonDown(button); -} - -/** - * Detect if a mouse button has been released once - */ -[[maybe_unused]] RLCPPAPI inline bool IsButtonReleased(int button) { - return ::IsMouseButtonReleased(button); -} - -[[maybe_unused]] RLCPPAPI inline bool IsButtonUp(int button) { - return ::IsMouseButtonUp(button); -} - -[[maybe_unused]] RLCPPAPI inline int GetX() { - return ::GetMouseX(); -} - -[[maybe_unused]] RLCPPAPI inline int GetY() { - return ::GetMouseY(); -} - -[[maybe_unused]] RLCPPAPI inline void SetX(int x) { - ::SetMousePosition(x, GetY()); -} - -[[maybe_unused]] RLCPPAPI inline void SetY(int y) { - ::SetMousePosition(GetX(), y); -} - -[[maybe_unused]] RLCPPAPI inline Vector2 GetPosition() { - return ::GetMousePosition(); -} - -[[maybe_unused]] RLCPPAPI inline void SetPosition(int x, int y) { - ::SetMousePosition(x, y); -} - -[[maybe_unused]] RLCPPAPI inline void SetPosition(::Vector2 position) { - ::SetMousePosition(static_cast(position.x), static_cast(position.y)); -} - -/** - * Get mouse delta between frames - */ -[[maybe_unused]] RLCPPAPI inline Vector2 GetDelta() { - return ::GetMouseDelta(); -} - -[[maybe_unused]] RLCPPAPI inline void SetOffset(int offsetX = 0, int offsetY = 0) { - ::SetMouseOffset(offsetX, offsetY); -} - -[[maybe_unused]] RLCPPAPI inline void SetOffset(::Vector2 offset) { - ::SetMouseOffset(static_cast(offset.x), static_cast(offset.y)); -} - -[[maybe_unused]] RLCPPAPI inline void SetScale(float scaleX = 1.0f, float scaleY = 1.0f) { - ::SetMouseScale(scaleX, scaleY); -} - -[[maybe_unused]] RLCPPAPI inline void SetScale(::Vector2 scale) { - ::SetMouseScale(scale.x, scale.y); -} - -/** - * Get mouse wheel movement for X or Y, whichever is larger - */ -[[maybe_unused]] RLCPPAPI inline float GetWheelMove() { - return ::GetMouseWheelMove(); -} - -/** - * Get mouse wheel movement for both X and Y - * - * @see ::GetMouseWheelMoveV() - */ -[[maybe_unused]] RLCPPAPI inline Vector2 GetWheelMoveV() { - return GetMouseWheelMoveV(); -} - -/** - * Sets the current mouse cursor icon. - * - * @see ::MouseCursor - */ -[[maybe_unused]] RLCPPAPI inline void SetCursor(int cursor = MOUSE_CURSOR_DEFAULT) { - ::SetMouseCursor(cursor); -} - -/** - * Get touch position X for touch point 0 (relative to screen size) - */ -[[maybe_unused]] RLCPPAPI inline int GetTouchX() { - return ::GetTouchX(); -} - -/** - * Get touch position Y for touch point 0 (relative to screen size) - */ -[[maybe_unused]] RLCPPAPI inline int GetTouchY() { - return ::GetTouchY(); -} - -/** - * Get touch position XY for a touch point index (relative to screen size) - */ -[[maybe_unused]] RLCPPAPI inline Vector2 GetTouchPosition(int index) { - return ::GetTouchPosition(index); -} - -/** - * Get a ray trace from mouse position - */ -[[maybe_unused]] RLCPPAPI inline Ray GetRay(::Vector2 mousePosition, const ::Camera& camera) { - return ::GetMouseRay(mousePosition, camera); -} - -/** - * Get a ray trace from mouse position - */ -[[maybe_unused]] RLCPPAPI inline Ray GetRay(const ::Camera& camera) { - return ::GetMouseRay(::GetMousePosition(), camera); -} -} // namespace Mouse -} // namespace raylib - -namespace RMouse = raylib::Mouse; - -#endif // RAYLIB_CPP_INCLUDE_MOUSE_HPP_ diff --git a/include/Music.hpp b/include/Music.hpp deleted file mode 100644 index fc1307d5..00000000 --- a/include/Music.hpp +++ /dev/null @@ -1,222 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_MUSIC_HPP_ -#define RAYLIB_CPP_INCLUDE_MUSIC_HPP_ - -#include - -#include "./RaylibException.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Music stream type (audio file streaming from memory) - */ -class Music : public ::Music { -public: - Music( - ::AudioStream stream = {nullptr, nullptr, 0, 0, 0}, - unsigned int frameCount = 0, - bool looping = false, - int ctxType = 0, - void* ctxData = nullptr) - : ::Music{stream, frameCount, looping, ctxType, ctxData} {} - - Music(const ::Music& music) : ::Music(music) { } - - /** - * Load music stream from file - * - * @throws raylib::RaylibException Throws if the music failed to load. - */ - Music(const std::string& fileName) { Load(fileName); } - - /** - * Load music stream from memory - * - * @throws raylib::RaylibException Throws if the music failed to load. - */ - Music(const std::string& fileType, unsigned char* data, int dataSize) { Load(fileType, data, dataSize); } - - Music(const Music&) = delete; - - Music(Music&& other) noexcept { - set(other); - - other.stream = {}; - other.frameCount = 0; - other.looping = false; - other.ctxType = 0; - other.ctxData = nullptr; - } - - /** - * Unload music stream - */ - ~Music() { Unload(); } - - GETTER(::AudioStream, Stream, stream) - GETTER(unsigned int, FrameCount, frameCount) - GETTERSETTER(bool, Looping, looping) - GETTER(int, CtxType, ctxType) - GETTER(void*, CtxData, ctxData) - - Music& operator=(const ::Music& music) { - set(music); - return *this; - } - - Music& operator=(const Music&) = delete; - - Music& operator=(Music&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.ctxType = 0; - other.ctxData = nullptr; - other.looping = false; - other.frameCount = 0; - other.stream = {}; - - return *this; - } - - /** - * Unload music stream - */ - void Unload() { ::UnloadMusicStream(*this); } - - /** - * Start music playing - */ - Music& Play() { - ::PlayMusicStream(*this); - return *this; - } - - /** - * Updates buffers for music streaming - */ - Music& Update() { - ::UpdateMusicStream(*this); - return *this; - } - - /** - * Stop music playing - */ - Music& Stop() { - ::StopMusicStream(*this); - return *this; - } - - /** - * Pause music playing - */ - Music& Pause() { - ::PauseMusicStream(*this); - return *this; - } - - /** - * Resume music playing - */ - Music& Resume() { - ::ResumeMusicStream(*this); - return *this; - } - - /** - * Seek music to a position (in seconds) - */ - Music& Seek(float position) { - SeekMusicStream(*this, position); - return *this; - } - - /** - * Check if music is playing - */ - [[nodiscard]] bool IsPlaying() const { return ::IsMusicStreamPlaying(*this); } - - /** - * Set volume for music - */ - Music& SetVolume(float volume) { - ::SetMusicVolume(*this, volume); - return *this; - } - - /** - * Set pitch for music - */ - Music& SetPitch(float pitch) { - ::SetMusicPitch(*this, pitch); - return *this; - } - - /** - * Set pan for a music (0.5 is center) - */ - Music& SetPan(float pan = 0.5f) { - ::SetMusicPan(*this, pan); - return *this; - } - - /** - * Get music time length (in seconds) - */ - [[nodiscard]] float GetTimeLength() const { return ::GetMusicTimeLength(*this); } - - /** - * Get current music time played (in seconds) - */ - [[nodiscard]] float GetTimePlayed() const { return ::GetMusicTimePlayed(*this); } - - /** - * Load music stream from file - * - * @throws raylib::RaylibException Throws if the music failed to load. - */ - void Load(const std::string& fileName) { - set(::LoadMusicStream(fileName.c_str())); - if (!IsValid()) { - throw RaylibException(TextFormat("Failed to load Music from file: %s", fileName.c_str())); - } - } - - /** - * Load music stream from memory - * - * @throws raylib::RaylibException Throws if the music failed to load. - */ - void Load(const std::string& fileType, unsigned char* data, int dataSize) { - set(::LoadMusicStreamFromMemory(fileType.c_str(), data, dataSize)); - if (!IsValid()) { - throw RaylibException(TextFormat("Failed to load Music from %s file dat", fileType.c_str())); - } - } - - /** - * Retrieve whether or not the Music has been loaded. - * - * @return True or false depending on whether the Music has been loaded. - */ - bool IsValid() const { return ::IsMusicValid(*this); } -protected: - void set(const ::Music& music) { - stream = music.stream; - frameCount = music.frameCount; - looping = music.looping; - ctxType = music.ctxType; - ctxData = music.ctxData; - } -}; -} // namespace raylib - -using RMusic = raylib::Music; - -#endif // RAYLIB_CPP_INCLUDE_MUSIC_HPP_ diff --git a/include/Ray.hpp b/include/Ray.hpp deleted file mode 100644 index c9ccb09b..00000000 --- a/include/Ray.hpp +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_RAY_HPP_ -#define RAYLIB_CPP_INCLUDE_RAY_HPP_ - -#include "./RayCollision.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Ray type (useful for raycast) - */ -class Ray : public ::Ray { -public: - Ray(const ::Ray& ray) { set(ray); } - - Ray(::Vector3 position = {0.0f, 0.0f, 0.0f}, ::Vector3 direction = {0.0f, 0.0f, 0.0f}) - : ::Ray{position, direction} { - // Nothing. - } - - Ray(::Vector2 mousePosition, const ::Camera& camera) { set(::GetMouseRay(mousePosition, camera)); } - - Ray& operator=(const ::Ray& ray) { - set(ray); - return *this; - } - - GETTERSETTER(::Vector3, Position, position) - GETTERSETTER(::Vector3, Direction, direction) - - /** - * Draw a ray line - */ - void Draw(::Color color) const { DrawRay(*this, color); } - - /** - * Get collision information between ray and sphere - */ - RayCollision GetCollision(::Vector3 center, float radius) const { - return ::GetRayCollisionSphere(*this, center, radius); - } - - /** - * Detect collision between ray and box - */ - RayCollision GetCollision(const ::BoundingBox& box) const { return ::GetRayCollisionBox(*this, box); } - - /** - * Get collision information between ray and mesh - */ - RayCollision GetCollision(const ::Mesh& mesh, const ::Matrix& transform) const { - return ::GetRayCollisionMesh(*this, mesh, transform); - } - - /** - * Get collision info between ray and triangle - */ - RayCollision GetCollision(::Vector3 p1, ::Vector3 p2, ::Vector3 p3) const { - return ::GetRayCollisionTriangle(*this, p1, p2, p3); - } - - /** - * Get collision info between ray and quad - */ - RayCollision GetCollision(::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4) const { - return ::GetRayCollisionQuad(*this, p1, p2, p3, p4); - } - - /** - * Get a ray trace from mouse position - */ - static Ray GetMouse(::Vector2 mousePosition, const ::Camera& camera) { - return ::GetMouseRay(mousePosition, camera); - } - - /** - * Get a ray trace from mouse position - */ - static Ray GetMouse(const ::Camera& camera) { return ::GetMouseRay(::GetMousePosition(), camera); } -protected: - void set(const ::Ray& ray) { - position = ray.position; - direction = ray.direction; - } -}; -} // namespace raylib - -using RRay = raylib::Ray; - -#endif // RAYLIB_CPP_INCLUDE_RAY_HPP_ diff --git a/include/RayCollision.hpp b/include/RayCollision.hpp deleted file mode 100644 index 0dfe4390..00000000 --- a/include/RayCollision.hpp +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_RAYCOLLISION_HPP_ -#define RAYLIB_CPP_INCLUDE_RAYCOLLISION_HPP_ - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Raycast hit information - */ -class RayCollision : public ::RayCollision { -public: - RayCollision(const ::RayCollision& ray) : ::RayCollision(ray) { } - - RayCollision(bool hit, float distance, ::Vector3 point, ::Vector3 normal) - : ::RayCollision{hit, distance, point, normal} { - // Nothing. - } - - /** - * Get collision info between ray and bounding box - */ - RayCollision(const ::Ray& ray, const ::BoundingBox& box) - : ::RayCollision(::GetRayCollisionBox(ray, box)) { - // Nothing. - } - - /** - * Get collision info between ray and mesh - */ - RayCollision(const ::Ray& ray, const ::Mesh& mesh, const ::Matrix& transform) - : ::RayCollision(::GetRayCollisionMesh(ray, mesh, transform)) { - // Nothing. - } - - /** - * Get collision info between ray and quad - */ - RayCollision(const ::Ray& ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4) - : ::RayCollision(::GetRayCollisionQuad(ray, p1, p2, p3, p4)) { - // Nothing. - } - - /** - * Get collision info between ray and sphere - */ - RayCollision(const ::Ray& ray, ::Vector3 center, float radius) - : ::RayCollision(::GetRayCollisionSphere(ray, center, radius)) { - // Nothing. - } - - /** - * Get collision info between ray and triangle - */ - RayCollision(const ::Ray& ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3) - : ::RayCollision(::GetRayCollisionTriangle(ray, p1, p2, p3)) { - // Nothing. - } - - RayCollision& operator=(const ::RayCollision& ray) { - set(ray); - return *this; - } - - GETTERSETTER(bool, Hit, hit) - GETTERSETTER(float, Distance, distance) - GETTERSETTER(::Vector3, Position, point) - GETTERSETTER(::Vector3, Normal, normal) -protected: - void set(const ::RayCollision& ray) { - hit = ray.hit; - distance = ray.distance; - point = ray.point; - normal = ray.normal; - } -}; -} // namespace raylib - -using RRayCollision = raylib::RayCollision; - -#endif // RAYLIB_CPP_INCLUDE_RAYCOLLISION_HPP_ diff --git a/include/RaylibException.hpp b/include/RaylibException.hpp deleted file mode 100644 index 2174e17b..00000000 --- a/include/RaylibException.hpp +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_RAYLIBEXCEPTION_HPP_ -#define RAYLIB_CPP_INCLUDE_RAYLIBEXCEPTION_HPP_ - -#include -#include - -#include "./raylib.hpp" - -namespace raylib { -/** - * Exception used for most raylib-related exceptions. - */ -class RaylibException : public std::runtime_error { -public: - /** - * Construct a runtime exception with the given message. - * - * @param message The message to provide for the exception. - */ - explicit RaylibException(const std::string& message) noexcept : std::runtime_error(message) { - // Nothing - } - - /** - * Outputs the exception message to TraceLog(). - * - * @param logLevel The output status to use when outputing. - */ - void TraceLog(int logLevel = LOG_ERROR) { ::TraceLog(logLevel, std::runtime_error::what()); } -}; - -} // namespace raylib - -using RRaylibException = raylib::RaylibException; - -#endif // RAYLIB_CPP_INCLUDE_RAYLIBEXCEPTION_HPP_ diff --git a/include/Rectangle.hpp b/include/Rectangle.hpp deleted file mode 100644 index 416d2337..00000000 --- a/include/Rectangle.hpp +++ /dev/null @@ -1,154 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_ -#define RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_ - -#include "./Vector2.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Rectangle type - */ -class Rectangle : public ::Rectangle { -public: - Rectangle(const ::Rectangle& rect) : ::Rectangle{rect.x, rect.y, rect.width, rect.height} {} - - Rectangle(float x, float y, float width, float height) : ::Rectangle{x, y, width, height} {} - Rectangle(float x, float y, float width) : ::Rectangle{x, y, width, 0} {} - Rectangle(float x, float y) : ::Rectangle{x, y, 0, 0} {} - Rectangle(float x) : ::Rectangle{x, 0, 0, 0} {} - Rectangle() : ::Rectangle{0, 0, 0, 0} {} - - Rectangle(::Vector2 position, ::Vector2 size) : ::Rectangle{position.x, position.y, size.x, size.y} {} - Rectangle(::Vector2 size) : ::Rectangle{0, 0, size.x, size.y} {} - Rectangle(::Vector4 rect) : ::Rectangle{rect.x, rect.y, rect.z, rect.w} {} - - GETTERSETTER(float, X, x) - GETTERSETTER(float, Y, y) - GETTERSETTER(float, Width, width) - GETTERSETTER(float, Height, height) - - Rectangle& operator=(const ::Rectangle& rect) { - set(rect); - return *this; - } - - ::Vector4 ToVector4() { return {x, y, width, height}; } - - explicit operator ::Vector4() const { return {x, y, width, height}; } - - /** - * Draw a color-filled rectangle - */ - void Draw(::Color color) const { ::DrawRectangleRec(*this, color); } - - void Draw(::Vector2 origin, float rotation, ::Color color) const { - ::DrawRectanglePro(*this, origin, rotation, color); - } - - void DrawGradientV(::Color color1, ::Color color2) const { - ::DrawRectangleGradientV( - static_cast(x), - static_cast(y), - static_cast(width), - static_cast(height), - color1, - color2); - } - - void DrawGradientH(::Color color1, ::Color color2) const { - ::DrawRectangleGradientH( - static_cast(x), - static_cast(y), - static_cast(width), - static_cast(height), - color1, - color2); - } - - void DrawGradient(::Color topLeft, ::Color bottomLeft, ::Color topRight, ::Color bottomRight) const { - ::DrawRectangleGradientEx(*this, topLeft, bottomLeft, topRight, bottomRight); - } - - void DrawLines(::Color color) const { - ::DrawRectangleLines( - static_cast(x), - static_cast(y), - static_cast(width), - static_cast(height), - color); - } - - void DrawLines(::Color color, float lineThick) const { ::DrawRectangleLinesEx(*this, lineThick, color); } - - void DrawRounded(float roundness, int segments, ::Color color) const { - ::DrawRectangleRounded(*this, roundness, segments, color); - } - - void DrawRoundedLines(float roundness, int segments, ::Color color) const { - ::DrawRectangleRoundedLines(*this, roundness, segments, color); - } - - void DrawRoundedLines(float roundness, int segments, float lineThick, ::Color color) const { - DrawRectangleRoundedLinesEx(*this, roundness, segments, lineThick, color); - } - - /** - * Check collision between two rectangles - */ - [[nodiscard]] bool CheckCollision(::Rectangle rec2) const { return ::CheckCollisionRecs(*this, rec2); } - - /** - * Get collision rectangle for two rectangles collision - */ - [[nodiscard]] ::Rectangle GetCollision(::Rectangle rec2) const { return ::GetCollisionRec(*this, rec2); } - - /** - * Check if point is inside rectangle - */ - [[nodiscard]] bool CheckCollision(::Vector2 point) const { return ::CheckCollisionPointRec(point, *this); } - - /** - * Check collision between circle and rectangle - */ - [[nodiscard]] bool CheckCollision(::Vector2 center, float radius) const { - return ::CheckCollisionCircleRec(center, radius, *this); - } - - [[nodiscard]] Vector2 GetSize() const { return {width, height}; } - - Rectangle& SetSize(float newWidth, float newHeight) { - width = newWidth; - height = newHeight; - return *this; - } - - Rectangle& SetSize(const ::Vector2& size) { return SetSize(size.x, size.y); } - - Rectangle& SetShapesTexture(const ::Texture2D& texture) { - ::SetShapesTexture(texture, *this); - return *this; - } - - [[nodiscard]] Vector2 GetPosition() const { return {x, y}; } - - Rectangle& SetPosition(float newX, float newY) { - x = newX; - y = newY; - return *this; - } - - Rectangle& SetPosition(const ::Vector2& position) { return SetPosition(position.x, position.y); } -protected: - void set(const ::Rectangle& rect) { - x = rect.x; - y = rect.y; - width = rect.width; - height = rect.height; - } -}; -} // namespace raylib - -using RRectangle = raylib::Rectangle; - -#endif // RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_ diff --git a/include/RenderTexture.hpp b/include/RenderTexture.hpp deleted file mode 100644 index 473d9b99..00000000 --- a/include/RenderTexture.hpp +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_ -#define RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_ - -#include "./TextureUnmanaged.hpp" -#include "./raylib-cpp-utils.hpp" - -namespace raylib { -/** - * RenderTexture type, for texture rendering - */ -class RenderTexture : public ::RenderTexture { -public: - /** - * Default constructor to build an empty RenderTexture. - */ - RenderTexture() = default; - - RenderTexture(const ::RenderTexture& renderTexture) - : ::RenderTexture(renderTexture) { - // Nothing. - } - - RenderTexture(unsigned int id, const ::Texture& texture, const ::Texture& depth) - : ::RenderTexture{id, texture, depth} {} - - /** - * Load texture for rendering (framebuffer) - */ - RenderTexture(int width, int height) - : ::RenderTexture(::LoadRenderTexture(width, height)) { - // Nothing. - } - - RenderTexture(const RenderTexture&) = delete; - - RenderTexture(RenderTexture&& other) noexcept - { - set(other); - - other.id = 0; - other.texture = {}; - other.depth = {}; - } - - GETTER(unsigned int, Id, id) - - /** - * Get the color buffer attachment texture. - */ - TextureUnmanaged GetTexture() { return texture; } - - void SetTexture(const ::Texture& newTexture) { texture = newTexture; } - - /** - * Depth buffer attachment texture - */ - TextureUnmanaged GetDepth() { return depth; } - - void SetDepth(const ::Texture& newDepth) { depth = newDepth; } - - RenderTexture& operator=(const ::RenderTexture& texture) { - set(texture); - return *this; - } - - RenderTexture& operator=(const RenderTexture&) = delete; - - RenderTexture& operator=(RenderTexture&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.id = 0; - other.texture = {}; - other.depth = {}; - - return *this; - } - - ~RenderTexture() { Unload(); } - - void Unload() { UnloadRenderTexture(*this); } - - /** - * Initializes render texture for drawing - */ - RenderTexture& BeginMode() { - ::BeginTextureMode(*this); - return *this; - } - - /** - * Ends drawing to render texture - */ - RenderTexture& EndMode() { - ::EndTextureMode(); - return *this; - } - - /** - * Load texture for rendering (framebuffer) - */ - static RenderTexture Load(int width, int height) { return ::LoadRenderTexture(width, height); } - - /** - * Retrieves whether or not the render texture is ready. - */ - [[nodiscard]] bool IsValid() const { return ::IsRenderTextureValid(*this); } -protected: - void set(const ::RenderTexture& renderTexture) { - id = renderTexture.id; - texture = renderTexture.texture; - depth = renderTexture.depth; - } -}; - -using RenderTexture2D = RenderTexture; - -} // namespace raylib - -using RRenderTexture = raylib::RenderTexture; -using RRenderTexture2D = raylib::RenderTexture2D; - -#endif // RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_ diff --git a/include/Shader.hpp b/include/Shader.hpp deleted file mode 100644 index 2c2c9fce..00000000 --- a/include/Shader.hpp +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_SHADER_HPP_ -#define RAYLIB_CPP_INCLUDE_SHADER_HPP_ - -#include - -#include "ShaderUnmanaged.hpp" -#include "Texture.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Shader type (generic) - */ -class Shader : public ShaderUnmanaged { -public: - using ShaderUnmanaged::ShaderUnmanaged; - - Shader(const Shader&) = delete; - - Shader(Shader&& other) noexcept { - set(other); - - other.id = 0; - other.locs = nullptr; - } - - Shader& operator=(const Shader&) = delete; - - Shader& operator=(Shader&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.id = 0; - other.locs = nullptr; - - return *this; - } - - /** - * Unload shader from GPU memory (VRAM) - */ - ~Shader() { Unload(); } - - /** - * Unload shader from GPU memory (VRAM) - */ - void Unload() { - if (locs != nullptr) { - ::UnloadShader(*this); - } - } -}; -} // namespace raylib - -using RShader = raylib::Shader; - -#endif // RAYLIB_CPP_INCLUDE_SHADER_HPP_ diff --git a/include/ShaderUnmanaged.hpp b/include/ShaderUnmanaged.hpp deleted file mode 100644 index e9a3344a..00000000 --- a/include/ShaderUnmanaged.hpp +++ /dev/null @@ -1,146 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_UNMANAGEDSHADER_HPP_ -#define RAYLIB_CPP_INCLUDE_UNMANAGEDSHADER_HPP_ - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -#include -#include - -namespace raylib { - -/** - * Shader type (generic), not managed by C++ RAII. - */ -class ShaderUnmanaged : public ::Shader { -public: - ShaderUnmanaged() : ::Shader{rlGetShaderIdDefault(), rlGetShaderLocsDefault()} {} - - ShaderUnmanaged(const ::Shader& shader) : ::Shader(shader) { } - - ShaderUnmanaged(unsigned int id, int* locs = nullptr) : ::Shader{id, locs} {} - - ShaderUnmanaged(const std::string& vsFileName, const std::string& fsFileName) { - set(::LoadShader(vsFileName.c_str(), fsFileName.c_str())); - } - ShaderUnmanaged(const char* vsFileName, const char* fsFileName) { set(::LoadShader(vsFileName, fsFileName)); } - - /** - * Load shader from files and bind default locations. - * - * @see ::LoadShader - */ - static ::Shader Load(const std::string& vsFileName, const std::string& fsFileName) { - return ::LoadShader(vsFileName.c_str(), fsFileName.c_str()); - } - static ::Shader Load(const char* vsFileName, const char* fsFileName) { - return ::LoadShader(vsFileName, fsFileName); - } - - /** - * Load a shader from memory. - * - * @see ::LoadShaderFromMemory - */ - static ::Shader LoadFromMemory(const std::string& vsCode, const std::string& fsCode) { - return ::LoadShaderFromMemory(vsCode.c_str(), fsCode.c_str()); - } - static ::Shader LoadFromMemory(const char* vsCode, const char* fsCode) { - return ::LoadShaderFromMemory(vsCode, fsCode); - } - - GETTER(unsigned int, Id, id) - GETTER(int*, Locs, locs) - - ShaderUnmanaged& operator=(const ::Shader& shader) { - set(shader); - return *this; - } - - /** - * Begin custom shader drawing. - */ - ShaderUnmanaged& BeginMode() { - ::BeginShaderMode(*this); - return *this; - } - - /** - * End custom shader drawing (use default shader). - */ - ShaderUnmanaged& EndMode() { - ::EndShaderMode(); - return *this; - } - - /** - * Get shader uniform location - * - * @see GetShaderLocation() - */ - [[nodiscard]] int GetLocation(const std::string& uniformName) const { return ::GetShaderLocation(*this, uniformName.c_str()); } - - /** - * Get shader attribute location - * - * @see GetShaderLocationAttrib() - */ - [[nodiscard]] int GetLocationAttrib(const std::string& attribName) const { - return ::GetShaderLocationAttrib(*this, attribName.c_str()); - } - - /** - * Set shader uniform value - * - * @see SetShaderValue() - */ - ShaderUnmanaged& SetValue(int uniformLoc, const void* value, int uniformType) { - ::SetShaderValue(*this, uniformLoc, value, uniformType); - return *this; - } - - /** - * Set shader uniform value vector - * - * @see SetShaderValueV() - */ - ShaderUnmanaged& SetValue(int uniformLoc, const void* value, int uniformType, int count) { - ::SetShaderValueV(*this, uniformLoc, value, uniformType, count); - return *this; - } - - /** - * Set shader uniform value (matrix 4x4) - * - * @see SetShaderValueMatrix() - */ - ShaderUnmanaged& SetValue(int uniformLoc, const ::Matrix& mat) { - ::SetShaderValueMatrix(*this, uniformLoc, mat); - return *this; - } - - /** - * Set shader uniform value for texture - * - * @see SetShaderValueTexture() - */ - ShaderUnmanaged& SetValue(int uniformLoc, const ::Texture2D& texture) { - ::SetShaderValueTexture(*this, uniformLoc, texture); - return *this; - } - - /** - * Retrieves whether or not the shader is ready. - */ - [[nodiscard]] bool IsValid() const { return ::IsShaderValid(*this); } -protected: - void set(const ::Shader& shader) { - id = shader.id; - locs = shader.locs; - } -}; -} // namespace raylib - -using RShaderUnmanaged = raylib::ShaderUnmanaged; - -#endif // RAYLIB_CPP_INCLUDE_UNMANAGEDSHADER_HPP_ diff --git a/include/Sound.hpp b/include/Sound.hpp deleted file mode 100644 index e1cce60a..00000000 --- a/include/Sound.hpp +++ /dev/null @@ -1,200 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_SOUND_HPP_ -#define RAYLIB_CPP_INCLUDE_SOUND_HPP_ - -#include - -#include "./RaylibException.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Wave/Sound management functions - * - * @code - * raylib::Sound boom("boom.wav"); - * boom.Play(); - * @endcode - */ -class Sound : public ::Sound { -public: - Sound(const Sound&) = delete; - Sound& operator=(const Sound&) = delete; - - Sound() { - stream = {nullptr, nullptr, 0, 0, 0}; - frameCount = 0; - } - - Sound(::AudioStream stream, unsigned int frameCount) : ::Sound{stream, frameCount} { - // Nothing. - } - - Sound(Sound&& other) noexcept { - set(other); - - other.stream = {nullptr, nullptr, 0, 0, 0}; - other.frameCount = 0; - } - - /** - * Loads a sound from the given file. - * - * @throws raylib::RaylibException Throws if the Sound failed to load. - */ - Sound(const std::string& fileName) { Load(fileName); } - - /** - * Loads a sound from the given Wave. - * - * @throws raylib::RaylibException Throws if the Sound failed to load. - */ - Sound(const ::Wave& wave) { Load(wave); } - - ~Sound() { Unload(); } - - GETTER(unsigned int, FrameCount, frameCount) - GETTER(::AudioStream, Stream, stream) - - Sound& operator=(Sound&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - other.frameCount = 0; - other.stream = {nullptr, nullptr, 0, 0, 0}; - - return *this; - } - - /** - * Update sound buffer with new data - */ - Sound& Update(const void* data, int samplesCount) { - ::UpdateSound(*this, data, samplesCount); - return *this; - } - - /** - * Update sound buffer with new data, assuming it's the same sample count. - */ - Sound& Update(const void* data) { - ::UpdateSound(*this, data, static_cast(frameCount)); - return *this; - } - - /** - * Unload sound - */ - void Unload() { - // Protect against calling UnloadSound() twice. - if (frameCount != 0) { - ::UnloadSound(*this); - frameCount = 0; - } - } - - /** - * Play a sound - */ - Sound& Play() { - ::PlaySound(*this); - return *this; - } - - /** - * Stop playing a sound - */ - Sound& Stop() { - ::StopSound(*this); - return *this; - } - - /** - * Pause a sound - */ - Sound& Pause() { - ::PauseSound(*this); - return *this; - } - - /** - * Resume a paused sound - */ - Sound& Resume() { - ::ResumeSound(*this); - return *this; - } - - /** - * Check if a sound is currently playing - */ - [[nodiscard]] bool IsPlaying() const { return ::IsSoundPlaying(*this); } - - /** - * Set volume for a sound (1.0 is max level) - */ - Sound& SetVolume(float volume) { - ::SetSoundVolume(*this, volume); - return *this; - } - - /** - * Set pitch for a sound (1.0 is base level) - */ - Sound& SetPitch(float pitch) { - ::SetSoundPitch(*this, pitch); - return *this; - } - - /** - * Set pan for a sound (0.5 is center) - */ - Sound& SetPan(float pan = 0.5f) { - ::SetSoundPan(*this, pan); - return *this; - } - - /** - * Load a sound from the given file. - * - * @throws raylib::RaylibException Throws if the Sound failed to load. - */ - void Load(const std::string& fileName) { - set(::LoadSound(fileName.c_str())); - if (!IsValid()) { - throw RaylibException("Failed to load Sound from file"); - } - } - - /** - * Loads the given Wave object into the Sound. - * - * @throws raylib::RaylibException Throws if the Sound failed to load. - */ - void Load(const ::Wave& wave) { - set(::LoadSoundFromWave(wave)); - if (!IsValid()) { - throw RaylibException("Failed to load Wave"); - } - } - - /** - * Retrieve whether or not the Sound buffer is loaded. - * - * @return True or false depending on whether the Sound buffer is loaded. - */ - [[nodiscard]] bool IsValid() const { return ::IsSoundValid(*this); } -protected: - void set(const ::Sound& sound) { - frameCount = sound.frameCount; - stream = sound.stream; - } -}; -} // namespace raylib - -using RSound = raylib::Sound; - -#endif // RAYLIB_CPP_INCLUDE_SOUND_HPP_ diff --git a/include/Text.hpp b/include/Text.hpp deleted file mode 100644 index 6a2100b7..00000000 --- a/include/Text.hpp +++ /dev/null @@ -1,199 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_TEXT_HPP_ -#define RAYLIB_CPP_INCLUDE_TEXT_HPP_ - -#include - -#include "./RaylibException.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Text Functions. - */ -class Text { -public: - /** - * The internal text. - */ - std::string text; - - /** - * The size of the text. - */ - float fontSize; - - /** - * The color of the text. - */ - ::Color color; - - /** - * The internal raylib font to use for the text. - */ - ::Font font; - - /** - * The character spacing for the text. - */ - float spacing; - - /** - * Initializes a new Text object. - * - * @param text Text to initialize. - * @param fontSize The size of the text. - * @param color The color of the font. - * @param font Font to initialize. - * @param spacing The spacing of the text. - */ - Text( - const std::string& text = "", - float fontSize = 10, - const ::Color& color = WHITE, - const ::Font& font = ::GetFontDefault(), - float spacing = 0) - : text(text) - , fontSize(fontSize) - , color(color) - , font(font) - , spacing(spacing) { - // Nothing. - } - - /** - * Initializes a new Text object with a custom font. - * - * @param font Font to initialize. - * @param text Text to initialize. - * @param fontSize The size of the text. - * @param spacing The spacing of the text. - * @param color The color of the font. - */ - Text( - const ::Font& font, - const std::string& text = "", - float fontSize = 10, - float spacing = 0, - const ::Color& color = WHITE) - : text(text) - , fontSize(fontSize) - , color(color) - , font(font) - , spacing(spacing) { - // Nothing. - } - - GETTERSETTER(const std::string&, Text, text) - GETTERSETTER(float, FontSize, fontSize) - GETTERSETTER(::Font, Font, font) - GETTERSETTER(::Color, Color, color) - GETTERSETTER(float, Spacing, spacing) - - /** - * Draw text with values in class. - */ - void Draw(const ::Vector2& position) const { ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, color); } - - /** - * Draw text with values in class. - */ - void Draw(int posX, int posY) const { - ::DrawTextEx( - font, - text.c_str(), - {static_cast(posX), static_cast(posY)}, - fontSize, - spacing, - color); - } - - /** - * Draw text using Font and pro parameters (rotation). - * - * @see DrawTextPro() - */ - void Draw(const ::Vector2& position, float rotation, const ::Vector2& origin = {0, 0}) const { - ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, color); - } - - /** - * Measure string width for default font - */ - [[nodiscard]] int Measure() const { return ::MeasureText(text.c_str(), static_cast(fontSize)); } - - /** - * Measure string size for Font - */ - [[nodiscard]] Vector2 MeasureEx() const { return ::MeasureTextEx(font, text.c_str(), fontSize, spacing); } - - Text& operator=(const Text& other) { - if (this == &other) { - return *this; - } - - text = other.text; - fontSize = other.fontSize; - color = other.color; - font = other.font; - spacing = other.spacing; - - return *this; - } - - /** - * Draw text using font and color - * - * @see ::DrawText - */ - static void - Draw(const std::string& text, const int posX, const int posY, const int fontSize, const ::Color& color) { - ::DrawText(text.c_str(), posX, posY, fontSize, color); - } - - /** - * Draw text using font and color, with position defined as Vector2 - * - * @see ::DrawText - */ - static void Draw(const std::string& text, const ::Vector2& pos, const int fontSize, const ::Color& color) { - ::DrawText(text.c_str(), static_cast(pos.x), static_cast(pos.y), fontSize, color); - } - - /** - * Draw text using font, color, position, font size and spacing - * - * @see ::DrawTextEx - */ - static void Draw( - const ::Font& font, - const std::string& text, - const ::Vector2& position, - const float fontSize, - const float spacing, - const ::Color& color) { - ::DrawTextEx(font, text.c_str(), position, fontSize, spacing, color); - } - - /** - * Draw text using font, color, position, origin, font size and spacing - * - * @see ::DrawTextPro - */ - static void Draw( - const ::Font& font, - const std::string& text, - const ::Vector2& position, - const ::Vector2& origin, - const float rotation, - const float fontSize, - const float spacing, - const ::Color& color) { - ::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, color); - } -}; -} // namespace raylib - -using RText = raylib::Text; - -#endif // RAYLIB_CPP_INCLUDE_TEXT_HPP_ diff --git a/include/Texture.hpp b/include/Texture.hpp deleted file mode 100644 index 1de51892..00000000 --- a/include/Texture.hpp +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_TEXTURE_HPP_ -#define RAYLIB_CPP_INCLUDE_TEXTURE_HPP_ - -#include "./TextureUnmanaged.hpp" - -namespace raylib { -/** - * Texture type - * - * The texture will be unloaded on object destruction. Use raylib::TextureUnmanaged if you're looking to not unload. - * - * @see raylib::TextureUnmanaged - */ -class Texture : public TextureUnmanaged { -public: - using TextureUnmanaged::TextureUnmanaged; - - /** - * Explicitly forbid the copy constructor. - */ - Texture(const Texture&) = delete; - - /** - * Explicitly forbid copy assignment. - */ - Texture& operator=(const Texture&) = delete; - - /** - * Move constructor. - */ - Texture(Texture&& other) noexcept { - set(other); - - other.id = 0; - other.width = 0; - other.height = 0; - other.mipmaps = 0; - other.format = 0; - } - - /** - * On destruction, unload the Texture. - */ - ~Texture() { Unload(); } - - /** - * Move assignment. - */ - Texture& operator=(Texture&& other) noexcept { - if (this == &other) { - return *this; - } - - Unload(); - set(other); - - other.id = 0; - other.width = 0; - other.height = 0; - other.mipmaps = 0; - other.format = 0; - - return *this; - } -}; - -// Create the Texture aliases. -using Texture2D = Texture; -using TextureCubemap = Texture; - -} // namespace raylib - -using RTexture = raylib::Texture; -using RTexture2D = raylib::Texture2D; -using RTextureCubemap = raylib::TextureCubemap; - -#endif // RAYLIB_CPP_INCLUDE_TEXTURE_HPP_ diff --git a/include/TextureUnmanaged.hpp b/include/TextureUnmanaged.hpp deleted file mode 100644 index fa65431f..00000000 --- a/include/TextureUnmanaged.hpp +++ /dev/null @@ -1,343 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_TEXTUREUNMANAGED_HPP_ -#define RAYLIB_CPP_INCLUDE_TEXTUREUNMANAGED_HPP_ - -#include - -#include "./Image.hpp" -#include "./Material.hpp" -#include "./RaylibException.hpp" -#include "./Vector2.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * A Texture that is not managed by C++ RAII. - * - * Make sure to Unload() this if needed, otherwise use raylib::Texture. - * - * @see raylib::Texture - */ -class TextureUnmanaged : public ::Texture { -public: - /** - * Default texture constructor. - */ - TextureUnmanaged() : ::Texture{0, 0, 0, 0, 0} { - // Nothing. - } - - /** - * Move/Create a texture structure manually. - */ - TextureUnmanaged( - unsigned int id, - int width, - int height, - int mipmaps = 1, - int format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8) - : ::Texture{id, width, height, mipmaps, format} { - // Nothing. - } - - /** - * Creates a texture object based on the given Texture struct data. - */ - TextureUnmanaged(const ::Texture& texture) - : ::Texture{texture.id, texture.width, texture.height, texture.mipmaps, texture.format} { - // Nothing. - } - - /** - * Creates a texture from the given Image. - * - * @throws raylib::RaylibException Throws if failed to create the texture from the given image. - */ - TextureUnmanaged(const ::Image& image) { Load(image); } - - /** - * Load cubemap from image, multiple image cubemap layouts supported. - * - * @throws raylib::RaylibException Throws if failed to create the texture from the given cubemap. - * - * @see LoadTextureCubemap() - */ - TextureUnmanaged(const ::Image& image, int layout) { Load(image, layout); } - - /** - * Load texture from file into GPU memory (VRAM) - * - * @throws raylib::RaylibException Throws if failed to create the texture from the given file. - */ - TextureUnmanaged(const std::string& fileName) { Load(fileName); } - - TextureUnmanaged(::Texture&& other) : ::Texture{other.id, other.width, other.height, other.mipmaps, other.format} { - // Nothing. - } - - GETTER(unsigned int, Id, id) - GETTER(int, Width, width) - GETTER(int, Height, height) - GETTER(int, Mipmaps, mipmaps) - GETTER(int, Format, format) - - TextureUnmanaged& operator=(const ::Texture& texture) { - set(texture); - return *this; - } - - /** - * Retrieve the width and height of the texture. - */ - [[nodiscard]] Vector2 GetSize() const { return {static_cast(width), static_cast(height)}; } - - /** - * Load texture from image data - */ - void Load(const ::Image& image) { - set(::LoadTextureFromImage(image)); - if (!IsValid()) { - throw RaylibException("Failed to load Texture from Image"); - } - } - - /** - * Load cubemap from image, multiple image cubemap layouts supported - */ - void Load(const ::Image& image, int layoutType) { - set(::LoadTextureCubemap(image, layoutType)); - if (!IsValid()) { - throw RaylibException("Failed to load Texture from Cubemap"); - } - } - - /** - * Load texture from file into GPU memory (VRAM) - */ - void Load(const std::string& fileName) { - set(::LoadTexture(fileName.c_str())); - if (!IsValid()) { - throw RaylibException("Failed to load Texture from file: " + fileName); - } - } - - /** - * Unload texture from GPU memory (VRAM) - */ - void Unload() { - // Protect against calling UnloadTexture() twice. - if (id != 0) { - ::UnloadTexture(*this); - id = 0; - } - } - - /** - * Update GPU texture with new data - */ - TextureUnmanaged& Update(const void* pixels) { - ::UpdateTexture(*this, pixels); - return *this; - } - - /** - * Update GPU texture rectangle with new data - */ - TextureUnmanaged& Update(::Rectangle rec, const void* pixels) { - UpdateTextureRec(*this, rec, pixels); - return *this; - } - - /** - * Get pixel data from GPU texture and return an Image - */ - [[nodiscard]] ::Image GetData() const { return ::LoadImageFromTexture(*this); } - - /** - * Get pixel data from GPU texture and return an Image - */ - operator Image() { return GetData(); } - - /** - * Generate GPU mipmaps for a texture - */ - TextureUnmanaged& GenMipmaps() { - ::GenTextureMipmaps(this); - return *this; - } - - /** - * Set texture scaling filter mode - */ - TextureUnmanaged& SetFilter(int filterMode) { - ::SetTextureFilter(*this, filterMode); - return *this; - } - - /** - * Set texture wrapping mode - */ - TextureUnmanaged& SetWrap(int wrapMode) { - ::SetTextureWrap(*this, wrapMode); - return *this; - } - - /** - * Draw a Texture2D - * - * @see ::DrawTexture() - */ - void Draw(int posX = 0, int posY = 0, ::Color tint = {255, 255, 255, 255}) const { - ::DrawTexture(*this, posX, posY, tint); - } - - /** - * Draw a Texture2D with position defined as Vector2 - * - * @see ::DrawTextureV() - */ - void Draw(::Vector2 position, ::Color tint = {255, 255, 255, 255}) const { ::DrawTextureV(*this, position, tint); } - - /** - * Draw a Texture2D with extended parameters - * - * @see ::DrawTextureEx() - */ - void Draw(::Vector2 position, float rotation, float scale = 1.0f, ::Color tint = {255, 255, 255, 255}) const { - ::DrawTextureEx(*this, position, rotation, scale, tint); - } - - /** - * Draw a part of a texture defined by a rectangle - * - * @see ::DrawTextureRec() - */ - void Draw(::Rectangle sourceRec, ::Vector2 position = {0, 0}, ::Color tint = {255, 255, 255, 255}) const { - ::DrawTextureRec(*this, sourceRec, position, tint); - } - - /** - * Draw a part of a texture defined by a rectangle with 'pro' parameters - * - * @see ::DrawTexturePro() - */ - void Draw( - ::Rectangle sourceRec, - ::Rectangle destRec, - ::Vector2 origin = {0, 0}, - float rotation = 0, - ::Color tint = {255, 255, 255, 255}) const { - ::DrawTexturePro(*this, sourceRec, destRec, origin, rotation, tint); - } - - /** - * Draws a texture (or part of it) that stretches or shrinks nicely - * - * @see ::DrawTextureNPatch() - */ - void Draw( - ::NPatchInfo nPatchInfo, - ::Rectangle destRec, - ::Vector2 origin = {0, 0}, - float rotation = 0, - ::Color tint = {255, 255, 255, 255}) const { - ::DrawTextureNPatch(*this, nPatchInfo, destRec, origin, rotation, tint); - } - - /** - * Draw a billboard texture - * - * @see ::DrawBillboard() - */ - void - DrawBillboard(const ::Camera& camera, ::Vector3 position, float size, ::Color tint = {255, 255, 255, 255}) const { - ::DrawBillboard(camera, *this, position, size, tint); - } - - /** - * Draw a billboard texture defined by source - * - * @see ::DrawBillboardRec() - */ - void DrawBillboard( - const ::Camera& camera, - ::Rectangle source, - ::Vector3 position, - ::Vector2 size, - ::Color tint = {255, 255, 255, 255}) const { - DrawBillboardRec(camera, *this, source, position, size, tint); - } - - /** - * Draw a billboard texture defined by source and rotation - * - * @see ::DrawBillboardPro() - */ - void DrawBillboard( - const ::Camera& camera, - ::Rectangle source, - Vector3 position, - ::Vector3 up, - Vector2 size, - Vector2 origin, - float rotation = 0.0f, - ::Color tint = {255, 255, 255, 255}) const { - DrawBillboardPro(camera, *this, source, position, up, size, origin, rotation, tint); - } - - /** - * Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...) - */ - TextureUnmanaged& SetMaterial(::Material* material, int mapType = MATERIAL_MAP_NORMAL) { - ::SetMaterialTexture(material, mapType, *this); - return *this; - } - - TextureUnmanaged& SetMaterial(const ::Material& material, int mapType = MATERIAL_MAP_NORMAL) { - ::SetMaterialTexture(const_cast<::Material*>(&material), mapType, *this); - return *this; - } - - /** - * Set texture and rectangle to be used on shapes drawing. - */ - TextureUnmanaged& SetShapes(const ::Rectangle& source) { - ::SetShapesTexture(*this, source); - return *this; - } - - /** - * Set shader uniform value for texture (sampler2d) - */ - TextureUnmanaged& SetShaderValue(const ::Shader& shader, int locIndex) { - ::SetShaderValueTexture(shader, locIndex, *this); - return *this; - } - - /** - * Determines whether or not the Texture has been loaded and is ready. - * - * @return True or false depending on whether the Texture has data. - */ - [[nodiscard]] bool IsValid() const { return IsTextureValid(*this); } -protected: - void set(const ::Texture& texture) { - id = texture.id; - width = texture.width; - height = texture.height; - mipmaps = texture.mipmaps; - format = texture.format; - } -}; - -// Create the TextureUnmanaged aliases. -using Texture2DUnmanaged = TextureUnmanaged; -using TextureCubemapUnmanaged = TextureUnmanaged; - -} // namespace raylib - -using RTextureUnmanaged = raylib::TextureUnmanaged; -using RTexture2DUnmanaged = raylib::Texture2DUnmanaged; -using RTextureCubemapUnmanaged = raylib::TextureCubemapUnmanaged; - -#endif // RAYLIB_CPP_INCLUDE_TEXTUREUNMANAGED_HPP_ diff --git a/include/Touch.hpp b/include/Touch.hpp deleted file mode 100644 index 86326d96..00000000 --- a/include/Touch.hpp +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_TOUCH_HPP_ -#define RAYLIB_CPP_INCLUDE_TOUCH_HPP_ - -#include "./Functions.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Input-related functions: touch - */ -namespace Touch { -/** - * Get touch position X for touch point 0 (relative to screen size) - */ -[[maybe_unused]] RLCPPAPI inline int GetX() { - return ::GetTouchX(); -} - -/** - * Get touch position Y for touch point 0 (relative to screen size) - */ -[[maybe_unused]] RLCPPAPI inline int GetY() { - return ::GetTouchY(); -} - -/** - * Get touch position XY for a touch point index (relative to screen size) - */ -[[maybe_unused]] RLCPPAPI inline Vector2 GetPosition(int index) { - return ::GetTouchPosition(index); -} - -/** - * Get touch point identifier for given index - */ -[[maybe_unused]] RLCPPAPI inline int GetPointId(int index) { - return ::GetTouchPointId(index); -} - -/** - * Get number of touch points - */ -[[maybe_unused]] RLCPPAPI inline int GetPointCount() { - return ::GetTouchPointCount(); -} -} // namespace Touch -} // namespace raylib - -namespace RTouch = raylib::Touch; - -#endif // RAYLIB_CPP_INCLUDE_TOUCH_HPP_ diff --git a/include/Vector2.hpp b/include/Vector2.hpp deleted file mode 100644 index bcbb8387..00000000 --- a/include/Vector2.hpp +++ /dev/null @@ -1,398 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_VECTOR2_HPP_ -#define RAYLIB_CPP_INCLUDE_VECTOR2_HPP_ - -#ifndef RAYLIB_CPP_NO_MATH -#include -#endif - -#include - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" -#include "./raymath.hpp" - -namespace raylib { -/** - * Vector2 type - */ -class Vector2 : public ::Vector2 { -public: - Vector2(const ::Vector2& vec) : ::Vector2{vec.x, vec.y} {} - - Vector2(float x, float y) : ::Vector2{x, y} {} - Vector2(float x) : ::Vector2{x, 0} {} - Vector2() : ::Vector2{0, 0} {} - - GETTERSETTER(float, X, x) - GETTERSETTER(float, Y, y) - - /** - * Set the Vector2 to the same as the given Vector2. - */ - Vector2& operator=(const ::Vector2& vector2) { - set(vector2); - return *this; - } - - /** - * Determine whether or not the vectors are equal. - */ - bool operator==(const ::Vector2& other) const { return x == other.x && y == other.y; } - - /** - * Determines if the vectors are not equal. - */ - bool operator!=(const ::Vector2& other) const { return !(*this == other); } - - [[nodiscard]] std::string ToString() const { return TextFormat("Vector2(%f, %f)", x, y); } - - operator std::string() const { return ToString(); } - -#ifndef RAYLIB_CPP_NO_MATH - /** - * Add two vectors (v1 + v2) - */ - Vector2 Add(const ::Vector2& vector2) const { return Vector2Add(*this, vector2); } - - /** - * Add two vectors (v1 + v2) - */ - Vector2 operator+(const ::Vector2& vector2) const { return Vector2Add(*this, vector2); } - - /** - * Add two vectors (v1 + v2) - */ - Vector2& operator+=(const ::Vector2& vector2) { - set(Vector2Add(*this, vector2)); - - return *this; - } - - /** - * Add vector and float value - */ - Vector2 Add(float value) const { - return Vector2AddValue(*this, value); - } - - /** - * Add vector and float value - */ - Vector2 operator+(float value) const { - return Vector2AddValue(*this, value); - } - - /** - * Add vector and float value - */ - Vector2& operator+=(float value) { - set(Vector2AddValue(*this, value)); - - return *this; - } - - /** - * Subtract two vectors (v1 - v2) - */ - [[nodiscard]] Vector2 Subtract(const ::Vector2& vector2) const { return Vector2Subtract(*this, vector2); } - - /** - * Subtract two vectors (v1 - v2) - */ - Vector2 operator-(const ::Vector2& vector2) const { return Vector2Subtract(*this, vector2); } - - /** - * Subtract two vectors (v1 - v2) - */ - Vector2& operator-=(const ::Vector2& vector2) { - set(Vector2Subtract(*this, vector2)); - - return *this; - } - - /** - * Subtract vector by float value - */ - [[nodiscard]] Vector2 Subtract(float value) const { - return Vector2SubtractValue(*this, value); - } - - /** - * Subtract vector by float value - */ - Vector2 operator-(float value) const { - return Vector2SubtractValue(*this, value); - } - - /** - * Subtract vector by float value - */ - Vector2& operator-=(float value) { - set(Vector2SubtractValue(*this, value)); - - return *this; - } - - /** - * Negate vector - */ - [[nodiscard]] Vector2 Negate() const { return Vector2Negate(*this); } - - /** - * Negate vector - */ - Vector2 operator-() const { return Vector2Negate(*this); } - - /** - * Multiply vector by vector - */ - [[nodiscard]] Vector2 Multiply(const ::Vector2& vector2) const { return Vector2Multiply(*this, vector2); } - - /** - * Multiply vector by vector - */ - Vector2 operator*(const ::Vector2& vector2) const { return Vector2Multiply(*this, vector2); } - - /** - * Multiply vector by vector - */ - Vector2& operator*=(const ::Vector2& vector2) { - set(Vector2Multiply(*this, vector2)); - - return *this; - } - - /** - * Scale vector (multiply by value) - */ - [[nodiscard]] Vector2 Scale(const float scale) const { return Vector2Scale(*this, scale); } - - /** - * Scale vector (multiply by value) - */ - Vector2 operator*(const float scale) const { return Vector2Scale(*this, scale); } - - /** - * Scale vector (multiply by value) - */ - Vector2& operator*=(const float scale) { - set(Vector2Scale(*this, scale)); - - return *this; - } - - /** - * Divide vector by vector - */ - [[nodiscard]] Vector2 Divide(const ::Vector2& vector2) const { return Vector2Divide(*this, vector2); } - - - /** - * Divide vector by vector - */ - Vector2 operator/(const ::Vector2& vector2) const { return Vector2Divide(*this, vector2); } - - /** - * Divide vector by vector - */ - Vector2& operator/=(const ::Vector2& vector2) { - set(Vector2Divide(*this, vector2)); - - return *this; - } - - /** - * Divide vector by value - */ - [[nodiscard]] Vector2 Divide(const float div) const { return ::Vector2{x / div, y / div}; } - - /** - * Divide vector by value - */ - Vector2 operator/(const float div) const { return Divide(div); } - - /** - * Divide vector by value - */ - Vector2& operator/=(const float div) { - this->x /= div; - this->y /= div; - - return *this; - } - - /** - * Normalize provided vector - */ - [[nodiscard]] Vector2 Normalize() const { return Vector2Normalize(*this); } - - /** - * Transforms a Vector2 by a given Matrix - */ - [[nodiscard]] Vector2 Transform(::Matrix mat) const { return ::Vector2Transform(*this, mat); } - - /** - * Calculate linear interpolation between two vectors - */ - [[nodiscard]] Vector2 Lerp(const ::Vector2& vector2, float amount) const { return Vector2Lerp(*this, vector2, amount); } - - /** - * Calculate reflected vector to normal - */ - [[nodiscard]] Vector2 Reflect(const ::Vector2& normal) const { return Vector2Reflect(*this, normal); } - - /** - * Rotate Vector by float in radians - */ - [[nodiscard]] Vector2 Rotate(float angle) const { return Vector2Rotate(*this, angle); } - - /** - * Move Vector towards target - */ - [[nodiscard]] Vector2 MoveTowards(const ::Vector2& target, float maxDistance) const { - return Vector2MoveTowards(*this, target, maxDistance); - } - - /** - * Invert the given vector - */ - [[nodiscard]] Vector2 Invert() const { return ::Vector2Invert(*this); } - - /** - * Clamp the components of the vector between - */ - [[nodiscard]] Vector2 Clamp(::Vector2 min, ::Vector2 max) const { return ::Vector2Clamp(*this, min, max); } - - /** - * // Clamp the magnitude of the vector between two min and max values - */ - [[nodiscard]] Vector2 Clamp(float min, float max) const { return ::Vector2ClampValue(*this, min, max); } - - /** - * Check whether two given vectors are almost equal - */ - [[nodiscard]] int Equals(::Vector2 q) const { return ::Vector2Equals(*this, q); } - - /** - * Calculate vector length - */ - [[nodiscard]] float Length() const { return Vector2Length(*this); } - - /** - * Calculate vector square length - */ - [[nodiscard]] float LengthSqr() const { return Vector2LengthSqr(*this); } - - /** - * Calculate two vectors dot product - */ - [[nodiscard]] float DotProduct(const ::Vector2& vector2) const { return Vector2DotProduct(*this, vector2); } - - /** - * Calculate distance between two vectors - */ - [[nodiscard]] float Distance(const ::Vector2& vector2) const { return Vector2Distance(*this, vector2); } - - /** - * Calculate square distance between two vectors - */ - [[nodiscard]] float DistanceSqr(::Vector2 v2) const { return ::Vector2DistanceSqr(*this, v2); } - - /** - * Calculate angle from two vectors in X-axis - */ - [[nodiscard]] float Angle(const ::Vector2& vector2) const { return Vector2Angle(*this, vector2); } - - /** - * Vector with components value 0.0f - */ - static Vector2 Zero() { return Vector2Zero(); } - - /** - * Vector with components value 1.0f - */ - static Vector2 One() { return Vector2One(); } -#endif - - void DrawPixel(::Color color = {0, 0, 0, 255}) const { ::DrawPixelV(*this, color); } - - void DrawLine(::Vector2 endPos, ::Color color = {0, 0, 0, 255}) const { ::DrawLineV(*this, endPos, color); } - - void DrawLine(::Vector2 endPos, float thick, ::Color color = {0, 0, 0, 255}) const { - ::DrawLineEx(*this, endPos, thick, color); - } - - void DrawLineBezier(::Vector2 endPos, float thick, ::Color color = {0, 0, 0, 255}) const { - ::DrawLineBezier(*this, endPos, thick, color); - } - - /** - * Draw a color-filled circle (Vector version) - */ - void DrawCircle(float radius, ::Color color = {0, 0, 0, 255}) const { ::DrawCircleV(*this, radius, color); } - - void DrawRectangle(::Vector2 size, ::Color color = {0, 0, 0, 255}) const { ::DrawRectangleV(*this, size, color); } - - void DrawPoly(int sides, float radius, float rotation, ::Color color = {0, 0, 0, 255}) const { - ::DrawPoly(*this, sides, radius, rotation, color); - } - - /** - * Check collision between two circles - */ - [[nodiscard]] bool CheckCollisionCircle(float radius1, ::Vector2 center2, float radius2) const { - return ::CheckCollisionCircles(*this, radius1, center2, radius2); - } - - /** - * Check collision between circle and rectangle - */ - [[nodiscard]] bool CheckCollisionCircle(float radius, ::Rectangle rec) const { - return ::CheckCollisionCircleRec(*this, radius, rec); - } - - /** - * Check if point is inside rectangle - */ - [[nodiscard]] bool CheckCollision(::Rectangle rec) const { return ::CheckCollisionPointRec(*this, rec); } - - /** - * Check if point is inside circle - */ - [[nodiscard]] bool CheckCollision(::Vector2 center, float radius) const { - return ::CheckCollisionPointCircle(*this, center, radius); - } - - /** - * Check if point is inside a triangle - */ - [[nodiscard]] bool CheckCollision(::Vector2 p1, ::Vector2 p2, ::Vector2 p3) const { - return ::CheckCollisionPointTriangle(*this, p1, p2, p3); - } - - /** - * Check the collision between two lines defined by two points each, returns collision point by reference - */ - bool - CheckCollisionLines(::Vector2 endPos1, ::Vector2 startPos2, ::Vector2 endPos2, ::Vector2* collisionPoint) const { - return ::CheckCollisionLines(*this, endPos1, startPos2, endPos2, collisionPoint); - } - - /** - * Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] - */ - [[nodiscard]] bool CheckCollisionPointLine(::Vector2 p1, ::Vector2 p2, int threshold = 1) const { - return ::CheckCollisionPointLine(*this, p1, p2, threshold); - } -protected: - void set(const ::Vector2& vec) { - x = vec.x; - y = vec.y; - } -}; - -} // namespace raylib - -using RVector2 = raylib::Vector2; - -#endif // RAYLIB_CPP_INCLUDE_VECTOR2_HPP_ diff --git a/include/Vector3.hpp b/include/Vector3.hpp deleted file mode 100644 index c4fbb8f3..00000000 --- a/include/Vector3.hpp +++ /dev/null @@ -1,315 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_VECTOR3_HPP_ -#define RAYLIB_CPP_INCLUDE_VECTOR3_HPP_ - -#ifndef RAYLIB_CPP_NO_MATH -#include -#endif - -#include - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" -#include "./raymath.hpp" - -namespace raylib { -/** - * Vector3 type - */ -class Vector3 : public ::Vector3 { -public: - Vector3(const ::Vector3& vec) : ::Vector3{vec.x, vec.y, vec.z} {} - - Vector3(float x, float y, float z) : ::Vector3{x, y, z} {} - Vector3(float x, float y) : ::Vector3{x, y, 0} {} - Vector3(float x) : ::Vector3{x, 0, 0} {} - Vector3() : ::Vector3{0, 0, 0} {} - - Vector3(::Color color) { set(ColorToHSV(color)); } - - GETTERSETTER(float, X, x) - GETTERSETTER(float, Y, y) - GETTERSETTER(float, Z, z) - - Vector3& operator=(const ::Vector3& vector3) { - set(vector3); - return *this; - } - - bool operator==(const ::Vector3& other) const { return x == other.x && y == other.y && z == other.z; } - - bool operator!=(const ::Vector3& other) const { return !(*this == other); } - - [[nodiscard]] std::string ToString() const { return TextFormat("Vector3(%f, %f, %f)", x, y, z); } - - operator std::string() const { return ToString(); } - -#ifndef RAYLIB_CPP_NO_MATH - /** - * Add two vectors - */ - [[nodiscard]] Vector3 Add(const ::Vector3& vector3) const { return Vector3Add(*this, vector3); } - - /** - * Add two vectors - */ - Vector3 operator+(const ::Vector3& vector3) const { return Vector3Add(*this, vector3); } - - Vector3& operator+=(const ::Vector3& vector3) { - set(Vector3Add(*this, vector3)); - - return *this; - } - - /** - * Add vector and float value - */ - [[nodiscard]] Vector3 Add(float value) const { - return Vector3AddValue(*this, value); - } - - /** - * Add vector and float value - */ - Vector3 operator+(float value) const { - return Vector3AddValue(*this, value); - } - - Vector3& operator+=(float value) { - set(Vector3AddValue(*this, value)); - - return *this; - } - - /** - * Subtract two vectors. - */ - [[nodiscard]] Vector3 Subtract(const ::Vector3& vector3) const { return Vector3Subtract(*this, vector3); } - - /** - * Subtract two vectors. - */ - Vector3 operator-(const ::Vector3& vector3) const { return Vector3Subtract(*this, vector3); } - - Vector3& operator-=(const ::Vector3& vector3) { - set(Vector3Subtract(*this, vector3)); - - return *this; - } - - /** - * Subtract vector by float value - */ - [[nodiscard]] Vector3 Subtract(float value) const { - return Vector3SubtractValue(*this, value); - } - - /** - * Subtract vector by float value - */ - Vector3 operator-(float value) const { - return Vector3SubtractValue(*this, value); - } - - Vector3& operator-=(float value) { - set(Vector3SubtractValue(*this, value)); - - return *this; - } - - /** - * Negate provided vector (invert direction) - */ - [[nodiscard]] Vector3 Negate() const { return Vector3Negate(*this); } - - /** - * Negate provided vector (invert direction) - */ - Vector3 operator-() const { return Vector3Negate(*this); } - - /** - * Multiply vector by vector - */ - [[nodiscard]] Vector3 Multiply(const ::Vector3& vector3) const { return Vector3Multiply(*this, vector3); } - - /** - * Multiply vector by vector - */ - Vector3 operator*(const ::Vector3& vector3) const { return Vector3Multiply(*this, vector3); } - - /** - * Multiply vector by vector - */ - Vector3& operator*=(const ::Vector3& vector3) { - set(Vector3Multiply(*this, vector3)); - - return *this; - } - - /** - * Multiply vector by scalar - */ - [[nodiscard]] Vector3 Scale(const float scaler) const { return Vector3Scale(*this, scaler); } - - /** - * Multiply vector by scalar - */ - Vector3 operator*(const float scaler) const { return Vector3Scale(*this, scaler); } - - /** - * Multiply vector by scalar - */ - Vector3& operator*=(const float scaler) { - set(Vector3Scale(*this, scaler)); - - return *this; - } - - /** - * Divide vector by vector - */ - [[nodiscard]] Vector3 Divide(const ::Vector3& vector3) const { return Vector3Divide(*this, vector3); } - - /** - * Divide vector by vector - */ - Vector3 operator/(const ::Vector3& vector3) const { return Vector3Divide(*this, vector3); } - - /** - * Divide vector by vector - */ - Vector3& operator/=(const ::Vector3& vector3) { - x /= vector3.x; - y /= vector3.y; - z /= vector3.z; - - return *this; - } - - /** - * Divide a vector by a value. - */ - [[nodiscard]] Vector3 Divide(const float div) const { return ::Vector3{x / div, y / div, z / div}; } - - /** - * Divide a vector by a value. - */ - Vector3 operator/(const float div) const { return Divide(div); } - - /** - * Divide a vector by a value. - */ - Vector3& operator/=(const float div) { - x /= div; - y /= div; - z /= div; - - return *this; - } - - /** - * Calculate vector length - */ - [[nodiscard]] float Length() const { return Vector3Length(*this); } - - /** - * Calculate vector square length - */ - [[nodiscard]] float LengthSqr() const { return Vector3LengthSqr(*this); } - - [[nodiscard]] Vector3 Normalize() const { return Vector3Normalize(*this); } - - [[nodiscard]] float DotProduct(const ::Vector3& vector3) const { return Vector3DotProduct(*this, vector3); } - - [[nodiscard]] float Distance(const ::Vector3& vector3) const { return Vector3Distance(*this, vector3); } - - [[nodiscard]] Vector3 Lerp(const ::Vector3& vector3, const float amount) const { return Vector3Lerp(*this, vector3, amount); } - - [[nodiscard]] Vector3 CrossProduct(const ::Vector3& vector3) const { return Vector3CrossProduct(*this, vector3); } - - [[nodiscard]] Vector3 Perpendicular() const { return Vector3Perpendicular(*this); } - - [[nodiscard]] Vector3 Project(const ::Vector3& vector3) const { return Vector3Project(*this, vector3); } - - [[nodiscard]] Vector3 Reject(const ::Vector3& vector3) const { return Vector3Reject(*this, vector3); } - - void OrthoNormalize(::Vector3* vector3) { Vector3OrthoNormalize(this, vector3); } - - [[nodiscard]] Vector3 Transform(const ::Matrix& matrix) const { return Vector3Transform(*this, matrix); } - - [[nodiscard]] Vector3 RotateByQuaternion(const ::Quaternion& quaternion) const { - return Vector3RotateByQuaternion(*this, quaternion); - } - - [[nodiscard]] Vector3 Reflect(const ::Vector3& normal) const { return Vector3Reflect(*this, normal); } - - [[nodiscard]] Vector3 Min(const ::Vector3& vector3) const { return Vector3Min(*this, vector3); } - - [[nodiscard]] Vector3 Max(const ::Vector3& vector3) const { return Vector3Max(*this, vector3); } - - [[nodiscard]] Vector3 Barycenter(const ::Vector3& a, const ::Vector3& b, const ::Vector3& c) const { - return Vector3Barycenter(*this, a, b, c); - } - - static Vector3 Zero() { return Vector3Zero(); } - - static Vector3 One() { return Vector3One(); } -#endif - - void DrawLine3D(const ::Vector3& endPos, ::Color color) const { ::DrawLine3D(*this, endPos, color); } - - void DrawPoint3D(::Color color) const { ::DrawPoint3D(*this, color); } - - void DrawCircle3D(float radius, const ::Vector3& rotationAxis, float rotationAngle, Color color) const { - ::DrawCircle3D(*this, radius, rotationAxis, rotationAngle, color); - } - - void DrawCube(float width, float height, float length, ::Color color) const { - ::DrawCube(*this, width, height, length, color); - } - - void DrawCube(const ::Vector3& size, ::Color color) const { ::DrawCubeV(*this, size, color); } - - void DrawCubeWires(float width, float height, float length, ::Color color) const { - ::DrawCubeWires(*this, width, height, length, color); - } - - void DrawCubeWires(const ::Vector3& size, ::Color color) const { ::DrawCubeWiresV(*this, size, color); } - - void DrawSphere(float radius, ::Color color) const { ::DrawSphere(*this, radius, color); } - - void DrawSphere(float radius, int rings, int slices, ::Color color) const { - ::DrawSphereEx(*this, radius, rings, slices, color); - } - - void DrawSphereWires(float radius, int rings, int slices, ::Color color) const { - ::DrawSphereWires(*this, radius, rings, slices, color); - } - - void DrawCylinder(float radiusTop, float radiusBottom, float height, int slices, ::Color color) const { - ::DrawCylinder(*this, radiusTop, radiusBottom, height, slices, color); - } - - void DrawCylinderWires(float radiusTop, float radiusBottom, float height, int slices, ::Color color) const { - ::DrawCylinderWires(*this, radiusTop, radiusBottom, height, slices, color); - } - - void DrawPlane(const ::Vector2& size, ::Color color) const { ::DrawPlane(*this, size, color); } - - /** - * Detect collision between two spheres - */ - [[nodiscard]] bool CheckCollision(float radius1, const ::Vector3& center2, float radius2) const { - return CheckCollisionSpheres(*this, radius1, center2, radius2); - } -protected: - void set(const ::Vector3& vec) { - x = vec.x; - y = vec.y; - z = vec.z; - } -}; -} // namespace raylib - -using RVector3 = raylib::Vector3; - -#endif // RAYLIB_CPP_INCLUDE_VECTOR3_HPP_ diff --git a/include/Vector4.hpp b/include/Vector4.hpp deleted file mode 100644 index 03cb47f6..00000000 --- a/include/Vector4.hpp +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_VECTOR4_HPP_ -#define RAYLIB_CPP_INCLUDE_VECTOR4_HPP_ - -#ifndef RAYLIB_CPP_NO_MATH -#include -#include -#endif - -#include - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" -#include "./raymath.hpp" - -namespace raylib { -/** - * Vector4 type - */ -class Vector4 : public ::Vector4 { -public: - Vector4(const ::Vector4& vec) : ::Vector4{vec.x, vec.y, vec.z, vec.w} {} - - Vector4(float x, float y, float z, float w) : ::Vector4{x, y, z, w} {} - Vector4(float x, float y, float z) : ::Vector4{x, y, z, 0} {} - Vector4(float x, float y) : ::Vector4{x, y, 0, 0} {} - Vector4(float x) : ::Vector4{x, 0, 0, 0} {} - Vector4() : ::Vector4{0, 0, 0, 0} {} - Vector4(::Rectangle rectangle) : ::Vector4{rectangle.x, rectangle.y, rectangle.width, rectangle.height} {} - - Vector4(::Color color) { set(ColorNormalize(color)); } - - GETTERSETTER(float, X, x) - GETTERSETTER(float, Y, y) - GETTERSETTER(float, Z, z) - GETTERSETTER(float, W, w) - - Vector4& operator=(const ::Vector4& vector4) { - set(vector4); - return *this; - } - - bool operator==(const ::Vector4& other) const { - return x == other.x && y == other.y && z == other.z && w == other.w; - } - - bool operator!=(const ::Vector4& other) const { return !(*this == other); } - - [[nodiscard]] ::Rectangle ToRectangle() const { return {x, y, z, w}; } - - operator ::Rectangle() const { return {x, y, z, w}; } - - [[nodiscard]] std::string ToString() const { return TextFormat("Vector4(%f, %f, %f, %f)", x, y, z, w); } - - operator std::string() const { return ToString(); } - -#ifndef RAYLIB_CPP_NO_MATH - [[nodiscard]] Vector4 Multiply(const ::Vector4& vector4) const { return QuaternionMultiply(*this, vector4); } - - Vector4 operator*(const ::Vector4& vector4) const { return QuaternionMultiply(*this, vector4); } - - [[nodiscard]] Vector4 Lerp(const ::Vector4& vector4, float amount) const { return QuaternionLerp(*this, vector4, amount); } - - [[nodiscard]] Vector4 Nlerp(const ::Vector4& vector4, float amount) const { return QuaternionNlerp(*this, vector4, amount); } - - [[nodiscard]] Vector4 Slerp(const ::Vector4& vector4, float amount) const { return QuaternionSlerp(*this, vector4, amount); } - - [[nodiscard]] Matrix ToMatrix() const { return QuaternionToMatrix(*this); } - - [[nodiscard]] float Length() const { return QuaternionLength(*this); } - - [[nodiscard]] Vector4 Normalize() const { return QuaternionNormalize(*this); } - - [[nodiscard]] Vector4 Invert() const { return QuaternionInvert(*this); } - - void ToAxisAngle(::Vector3* outAxis, float* outAngle) const { QuaternionToAxisAngle(*this, outAxis, outAngle); } - - /** - * Get the rotation angle and axis for a given quaternion - */ - [[nodiscard]] std::pair ToAxisAngle() const { - Vector3 outAxis; - float outAngle; - QuaternionToAxisAngle(*this, &outAxis, &outAngle); - - return { outAxis, outAngle }; - } - - [[nodiscard]] Vector4 Transform(const ::Matrix& matrix) const { return ::QuaternionTransform(*this, matrix); } - - static Vector4 Identity() { return ::QuaternionIdentity(); } - - static Vector4 FromVector3ToVector3(const ::Vector3& from, const ::Vector3& to) { - return ::QuaternionFromVector3ToVector3(from, to); - } - - static Vector4 FromMatrix(const ::Matrix& matrix) { return ::QuaternionFromMatrix(matrix); } - - static Vector4 FromAxisAngle(const ::Vector3& axis, const float angle) { - return ::QuaternionFromAxisAngle(axis, angle); - } - - static Vector4 FromEuler(const float pitch, const float yaw, const float roll) { - return ::QuaternionFromEuler(pitch, yaw, roll); - } - - static Vector4 FromEuler(const ::Vector3& vector3) { - return ::QuaternionFromEuler(vector3.x, vector3.y, vector3.z); - } - - [[nodiscard]] Vector3 ToEuler() const { return ::QuaternionToEuler(*this); } -#endif - - [[nodiscard]] Color ColorFromNormalized() const { return ::ColorFromNormalized(*this); } - - operator Color() const { return ColorFromNormalized(); } -protected: - void set(const ::Vector4& vec4) { - x = vec4.x; - y = vec4.y; - z = vec4.z; - w = vec4.w; - } -}; - -// Alias the Vector4 as Quaternion. -using Quaternion = Vector4; - -} // namespace raylib - -using RVector4 = raylib::Vector4; -using RQuaternion = raylib::Quaternion; - -#endif // RAYLIB_CPP_INCLUDE_VECTOR4_HPP_ diff --git a/include/VrStereoConfig.hpp b/include/VrStereoConfig.hpp deleted file mode 100644 index 0b767faa..00000000 --- a/include/VrStereoConfig.hpp +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_ -#define RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_ - -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * VR stereo config functions for VR simulator - */ -class VrStereoConfig : public ::VrStereoConfig { -public: - VrStereoConfig(const ::VrDeviceInfo& info) { Load(info); } - - /** - * Load VR stereo config for VR simulator device parameters - */ - void Load(const ::VrDeviceInfo& info) { set(LoadVrStereoConfig(info)); } - - /** - * Unload VR stereo config - */ - ~VrStereoConfig() { Unload(); } - - /** - * Begin stereo rendering - */ - VrStereoConfig& BeginMode() { - ::BeginVrStereoMode(*this); - return *this; - } - - /** - * End stereo rendering - */ - VrStereoConfig& EndMode() { - ::EndVrStereoMode(); - return *this; - } - - /** - * Unload VR stereo config - */ - void Unload() { ::UnloadVrStereoConfig(*this); } -protected: - void set(const ::VrStereoConfig& config) { - projection[0] = config.projection[0]; - projection[1] = config.projection[1]; - viewOffset[0] = config.viewOffset[0]; - viewOffset[1] = config.viewOffset[1]; - leftLensCenter[0] = config.leftLensCenter[0]; - leftLensCenter[1] = config.leftLensCenter[1]; - rightLensCenter[0] = config.rightLensCenter[0]; - rightLensCenter[1] = config.rightLensCenter[1]; - leftScreenCenter[0] = config.leftScreenCenter[0]; - leftScreenCenter[1] = config.leftScreenCenter[1]; - rightScreenCenter[0] = config.rightScreenCenter[0]; - rightScreenCenter[1] = config.rightScreenCenter[1]; - scale[0] = config.scale[0]; - scale[1] = config.scale[1]; - scaleIn[0] = config.scaleIn[0]; - scaleIn[1] = config.scaleIn[1]; - } -}; -} // namespace raylib - -using RVrStereoConfig = raylib::VrStereoConfig; - -#endif // RAYLIB_CPP_INCLUDE_VRSTEREOCONFIG_HPP_ diff --git a/include/Wave.hpp b/include/Wave.hpp deleted file mode 100644 index dc446640..00000000 --- a/include/Wave.hpp +++ /dev/null @@ -1,212 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_WAVE_HPP_ -#define RAYLIB_CPP_INCLUDE_WAVE_HPP_ - -#include - -#include "./RaylibException.hpp" -#include "./raylib-cpp-utils.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Wave type, defines audio wave data - */ -class Wave : public ::Wave { -public: - Wave(const ::Wave& wave) : ::Wave(wave) { } - - Wave( - unsigned int frameCount = 0, - unsigned int sampleRate = 0, - unsigned int sampleSize = 0, - unsigned int channels = 0, - void* data = nullptr) - : ::Wave{frameCount, sampleRate, sampleSize, channels, data} { - // Nothing. - } - - /** - * Load wave data from file - * - * @throws raylib::RaylibException Throws if the Wave failed to load. - */ - Wave(const std::string& fileName) { Load(fileName); } - - /** - * Load wave from memory buffer, fileType refers to extension: i.e. "wav" - * - * @throws raylib::RaylibException Throws if the Wave failed to load. - */ - Wave(const std::string& fileType, const unsigned char* fileData, int dataSize) { - Load(fileType, fileData, dataSize); - } - - Wave(const Wave& other) { set(other.Copy()); } - - Wave(Wave&& other) noexcept { - set(other); - - other.frameCount = 0; - other.sampleRate = 0; - other.sampleSize = 0; - other.channels = 0; - other.data = nullptr; - } - - /** - * Unload wave data - */ - ~Wave() { Unload(); } - - GETTER(unsigned int, FrameCount, frameCount) - GETTER(unsigned int, SampleRate, sampleRate) - GETTER(unsigned int, SampleSize, sampleSize) - GETTER(unsigned int, Channels, channels) - GETTER(void*, Data, data) - - Wave& operator=(const ::Wave& wave) { - set(wave); - return *this; - } - - Wave& operator=(const Wave& other) { - if (this == &other) { - return *this; - } - - Unload(); - set(other.Copy()); - - return *this; - } - - Wave& operator=(Wave&& other) noexcept { - if (this != &other) { - return *this; - } - - Unload(); - set(other); - - other.frameCount = 0; - other.sampleRate = 0; - other.sampleSize = 0; - other.channels = 0; - other.data = nullptr; - - return *this; - } - - /** - * Copy a wave to a new wave - */ - [[nodiscard]] ::Wave Copy() const { return ::WaveCopy(*this); } - - /** - * Crop a wave to defined samples range - */ - Wave& Crop(int initSample, int finalSample) { - ::WaveCrop(this, initSample, finalSample); - return *this; - } - - /** - * Convert wave data to desired format - */ - Wave& Format(int SampleRate, int SampleSize, int Channels = 2) { - ::WaveFormat(this, SampleRate, SampleSize, Channels); - return *this; - } - - /** - * Load samples data from wave as a floats array - */ - float* LoadSamples() { return ::LoadWaveSamples(*this); } - - /** - * Unload samples data loaded with LoadWaveSamples() - */ - static void UnloadSamples(float* samples) { ::UnloadWaveSamples(samples); } - - /** - * Export wave data to file, returns true on success - */ - bool Export(const std::string& fileName) { - // TODO(RobLoach): Throw exception on error. - return ::ExportWave(*this, fileName.c_str()); - } - - /** - * Export wave sample data to code (.h), returns true on success - */ - bool ExportAsCode(const std::string& fileName) { - // TODO(RobLoach): Throw exception on error. - return ::ExportWaveAsCode(*this, fileName.c_str()); - } - - /** - * Unload wave data - */ - void Unload() { - // Protect against calling UnloadWave() twice. - if (data != nullptr) { - ::UnloadWave(*this); - data = nullptr; - } - } - - /** - * Load sound from wave data - */ - ::Sound LoadSound() { return ::LoadSoundFromWave(*this); } - - /** - * Load sound from wave data - */ - operator ::Sound() { return LoadSound(); } - - /** - * Load wave data from file. - * - * @throws raylib::RaylibException Throws if the Wave failed to load. - */ - void Load(const std::string& fileName) { - set(::LoadWave(fileName.c_str())); - if (!IsValid()) { - throw RaylibException("Failed to load Wave from file: " + fileName); - } - } - - /** - * Load wave from memory buffer, fileType refers to extension: i.e. "wav" - * - * @throws raylib::RaylibException Throws if the Wave failed to load. - */ - void Load(const std::string& fileType, const unsigned char* fileData, int dataSize) { - set(::LoadWaveFromMemory(fileType.c_str(), fileData, dataSize)); - if (!IsValid()) { - throw RaylibException("Failed to load Wave from file data of type: " + fileType); - } - } - - /** - * Retrieve whether or not the Wave data has been loaded. - * - * @return True or false depending on whether the wave data has been loaded. - */ - [[nodiscard]] bool IsValid() const { return ::IsWaveValid(*this); } -protected: - void set(const ::Wave& wave) { - frameCount = wave.frameCount; - sampleRate = wave.sampleRate; - sampleSize = wave.sampleSize; - channels = wave.channels; - data = wave.data; - } -}; - -} // namespace raylib - -using RWave = raylib::Wave; - -#endif // RAYLIB_CPP_INCLUDE_WAVE_HPP_ diff --git a/include/Window.hpp b/include/Window.hpp deleted file mode 100644 index 20c5138d..00000000 --- a/include/Window.hpp +++ /dev/null @@ -1,467 +0,0 @@ -#ifndef RAYLIB_CPP_INCLUDE_WINDOW_HPP_ -#define RAYLIB_CPP_INCLUDE_WINDOW_HPP_ - -#include - -#include "./RaylibException.hpp" -#include "./Vector2.hpp" -#include "./raylib.hpp" - -namespace raylib { -/** - * Window and Graphics Device Functions. - */ -class Window { -public: - /** - * Build a Window object, but defer the initialization. Ensure you call Init() manually. - * - * @see Init() - */ - Window() = default; - - /** - * Initialize window and OpenGL context. - * - * @param width The width of the window. - * @param height The height of the window. - * @param title The desired title of the window. - * @param flags The ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details. - * @param logLevel The the current threshold (minimum) log level - * - * @see ::SetConfigFlags() - * @see ConfigFlags - * - * @throws raylib::RaylibException Thrown if the window failed to initiate. - */ - Window(int width, int height, const std::string& title = "raylib", unsigned int flags = 0, TraceLogLevel logLevel = LOG_ALL) { - Init(width, height, title, flags, logLevel); - } - - /** - * Close window and unload OpenGL context - */ - ~Window() { Close(); } - - /** - * Initializes the window. - * - * @param width The width of the window. - * @param height The height of the window. - * @param title The desired title of the window. - * @param flags The ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details. - * - * @see ::SetConfigFlags() - * @see ConfigFlags - * - * @throws raylib::RaylibException Thrown if the window failed to initiate. - */ - static void Init(int width = 800, int height = 450, const std::string& title = "raylib", unsigned int flags = 0, TraceLogLevel logLevel = LOG_ALL) { - if (flags != 0) { - ::SetConfigFlags(flags); - } - ::SetTraceLogLevel(logLevel); - ::InitWindow(width, height, title.c_str()); - if (!::IsWindowReady()) { - throw RaylibException("Failed to create Window"); - } - } - - /** - * Check if KEY_ESCAPE pressed or Close icon pressed - */ - static bool ShouldClose() { return ::WindowShouldClose(); } - - /** - * Set a custom key to exit program (default is ESC) - */ - static void SetExitKey(int key) { ::SetExitKey(key); } - - /** - * Close window and unload OpenGL context - */ - static void Close() { - if (::IsWindowReady()) { - ::CloseWindow(); - } - } - - /** - * Check if cursor is on the current screen - */ - static bool IsCursorOnScreen() { return ::IsCursorOnScreen(); } - - /** - * Check if cursor is not visible - */ - static bool IsCursorHidden() { return ::IsCursorHidden(); } - - /** - * Hides cursor - */ - static void HideCursor() { ::HideCursor(); } - - /** - * Shows cursor - */ - static void ShowCursor() { ::ShowCursor(); } - - /** - * Check if window is currently fullscreen - */ - static bool IsFullscreen() { return ::IsWindowFullscreen(); } - - /** - * Check if window is currently hidden - */ - static bool IsHidden() { return ::IsWindowHidden(); } - - /** - * Check if window is currently minimized - */ - static bool IsMinimized() { return ::IsWindowMinimized(); } - - /** - * Check if window is currently minimized - */ - static bool IsMaximized() { return ::IsWindowMaximized(); } - - /** - * Check if window is currently focused - */ - static bool IsFocused() { return ::IsWindowFocused(); } - - /** - * Check if window has been resized last frame - */ - static bool IsResized() { return ::IsWindowResized(); } - - /** - * Check if one specific window flag is enabled - */ - static bool IsState(unsigned int flag) { return ::IsWindowState(flag); } - - /** - * Set window configuration state using flags - */ - Window& SetState(unsigned int flag) { - ::SetWindowState(flag); - return *this; - } - - /** - * Clear window configuration state flags - */ - Window& ClearState(unsigned int flag) { - ::ClearWindowState(flag); - return *this; - } - - /** - * Clear window with given color. - */ - Window& ClearBackground(const ::Color& color = BLACK) { - ::ClearBackground(color); - return *this; - } - - /** - * Toggle window state: fullscreen/windowed - */ - Window& ToggleFullscreen() { - ::ToggleFullscreen(); - return *this; - } - - /** - * Set whether or not the application should be fullscreen. - */ - Window& SetFullscreen(bool fullscreen) { - if (fullscreen) { - if (!IsFullscreen()) { - ToggleFullscreen(); - } - } - else { - if (IsFullscreen()) { - ToggleFullscreen(); - } - } - - return *this; - } - - /** - * Toggle window state: borderless/windowed - */ - Window& ToggleBorderless() { - ::ToggleBorderlessWindowed(); - return *this; - } - - /** - * Set window state: maximized, if resizable (only PLATFORM_DESKTOP) - */ - Window& Maximize() { - ::MaximizeWindow(); - return *this; - } - - /** - * Set window state: minimized, if resizable (only PLATFORM_DESKTOP) - */ - Window& Minimize() { - ::MinimizeWindow(); - return *this; - } - - /** - * Set window state: not minimized/maximized (only PLATFORM_DESKTOP) - */ - Window& Restore() { - ::RestoreWindow(); - return *this; - } - - /** - * Set icon for window - */ - Window& SetIcon(const ::Image& image) { - ::SetWindowIcon(image); - return *this; - } - - /** - * Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP) - */ - Window& SetIcons(Image* images, int count) { - ::SetWindowIcons(images, count); - return *this; - } - - /** - * Set title for window - */ - Window& SetTitle(const std::string& title) { - ::SetWindowTitle(title.c_str()); - return *this; - } - - /** - * Set window position on screen - */ - Window& SetPosition(int x, int y) { - ::SetWindowPosition(x, y); - return *this; - } - - /** - * Set window position on screen - */ - Window& SetPosition(const ::Vector2& position) { - return SetPosition(static_cast(position.x), static_cast(position.y)); - } - - /** - * Set monitor for the current window - */ - Window& SetMonitor(int monitor) { - ::SetWindowMonitor(monitor); - return *this; - } - - /** - * Set window minimum dimensions - */ - Window& SetMinSize(int width, int height) { - ::SetWindowMinSize(width, height); - return *this; - } - - /** - * Set window minimum dimensions - */ - Window& SetMinSize(const ::Vector2& size) { - ::SetWindowMinSize(static_cast(size.x), static_cast(size.y)); - return *this; - } - - /** - * Set window dimensions - */ - Window& SetSize(int width, int height) { - ::SetWindowSize(width, height); - return *this; - } - - /** - * Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP) - */ - Window& SetOpacity(float opacity) { - ::SetWindowOpacity(opacity); - return *this; - } - - /** - * Set window focused (only PLATFORM_DESKTOP) - */ - Window& SetFocused() { - ::SetWindowFocused(); - return *this; - } - - /** - * Set window dimensions - */ - Window& SetSize(const ::Vector2& size) { return SetSize(static_cast(size.x), static_cast(size.y)); } - - /** - * Get the screen's width and height. - */ - static Vector2 GetSize() { return {static_cast(GetWidth()), static_cast(GetHeight())}; } - - /** - * Get native window handle - */ - static void* GetHandle() { return ::GetWindowHandle(); } - - /** - * Setup canvas (framebuffer) to start drawing - */ - Window& BeginDrawing() { - ::BeginDrawing(); - return *this; - } - - /** - * End canvas drawing and swap buffers (double buffering) - */ - Window& EndDrawing() { - ::EndDrawing(); - return *this; - } - - /** - * Get current screen width - */ - static int GetWidth() { return ::GetScreenWidth(); } - - /** - * Get current screen height - */ - static int GetHeight() { return ::GetScreenHeight(); } - - /** - * Get current render width (it considers HiDPI) - */ - static int GetRenderWidth() { return ::GetRenderWidth(); } - - /** - * Get current render height (it considers HiDPI) - */ - static int GetRenderHeight() { return ::GetRenderHeight(); } - - /** - * Get window position XY on monitor - */ - static Vector2 GetPosition() { return ::GetWindowPosition(); } - - /* - * Get current window monitor - */ - static int GetMonitor() { return ::GetCurrentMonitor(); } - - /** - * Get window scale DPI factor - */ - static Vector2 GetScaleDPI() { return ::GetWindowScaleDPI(); } - - /** - * Set clipboard text content - */ - static void SetClipboardText(const std::string& text) { ::SetClipboardText(text.c_str()); } - - /** - * Get clipboard text content - */ - static std::string GetClipboardText() { return ::GetClipboardText(); } - - /** - * Set target FPS (maximum) - */ - Window& SetTargetFPS(int fps) { - ::SetTargetFPS(fps); - return *this; - } - - /** - * Returns current FPS - */ - static int GetFPS() { return ::GetFPS(); } - - /** - * Draw current FPS - */ - static void DrawFPS(int posX = 10, int posY = 10) { ::DrawFPS(posX, posY); } - - /** - * Returns time in seconds for last frame drawn - */ - static float GetFrameTime() { return ::GetFrameTime(); } - - /** - * Returns elapsed time in seconds since InitWindow() - */ - static double GetTime() { return ::GetTime(); } - - /** - * Check if window has been initialized successfully - */ - static bool IsReady() { return ::IsWindowReady(); } - - /** - * Sets the configuration flags for raylib. - * - * @param flags The ConfigFlags to apply to the configuration. - * - * @see ::SetConfigFlags - */ - static void SetConfigFlags(unsigned int flags) { ::SetConfigFlags(flags); } - - /** - * Alternates between calling `BeginDrawing()` and `EndDrawing()`. - * - * @code - * while (window.Drawing()) { - * DrawRectangle(); - * } - * @endcode - * - * @return True if we're within the `BeginDrawing()` scope. - */ - bool Drawing() { - if (m_drawing) { - EndDrawing(); - m_drawing = false; - } - else { - BeginDrawing(); - m_drawing = true; - } - - return m_drawing; - } - - protected: - /** - * Handles the internal drawing state for calling either `BeginDrawing()` or `EndDrawing()` from the `Drawing()` function. - * - * @see Drawing() - */ - bool m_drawing = false; -}; -} // namespace raylib - -using RWindow = raylib::Window; - -#endif // RAYLIB_CPP_INCLUDE_WINDOW_HPP_ diff --git a/include/raylib-cpp-utils.hpp b/include/raylib-cpp-utils.hpp deleted file mode 100644 index c848ffa8..00000000 --- a/include/raylib-cpp-utils.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Utility for raylib-cpp. - */ -#ifndef RAYLIB_CPP_INCLUDE_RAYLIB_CPP_UTILS_HPP_ -#define RAYLIB_CPP_INCLUDE_RAYLIB_CPP_UTILS_HPP_ - -#ifndef GETTER -/** - * A utility to build a get method on top of a property. - * - * @param type The type of the property. - * @param method The human-readable name for the method. - * @param name The machine-readable name of the property. - */ -#define GETTER(type, method, name) \ - /** Retrieves the name value for the object. @return The name value of the object. */ \ - type Get##method() const { \ - return name; \ - } -#endif - -#ifndef GETTERSETTER -/** - * A utility to build get and set methods on top of a property. - * - * @param type The type of the property. - * @param method The human-readable name for the method. - * @param name The machine-readable name of the property. - */ -#define GETTERSETTER(type, method, name) \ - GETTER(type, method, name) \ - /** Sets the name value for the object. @param value The value of which to set name to. */ \ - void Set##method(type value) { \ - name = value; \ - } -#endif - -#endif // RAYLIB_CPP_INCLUDE_RAYLIB_CPP_UTILS_HPP_ diff --git a/include/raylib-cpp.hpp b/include/raylib-cpp.hpp deleted file mode 100644 index 1ac27bab..00000000 --- a/include/raylib-cpp.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/** - * [raylib-cpp](https://github.com/RobLoach/raylib-cpp) is a C++ wrapper library for raylib, a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around raylib's struct interfaces. - * - * @see raylib namespace for a list of all available classes. - * @mainpage raylib-cpp - * @include core_basic_window.cpp - * @author Rob Loach (RobLoach) - * @copyright zlib/libpng - * - * raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified, - * BSD-like license that allows static linking with closed source software: - * - * Copyright 2020 Rob Loach (RobLoach) - * - * This software is provided "as-is", without any express or implied warranty. In no event - * will the authors be held liable for any damages arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, including commercial - * applications, and to alter it and redistribute it freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not claim that you - * wrote the original software. If you use this software in a product, an acknowledgment - * in the product documentation would be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not be misrepresented - * as being the original software. - * - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef RAYLIB_CPP_INCLUDE_RAYLIB_CPP_HPP_ -#define RAYLIB_CPP_INCLUDE_RAYLIB_CPP_HPP_ - -#include "./AudioDevice.hpp" -#include "./AudioStream.hpp" -#include "./AutomationEventList.hpp" -#include "./BoundingBox.hpp" -#include "./Camera2D.hpp" -#include "./Camera3D.hpp" -#include "./Color.hpp" -#include "./FileData.hpp" -#include "./FileText.hpp" -#include "./Font.hpp" -#include "./Functions.hpp" -#include "./Gamepad.hpp" -#include "./Image.hpp" -#include "./Keyboard.hpp" -#include "./Material.hpp" -#include "./Matrix.hpp" -#include "./Mesh.hpp" -#include "./Model.hpp" -#include "./ModelAnimation.hpp" -#include "./Mouse.hpp" -#include "./Music.hpp" -#include "./Ray.hpp" -#include "./RayCollision.hpp" -#include "./RaylibException.hpp" -#include "./Rectangle.hpp" -#include "./RenderTexture.hpp" -#include "./Shader.hpp" -#include "./Sound.hpp" -#include "./Text.hpp" -#include "./Texture.hpp" -#include "./TextureUnmanaged.hpp" -#include "./Touch.hpp" -#include "./Vector2.hpp" -#include "./Vector3.hpp" -#include "./Vector4.hpp" -#include "./VrStereoConfig.hpp" -#include "./Wave.hpp" -#include "./Window.hpp" - -/** - * All raylib-cpp classes and functions appear in the raylib namespace. - */ -namespace raylib { -// Nothing. -} // namespace raylib - -#endif // RAYLIB_CPP_INCLUDE_RAYLIB_CPP_HPP_ diff --git a/include/raylib.hpp b/include/raylib.hpp deleted file mode 100644 index 7fb2da34..00000000 --- a/include/raylib.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * C++ header to wrap raylib.h. - */ -#ifndef RAYLIB_CPP_INCLUDE_RAYLIB_HPP_ -#define RAYLIB_CPP_INCLUDE_RAYLIB_HPP_ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef RAYLIB_H_FILE -#define RAYLIB_H_FILE "raylib.h" -#endif - -#include RAYLIB_H_FILE // NOLINT - -#if !defined(RAYLIB_VERSION_MAJOR) || !defined(RAYLIB_VERSION_MINOR) -#error "raylib-cpp requires raylib >= 5" -#endif - -#if RAYLIB_VERSION_MAJOR < 5 -#error "raylib-cpp requires raylib >= 5" -#endif - -#if RAYLIB_VERSION_MAJOR > 5 -#error "raylib-cpp requires raylib ~5.0. Use the `next` branch for the next version of raylib." -#endif - -#if RAYLIB_VERSION_MINOR < 1 - #error "raylib-cpp targets raylib 5.1 or higher." -#endif - -#ifdef __cplusplus -} -#endif - -#endif // RAYLIB_CPP_INCLUDE_RAYLIB_HPP_ diff --git a/include/raymath.hpp b/include/raymath.hpp deleted file mode 100644 index 41e37cf3..00000000 --- a/include/raymath.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * C++ header to wrap raymath.h. - */ -#ifndef RAYLIB_CPP_INCLUDE_RAYMATH_HPP_ -#define RAYLIB_CPP_INCLUDE_RAYMATH_HPP_ - -#ifdef __cplusplus -extern "C" { -#endif -#ifndef RAYLIB_CPP_NO_MATH -#ifndef BUILD_RAYLIB_CPP_MODULES -#ifndef RAYMATH_STATIC_INLINE -#define RAYMATH_STATIC_INLINE -#endif -#endif -#ifdef __GNUC__ -#pragma GCC diagnostic push // These throw a warnings on visual studio, need to check if __GNUC__ is defined to use it. -#pragma GCC diagnostic ignored "-Wmissing-field-initializers" -#endif -#define RAYMATH_DISABLE_CPP_OPERATORS -#include "raymath.h" // NOLINT -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif -#endif -#ifdef __cplusplus -} -#endif - -#endif // RAYLIB_CPP_INCLUDE_RAYMATH_HPP_ diff --git a/index.html b/index.html new file mode 100644 index 00000000..fbc626ee --- /dev/null +++ b/index.html @@ -0,0 +1,147 @@ + + + + + + + +raylib-cpp: raylib-cpp + + + + + + + + + + +
+
+ + + + + + + +
+
raylib-cpp +
+
C++ object-oriented wrapper library for raylib.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
raylib-cpp
+
+
+

raylib-cpp is a C++ wrapper library for raylib, a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around raylib's struct interfaces.

+
See also
raylib namespace for a list of all available classes.
+
/*******************************************************************************************
+
*
+
* raylib [core] example - Basic window
+
*
+
* Welcome to raylib!
+
*
+
* To test examples, just press F6 and execute raylib_compile_execute script
+
* Note that compiled executable is placed in the same folder as .c file
+
*
+
* You can find all basic examples on C:\raylib\raylib\examples folder or
+
* raylib official webpage: www.raylib.com
+
*
+
* Enjoy using raylib. :)
+
*
+
* This example has been created using raylib 1.0 (www.raylib.com)
+
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
+
*
+
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
+
*
+
********************************************************************************************/
+
+
#include "raylib-cpp.hpp"
+
+
int main() {
+
// Initialization
+
//--------------------------------------------------------------------------------------
+
int screenWidth = 800;
+
int screenHeight = 450;
+
raylib::Color textColor = raylib::Color::LightGray();
+
raylib::Window window(screenWidth, screenHeight, "raylib [core] example - basic window");
+
+
SetTargetFPS(60);
+
//--------------------------------------------------------------------------------------
+
+
// Main game loop
+
while (!window.ShouldClose()) { // Detect window close button or ESC key
+
// Update
+
//----------------------------------------------------------------------------------
+
// Update your variables here
+
//----------------------------------------------------------------------------------
+
+
// Draw
+
//----------------------------------------------------------------------------------
+
BeginDrawing();
+
{
+
window.ClearBackground(RAYWHITE);
+
textColor.DrawText("Congrats! You created your first window!", 190, 200, 20);
+
}
+
EndDrawing();
+
//----------------------------------------------------------------------------------
+
}
+
+
return 0;
+
}
+
Color type, RGBA (32bit)
Definition: Color.hpp:14
+
Window and Graphics Device Functions.
Definition: Window.hpp:14
+
Author
Rob Loach (RobLoach)
+ +

raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software:

+

Copyright 2020 Rob Loach (RobLoach)

+

This software is provided "as-is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

+

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

+
    +
  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. +
  3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  4. +
  5. This notice may not be removed or altered from any source distribution.
  6. +
+
+
+ + + + diff --git a/jquery.js b/jquery.js new file mode 100644 index 00000000..103c32d7 --- /dev/null +++ b/jquery.js @@ -0,0 +1,35 @@ +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/menu.js b/menu.js new file mode 100644 index 00000000..2fe2214f --- /dev/null +++ b/menu.js @@ -0,0 +1,51 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+=''; + } + return result; + } + + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchEnabled) { + if (serverSide) { + $('#main-menu').append('
  • '); + } else { + $('#main-menu').append('
  • '); + } + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/menudata.js b/menudata.js new file mode 100644 index 00000000..d1d477f2 --- /dev/null +++ b/menudata.js @@ -0,0 +1,105 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Namespaces",url:"namespaces.html",children:[ +{text:"Namespace List",url:"namespaces.html"}, +{text:"Namespace Members",url:"namespacemembers.html",children:[ +{text:"All",url:"namespacemembers.html",children:[ +{text:"c",url:"namespacemembers.html#index_c"}, +{text:"d",url:"namespacemembers.html#index_d"}, +{text:"e",url:"namespacemembers.html#index_e"}, +{text:"f",url:"namespacemembers.html#index_f"}, +{text:"g",url:"namespacemembers.html#index_g"}, +{text:"i",url:"namespacemembers.html#index_i"}, +{text:"l",url:"namespacemembers.html#index_l"}, +{text:"m",url:"namespacemembers.html#index_m"}, +{text:"o",url:"namespacemembers.html#index_o"}, +{text:"s",url:"namespacemembers.html#index_s"}, +{text:"t",url:"namespacemembers.html#index_t"}]}, +{text:"Functions",url:"namespacemembers_func.html",children:[ +{text:"c",url:"namespacemembers_func.html#index_c"}, +{text:"d",url:"namespacemembers_func.html#index_d"}, +{text:"e",url:"namespacemembers_func.html#index_e"}, +{text:"f",url:"namespacemembers_func.html#index_f"}, +{text:"g",url:"namespacemembers_func.html#index_g"}, +{text:"i",url:"namespacemembers_func.html#index_i"}, +{text:"l",url:"namespacemembers_func.html#index_l"}, +{text:"m",url:"namespacemembers_func.html#index_m"}, +{text:"o",url:"namespacemembers_func.html#index_o"}, +{text:"s",url:"namespacemembers_func.html#index_s"}, +{text:"t",url:"namespacemembers_func.html#index_t"}]}]}]}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Hierarchy",url:"hierarchy.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"a",url:"functions.html#index_a"}, +{text:"b",url:"functions_b.html#index_b"}, +{text:"c",url:"functions_c.html#index_c"}, +{text:"d",url:"functions_d.html#index_d"}, +{text:"e",url:"functions_e.html#index_e"}, +{text:"f",url:"functions_f.html#index_f"}, +{text:"g",url:"functions_g.html#index_g"}, +{text:"h",url:"functions_h.html#index_h"}, +{text:"i",url:"functions_i.html#index_i"}, +{text:"k",url:"functions_k.html#index_k"}, +{text:"l",url:"functions_l.html#index_l"}, +{text:"m",url:"functions_m.html#index_m"}, +{text:"n",url:"functions_n.html#index_n"}, +{text:"o",url:"functions_o.html#index_o"}, +{text:"p",url:"functions_p.html#index_p"}, +{text:"r",url:"functions_r.html#index_r"}, +{text:"s",url:"functions_s.html#index_s"}, +{text:"t",url:"functions_t.html#index_t"}, +{text:"u",url:"functions_u.html#index_u"}, +{text:"w",url:"functions_w.html#index_w"}, +{text:"z",url:"functions_z.html#index_z"}, +{text:"~",url:"functions_~.html#index__7E"}]}, +{text:"Functions",url:"functions_func.html",children:[ +{text:"a",url:"functions_func.html#index_a"}, +{text:"b",url:"functions_func_b.html#index_b"}, +{text:"c",url:"functions_func_c.html#index_c"}, +{text:"d",url:"functions_func_d.html#index_d"}, +{text:"e",url:"functions_func_e.html#index_e"}, +{text:"f",url:"functions_func_f.html#index_f"}, +{text:"g",url:"functions_func_g.html#index_g"}, +{text:"h",url:"functions_func_h.html#index_h"}, +{text:"i",url:"functions_func_i.html#index_i"}, +{text:"k",url:"functions_func_k.html#index_k"}, +{text:"l",url:"functions_func_l.html#index_l"}, +{text:"m",url:"functions_func_m.html#index_m"}, +{text:"n",url:"functions_func_n.html#index_n"}, +{text:"o",url:"functions_func_o.html#index_o"}, +{text:"p",url:"functions_func_p.html#index_p"}, +{text:"r",url:"functions_func_r.html#index_r"}, +{text:"s",url:"functions_func_s.html#index_s"}, +{text:"t",url:"functions_func_t.html#index_t"}, +{text:"u",url:"functions_func_u.html#index_u"}, +{text:"w",url:"functions_func_w.html#index_w"}, +{text:"z",url:"functions_func_z.html#index_z"}, +{text:"~",url:"functions_func_~.html#index__7E"}]}, +{text:"Variables",url:"functions_vars.html"}]}]}]} diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt deleted file mode 100644 index b61a34fd..00000000 --- a/modules/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -file(GLOB_RECURSE RAYLIB_CPP_MODULES raylib.cppm) - -add_library(raylib_cpp_modules) - -cmake_minimum_required(VERSION 3.28) - -if(NOT COMMAND configure_cpp_module_target) - function(configure_cpp_module_target target) - if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.28) - target_sources(${target} PUBLIC FILE_SET CXX_MODULES FILES ${RAYLIB_CPP_MODULES}) - else() - message(WARNING "C++ modules require CMake 3.28+. Using standard compilation.") - target_sources(${target} PRIVATE ${RAYLIB_CPP_MODULES}) - endif() - endfunction() -endif() - -configure_cpp_module_target(raylib_cpp_modules) - -target_link_libraries(raylib_cpp_modules - PUBLIC - raylib_cpp -) - -target_include_directories(raylib_cpp_modules - PRIVATE - ${PROJECT_SOURCE_DIR}/include -) - -target_compile_features(raylib_cpp_modules PUBLIC cxx_std_20) \ No newline at end of file diff --git a/modules/raylib.cppm b/modules/raylib.cppm deleted file mode 100644 index e0903f86..00000000 --- a/modules/raylib.cppm +++ /dev/null @@ -1,294 +0,0 @@ -/** - * @file raylib.cppm - * @brief Module file exporting all symbols in raylib-cpp. - */ - -module; - -#define BUILD_RAYLIB_CPP_MODULES -#define RLCPPAPI -#define RAYMATH_IMPLEMENTATION -#include "../include/raylib-cpp.hpp" - -#undef LIGHTGRAY -#undef GRAY -#undef DARKGRAY -#undef YELLOW -#undef GOLD -#undef ORANGE -#undef PINK -#undef RED -#undef MAROON -#undef GREEN -#undef LIME -#undef DARKGREEN -#undef SKYBLUE -#undef BLUE -#undef DARKBLUE -#undef PURPLE -#undef VIOLET -#undef DARKPURPLE -#undef BEIGE -#undef BROWN -#undef DARKBROWN -#undef WHITE -#undef BLACK -#undef BLANK -#undef MAGENTA -#undef RAYWHITE - -export module raylib; - -/** - * @namespace raylib - * @brief All raylib-cpp classes and functions appear in the raylib namespace. - */ -export namespace raylib { - // Classes - using raylib::AudioDevice; - using raylib::AudioStream; - using raylib::AutomationEventList; - using raylib::BoundingBox; - using raylib::Camera; // Alias for Camera3D - using raylib::Camera2D; - using raylib::Camera3D; - using raylib::Color; - using raylib::FileData; - using raylib::FileText; - using raylib::Font; - using raylib::Gamepad; - using raylib::Image; - using raylib::Material; - using raylib::Matrix; - using raylib::Mesh; - using raylib::Model; - using raylib::ModelAnimation; - using raylib::Music; - using raylib::Ray; - using raylib::RayCollision; - using raylib::RaylibException; - using raylib::Rectangle; - using raylib::RenderTexture; - using raylib::RenderTexture2D; // Alias for RenderTexture - using raylib::Shader; - using raylib::Sound; - using raylib::Text; - using raylib::Texture; - using raylib::Texture2D; // Alias for Texture - using raylib::TextureCubemap; // Alias for Texture - using raylib::TextureUnmanaged; - using raylib::Texture2DUnmanaged; // Alias for TextureUnmanaged - using raylib::TextureCubemapUnmanaged; // Alias for TextureUnmanaged - using raylib::Vector2; - using raylib::Vector3; - using raylib::Vector4; - using raylib::Quaternion; // Alias for Vector4 - using raylib::VrStereoConfig; - using raylib::Wave; - using raylib::Window; - - // Enums - using ::ConfigFlags; - using ::TraceLogLevel; - using ::KeyboardKey; - using ::MouseButton; - using ::MouseCursor; - using ::GamepadButton; - using ::GamepadAxis; - using ::MaterialMapIndex; - using ::ShaderLocationIndex; - using ::ShaderUniformDataType; - using ::ShaderAttributeDataType; - using ::PixelFormat; - using ::TextureFilter; - using ::TextureWrap; - using ::CubemapLayout; - using ::FontType; - using ::BlendMode; - using ::Gesture; - using ::CameraMode; - using ::CameraProjection; - using ::NPatchLayout; - - // From Functions.hpp - using raylib::InitWindow; - using raylib::SetWindowTitle; - using raylib::GetMonitorName; - using raylib::SetClipboardText; - using raylib::GetClipboardText; - using raylib::TakeScreenshot; - using raylib::GetGamepadName; - using raylib::LoadFileText; - using raylib::SaveFileText; - using raylib::FileExists; - using raylib::DirectoryExists; - using raylib::IsFileExtension; - using raylib::GetFileExtension; - using raylib::GetFileName; - using raylib::GetFileNameWithoutExt; - using raylib::GetDirectoryPath; - using raylib::GetPrevDirectoryPath; - using raylib::GetWorkingDirectory; - using raylib::LoadDirectoryFiles; - using raylib::ChangeDirectory; - using raylib::LoadDroppedFiles; - using raylib::GetFileModTime; - using raylib::OpenURL; - using raylib::LoadImage; - using raylib::LoadImageRaw; - using raylib::LoadImageAnim; - using raylib::LoadImageFromMemory; - using raylib::ExportImage; - using raylib::ExportImageAsCode; - using raylib::DrawText; - using raylib::DrawTextEx; - using raylib::DrawTextPro; - using raylib::LoadFont; - using raylib::LoadFontEx; - using raylib::MeasureText; - using raylib::TextIsEqual; - using raylib::TextLength; - using raylib::TextSubtext; - using raylib::TextReplace; - using raylib::TextInsert; - using raylib::TextSplit; - using raylib::TextFindIndex; - using raylib::TextToUpper; - using raylib::TextToLower; - using raylib::TextToPascal; - using raylib::TextToInteger; - - /** - * @namespace raylib::Colors - * @brief Re-exports all Color macros as inline constexpr - */ - namespace Colors { - inline constexpr ::Color LIGHTGRAY = CLITERAL(::Color){ 200, 200, 200, 255 }; - inline constexpr ::Color GRAY = CLITERAL(::Color){ 130, 130, 130, 255 }; - inline constexpr ::Color DARKGRAY = CLITERAL(::Color){ 80, 80, 80, 255 }; - inline constexpr ::Color YELLOW = CLITERAL(::Color){ 253, 249, 0, 255 }; - inline constexpr ::Color GOLD = CLITERAL(::Color){ 255, 203, 0, 255 }; - inline constexpr ::Color ORANGE = CLITERAL(::Color){ 255, 161, 0, 255 }; - inline constexpr ::Color PINK = CLITERAL(::Color){ 255, 109, 194, 255 }; - inline constexpr ::Color RED = CLITERAL(::Color){ 230, 41, 55, 255 }; - inline constexpr ::Color MAROON = CLITERAL(::Color){ 190, 33, 55, 255 }; - inline constexpr ::Color GREEN = CLITERAL(::Color){ 0, 228, 48, 255 }; - inline constexpr ::Color LIME = CLITERAL(::Color){ 0, 158, 47, 255 }; - inline constexpr ::Color DARKGREEN = CLITERAL(::Color){ 0, 117, 44, 255 }; - inline constexpr ::Color SKYBLUE = CLITERAL(::Color){ 102, 191, 255, 255 }; - inline constexpr ::Color BLUE = CLITERAL(::Color){ 0, 121, 241, 255 }; - inline constexpr ::Color DARKBLUE = CLITERAL(::Color){ 0, 82, 172, 255 }; - inline constexpr ::Color PURPLE = CLITERAL(::Color){ 200, 122, 255, 255 }; - inline constexpr ::Color VIOLET = CLITERAL(::Color){ 135, 60, 190, 255 }; - inline constexpr ::Color DARKPURPLE = CLITERAL(::Color){ 112, 31, 126, 255 }; - inline constexpr ::Color BEIGE = CLITERAL(::Color){ 211, 176, 131, 255 }; - inline constexpr ::Color BROWN = CLITERAL(::Color){ 127, 106, 79, 255 }; - inline constexpr ::Color DARKBROWN = CLITERAL(::Color){ 76, 63, 47, 255 }; - inline constexpr ::Color WHITE = CLITERAL(::Color){ 255, 255, 255, 255 }; - inline constexpr ::Color BLACK = CLITERAL(::Color){ 0, 0, 0, 255 }; - inline constexpr ::Color BLANK = CLITERAL(::Color){ 0, 0, 0, 0 }; - inline constexpr ::Color MAGENTA = CLITERAL(::Color){ 255, 0, 255, 255 }; - inline constexpr ::Color RAYWHITE = CLITERAL(::Color){ 245, 245, 245, 255 }; - } - - /** - * @namespace raylib::Keyboard - * @brief Input-related functions: keyboard - */ - namespace Keyboard { - using raylib::Keyboard::IsKeyPressed; - using raylib::Keyboard::IsKeyPressedRepeat; - using raylib::Keyboard::IsKeyDown; - using raylib::Keyboard::IsKeyReleased; - using raylib::Keyboard::IsKeyUp; - using raylib::Keyboard::GetKeyPressed; - using raylib::Keyboard::GetCharPressed; - } - - /** - * @namespace raylib::Mouse - * @brief Input-related functions: mouse - */ - namespace Mouse { - using raylib::Mouse::IsButtonPressed; - using raylib::Mouse::IsButtonDown; - using raylib::Mouse::IsButtonReleased; - using raylib::Mouse::IsButtonUp; - using raylib::Mouse::GetX; - using raylib::Mouse::GetY; - using raylib::Mouse::SetX; - using raylib::Mouse::SetY; - using raylib::Mouse::GetPosition; - using raylib::Mouse::SetPosition; - using raylib::Mouse::GetDelta; - using raylib::Mouse::SetOffset; - using raylib::Mouse::SetScale; - using raylib::Mouse::GetWheelMove; - using raylib::Mouse::GetWheelMoveV; - using raylib::Mouse::SetCursor; - using raylib::Mouse::GetTouchX; - using raylib::Mouse::GetTouchY; - using raylib::Mouse::GetTouchPosition; - using raylib::Mouse::GetRay; - } - - /** - * @namespace raylib::Touch - * @brief Input-related functions: touch - */ - namespace Touch { - using raylib::Touch::GetX; - using raylib::Touch::GetY; - using raylib::Touch::GetPosition; - using raylib::Touch::GetPointId; - using raylib::Touch::GetPointCount; - } - - -} // namespace raylib - -#ifdef RAYLIB_CPP_R_PREFIXES -export { - using RAudioDevice = raylib::AudioDevice; - using RAudioStream = raylib::AudioStream; - using RAutomationEventList = raylib::AutomationEventList; - using RBoundingBox = raylib::BoundingBox; - using RCamera = raylib::Camera; // Alias for Camera3D - using RCamera2D = raylib::Camera2D; - using RCamera3D = raylib::Camera3D; - using RColor = raylib::Color; - using RFileData = raylib::FileData; - using RFileText = raylib::FileText; - using RFont = raylib::Font; - using RGamepad = raylib::Gamepad; - using RImage = raylib::Image; - using RMaterial = raylib::Material; - using RMatrix = raylib::Matrix; - using RMesh = raylib::Mesh; - using RModel = raylib::Model; - using RModelAnimation = raylib::ModelAnimation; - using RMusic = raylib::Music; - using RRay = raylib::Ray; - using RRayCollision = raylib::RayCollision; - using RRaylibException = raylib::RaylibException; - using RRectangle = raylib::Rectangle; - using RRenderTexture = raylib::RenderTexture; - using RRenderTexture2D = raylib::RenderTexture2D; // Alias for RenderTexture - using RShader = raylib::Shader; - using RSound = raylib::Sound; - using RText = raylib::Text; - using RTexture = raylib::Texture; - using RTexture2D = raylib::Texture2D; // Alias for Texture - using RTextureCubemap = raylib::TextureCubemap; // Alias for Texture - using RTextureUnmanaged = raylib::TextureUnmanaged; - using RTexture2DUnmanaged = raylib::Texture2DUnmanaged; // Alias for TextureUnmanaged - using RTextureCubemapUnmanaged = raylib::TextureCubemapUnmanaged; // Alias for TextureUnmanaged - using RVector2 = raylib::Vector2; - using RVector3 = raylib::Vector3; - using RVector4 = raylib::Vector4; - using RQuaternion = raylib::Quaternion; // Alias for Vector4 - using RVrStereoConfig = raylib::VrStereoConfig; - using RWave = raylib::Wave; - using RWindow = raylib::Window; -} -#endif diff --git a/namespacemembers.html b/namespacemembers.html new file mode 100644 index 00000000..6a96f750 --- /dev/null +++ b/namespacemembers.html @@ -0,0 +1,324 @@ + + + + + + + +raylib-cpp: Namespace Members + + + + + + + + + + +
    +
    + + + + + + + +
    +
    raylib-cpp +
    +
    C++ object-oriented wrapper library for raylib.
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    Here is a list of all documented namespace members with links to the namespaces they belong to:
    + +

    - c -

      +
    • ChangeDirectory() +: raylib +
    • +
    + + +

    - d -

    + + +

    - e -

      +
    • ExportImage() +: raylib +
    • +
    • ExportImageAsCode() +: raylib +
    • +
    + + +

    - f -

    + + +

    - g -

    + + +

    - i -

    + + +

    - l -

    + + +

    - m -

    + + +

    - o -

    + + +

    - s -

    + + +

    - t -

    +
    + + + + diff --git a/namespacemembers_func.html b/namespacemembers_func.html new file mode 100644 index 00000000..fe138341 --- /dev/null +++ b/namespacemembers_func.html @@ -0,0 +1,324 @@ + + + + + + + +raylib-cpp: Namespace Members + + + + + + + + + + +
    +
    + + + + + + + +
    +
    raylib-cpp +
    +
    C++ object-oriented wrapper library for raylib.
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +  + +

    - c -

      +
    • ChangeDirectory() +: raylib +
    • +
    + + +

    - d -

    + + +

    - e -

      +
    • ExportImage() +: raylib +
    • +
    • ExportImageAsCode() +: raylib +
    • +
    + + +

    - f -

    + + +

    - g -

    + + +

    - i -

    + + +

    - l -

    + + +

    - m -

    + + +

    - o -

    + + +

    - s -

    + + +

    - t -

    +
    + + + + diff --git a/namespaceraylib.html b/namespaceraylib.html new file mode 100644 index 00000000..e701d328 --- /dev/null +++ b/namespaceraylib.html @@ -0,0 +1,440 @@ + + + + + + + +raylib-cpp: raylib Namespace Reference + + + + + + + + + + +
    +
    + + + + + + + +
    +
    raylib-cpp +
    +
    C++ object-oriented wrapper library for raylib.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    raylib Namespace Reference
    +
    +
    + +

    All raylib-cpp classes and functions appear in the raylib namespace. +More...

    + + + + + + + + + + + +

    +Namespaces

     Keyboard
     Input-related functions: keyboard.
     
     Mouse
     Input-related functions: mouse.
     
     Touch
     Input-related functions: touch.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Classes

    class  AudioDevice
     Audio device management functions. More...
     
    class  AudioStream
     AudioStream management functions. More...
     
    class  AutomationEventList
     AutomationEventList management functions. More...
     
    class  BoundingBox
     Bounding box type. More...
     
    class  Camera2D
     Camera2D type, defines a 2d camera. More...
     
    class  Camera3D
     Camera type, defines a camera position/orientation in 3d space. More...
     
    class  Color
     Color type, RGBA (32bit) More...
     
    class  Font
     Font type, includes texture and charSet array data. More...
     
    class  Gamepad
     Input-related functions: gamepads. More...
     
    class  Image
     Image type, bpp always RGBA (32bit) More...
     
    class  Material
     Material type (generic) More...
     
    class  Matrix
     Matrix type (OpenGL style 4x4 - right handed, column major) More...
     
    class  Mesh
     Vertex data defining a mesh. More...
     
    class  MeshUnmanaged
     Vertex data defining a mesh, not managed by C++ RAII. More...
     
    class  Model
     Model type. More...
     
    class  ModelAnimation
     Model animation. More...
     
    class  Music
     Music stream type (audio file streaming from memory) More...
     
    class  Ray
     Ray type (useful for raycast) More...
     
    class  RayCollision
     Raycast hit information. More...
     
    class  RaylibException
     Exception used for most raylib-related exceptions. More...
     
    class  Rectangle
     Rectangle type. More...
     
    class  RenderTexture
     RenderTexture type, for texture rendering. More...
     
    class  Shader
     Shader type (generic) More...
     
    class  ShaderUnmanaged
     Shader type (generic), not managed by C++ RAII. More...
     
    class  Sound
     Wave/Sound management functions. More...
     
    class  Text
     Text Functions. More...
     
    class  Texture
     Texture type. More...
     
    class  TextureUnmanaged
     A Texture that is not managed by C++ RAII. More...
     
    class  Vector2
     Vector2 type. More...
     
    class  Vector3
     Vector3 type. More...
     
    class  Vector4
     Vector4 type. More...
     
    class  VrStereoConfig
     VR stereo config functions for VR simulator. More...
     
    class  Wave
     Wave type, defines audio wave data. More...
     
    class  Window
     Window and Graphics Device Functions. More...
     
    + + + + + + + + + + + + + + + +

    +Typedefs

    +using Camera = Camera3D
     
    +using Quaternion = Vector4
     
    +using RenderTexture2D = RenderTexture
     
    +using Texture2D = Texture
     
    +using Texture2DUnmanaged = TextureUnmanaged
     
    +using TextureCubemap = Texture
     
    +using TextureCubemapUnmanaged = TextureUnmanaged
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    +static bool ChangeDirectory (const std::string &dir)
     Change working directory, return true on success.
     
    +static bool DirectoryExists (const std::string &dirPath)
     Check if directory path exists.
     
    +static void DrawText (const char *text, int posX, int posY, int fontSize, ::Color color)
     Draw text (using default font)
     
    +static void DrawText (const std::string &text, int posX, int posY, int fontSize, ::Color color)
     Draw text (using default font)
     
    +static void DrawTextEx (const Font &font, char *text, Vector2 position, float fontSize, float spacing, ::Color tint)
     Draw text using font and additional parameters.
     
    +static void DrawTextEx (const Font &font, const std::string &text, Vector2 position, float fontSize, float spacing, ::Color tint)
     Draw text using font and additional parameters.
     
    +static void DrawTextPro (const Font &font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint)
     Draw text using Font and pro parameters (rotation)
     
    +static void DrawTextPro (const Font &font, const std::string &text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint)
     Draw text using Font and pro parameters (rotation)
     
    +static bool ExportImage (const Image &image, const std::string &fileName)
     Export image data to file.
     
    +static bool ExportImageAsCode (const Image &image, const std::string &fileName)
     Export image as code file (.h) defining an array of bytes.
     
    +static bool FileExists (const std::string &fileName)
     Check if file exists.
     
    +static std::string GetClipboardText ()
     Get clipboard text content.
     
    +static std::string GetDirectoryPath (const std::string &filePath)
     Get full path for a given fileName with path.
     
    +static std::string GetFileExtension (const std::string &fileName)
     Get pointer to extension for a filename string (including point: ".png")
     
    +static long GetFileModTime (const std::string &fileName)
     Get file modification time (last write time)
     
    +static std::string GetFileName (const std::string &filePath)
     Get pointer to filename for a path string.
     
    +static std::string GetFileNameWithoutExt (const std::string &filePath)
     Get filename string without extension.
     
    +static std::string GetGamepadName (int gamepad)
     Get gamepad internal name id.
     
    +static std::string GetMonitorName (int monitor=0)
     Get the human-readable, UTF-8 encoded name of the primary monitor.
     
    +static std::string GetPrevDirectoryPath (const std::string &dirPath)
     Get previous directory path for a given path.
     
    +static std::string GetWorkingDirectory ()
     Get current working directory.
     
    +static void InitWindow (int width, int height, const std::string &title="raylib")
     Initialize window and OpenGL context.
     
    +static bool IsFileExtension (const std::string &fileName, const std::string &ext)
     Check file extension (including point: .png, .wav)
     
    +static std::vector< std::string > LoadDirectoryFiles (const std::string &dirPath)
     Get filenames in a directory path.
     
    +static std::vector< std::string > LoadDroppedFiles ()
     Get dropped files names.
     
    +static std::string LoadFileText (const std::string &fileName)
     Load text data from file (read)
     
    +static inline ::Font LoadFont (const std::string &fileName)
     Load font from file (filename must include file extension)
     
    +static inline ::Font LoadFontEx (const std::string &fileName, int fontSize, int *fontChars, int charsCount)
     Load font from file (filename must include file extension)
     
    +static inline ::Image LoadImage (const std::string &fileName)
     Load an image.
     
    +static inline ::Image LoadImageAnim (const std::string &fileName, int *frames)
     Load animated image data.
     
    +static inline ::Image LoadImageFromMemory (const std::string &fileType, const unsigned char *fileData, int dataSize)
     Load image from memory buffer, fileType refers to extension like "png".
     
    +static inline ::Image LoadImageRaw (const std::string &fileName, int width, int height, int format, int headerSize)
     Load an image from RAW file data.
     
    +static int MeasureText (const char *text, int fontSize)
     Measure string width for default font.
     
    +static int MeasureText (const std::string &text, int fontSize)
     Measure string width for default font.
     
    +static void OpenURL (const std::string &url)
     Open URL with default system browser (if available)
     
    +static bool SaveFileText (const std::string &fileName, const std::string &text)
     Save text data to file (write)
     
    +static void SetClipboardText (const std::string &text)
     Set clipboard text content.
     
    +static void SetWindowTitle (const std::string &title)
     Set title for window.
     
    +static void TakeScreenshot (const std::string &fileName)
     Takes a screenshot of current screen (saved a .png)
     
    +static int TextFindIndex (const std::string &text, const std::string &find)
     Find first text occurrence within a string.
     
    +static std::string TextInsert (const std::string &text, const std::string &insert, int position)
     Insert text in a position.
     
    +static bool TextIsEqual (const char *text1, const char *text2)
     Check if two text string are equal.
     
    +static bool TextIsEqual (const std::string &text1, const std::string &text2)
     Check if two text string are equal.
     
    +static unsigned int TextLength (const char *text)
     Check if two text string are equal.
     
    +static unsigned int TextLength (const std::string &text)
     Check if two text string are equal.
     
    +static std::string TextReplace (const std::string &text, const std::string &replace, const std::string &by)
     Replace text string.
     
    +static std::vector< std::string > TextSplit (const std::string &text, char delimiter)
     Split text into multiple strings.
     
    +static std::string TextSubtext (const std::string &text, int position, int length)
     Get text length, checks for '\0' ending.
     
    +static int TextToInteger (const std::string &text)
     Get integer value from text (negative values not supported)
     
    +static std::string TextToLower (const std::string &text)
     Get lower case version of provided string.
     
    +static std::string TextToPascal (const std::string &text)
     Get Pascal case notation version of provided string.
     
    +static std::string TextToUpper (const std::string &text)
     Get upper case version of provided string.
     
    +

    Detailed Description

    +

    All raylib-cpp classes and functions appear in the raylib namespace.

    +
    + + + + diff --git a/namespaceraylib_1_1_keyboard.html b/namespaceraylib_1_1_keyboard.html new file mode 100644 index 00000000..30b7e28f --- /dev/null +++ b/namespaceraylib_1_1_keyboard.html @@ -0,0 +1,120 @@ + + + + + + + +raylib-cpp: raylib::Keyboard Namespace Reference + + + + + + + + + + +
    +
    + + + + + + + +
    +
    raylib-cpp +
    +
    C++ object-oriented wrapper library for raylib.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    raylib::Keyboard Namespace Reference
    +
    +
    + +

    Input-related functions: keyboard. +More...

    + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    +RLCPPAPI int GetCharPressed ()
     Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty.
     
    +RLCPPAPI int GetKeyPressed ()
     Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty.
     
    +RLCPPAPI bool IsKeyDown (int key)
     Detect if a key is being pressed.
     
    +RLCPPAPI bool IsKeyPressed (int key)
     Detect if a key has been pressed once.
     
    +RLCPPAPI bool IsKeyPressedRepeat (int key)
     Detect if a key has been pressed again (Only PLATFORM_DESKTOP)
     
    +RLCPPAPI bool IsKeyReleased (int key)
     Detect if a key has been released once.
     
    +RLCPPAPI bool IsKeyUp (int key)
     Detect if a key is NOT being pressed.
     
    +

    Detailed Description

    +

    Input-related functions: keyboard.

    +
    + + + + diff --git a/namespaceraylib_1_1_mouse.html b/namespaceraylib_1_1_mouse.html new file mode 100644 index 00000000..598f2d22 --- /dev/null +++ b/namespaceraylib_1_1_mouse.html @@ -0,0 +1,236 @@ + + + + + + + +raylib-cpp: raylib::Mouse Namespace Reference + + + + + + + + + + +
    +
    + + + + + + + +
    +
    raylib-cpp +
    +
    C++ object-oriented wrapper library for raylib.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    raylib::Mouse Namespace Reference
    +
    +
    + +

    Input-related functions: mouse. +More...

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    +RLCPPAPI Vector2 GetDelta ()
     Get mouse delta between frames.
     
    +RLCPPAPI Vector2 GetPosition ()
     
    +RLCPPAPI Ray GetRay (::Vector2 mousePosition, const ::Camera &camera)
     Get a ray trace from mouse position.
     
    +RLCPPAPI Ray GetRay (const ::Camera &camera)
     Get a ray trace from mouse position.
     
    +RLCPPAPI Vector2 GetTouchPosition (int index)
     Get touch position XY for a touch point index (relative to screen size)
     
    +RLCPPAPI int GetTouchX ()
     Get touch position X for touch point 0 (relative to screen size)
     
    +RLCPPAPI int GetTouchY ()
     Get touch position Y for touch point 0 (relative to screen size)
     
    +RLCPPAPI float GetWheelMove ()
     Get mouse wheel movement for X or Y, whichever is larger.
     
    RLCPPAPI Vector2 GetWheelMoveV ()
     Get mouse wheel movement for both X and Y. More...
     
    +RLCPPAPI int GetX ()
     
    +RLCPPAPI int GetY ()
     
    +RLCPPAPI bool IsButtonDown (int button)
     Detect if a mouse button is being pressed.
     
    +RLCPPAPI bool IsButtonPressed (int button)
     Detect if a mouse button has been pressed once.
     
    +RLCPPAPI bool IsButtonReleased (int button)
     Detect if a mouse button has been released once.
     
    +RLCPPAPI bool IsButtonUp (int button)
     
    RLCPPAPI void SetCursor (int cursor=MOUSE_CURSOR_DEFAULT)
     Sets the current mouse cursor icon. More...
     
    +RLCPPAPI void SetOffset (::Vector2 offset)
     
    +RLCPPAPI void SetOffset (int offsetX=0, int offsetY=0)
     
    +RLCPPAPI void SetPosition (::Vector2 position)
     
    +RLCPPAPI void SetPosition (int x, int y)
     
    +RLCPPAPI void SetScale (::Vector2 scale)
     
    +RLCPPAPI void SetScale (float scaleX=1.0f, float scaleY=1.0f)
     
    +RLCPPAPI void SetX (int x)
     
    +RLCPPAPI void SetY (int y)
     
    +

    Detailed Description

    +

    Input-related functions: mouse.

    +

    Function Documentation

    + +

    ◆ GetWheelMoveV()

    + +
    +
    + + + + + +
    + + + + + + + +
    RLCPPAPI Vector2 raylib::Mouse::GetWheelMoveV ()
    +
    +inline
    +
    + +

    Get mouse wheel movement for both X and Y.

    +
    See also
    ::GetMouseWheelMoveV()
    + +

    Definition at line 100 of file Mouse.hpp.

    + +
    +
    + +

    ◆ SetCursor()

    + +
    +
    + + + + + +
    + + + + + + + + +
    RLCPPAPI void raylib::Mouse::SetCursor (int cursor = MOUSE_CURSOR_DEFAULT)
    +
    +inline
    +
    + +

    Sets the current mouse cursor icon.

    +
    See also
    ::MouseCursor
    + +

    Definition at line 109 of file Mouse.hpp.

    + +
    +
    +
    + + + + diff --git a/namespaceraylib_1_1_touch.html b/namespaceraylib_1_1_touch.html new file mode 100644 index 00000000..5961cd03 --- /dev/null +++ b/namespaceraylib_1_1_touch.html @@ -0,0 +1,112 @@ + + + + + + + +raylib-cpp: raylib::Touch Namespace Reference + + + + + + + + + + +
    +
    + + + + + + + +
    +
    raylib-cpp +
    +
    C++ object-oriented wrapper library for raylib.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    raylib::Touch Namespace Reference
    +
    +
    + +

    Input-related functions: touch. +More...

    + + + + + + + + + + + + + + + + + +

    +Functions

    +RLCPPAPI int GetPointCount ()
     Get number of touch points.
     
    +RLCPPAPI int GetPointId (int index)
     Get touch point identifier for given index.
     
    +RLCPPAPI Vector2 GetPosition (int index)
     Get touch position XY for a touch point index (relative to screen size)
     
    +RLCPPAPI int GetX ()
     Get touch position X for touch point 0 (relative to screen size)
     
    +RLCPPAPI int GetY ()
     Get touch position Y for touch point 0 (relative to screen size)
     
    +

    Detailed Description

    +

    Input-related functions: touch.

    +
    + + + + diff --git a/namespaces.html b/namespaces.html new file mode 100644 index 00000000..6fb842d2 --- /dev/null +++ b/namespaces.html @@ -0,0 +1,119 @@ + + + + + + + +raylib-cpp: Namespace List + + + + + + + + + + +
    +
    + + + + + + + +
    +
    raylib-cpp +
    +
    C++ object-oriented wrapper library for raylib.
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    Namespace List
    +
    +
    +
    Here is a list of all documented namespaces with brief descriptions:
    +
    [detail level 12]
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     NraylibAll raylib-cpp classes and functions appear in the raylib namespace
     NKeyboardInput-related functions: keyboard
     NMouseInput-related functions: mouse
     NTouchInput-related functions: touch
     CAudioDeviceAudio device management functions
     CAudioStreamAudioStream management functions
     CAutomationEventListAutomationEventList management functions
     CBoundingBoxBounding box type
     CCamera2DCamera2D type, defines a 2d camera
     CCamera3DCamera type, defines a camera position/orientation in 3d space
     CColorColor type, RGBA (32bit)
     CFontFont type, includes texture and charSet array data
     CGamepadInput-related functions: gamepads
     CImageImage type, bpp always RGBA (32bit)
     CMaterialMaterial type (generic)
     CMatrixMatrix type (OpenGL style 4x4 - right handed, column major)
     CMeshVertex data defining a mesh
     CMeshUnmanagedVertex data defining a mesh, not managed by C++ RAII
     CModelModel type
     CModelAnimationModel animation
     CMusicMusic stream type (audio file streaming from memory)
     CRayRay type (useful for raycast)
     CRayCollisionRaycast hit information
     CRaylibExceptionException used for most raylib-related exceptions
     CRectangleRectangle type
     CRenderTextureRenderTexture type, for texture rendering
     CShaderShader type (generic)
     CShaderUnmanagedShader type (generic), not managed by C++ RAII
     CSoundWave/Sound management functions
     CTextText Functions
     CTextureTexture type
     CTextureUnmanagedA Texture that is not managed by C++ RAII
     CVector2Vector2 type
     CVector3Vector3 type
     CVector4Vector4 type
     CVrStereoConfigVR stereo config functions for VR simulator
     CWaveWave type, defines audio wave data
     CWindowWindow and Graphics Device Functions
    +
    +
    + + + + diff --git a/nav_f.png b/nav_f.png new file mode 100644 index 00000000..72a58a52 Binary files /dev/null and b/nav_f.png differ diff --git a/nav_g.png b/nav_g.png new file mode 100644 index 00000000..2093a237 Binary files /dev/null and b/nav_g.png differ diff --git a/nav_h.png b/nav_h.png new file mode 100644 index 00000000..33389b10 Binary files /dev/null and b/nav_h.png differ diff --git a/open.png b/open.png new file mode 100644 index 00000000..30f75c7e Binary files /dev/null and b/open.png differ diff --git a/package.json b/package.json deleted file mode 100644 index 615102d1..00000000 --- a/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "raylib-cpp", - "version": "5.5.0", - "description": "raylib-cpp: C++ Object-Oriented Wrapper for raylib", - "main": "index.js", - "private": true, - "directories": { - "doc": "docs", - "example": "examples", - "test": "tests" - }, - "scripts": { - "prebuild": "cmake -S . -B build", - "build": "cmake --build build", - "test": "build/tests/raylib_cpp_test", - "pretest": "npm run build", - "deploy": "gh-pages -d docs", - "predeploy": "npm run docs", - "docs": "doxygen projects/Doxygen/Doxyfile", - "predocs": "git submodule update --init" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/RobLoach/raylib-cpp.git" - }, - "author": "Rob Loach (https://robloach.net)", - "license": "Zlib", - "bugs": { - "url": "https://github.com/RobLoach/raylib-cpp/issues" - }, - "homepage": "https://github.com/RobLoach/raylib-cpp#readme", - "devDependencies": { - "gh-pages": "^6.1.1" - } -} diff --git a/projects/CMake/.gitignore b/projects/CMake/.gitignore deleted file mode 100644 index 796b96d1..00000000 --- a/projects/CMake/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt deleted file mode 100644 index 8fe355ca..00000000 --- a/projects/CMake/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(raylib_cpp_example) - -# raylib -find_package(raylib QUIET) -if (NOT raylib_FOUND) - include(FetchContent) - FetchContent_Declare( - raylib - GIT_REPOSITORY https://github.com/raysan5/raylib.git - GIT_TAG 5e6cdf3 - GIT_SHALLOW 1 - ) - FetchContent_MakeAvailable(raylib) -endif() - -# raylib-cpp -find_package(raylib_cpp QUIET) -if (NOT raylib_cpp_FOUND) - if (NOT DEFINED RAYLIB_CPP_VERSION) - set(RAYLIB_CPP_VERSION next) - endif() - include(FetchContent) - FetchContent_Declare( - raylib_cpp - GIT_REPOSITORY https://github.com/RobLoach/raylib-cpp.git - GIT_TAG ${RAYLIB_CPP_VERSION} - ) - FetchContent_MakeAvailable(raylib_cpp) -endif() - -# This is the main part: -set(SOURCES main.cpp) -add_executable(${PROJECT_NAME} ${SOURCES}) -set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) -target_link_libraries(${PROJECT_NAME} PUBLIC raylib raylib_cpp) - -# Web Configurations -if (${PLATFORM} STREQUAL "Web") - # Tell Emscripten to build an example.html file. - set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".html") - - # Required linker flags for using Raylib with Emscripten - target_link_options(${PROJECT_NAME} PRIVATE -sEXPORTED_FUNCTIONS=['_main','_malloc'] -sEXPORTED_RUNTIME_METHODS=ccall -sUSE_GLFW=3) -endif() - -# That's it! You should have an example executable that you can run. Have fun! diff --git a/projects/CMake/README.md b/projects/CMake/README.md deleted file mode 100644 index e3d99de5..00000000 --- a/projects/CMake/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# raylib-cpp CMake Example Project - -Use this template to build a [raylib-cpp](https://github.com/RobLoach/raylib-cpp) project using [CMake](https://cmake.org). - -## Build - -To build this project, make sure to have CMake installed locally. - -### Desktop - -``` -mkdir build -cd build -cmake .. -make -``` - -### Web - -``` -mkdir build -cd build -emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -emmake make -``` - -## Run - -``` -./raylib-cpp-example -``` diff --git a/projects/CMake/main.cpp b/projects/CMake/main.cpp deleted file mode 100644 index e928af0e..00000000 --- a/projects/CMake/main.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************************* -* -* raylib-cpp [core] example - Basic window (adapted for HTML5 platform) -* -* This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI -* As you will notice, code structure is slightly diferent to the other examples... -* To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning -* -* This example has been created using raylib-cpp (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2015 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib-cpp.hpp" - -#if defined(PLATFORM_WEB) - #include -#endif - -//---------------------------------------------------------------------------------- -// Global Variables Definition -//---------------------------------------------------------------------------------- -int screenWidth = 800; -int screenHeight = 450; - -//---------------------------------------------------------------------------------- -// Module Functions Declaration -//---------------------------------------------------------------------------------- -void UpdateDrawFrame(void); // Update and Draw one frame - -//---------------------------------------------------------------------------------- -// Main Enry Point -//---------------------------------------------------------------------------------- -int main() -{ - // Initialization - //-------------------------------------------------------------------------------------- - raylib::Window window(screenWidth, screenHeight, "raylib-cpp [core] example - basic window"); - -#if defined(PLATFORM_WEB) - emscripten_set_main_loop(UpdateDrawFrame, 0, 1); -#else - SetTargetFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.ShouldClose()) // Detect window close button or ESC key - { - UpdateDrawFrame(); - } -#endif - - return 0; -} - -//---------------------------------------------------------------------------------- -// Module Functions Definition -//---------------------------------------------------------------------------------- -void UpdateDrawFrame(void) -{ - // Update - //---------------------------------------------------------------------------------- - // TODO: Update your variables here - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - - ClearBackground(RAYWHITE); - - DrawText("Congrats! You created your first raylib-cpp window!", 160, 200, 20, LIGHTGRAY); - - EndDrawing(); - //---------------------------------------------------------------------------------- -} diff --git a/projects/Doxygen/Doxyfile b/projects/Doxygen/Doxyfile deleted file mode 100644 index 01b882b1..00000000 --- a/projects/Doxygen/Doxyfile +++ /dev/null @@ -1,2310 +0,0 @@ -# Doxyfile 1.8.7 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "raylib-cpp" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "C++ object-oriented wrapper library for raylib." - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = projects/Doxygen/raylib-cpp_55x55.png - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = docs - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = NO - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = YES - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = YES - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = NO - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = NO - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = YES - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = YES - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = NO - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - -GENERATE_TESTLIST = NO - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = NO - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= NO - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = NO - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = include - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = vendor - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = examples - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = YES - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = . - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = projects/Doxygen/doxygen-awesome-css/doxygen-awesome.css - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /