AxiosEngine-old 

AxiosEngine-old Commit Details


Date:2012-03-23 23:21:00 (12 years 8 months ago)
Author:nathan@daedalus
Branch:default
Commit:1dffc3cc41e1
Parents: 89349dfb8461
Message:Adding support for intersecting a floating point rectangle

Changes:
Maxios/Axios_WP7.csproj (1 diff)
Maxios/Axios_Windows.csproj (1 diff)
Maxios/Axios_Xbox_360.csproj (1 diff)
Maxios/Engine/Structures/AxiosPoint.cs (1 diff)
Maxios/Engine/Structures/AxiosRectangle.cs (2 diffs)

File differences

axios/Axios_WP7.csproj
179179
180180
181181
182
182183
183184
184185
<Compile Include="Engine\SimpleAxiosGameObject.cs" />
<Compile Include="Engine\SimpleDrawableAxiosGameObject.cs" />
<Compile Include="Engine\Singleton.cs" />
<Compile Include="Engine\Structures\AxiosPoint.cs" />
<Compile Include="Engine\Structures\AxiosRectangle.cs" />
<Compile Include="Engine\UI\AxiosButton.cs" />
<Compile Include="Engine\UI\AxiosUIObject.cs" />
axios/Axios_Windows.csproj
219219
220220
221221
222
222223
223224
224225
<Compile Include="Engine\Interfaces\IAxiosGameObject.cs" />
<Compile Include="Engine\Interfaces\IDrawableAxiosGameObject.cs" />
<Compile Include="Engine\Log\AxiosLog.cs" />
<Compile Include="Engine\Structures\AxiosPoint.cs" />
<Compile Include="Engine\Structures\AxiosRectangle.cs" />
<Compile Include="Engine\SimpleAxiosGameObject.cs" />
<Compile Include="Engine\SimpleDrawableAxiosGameObject.cs" />
axios/Axios_Xbox_360.csproj
172172
173173
174174
175
175176
176177
177178
<Compile Include="Engine\SimpleAxiosGameObject.cs" />
<Compile Include="Engine\SimpleDrawableAxiosGameObject.cs" />
<Compile Include="Engine\Singleton.cs" />
<Compile Include="Engine\Structures\AxiosPoint.cs" />
<Compile Include="Engine\Structures\AxiosRectangle.cs" />
<Compile Include="Engine\UI\AxiosButton.cs" />
<Compile Include="Engine\UI\AxiosUIObject.cs" />
axios/Engine/Structures/AxiosPoint.cs
77
88
99
10
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
1130
1231
{
class AxiosPoint
{
private float _x;
private float _y;
public float X
{
get { return _x; }
set { _x = value; }
}
public float Y
{
get { return _y; }
set { _y = value; }
}
public AxiosPoint(float X, float Y)
{
_x = X;
_y = Y;
}
}
}
axios/Engine/Structures/AxiosRectangle.cs
77
88
99
10
11
1012
1113
12
13
14
1415
1516
1617
......
2425
2526
2627
27
28
2829
29
30
30
3131
3232
33
33
3434
35
36
35
3736
3837
39
38
4039
41
40
4241
4342
4443
4544
46
45
4746
4847
48
49
50
51
52
4953
5054
51
55
5256
57
58
59
60
61
62
63
64
5365
54
55
66
5667
5768
5869
5970
6071
6172
62
63
73
6474
6575
6676
{
class AxiosRectangle
{
private AxiosPoint _point;
private float _width;
private float _height;
private float _x;
private float _y;
public float Width
{
set { _height = value; }
}
public float X
public float Top
{
get { return _x; }
set { _x = value; }
get { return _point.Y; }
}
public float Y
public float Right
{
get { return _y; }
set { _y = value; }
get { return _point.X + _width; }
}
public float Top
public float Left
{
get { return _point.X; }
}
public float Bottom
{
get { return _y + _height; }
get { return _point.Y + _height; }
}
/*public AxiosPoint Center
{
get { return new AxiosPoint(Top + (Width / 2), Bottom - (Width / 2)); }
}*/
public bool Intersect(AxiosRectangle rect)
{
bool intersects = false;
//bool intersects = true;
if (Bottom < rect.Top)
return false;
if (Top > rect.Bottom)
return false;
if (Right < rect.Left)
return false;
if (Left > rect.Right)
return false;
return intersects;
return true;
}
public AxiosRectangle(float X, float Y, float width, float height)
{
_width = width;
_height = height;
_x = X;
_y = Y;
_point = new AxiosPoint(X, Y);
}

Archive Download the corresponding diff file

Page rendered in 0.43135s using 13 queries.