28 lines
622 B
C++
28 lines
622 B
C++
// Copyright (c) 2023 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "Collider3D.hpp"
|
|
#include "physics/3d/Ray3D.hpp"
|
|
|
|
namespace Dawn {
|
|
class CapsuleCollider : public Collider3D {
|
|
protected:
|
|
bool_t performRaycast(
|
|
struct Collider3DRayResult *result,
|
|
struct Ray3D ray
|
|
) override;
|
|
|
|
public:
|
|
// @optional
|
|
float_t height = 1;
|
|
// @optional
|
|
float_t radius = 0.5f;
|
|
|
|
CapsuleCollider(std::weak_ptr<SceneItem> item);
|
|
|
|
enum Collider3DType getColliderType() override;
|
|
};
|
|
} |