Pioneer
Loading...
Searching...
No Matches
src
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
11
struct
SSphere
{
12
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) {}
18
vector3d
m_centre
;
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 */
vector3< double >
SSphere
Definition:
Sphere.h:11
SSphere::SSphere
SSphere(const double rad)
Definition:
Sphere.h:15
SSphere::HorizonCulling
bool HorizonCulling(const vector3d &view, const SSphere &obj) const
Definition:
Sphere.cpp:19
SSphere::m_centre
vector3d m_centre
Definition:
Sphere.h:18
SSphere::SSphere
SSphere()
Definition:
Sphere.h:12
SSphere::m_radius
double m_radius
Definition:
Sphere.h:19
vector3.h
Generated by
1.9.6