Steeriously
0.1
Main Page
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Pages
include
steeriously
Wall.hpp
1
#ifndef WALL_HPP
2
#define WALL_HPP
3
4
#include <steeriously/Vector2.hpp>
5
#include <steeriously/VectorMath.hpp>
6
7
namespace
steer
8
{
13
class
Wall
14
{
15
public
:
16
21
Wall
();
22
30
Wall
(
bool
render,
Vector2
A,
Vector2
B);
31
40
Wall
(
bool
render,
Vector2
A,
Vector2
B,
Vector2
N);
41
42
virtual
~
Wall
(){};
43
48
bool
renderNormal
()
const
{
return
m_renderNormals;}
49
54
void
toggleRenderNormal
(){m_renderNormals = !m_renderNormals;}
55
60
Vector2
From
()
const
{
return
m_vA;}
61
67
void
SetFrom
(
Vector2
v);
68
73
Vector2
To
()
const
{
return
m_vB;}
74
80
void
SetTo
(
Vector2
v);
81
86
Vector2
Normal
()
const
{
return
m_vN;}
87
93
void
SetNormal
(
Vector2
n);
94
99
Vector2
Center
()
const
{
return
(m_vA+m_vB)/2.f;}
100
101
private
:
102
103
Vector2
m_vA;
104
Vector2
m_vB;
105
Vector2
m_vN;
106
bool
m_renderNormals;
107
112
void
CalculateNormal();
113
114
};
115
}
116
117
#endif // WALL_HPP
Generated on Sun Dec 10 2017 18:36:37 for Steeriously by
1.8.2