// 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 size. /// public __value class Dimension2D { public: /// Constructs a dimension of widht 0 and height 0. Dimension2D() : Width(0), Height(0) { } /// Constructs a dimension of specified size. Dimension2D(int width, int height) : Width(width), Height(height) { } /// /// Compares the size to another size. /// bool Equals(Object* rhs) { Dimension2D* c = dynamic_cast(rhs); if(!c) return false; return c->Width == Width && c->Height == Height; } int Width, Height; }; /// /// Specifies a two dimensional size. /// public __value class Dimension2Df { public: /// Constructs a dimension of widht 0 and height 0. Dimension2Df() : Width(0), Height(0) { } /// Constructs a dimension of specified size. Dimension2Df(float width, float height) : Width(width), Height(height) { } /// /// Compares the size to another size. /// bool Equals(Object* rhs) { Dimension2Df* c = dynamic_cast(rhs); if(!c) return false; return c->Width == Width && c->Height == Height; } float Width, Height; }; } // end namespace Core } // end namespace Irrlicht