//! Base implementation of a physical AABB for the Sju engine /*! * The physical Axis-Aligned Bounding Box class is intended to be used for * wrapping non-immovable objects. This limitation will be removed in the near * future. * * It is useful to create "force fields" such as wind. */ /* Copyright (C) 2009 Alejandro Valenzuela Roca, * * This file is part of MotorJ, a free framework for videogame creation. * * * * MotorJ is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MotorJ is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with MotorJ. If not, see . */ #ifndef PAABB_CLASS_H #define PAABB_CLASS_H //#include "mjVectorAlgebra.h" #include "physicalobject-class.h" #include "sjuengine-types.h" #include "collisions.h" class pAABB: public IPhysicalObject { public: pAABB(); ~pAABB(); void SetData(vector3 a_min, vector3 a_max); void virtual ApplyEffect(vector3 force, vector3& pointOfAction, sjuPETypes effectType, IPhysicalObject* interactionObject); void virtual ResetAccels(); void virtual Update(float t_elapsed); void Move(vector3 displacement); void MoveTo(vector3 position); vector3 corners[2]; vector3 halfWidths; bool movable; private: //float mass; float invmass; //dynDataNode * dyn; bool collisionDetected; vector3 f_1; }; #endif