Pioneer
Loading...
Searching...
No Matches
Sphere.h
Go to the documentation of this file.
1// Copyright © 2008-2024 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#pragma once
5
6#ifndef _SPHERE_H
7#define _SPHERE_H
8
9#include "vector3.h"
10
11struct SSphere {
13 m_centre(vector3d(0.0)),
14 m_radius(1.0) {}
15 SSphere(const double rad) :
16 m_centre(vector3d(0.0)),
17 m_radius(rad) {}
19 double m_radius;
20
21 // Adapted from Ysaneya here: http://www.gamedev.net/blog/73/entry-1666972-horizon-culling/
22 bool HorizonCulling(const vector3d &view, const SSphere &obj) const;
23};
24
25#endif /* _SPHERE_H */
Definition: Sphere.h:11
SSphere(const double rad)
Definition: Sphere.h:15
bool HorizonCulling(const vector3d &view, const SSphere &obj) const
Definition: Sphere.cpp:19
vector3d m_centre
Definition: Sphere.h:18
SSphere()
Definition: Sphere.h:12
double m_radius
Definition: Sphere.h:19