Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 119-graphicspipeline-refactoring
  • 129-projekte-und-assets-auslagern
  • 132-denoising-module
  • 143-ar-vr-support-via-openxr
  • 43-multi-threading
  • 91-compute-first-network
  • 95-arm64-raspberry-pi-4-support
  • develop
  • master
  • optimizations
  • 0.1.0
  • 0.2.0
12 results

Target

Select target project
  • vulkan2021/vkcv-framework
1 result
Select Git revision
  • 119-graphicspipeline-refactoring
  • 129-projekte-und-assets-auslagern
  • 132-denoising-module
  • 143-ar-vr-support-via-openxr
  • 43-multi-threading
  • 91-compute-first-network
  • 95-arm64-raspberry-pi-4-support
  • develop
  • master
  • optimizations
  • 0.1.0
  • 0.2.0
12 results
Show changes
Commits on Source (7)
Showing
with 875 additions and 44 deletions
......@@ -7,6 +7,7 @@
.editorconfig
# build directories
bin/
build/
cmake-build-debug/
cmake-build-release/
......
......@@ -14,7 +14,7 @@
path = modules/asset_loader/lib/stb
url = https://github.com/nothings/stb.git
[submodule "modules/camera/lib/glm"]
path = modules/camera/lib/glm
path = modules/geometry/lib/glm
url = https://github.com/g-truc/glm.git
[submodule "modules/shader_compiler/lib/glslang"]
path = modules/shader_compiler/lib/glslang
......
......@@ -23,23 +23,25 @@ Detailed build process:
Most dependencies will be used via submodules but for example Vulkan needs to be installed correctly depending on your platform. So please setup your environment properly.
| Name of dependency | Used as submodule |
|-----------------------------------|---|
| [Vulkan](https://www.vulkan.org/) | ❌ |
| [Vulkan-Headers](https://github.com/KhronosGroup/Vulkan-Headers) | ✅ |
| [Vulkan-Hpp](https://github.com/KhronosGroup/Vulkan-Hpp) | ✅ |
| [GLFW](https://www.glfw.org/) | ✅ |
| [SPIRV-CROSS](https://github.com/KhronosGroup/SPIRV-Cross) | ✅ |
| Name of dependency | Used as submodule |
|-----------------------------------------------------------------------------------|---|
| [Vulkan](https://www.vulkan.org/) | ❌ |
| [Vulkan-Headers](https://github.com/KhronosGroup/Vulkan-Headers) | ✅ |
| [Vulkan-Hpp](https://github.com/KhronosGroup/Vulkan-Hpp) | ✅ |
| [GLFW](https://www.glfw.org/) | ✅ |
| [SPIRV-CROSS](https://github.com/KhronosGroup/SPIRV-Cross) | ✅ |
| [VulkanMemoryAllocator-Hpp](https://github.com/malte-v/VulkanMemoryAllocator-Hpp) | ✅ |
### Modules (optional):
The following modules will be provided in this repository and they will automatically be builded together with the framework if used. You can configure/adjust the build using CMake if necessary.
- [Algorithm](modules/algorithm/README.md)
- [Asset-Loader](modules/asset_loader/README.md)
- [Camera](modules/asset_loader/README.md)
- [GUI](modules/gui/README.md)
- [Effects](modules/effects/README.md)
- [Geometry](modules/geometry/README.md)
- [Material](modules/material/README.md)
- [Meshlet](modules/meshlet/README.md)
- [Scene](modules/scene/README.md)
......
......@@ -102,6 +102,19 @@ namespace vkcv {
void fill(const std::vector<T> &vector, size_t offset = 0) {
fill(static_cast<const T*>(vector.data()), static_cast<size_t>(vector.size()), offset);
}
/**
* @brief Fills the #Buffer with data from an array of type T
* and size N.
*
* @tparam N Size of the array to be copied into the #Buffer
* @param array Array of type T to be copied into the #Buffer
* @param offset The offset into the #Buffer where the data is copied into
*/
template<size_t N>
void fill(const std::array<T, N> &array, size_t offset = 0) {
fill(static_cast<const T*>(array.data()), N, offset);
}
/**
* @brief Reads the #Buffer directly into a data pointer of type T.
......
......@@ -324,6 +324,16 @@ namespace vkcv {
*/
[[nodiscard]] bool checkSupport(const vk::PhysicalDeviceVulkan13Features &features,
bool required) const;
/**
* @brief Checks support of the @p vk::PhysicalDeviceIndexTypeUint8FeaturesEXT.
*
* @param[in] features The features
* @param[in] required True, if the @p features are required, else false
* @return @p True, if the @p features are supported, else @p false
*/
[[nodiscard]] bool checkSupport(const vk::PhysicalDeviceIndexTypeUint8FeaturesEXT &features,
bool required) const;
/**
* @brief Searches for a base structure of a given structure type.
......
......@@ -7,6 +7,7 @@ add_subdirectory(algorithm)
add_subdirectory(asset_loader)
add_subdirectory(camera)
add_subdirectory(effects)
add_subdirectory(geometry)
add_subdirectory(gui)
add_subdirectory(material)
add_subdirectory(meshlet)
......
......@@ -27,15 +27,21 @@ add_library(vkcv_camera ${vkcv_build_attribute} ${vkcv_camera_sources})
set(vkcv_camera_lib lib)
set(vkcv_camera_lib_path ${PROJECT_SOURCE_DIR}/${vkcv_camera_lib})
include(config/GLM.cmake)
target_link_libraries(vkcv_camera PUBLIC ${vkcv_camera_libraries} vkcv)
target_link_libraries(vkcv_camera PUBLIC
${vkcv_camera_libraries}
vkcv
vkcv_geometry
)
target_include_directories(vkcv_camera SYSTEM BEFORE PRIVATE ${vkcv_camera_includes} ${vkcv_include} ${vkcv_includes})
target_include_directories(vkcv_camera SYSTEM BEFORE PRIVATE
${vkcv_camera_includes}
${vkcv_include}
${vkcv_includes}
${vkcv_geometry_include}
)
# add the own include directory for public headers
target_include_directories(vkcv_camera BEFORE PUBLIC ${vkcv_camera_include} ${vkcv_camera_includes})
target_compile_definitions(vkcv_camera PUBLIC ${vkcv_camera_definitions})
if (vkcv_parent_scope)
......
......@@ -2,14 +2,6 @@
A VkCV module to manage cameras and their handle view and projection matrices
## Build
### Dependencies (required):
| Name of dependency | Used as submodule |
|----------------------------------------------------|---|
| [GLM](https://github.com/g-truc/glm) | ✅ |
## Docs
Here is a [link](https://userpages.uni-koblenz.de/~vkcv/doc/group__vkcv__camera.html) to this module.
find_package(glm QUIET)
if (glm_FOUND)
list(APPEND vkcv_camera_includes ${GLM_INCLUDE_DIRS})
list(APPEND vkcv_camera_libraries glm)
else()
use_git_submodule("${vkcv_camera_lib_path}/glm" glm_status)
if (${glm_status})
add_subdirectory(${vkcv_camera_lib}/glm)
list(APPEND vkcv_camera_includes ${vkcv_camera_lib_path}/glm)
list(APPEND vkcv_camera_libraries glm)
endif ()
endif ()
list(APPEND vkcv_camera_definitions GLM_DEPTH_ZERO_TO_ONE)
list(APPEND vkcv_camera_definitions GLM_FORCE_LEFT_HANDED)
if ((WIN32) AND (${CMAKE_SIZEOF_VOID_P} MATCHES 4))
list(APPEND vkcv_camera_definitions GLM_ENABLE_EXPERIMENTAL)
endif()
cmake_minimum_required(VERSION 3.16)
project(vkcv_geometry)
# setting c++ standard for the project
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(vkcv_geometry_source ${PROJECT_SOURCE_DIR}/src)
set(vkcv_geometry_include ${PROJECT_SOURCE_DIR}/include)
set(vkcv_geometry_sources
${vkcv_geometry_include}/vkcv/geometry/Geometry.hpp
${vkcv_geometry_source}/vkcv/geometry/Geometry.cpp
${vkcv_geometry_include}/vkcv/geometry/Volume.hpp
${vkcv_geometry_source}/vkcv/geometry/Volume.cpp
${vkcv_geometry_include}/vkcv/geometry/Circular.hpp
${vkcv_geometry_source}/vkcv/geometry/Circular.cpp
${vkcv_geometry_include}/vkcv/geometry/Sphere.hpp
${vkcv_geometry_source}/vkcv/geometry/Sphere.cpp
${vkcv_geometry_include}/vkcv/geometry/Cuboid.hpp
${vkcv_geometry_source}/vkcv/geometry/Cuboid.cpp
${vkcv_geometry_include}/vkcv/geometry/Cylinder.hpp
${vkcv_geometry_source}/vkcv/geometry/Cylinder.cpp
${vkcv_geometry_include}/vkcv/geometry/Teapot.hpp
${vkcv_geometry_source}/vkcv/geometry/Teapot.cpp
)
# adding source files to the project
add_library(vkcv_geometry ${vkcv_build_attribute} ${vkcv_geometry_sources})
# Setup some path variables to load libraries
set(vkcv_geometry_lib lib)
set(vkcv_geometry_lib_path ${PROJECT_SOURCE_DIR}/${vkcv_geometry_lib})
include(config/GLM.cmake)
target_link_libraries(vkcv_geometry PUBLIC
${vkcv_geometry_libraries}
vkcv
)
target_include_directories(vkcv_geometry SYSTEM BEFORE PRIVATE
${vkcv_geometry_includes}
${vkcv_include}
${vkcv_includes}
)
# add the own include directory for public headers
target_include_directories(vkcv_geometry BEFORE PUBLIC ${vkcv_geometry_include} ${vkcv_geometry_includes})
target_compile_definitions(vkcv_geometry PUBLIC ${vkcv_geometry_definitions})
if (vkcv_parent_scope)
list(APPEND vkcv_modules_includes ${vkcv_geometry_include})
list(APPEND vkcv_modules_libraries vkcv_geometry)
set(vkcv_modules_includes ${vkcv_modules_includes} PARENT_SCOPE)
set(vkcv_modules_libraries ${vkcv_modules_libraries} PARENT_SCOPE)
endif()
# Geometry
A VkCV module to use basic geometry for rendering.
## Build
### Dependencies (required):
| Name of dependency | Used as submodule |
|--------------------------------------|---|
| [GLM](https://github.com/g-truc/glm) | ✅ |
## Docs
Here is a [link](https://userpages.uni-koblenz.de/~vkcv/doc/group__vkcv__geometry.html) to this module.
find_package(glm QUIET)
if (glm_FOUND)
list(APPEND vkcv_geometry_includes ${GLM_INCLUDE_DIRS})
list(APPEND vkcv_geometry_libraries glm)
else()
use_git_submodule("${vkcv_geometry_lib_path}/glm" glm_status)
if (${glm_status})
add_subdirectory(${vkcv_geometry_lib}/glm)
list(APPEND vkcv_geometry_includes ${vkcv_geometry_lib_path}/glm)
list(APPEND vkcv_geometry_libraries glm)
endif ()
endif ()
list(APPEND vkcv_geometry_definitions GLM_DEPTH_ZERO_TO_ONE)
list(APPEND vkcv_geometry_definitions GLM_FORCE_LEFT_HANDED)
if ((WIN32) AND (${CMAKE_SIZEOF_VOID_P} MATCHES 4))
list(APPEND vkcv_geometry_definitions GLM_ENABLE_EXPERIMENTAL)
endif()
#pragma once
#include <cstdlib>
namespace vkcv::geometry {
/**
* @addtogroup vkcv_geometry
* @{
*/
/**
* A basic class to provide attributes for circular geometry.
*/
class Circular {
private:
/**
* Radius of the circular part of the geometry.
*/
float m_radius;
/**
* Resolution in case of generating the geometry in a
* discrete way.
*/
size_t m_resolution;
public:
/**
* Constructor creating circular geometry by a given
* radius and a resolution also provides a default.
*
* @param[in] radius Radius of the circular geometry
* @param[in] resoltion Resolution of the circular geometry
*/
explicit Circular(float radius, size_t resoltion = 10);
/**
* Copy-constructor of a circular geometry.
*
* @param[in] other Other circular geometry
*/
Circular(const Circular& other) = default;
/**
* Move-constructor of a circular geometry.
*
* @param[in] other Other circular geometry
*/
Circular(Circular&& other) = default;
/**
* Destructor of a circular geometry.
*/
~Circular() = default;
/**
* Copy-operator of a circular geometry.
*
* @param[in] other Other circular geometry
* @return Reference to this circular geometry
*/
Circular& operator=(const Circular& other) = default;
/**
* Move-operator of a circular geometry.
*
* @param[in] other Other circular geometry
* @return Reference to this circular geometry
*/
Circular& operator=(Circular&& other) = default;
/**
* Return the radius of the circular part of the geometry.
*
* @return Radius of the circular geometry
*/
[[nodiscard]]
float getRadius() const;
/**
* Set the radius of the circular part of the geometry.
*
* @param[in] radius Radius of the circular geometry
*/
void setRadius(float radius);
/**
* Return the resolution of the geometry for discrete
* generation.
*
* @return Resolution of the circular geometry
*/
[[nodiscard]]
size_t getResolution() const;
/**
* Set the resolution of the geometry for any discrete
* generation.
*
* @param[in] resolution Resolution of the circular geometry
*/
void setResolution(size_t resolution);
};
/** @} */
}
\ No newline at end of file
#pragma once
#include "Volume.hpp"
namespace vkcv::geometry {
/**
* @addtogroup vkcv_geometry
* @{
*/
/**
* A class to use geometry in form of a cuboid.
*/
class Cuboid : public Volume {
private:
/**
* Size of the cuboid in 3D-space.
*/
glm::vec3 m_size;
public:
/**
* Constructor creating cuboid by a given position
* and size as 3D vectors.
*
* @param[in] position Position of the cuboid as 3D vector
* @param[in] size Size of the cuboid as 3D vector
*/
Cuboid(const glm::vec3& position, const glm::vec3& size);
/**
* Constructor creating cube by a given position
* as 3D vector and uniform size.
*
* @param[in] position Position of the cube as 3D vector
* @param[in] size Uniform size of the cube
*/
Cuboid(const glm::vec3& position, float size);
/**
* Copy-constructor of a cuboid.
*
* @param[in] other Other cuboid
*/
Cuboid(const Cuboid& other) = default;
/**
* Move-constructor of a cuboid.
*
* @param[in] other Other cuboid
*/
Cuboid(Cuboid&& other) = default;
/**
* Destructor of a cuboid.
*/
~Cuboid() = default;
/**
* Copy-operator of a cuboid.
*
* @param[in] other Other cuboid
* @return Reference to this cuboid
*/
Cuboid& operator=(const Cuboid& other) = default;
/**
* Move-operator of a cuboid.
*
* @param[in] other Other cuboid
* @return Reference to this cuboid
*/
Cuboid& operator=(Cuboid&& other) = default;
/**
* Return the size of a cuboid as 3D vector.
*
* @return Size of the cuboid as 3D vector
*/
[[nodiscard]]
const glm::vec3& getSize() const;
/**
* Set the size of a cuboid to a specific
* 3D vector.
*
* @param[in] position Size as 3D vector
*/
void setSize(const glm::vec3& size);
/**
* Returns the signed distance from a point to the closest
* surface of the cuboid.
*
* The result is negative if the point is contained by the
* cuboid.
*
* @param[in] point Point as 3D vector
* @return Signed distance from point to surface
*/
[[nodiscard]]
float distanceTo(const glm::vec3& point) override;
/**
* Generates a vertex data structure, which can be
* used for rendering via draw calls, containing
* the cuboid in a discrete form.
*
* The vertex data will store positions, normals and
* UV-coordinates as vertex attributes.
*
* @param[in,out] core Core instance
* @return Vertex data with generated geometry
*/
[[nodiscard]]
VertexData generateVertexData(Core& core) const override;
};
/** @} */
}
#pragma once
#include "Circular.hpp"
#include "Volume.hpp"
namespace vkcv::geometry {
/**
* @addtogroup vkcv_geometry
* @{
*/
/**
* A class to use geometry in form of a cylinder.
*/
class Cylinder : public Volume, public Circular {
private:
/**
* Height of the cylinder (Y-axis)
*/
float m_height;
public:
/**
* Constructor creating cylinder by a given position
* as 3D vector, a given height and a radius.
*
* @param[in] position Position of the cylinder as 3D vector
* @param[in] height Height of the cylinder
* @param[in] radius Radius of the cylinder
*/
Cylinder(const glm::vec3& position, float height, float radius);
/**
* Copy-constructor of a cylinder.
*
* @param[in] other Other cylinder
*/
Cylinder(const Cylinder& other) = default;
/**
* Move-constructor of a cylinder.
*
* @param[in] other Other cylinder
*/
Cylinder(Cylinder&& other) = default;
/**
* Destructor of a cylinder.
*/
~Cylinder() = default;
/**
* Copy-operator of a cylinder.
*
* @param[in] other Other cylinder
* @return Reference to this cylinder
*/
Cylinder& operator=(const Cylinder& other) = default;
/**
* Move-operator of a cylinder.
*
* @param[in] other Other cylinder
* @return Reference to this cylinder
*/
Cylinder& operator=(Cylinder&& other) = default;
/**
* Return the height of the cylinder.
*
* @return Height of the cylinder
*/
[[nodiscard]]
float getHeight() const;
/**
* Set the height of the cylinder.
*
* @param[in] height Height of the cylinder
*/
void setHeight(float height);
/**
* Returns the signed distance from a point to the closest
* surface of the cylinder.
*
* The result is negative if the point is contained by the
* cylinder.
*
* @param[in] point Point as 3D vector
* @return Signed distance from point to surface
*/
[[nodiscard]]
float distanceTo(const glm::vec3& point) override;
/**
* Generates a vertex data structure, which can be
* used for rendering via draw calls, containing
* the cylinder in a discrete form.
*
* The vertex data will store positions, normals and
* UV-coordinates as vertex attributes.
*
* @param[in,out] core Core instance
* @return Vertex data with generated geometry
*/
[[nodiscard]]
VertexData generateVertexData(Core& core) const override;
};
/** @} */
}
\ No newline at end of file
#pragma once
#include <vkcv/Buffer.hpp>
#include <vkcv/Core.hpp>
#include <vkcv/VertexData.hpp>
#include <glm/glm.hpp>
namespace vkcv::geometry {
/**
* @defgroup vkcv_geometry Geometry Module
* A module to use basic geometry for rendering.
* @{
*/
/**
* A basic class to provide attributes for any kind of geometry.
*/
class Geometry {
private:
/**
* Position of the geometry in 3D-coordinates.
*/
glm::vec3 m_position;
public:
/**
* Constructor creating geometry by a given position
* as 3D vector.
*
* @param[in] position Position of the geometry as 3D vector
*/
explicit Geometry(const glm::vec3& position);
/**
* Copy-constructor of a geometry.
*
* @param[in] other Other geometry
*/
Geometry(const Geometry& other) = default;
/**
* Move-constructor of a geometry.
*
* @param[in] other Other geometry
*/
Geometry(Geometry&& other) = default;
/**
* Destructor of a geometry.
*/
~Geometry() = default;
/**
* Copy-operator of a geometry.
*
* @param[in] other Other geometry
* @return Reference to this geometry
*/
Geometry& operator=(const Geometry& other) = default;
/**
* Move-operator of a geometry.
*
* @param[in] other Other geometry
* @return Reference to this geometry
*/
Geometry& operator=(Geometry&& other) = default;
/**
* Return the position of a geometry as 3D vector.
*
* @return Position of the geometry as 3D vector
*/
[[nodiscard]]
const glm::vec3& getPosition() const;
/**
* Set the position of a geometry to a specific
* 3D vector.
*
* @param[in] position Position as 3D vector
*/
void setPosition(const glm::vec3& position);
/**
* Generates a vertex data structure, which can be
* used for rendering via draw calls, containing
* the geometry in a discrete form.
*
* The vertex data will store positions, normals and
* UV-coordinates as vertex attributes.
*
* @param[in,out] core Core instance
* @return Vertex data with generated geometry
*/
[[nodiscard]]
virtual VertexData generateVertexData(Core& core) const = 0;
};
/** @} */
}
#pragma once
#include "Circular.hpp"
#include "Volume.hpp"
namespace vkcv::geometry {
/**
* @addtogroup vkcv_geometry
* @{
*/
/**
* A class to use geometry in form of a sphere.
*/
class Sphere : public Volume, public Circular {
public:
/**
* Constructor creating sphere by a given position
* as 3D vector and a radius.
*
* @param[in] position Position of the sphere as 3D vector
* @param[in] radius Radius of the sphere
*/
Sphere(const glm::vec3& position, float radius);
/**
* Copy-constructor of a sphere.
*
* @param[in] other Other sphere
*/
Sphere(const Sphere& other) = default;
/**
* Move-constructor of a sphere.
*
* @param[in] other Other sphere
*/
Sphere(Sphere&& other) = default;
/**
* Destructor of a sphere.
*/
~Sphere() = default;
/**
* Copy-operator of a sphere.
*
* @param[in] other Other sphere
* @return Reference to this sphere
*/
Sphere& operator=(const Sphere& other) = default;
/**
* Move-operator of a sphere.
*
* @param[in] other Other sphere
* @return Reference to this sphere
*/
Sphere& operator=(Sphere&& other) = default;
/**
* Returns the signed distance from a point to the closest
* surface of the sphere.
*
* The result is negative if the point is contained by the
* sphere.
*
* @param[in] point Point as 3D vector
* @return Signed distance from point to surface
*/
[[nodiscard]]
float distanceTo(const glm::vec3& point) override;
/**
* Generates a vertex data structure, which can be
* used for rendering via draw calls, containing
* the sphere in a discrete form.
*
* The vertex data will store positions, normals and
* UV-coordinates as vertex attributes.
*
* @param[in,out] core Core instance
* @return Vertex data with generated geometry
*/
[[nodiscard]]
VertexData generateVertexData(Core& core) const override;
};
/** @} */
}
#pragma once
#include "Geometry.hpp"
namespace vkcv::geometry {
/**
* @addtogroup vkcv_geometry
* @{
*/
/**
* A class to use geometry in form of a teapot.
*/
class Teapot : public Geometry {
private:
/**
* Uniform scale of the teapot.
*/
float m_scale;
public:
/**
* Constructor creating teapot by a given position
* as 3D vector and uniform scale.
*
* @param[in] position Position of the teapot as 3D vector
* @param[in] scale Uniform scale of the teapot
*/
explicit Teapot(const glm::vec3& position, float scale);
/**
* Copy-constructor of a teapot.
*
* @param[in] other Other teapot
*/
Teapot(const Teapot& other) = default;
/**
* Move-constructor of a teapot.
*
* @param[in] other Other teapot
*/
Teapot(Teapot&& other) = default;
/**
* Destructor of a teapot.
*/
~Teapot() = default;
/**
* Copy-operator of a teapot.
*
* @param[in] other Other teapot
* @return Reference to this teapot
*/
Teapot& operator=(const Teapot& other) = default;
/**
* Move-operator of a teapot.
*
* @param[in] other Other teapot
* @return Reference to this teapot
*/
Teapot& operator=(Teapot&& other) = default;
/**
* Return the uniform scale of a teapot.
*
* @return Uniform scale of the teapot
*/
[[nodiscard]]
float getScale() const;
/**
* Set the uniform scale of a teapot.
*
* @param scale Uniform scale
*/
void setScale(float scale);
/**
* Generates a vertex data structure, which can be
* used for rendering via draw calls, containing
* the teapot in a discrete form.
*
* The vertex data will store positions, normals and
* UV-coordinates as vertex attributes.
*
* @param[in,out] core Core instance
* @return Vertex data with generated geometry
*/
[[nodiscard]]
VertexData generateVertexData(Core& core) const override;
};
/** @} */
}
#pragma once
#include "Geometry.hpp"
namespace vkcv::geometry {
/**
* @addtogroup vkcv_geometry
* @{
*/
/**
* A basic class to provide functions for any volumetric geometry.
*/
class Volume : public Geometry {
private:
public:
/**
* Constructor creating volumetric geometry by a given
* position as 3D vector.
*
* @param[in] position Position of the geometry as 3D vector
*/
explicit Volume(const glm::vec3& position);
/**
* Copy-constructor of a volumetric geometry.
*
* @param[in] other Other volumetric geometry
*/
Volume(const Volume& other) = default;
/**
* Move-constructor of a volumetric geometry.
*
* @param[in] other Other volumetric geometry
*/
Volume(Volume&& other) = default;
/**
* Destructor of a volumetric geometry.
*/
~Volume() = default;
/**
* Copy-operator of a volumetric geometry.
*
* @param[in] other Other volumetric geometry
* @return Reference to this volumetric geometry
*/
Volume& operator=(const Volume& other) = default;
/**
* Move-operator of a volumetric geometry.
*
* @param[in] other Other volumetric geometry
* @return Reference to this volumetric geometry
*/
Volume& operator=(Volume&& other) = default;
/**
* Returns the signed distance from a point to the closest
* surface of the volumetric geometry.
*
* The result is negative if the point is contained by the
* volumetric geometry.
*
* @param[in] point Point as 3D vector
* @return Signed distance from point to surface
*/
[[nodiscard]]
virtual float distanceTo(const glm::vec3& point) = 0;
/**
* Returns as boolean value whether a point is contained
* by a volumetric geometry.
*
* @param[in] point Point as 3D vector
* @return true if the point is contained, other false.
*/
[[nodiscard]]
bool contains(const glm::vec3& point);
};
/** @} */
}
File moved