ogreboxcollisionshape.h

来自「opcode是功能强大」· C头文件 代码 · 共 73 行

H
73 行
字号
///////////////////////////////////////////////////////////////////////////////
///  @file OgreBoxCollisionShape.h
///  @brief <TODO: insert file description here>
///
///  @author The OgreOpcode Team
///
///////////////////////////////////////////////////////////////////////////////
///
///  This file is part of OgreOpcode.
///
///  A lot of the code is based on the Nebula Opcode Collision module, see docs/Nebula_license.txt
///
///  OgreOpcode 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 2.1 of the License, or (at your option) any later version.
///
///  OgreOpcode 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 OgreOpcode; if not, write to the Free Software
///  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
///
///////////////////////////////////////////////////////////////////////////////
#ifndef __OgreBoxCollisionShape_h__
# define __OgreBoxCollisionShape_h__

#include "OgreOpcodeExports.h"
# include <Ogre.h>

#include "IOgreCollisionShape.h"
#include "OgreCollisionTypes.h"
#include "OgreOpcodeDebugObject.h"
#include "Opcode/Opcode.h"

namespace OgreOpcode
{
	class CollisionPair;

	/// Describes shapes for collision system.
	/// Holds a triangle list describing a collision shape.
	/// One BoxCollisionShape object may be shared between several
	/// CollisionObject%s. 2 BoxCollisionShape objects may also
	/// be queried directly whether they intersect.
	///
	/// BoxCollisionShape objects are also able to load themselves
	/// from a mesh file.
	class _OgreOpcode_Export BoxCollisionShape : public ICollisionShape
	{
	public:
		/// Constructs a BoxCollisionShape
		BoxCollisionShape(const Ogre::String& name);
		virtual ~BoxCollisionShape();

		/// load collide geometry from mesh, and build a collision tree
		virtual bool load(Ogre::SceneNode* scnNode, int height, int width, int depth);

	protected:
		virtual void _prepareOpcodeCreateParams(Opcode::OPCODECREATE& opcc);

	private:
		/// prevent default construction
		BoxCollisionShape();

	};

}; // namespace OgreOpcode

#endif // __OgreBoxCollisionShape_h__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?