SO3Engine
Position.cpp
Go to the documentation of this file.
1/*
2 This file is part of Hikari, a library that allows developers
3 to use Flash in their Ogre3D applications.
4
5 Copyright (C) 2008 Adam J. Simmons
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20*/
21
23
24using namespace Hikari;
25
27{
28 usingRelative = false;
29 data.abs.left = 0;
30 data.abs.top = 0;
31}
32
33Position::Position(const RelativePosition &relPosition, short offsetLeft, short offsetTop)
34{
35 usingRelative = true;
36 data.rel.position = relPosition;
37 data.rel.x = offsetLeft;
38 data.rel.y = offsetTop;
39}
40
41Position::Position(short absoluteLeft, short absoluteTop)
42{
43 usingRelative = false;
44 data.abs.left = absoluteLeft;
45 data.abs.top = absoluteTop;
46}
RelativePosition
Definition Position.h:33
union Hikari::Position::@0 data