Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Help.h
Go to the documentation of this file.
1/*
2--------------------------------------------------------------------------------
3This source file is part of Hydrax.
4Visit ---
5
6Copyright (C) 2008 Xavier Vergu�n Gonz�lez <xavierverguin@hotmail.com>
7 <xavyiy@gmail.com>
8
9This program is free software; you can redistribute it and/or modify it under
10the terms of the GNU Lesser General Public License as published by the Free Software
11Foundation; either version 2 of the License, or (at your option) any later
12version.
13
14This program is distributed in the hope that it will be useful, but WITHOUT
15ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17
18You should have received a copy of the GNU Lesser General Public License along with
19this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21http://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
36namespace Hydrax
37{
40 struct Size
41 {
43 int Width;
45 int Height;
46
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
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
Math class with some help funtions.
Definition Help.h:103
Math()
Constructor.
Definition Help.h:107
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
~Math()
Destructor.
Definition Help.h:110
Struct wich contains an especific width and height value.
Definition Help.h:41
int Height
Height value.
Definition Help.h:45
Size()
Default constructor.
Definition Help.h:49
Size(const int &size)
Constructor.
Definition Help.h:58
int Width
Width value.
Definition Help.h:43
Size(const int &width, const int &height)
Constructor.
Definition Help.h:68
void setSize(const int &width, const int &height)
Sets the especified values.
Definition Help.h:93
~Size()
Destructor.
Definition Help.h:76
void setSize(const int &size)
Sets the same width and height value.
Definition Help.h:83