RigsofRods
Soft-body Physics Simulation
source
main
gfx
hydrax
Help.h
Go to the documentation of this file.
1
/*
2
--------------------------------------------------------------------------------
3
This source file is part of Hydrax.
4
Visit ---
5
6
Copyright (C) 2008 Xavier Verguín González <xavierverguin@hotmail.com>
7
<xavyiy@gmail.com>
8
9
This program is free software; you can redistribute it and/or modify it under
10
the terms of the GNU Lesser General Public License as published by the Free Software
11
Foundation; either version 2 of the License, or (at your option) any later
12
version.
13
14
This program is distributed in the hope that it will be useful, but WITHOUT
15
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17
18
You should have received a copy of the GNU Lesser General Public License along with
19
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21
http://www.gnu.org/copyleft/lesser.txt.
22
--------------------------------------------------------------------------------
23
*/
24
25
#ifndef _Hydrax_Help_H_
26
#define _Hydrax_Help_H_
27
28
#include "
Prerequisites.h
"
29
32
35
36
namespace
Hydrax
37
{
40
struct
Size
41
{
43
int
Width
;
45
int
Height
;
46
49
Size
()
50
{
51
Width
= 0;
52
Height
= 0;
53
}
54
58
Size
(
const
int
&size)
59
{
60
Width
= size;
61
Height
= size;
62
}
63
68
Size
(
const
int
&width,
const
int
&height)
69
{
70
Width
= width;
71
Height
= height;
72
}
73
76
~Size
()
77
{
78
}
79
83
void
setSize
(
const
int
&size)
84
{
85
Width
= size;
86
Height
= size;
87
}
88
93
void
setSize
(
const
int
&width,
const
int
&height)
94
{
95
Width
= width;
96
Height
= height;
97
}
98
};
99
102
class
Math
103
{
104
public
:
107
Math
(){};
110
~Math
(){};
111
119
static
Ogre::Vector2
intersectionOfTwoLines
(
const
Ogre::Vector2 &a,
const
Ogre::Vector2 &b,
120
const
Ogre::Vector2 &c,
const
Ogre::Vector2 &d);
121
};
122
}
123
126
127
#endif
Hydrax::Math::Math
Math()
Constructor.
Definition:
Help.h:107
Hydrax
Definition:
CfgFileManager.cpp:28
Hydrax::Math
Math class with some help funtions.
Definition:
Help.h:102
Hydrax::Size
Struct wich contains an especific width and height value.
Definition:
Help.h:40
Hydrax::Size::setSize
void setSize(const int &size)
Sets the same width and height value.
Definition:
Help.h:83
Hydrax::Math::intersectionOfTwoLines
static Ogre::Vector2 intersectionOfTwoLines(const Ogre::Vector2 &a, const Ogre::Vector2 &b, const Ogre::Vector2 &c, const Ogre::Vector2 &d)
Find the intersection point of two lines.
Definition:
Help.cpp:29
Hydrax::Size::Size
Size(const int &width, const int &height)
Constructor.
Definition:
Help.h:68
Hydrax::Size::setSize
void setSize(const int &width, const int &height)
Sets the especified values.
Definition:
Help.h:93
Hydrax::Size::Size
Size()
Default constructor.
Definition:
Help.h:49
Hydrax::Size::~Size
~Size()
Destructor.
Definition:
Help.h:76
Hydrax::Size::Size
Size(const int &size)
Constructor.
Definition:
Help.h:58
Prerequisites.h
Hydrax::Size::Width
int Width
Width value.
Definition:
Help.h:43
Hydrax::Size::Height
int Height
Height value.
Definition:
Help.h:45
Hydrax::Math::~Math
~Math()
Destructor.
Definition:
Help.h:110
Generated by
1.8.17