Skip to content

Commit cbed1d4

Browse files
committed
[collision-query] Add nolints and doxygen comments
1 parent efa20e3 commit cbed1d4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

include/inexor/vulkan-renderer/world/collision.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ class RayCubeCollision {
3030
public:
3131
/// @brief Default constructor
3232
/// @param The cube to check collisions with
33+
/// @note We need to pass cube as a std::shared_ptr by copy in this case because we want to ensure the lifetime
34+
/// of the object in multithreaded code. We are not accepting const references here, as they could become invalid.
3335
/// @param ray The start point of the ray
3436
/// @param dir The direction of the ray
3537
/// @param The intersection between ray and vertex geometry of the cube which was found
36-
RayCubeCollision(std::shared_ptr<T> cube, glm::vec3 ray, glm::vec3 dir,
38+
RayCubeCollision(std::shared_ptr<T> cube, glm::vec3 ray, glm::vec3 dir, // NOLINT
3739
std::optional<glm::vec3> vertex_intersection = std::nullopt);
3840

3941
/// @note This method returns a copy of the cube, not a const reference.

src/vulkan-renderer/world/collision.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
namespace inexor::vulkan_renderer::world {
1313

1414
template <typename T>
15-
RayCubeCollision<T>::RayCubeCollision(const std::shared_ptr<T> cube, const glm::vec3 ray_pos, // NOLINT
16-
const glm::vec3 ray_dir, const std::optional<glm::vec3> vertex_intersection)
15+
RayCubeCollision<T>::RayCubeCollision(const std::shared_ptr<T> cube, const glm::vec3 ray_pos, const glm::vec3 ray_dir,
16+
const std::optional<glm::vec3> vertex_intersection)
1717
: m_cube(cube), m_vertex_intersection(vertex_intersection) {
1818

1919
/// In order to work with cubes of arbitrary size, this lambda calculates the center of a cube's face with respect

0 commit comments

Comments
 (0)