Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
Geometry
AxisAlignedBox2.h
1
// Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2
3
#pragma once
4
5
#include "Geometry.h"
6
7
#include "VectorMath.h"
8
9
namespace
Eegeo
10
{
11
namespace
Geometry
12
{
13
class
AxisAlignedBox2
14
{
15
public
:
16
17
AxisAlignedBox2
();
18
19
AxisAlignedBox2
(
const
v2
& center,
20
const
v2
& halfExtents)
21
: m_center(center)
22
, m_halfExtents(halfExtents)
23
{}
24
25
v2
GetCenter()
const
{
return
m_center; }
26
v2
GetHalfExtents()
const
{
return
m_halfExtents; }
27
v2
GetMin()
const
{
return
m_center - m_halfExtents; }
28
v2
GetMax()
const
{
return
m_center + m_halfExtents; }
29
30
static
AxisAlignedBox2
CreateFromBounds2D(
const
Bounds2D
& bounds2D);
31
32
static
AxisAlignedBox2
CreateFromExtents(
const
v2
& min,
const
v2
& max);
33
34
static
AxisAlignedBox2
Encompass(
const
AxisAlignedBox2
& boxA,
const
AxisAlignedBox2
& boxB);
35
36
private
:
37
v2
m_center;
38
v2
m_halfExtents;
39
};
40
}
41
}
Generated on Sat Jun 10 2023 02:00:30 for eeGeo Platform SDK by
1.8.3.1