Fix RaycastInfo contructors
This commit is contained in:
parent
b289487583
commit
4bb90733a3
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user