#ifndef __PBMWALL_H__ #define __PBMWALL_H__ /*************************************************************************** File: PBMWall.h Created: 03/03/2002 Author: Maxim Garber Computer Science Department University of North Carolina - Chapel Hill garber@cs.unc.edu Description: An axis aligned wall with rendering and collision detection ----------------------------------------------------------------------------. Copyright 2002 Maxim Garber UNC Collide Research Group *****************************************************************************/ #include "PQP.h" #include "PBMConfiguration.h" class PBMWall { public: PBMWall(float position[3], float normal[3], float right[3], float up[3], float width, float height); ~PBMWall(); ////////////////////////////////////////////////////////////////////////////// // Simulation void Update(float timeStep); ////////////////////////////////////////////////////////////////////////////// // Rendering void Draw(); void SetColor(float color[3]){for(unsigned int i=0; i<3; i++) _color[i] = color[i];} ////////////////////////////////////////////////////////////////////////////// // state void GetNormal (float normal[3]); void GetPosition(float position[3]); ////////////////////////////////////////////////////////////////////////////// // Test For Culling bool IsActive(){return true;} ////////////////////////////////////////////////////////////////////////////// // Collision Testing void GetCollisionGeometry(PQP_Model* &geometry, Frame3 &frame); private: // position of center float _position[3]; // orientation vectors float _normal[3], _up[3], _right[3]; // rendering and collision matrices float _collisionRotation[3][3]; float _renderTransform [16]; // extents float _width, // along up vector _height; // along right vector // color float _color[3]; // collision model PQP_Model* _collisionGeometry; void _DrawGridPlane(unsigned int widthDivisions, unsigned int heightDivisions); void _InitCollision(); }; #endif //__PBMWALL_H__