SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
CollisionVolumeBSphere.h
1#ifndef CollisionVolumeBSphere_H
2#define CollisionVolumeBSphere_H
3
4#include "CollisionVolume.h"
5
13class CollisionVolumeBSphere : public CollisionVolume, public Align16
14{
15public:
16 CollisionVolumeBSphere();
17 CollisionVolumeBSphere(const CollisionVolumeBSphere&) = delete;
18 CollisionVolumeBSphere& operator=(const CollisionVolumeBSphere&) = delete;
19 virtual ~CollisionVolumeBSphere() = default;
20
26 void ComputeData(Model* mod, const Matrix& mat) override;
27
32 const Vect& GetCenter() const;
33
38 float GetRadius() const;
39
40 void DebugView(const Vect& col) const override;
41
42
43 bool IntersectAccept(const CollisionVolume& other) const override;
44 bool IntersectVisit(const CollisionVolumeBSphere& other) const override;
45 bool IntersectVisit(const CollisionVolumeAABB& other) const override;
46 bool IntersectVisit(const CollisionVolumeOBB& other) const override;
47
48private:
52 Vect center;
53
57 float radius;
58};
59
60#endif
Definition Framework.h:1558
Represents an axis-aligned bounding box (AABB) collision volume.
Definition CollisionVolumeAABB.h:23
float radius
The radius of the bounding sphere.
Definition CollisionVolumeBSphere.h:57
Vect center
The center of the bounding sphere.
Definition CollisionVolumeBSphere.h:52
const Vect & GetCenter() const
Gets the center of the bounding sphere.
Definition CollisionVolumeBSphere.cpp:14
float GetRadius() const
Gets the radius of the bounding sphere.
Definition CollisionVolumeBSphere.cpp:19
void ComputeData(Model *mod, const Matrix &mat) override
Computes the collision data for the bounding sphere.
Definition CollisionVolumeBSphere.cpp:7
Represents an Oriented Bounding Box (OBB) collision volume.
Definition CollisionVolumeOBB.h:23