// Copyright (C) 2002-2006 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h #pragma once #using namespace Irrlicht { namespace Core { /// /// Specifies a two dimensional position with integer values. /// public __value class Position2D { public: /// Constructs a position at (0,0) Position2D() : X(0), Y(0) { } /// Constructs a position. Position2D(int x, int y) : X(x), Y(y) { } /// /// Compares the position to another position. /// bool Equals(Object* rhs) { Position2D* c = dynamic_cast(rhs); if(!c) return false; return c->X == X && c->Y == Y; } int X, Y; }; /// /// Specifies a two dimensional position with float values. /// public __value class Position2Df { public: /// Constructs a position at (0,0) Position2Df() : X(0), Y(0) { } /// Constructs a position. Position2Df(float x, float y) : X(x), Y(y) { } /// /// Compares the position to another position. /// bool Equals(Object* rhs) { Position2Df* c = dynamic_cast(rhs); if(!c) return false; return c->X == X && c->Y == Y; } float X, Y; }; } // end namespace Core } // end namespace Irrlicht