This commit is contained in:
Taylor 2022-07-22 17:10:40 +02:00 committed by GitHub
commit ed0536ec75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,32 +61,31 @@ struct RaycastInfo {
decimal hitFraction; decimal hitFraction;
/// Mesh subpart index that has been hit (only used for triangles mesh and -1 otherwise) /// Mesh subpart index that has been hit (only used for triangles mesh and -1 otherwise)
int meshSubpart; int meshSubpart = -1;
/// Hit triangle index (only used for triangles mesh and -1 otherwise) /// Hit triangle index (only used for triangles mesh and -1 otherwise)
int triangleIndex; int triangleIndex = -1;
/// Pointer to the hit collision body /// Pointer to the hit collision body
CollisionBody* body; CollisionBody* body = nullptr;
/// Pointer to the hit collider /// Pointer to the hit collider
Collider* collider; Collider* collider = nullptr;
// -------------------- Methods -------------------- // // -------------------- Methods -------------------- //
/// Constructor RaycastInfo() = default;
RaycastInfo() : meshSubpart(-1), triangleIndex(-1), body(nullptr), collider(nullptr) {
} explicit RaycastInfo(const RaycastInfo& raycastInfo) = default;
/// Destructor RaycastInfo(RaycastInfo&&) = default;
~RaycastInfo() = default;
/// Deleted copy constructor
RaycastInfo(const RaycastInfo& raycastInfo) = delete;
/// Deleted assignment operator /// Deleted assignment operator
RaycastInfo& operator=(const RaycastInfo& raycastInfo) = delete; RaycastInfo& operator=(const RaycastInfo& raycastInfo) = delete;
RaycastInfo& operator = (RaycastInfo&&) = default;
~RaycastInfo() = default;
}; };
// Class RaycastCallback // Class RaycastCallback