亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ogrecollisionobject.h

?? opcode是功能強大
?? H
字號:
///////////////////////////////////////////////////////////////////////////////
///  @file OgreCollisionObject.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 __OgreCollisionObject_h__
#define __OgreCollisionObject_h__

#include <Ogre.h>
#include "OgreNodes.h"
#include "OgreCollisionManager.h"
#include "OgreCollisionContext.h"
#include "OgreOpcodeMath.h"

namespace OgreOpcode
{
	class CollisionContext;
	class CollisionPair;

	namespace Details
	{
		class BP_Proxy;
	}
	/// Collision system object.
	/// CollisionObject is an actual collision system object which can
	/// be positioned and oriented in space. It points to an
	/// EntityCollisionShape which describes the actual shape of the
	/// object.
	/// CollisionObject%s are kept in sorted list (one for each dimension)
	/// by the CollisionContext they belong to.
	class _OgreOpcode_Export CollisionObject : public Ogre::Node::Listener
	{
		friend class CollisionContext;

	public:
		CollisionObject(const Ogre::String& name)
			: mContext(0),
			mName(name),
			mRadius(0.0f),
			//old_center_offset(0,0,0),
			//new_center_offset(0,0,0),
			new_pos(0,0,0),
			old_pos(0,0,0),
			mShape(0),
			coll_class(0),
			m_tdelta(-1.0),
			client_data(0),
			is_attached(false),
			num_colls(0),
			old_matrix(Ogre::Matrix4::IDENTITY),
			new_matrix(Ogre::Matrix4::IDENTITY),
			mNeedsUpdating(true),
			mForcedUpdate(true),
			mProxy(0)
		{
			mRecentContactList.clear();
		};

		virtual ~CollisionObject()
		{
			//remove_broadphase();
			getShape()->getParentSceneNode()->setListener(0);
		}
		
		void setForcedUpdate(bool newupdate = true)
		{
			mForcedUpdate = newupdate;
		};
		
		/// <TODO: insert function description here>
		/// @param [in, out]  c CollisionContext *    <TODO: insert parameter description here>
		/// @return void <TODO: insert return value description here>
		void setContext(CollisionContext *c)
		{
			// c may be 0!!!
			mContext = c;
		};

		/// <TODO: insert function description here>
		/// @return CollisionContext * <TODO: insert return value description here>
		CollisionContext *getContext(void)
		{
			return mContext;
		};

		/// <TODO: insert function description here>
		/// @param [in]       i int     <TODO: insert parameter description here>
		/// @return void <TODO: insert return value description here>
		void setId(int i)
		{
			id = i;
		};

		/// <TODO: insert function description here>
		/// @return int <TODO: insert return value description here>
		int getId(void)
		{
			return id;
		};

		Ogre::String getName() const
		{
			return mName;
		};
		
		/// <TODO: insert function description here>
		/// @param [in]       b bool     <TODO: insert parameter description here>
		/// @return void <TODO: insert return value description here>
		void setAttached(bool b)
		{
			is_attached = b;
		};

		/// <TODO: insert function description here>
		/// @return bool <TODO: insert return value description here>
		bool isAttached(void)
		{
			return is_attached;
		};

		/// <TODO: insert function description here>
		/// @param [in]       f float     <TODO: insert parameter description here>
		/// @return void <TODO: insert return value description here>
		void setRadius(float f)
		{
			mRadius = f;
		};

		/// <TODO: insert function description here>
		/// @return float <TODO: insert return value description here>
		float getRadius(void)
		{
			return mRadius;
		};

		/// <TODO: insert function description here>
		/// @param [in, out]  s EntityCollisionShape *    <TODO: insert parameter description here>
		/// @return void <TODO: insert return value description here>
		void setShape(ICollisionShape *s)
		{
			mShape = s;
			if (s)
			{
				setRadius(s->getRadius());
				getShape()->getParentSceneNode()->setListener(this);
			}
			else
			{
				setRadius(0.0f);
			}
		};

		/// <TODO: insert function description here>
		/// @return EntityCollisionShape * <TODO: insert return value description here>
		ICollisionShape *getShape(void)
		{
			return mShape;
		};

		/// <TODO: insert function description here>
		/// @param [in] cc CollisionClass     <TODO: insert parameter description here>
		/// @return void
		void setCollClass(Details::CollisionClass cc)
		{
			coll_class = cc;
		};

		/// <TODO: insert function description here>
		/// @param [in]       ccstr registered CollisionClass string
		/// @return void
		void setCollClass(const char *ccstr)
		{
			coll_class = CollisionManager::getSingletonPtr()->queryCollClass(ccstr);
		};

		/// <TODO: insert function description here>
		/// @return CollisionClass <TODO: insert return value description here>
		Details::CollisionClass getCollClass(void)
		{
			return coll_class;
		};

		/// <TODO: insert function description here>
		/// @param [in, out]  d void *    <TODO: insert parameter description here>
		/// @return void <TODO: insert return value description here>
		void setClientData(void *d)
		{
			client_data = d;
		};

		/// <TODO: insert function description here>
		/// @return void * <TODO: insert return value description here>
		void *getClientData(void)
		{
			return client_data;
		};

		/// <TODO: insert function description here>
		/// @return const Matrix4 & <TODO: insert return value description here>
		const Ogre::Matrix4& getTransform(void)
		{
			new_matrix = getShape()->getFullTransform();
			//getShape()->getEntity()->getSubEntity(0)->getWorldTransforms(&new_matrix);
			return new_matrix;
		};

		/// <TODO: insert function description here>
		/// @return const Matrix4 & <TODO: insert return value description here>
		const Ogre::Matrix4& getPrevTransform(void)
		{
			return old_matrix;
		};

		/// Return the 'time' between the current and previous transforms
		/// @return Real The elapsed 'time' (actually just whatever the user
		///         told us it was when calling update()).  Negative if no
		///         update()'s have been performed since the last reset()
		Ogre::Real getTimeDelta(void)
		{
			return m_tdelta;
		};

		/// <TODO: insert function description here>
		/// @return void <TODO: insert return value description here>
		void clearCollisions(void)
		{
			num_colls = 0;
		};

		/// <TODO: insert function description here>
		/// @return int <TODO: insert return value description here>
		int getNumCollisions(void)
		{
			return num_colls;
		};

		/// Retrieve current vertex data from mesh and refit collision tree
		void refit()
		{
			if (mShape)
				mShape->refit();
		}

		void update(Ogre::Real tdelta)
		{
			Ogre::Matrix4 m;
			OgreOpcode::ICollisionShape* ics = getShape();
			ics->update(tdelta);
			m = ics->getFullTransform();
			//getShape()->getEntity()->getSubEntity(0)->getWorldTransforms(&m);

			update(tdelta,m);
		}

		/// update the object to its new position/orientation, update the dimensional nodes and the bounding box.
		/// @param [in]       t Real 'time' delta.  Doesn't have to be real time though.
		///                   Just pass in 1.0 every time if you don't care about actual time.
		///                   This comes into play when collisions are sub-stepped.
		///                   You can get back the portion of t that passed before
		///                   a collision occurred from the CollisionPair::tstamp member.
		/// @param [in]       m const Matrix4 &    new world transform
		void update(Ogre::Real t, Ogre::Matrix4& m);

		/// Check whether 2 moving collide objects have contact.
		bool contact(CollisionObject *other,     // the other object
			CollisionType ct,
			CollisionPair& cr);

		/// For each overlapping object in all 3 dimensions,
		/// which doesn't fall into the ignore_types category,
		/// do a collision check, and if the check is positive,
		/// record collision by doing an addCollision().
		void collide(void);

		/// Return collision reports for all collisions this object is involved in.
		int getCollisions(CollisionPair **&crp)
		{
			assert(mContext);
			assert(is_attached);
			return mContext->collideReportHandler.getCollisions(this,crp);
			return 0;
		};

		/// get SAP min max values
		virtual void getSAPMinMax(Ogre::Vector3& sapMin, Ogre::Vector3& sapMax) const; 

		bool hasCollisions()
		{
			assert(mContext);
			assert(is_attached);
			if ( mContext->collideReportHandler.getCollisions(this) > 0) return true;
			return false;
		};

		bool hasCheckCollisions()
		{
			assert(mContext);
			assert(is_attached);
			if ( mContext->checkReportHandler.getCollisions(this) > 0) return true;
			return false;
		};

		const bool needsUpdate() const
		{
			return mNeedsUpdating;
		}
		
		/// visualize stuff in local coordinate space.
		void visualizeRadii();

		/// visualize stuff in global space.
		void visualizeContacts();
	
		/// 
		void visualizeBoundingBoxes();

		///
		void addToCollideList(CollisionObject* collObj);

		/// @see Node::Listener::nodeUpdated
		void nodeUpdated(const Ogre::Node* node);

		/// 
		void do_broadphase();

		///
		void remove_broadphase();

	protected:
		std::list<CollisionObject*> collideList;
		typedef std::list<CollisionObject*>::const_iterator collideListIterator;
		int id;                     ///< a unique 32 bit id for this object
		Ogre::String mName;				///< 
		CollisionContext *mContext;    ///< the collide context this object is currently attached to

		Ogre::Real mRadius;               ///< radius of the collision object (normally provided by shape)
		ICollisionShape *mShape;       ///< the triangle exact collision shape (optional)
		Details::CollisionClass coll_class;      ///< the application defined collision type

		Ogre::Vector3 minv;               ///< the min/max coordinates in each dimension
		Ogre::Vector3 maxv;

		Ogre::Vector3 old_minv, old_maxv;

		Ogre::Matrix4 old_matrix;			///< the previous orientation of the object
		Ogre::Vector3 old_pos;			///< the previous position of the object
		Ogre::Matrix4 new_matrix;			///< the new orientation of the object
		Ogre::Vector3 new_pos;			///< the new position of the object
		Ogre::Real    m_tdelta;          ///< the 'time' between old and new transform
		//Vector3 old_center_offset; ///< the world offset of the shape center
		//Vector3 new_center_offset; ///< the world offset of the shape center

		void *client_data;          ///< user defined client data field
		bool is_attached;           ///< currently attached to a context
		bool mNeedsUpdating;		///< do we need to update collisions?
		bool mForcedUpdate;			///< force update even if we haven't moved
		int num_colls;              ///< number of collisions this object is involved in

		Details::BP_Proxy* mProxy;

		std::list<CollisionInfo> mRecentContactList;
	};
};

#endif // __OgreCollisionObject_h__

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久9热精品视频| 欧美少妇bbb| 欧美午夜电影网| 久久嫩草精品久久久精品一| 亚洲天堂久久久久久久| 精品制服美女久久| 欧美亚洲自拍偷拍| 中文字幕亚洲不卡| 国产69精品久久久久毛片 | 欧美成人高清电影在线| 亚洲黄色av一区| 成人午夜av电影| 欧美一级精品大片| 亚洲一级二级在线| 色综合视频在线观看| 日本一区二区三区久久久久久久久不| 天堂一区二区在线| 欧美视频在线播放| 亚洲影视在线观看| 色婷婷综合五月| 中文字幕一区二区三区精华液 | 精品国产一区久久| 乱一区二区av| 日韩一区二区精品在线观看| 日韩黄色小视频| 欧美精品亚洲二区| 香蕉av福利精品导航 | 成人网在线免费视频| 国产人妖乱国产精品人妖| 国模套图日韩精品一区二区 | 国产精品一区三区| 久久精品在线观看| 国产成人精品影视| 亚洲欧洲精品一区二区三区| 成人av电影在线播放| 亚洲视频每日更新| 色av综合在线| 亚洲va欧美va人人爽午夜| 欧美乱熟臀69xxxxxx| 看电影不卡的网站| 国产无遮挡一区二区三区毛片日本| 国产精品一区二区久激情瑜伽| 久久先锋影音av鲁色资源网| 国产成人夜色高潮福利影视| 国产精品天美传媒沈樵| 91免费视频网| 午夜精品久久久久久久| 日韩免费观看高清完整版| 久久97超碰色| 欧美国产综合一区二区| 91麻豆免费观看| 亚洲h精品动漫在线观看| 日韩一区二区在线免费观看| 久久精品国产秦先生| 国产精品蜜臀av| 欧美日韩1区2区| 国产美女精品一区二区三区| 亚洲日本韩国一区| 56国语精品自产拍在线观看| 国产精品一二一区| 亚洲永久免费av| 久久亚洲免费视频| 欧美天堂亚洲电影院在线播放| 免费av成人在线| 国产精品久久久久久久久动漫| 欧美伊人久久久久久久久影院| 视频一区视频二区在线观看| 久久久噜噜噜久噜久久综合| 色94色欧美sute亚洲13| 免费观看91视频大全| 亚洲国产精华液网站w| 欧美日本在线播放| k8久久久一区二区三区| 美腿丝袜在线亚洲一区| 亚洲精选在线视频| 久久久久久久综合狠狠综合| 欧洲另类一二三四区| 国产精品1024| 视频精品一区二区| 亚洲精品网站在线观看| 国产校园另类小说区| 欧美美女一区二区三区| 99re8在线精品视频免费播放| 免费在线观看一区二区三区| 综合久久久久久久| 国产肉丝袜一区二区| 欧美一级精品大片| 欧美午夜电影在线播放| 色又黄又爽网站www久久| 国产成人精品免费看| 毛片基地黄久久久久久天堂| 亚洲超碰精品一区二区| 亚洲精品乱码久久久久久| 国产精品免费视频一区| 国产欧美精品一区二区三区四区| 777xxx欧美| 欧美日韩不卡一区| 欧美性猛片xxxx免费看久爱| 波多野结衣91| 国产91高潮流白浆在线麻豆| 国产综合色产在线精品| 日本亚洲电影天堂| 日韩精品1区2区3区| 日日夜夜精品视频天天综合网| 一区二区三区四区激情| 亚洲精品第一国产综合野| 亚洲区小说区图片区qvod| 国产精品嫩草99a| 国产亚洲人成网站| 国产日韩精品一区| 2020国产精品自拍| 国产性天天综合网| 国产精品女人毛片| 中文在线免费一区三区高中清不卡| 久久精品视频一区二区| 国产人久久人人人人爽| 国产精品国产三级国产普通话蜜臀 | 欧美一区二区三区四区久久| 欧美老年两性高潮| 欧美日本韩国一区| 日韩亚洲欧美成人一区| 欧美不卡一区二区| 欧美激情中文不卡| 成人欧美一区二区三区视频网页| 亚洲欧美综合色| 亚洲国产精品嫩草影院| 蜜臀av国产精品久久久久| 韩国一区二区三区| 成人高清在线视频| 日本高清成人免费播放| 717成人午夜免费福利电影| 欧美成人精品3d动漫h| 中文字幕精品一区二区精品绿巨人 | 欧美色区777第一页| 欧美高清你懂得| 国产亚洲婷婷免费| 中文字幕亚洲区| 日本亚洲欧美天堂免费| 国产一区二区久久| 日本国产一区二区| 欧美大白屁股肥臀xxxxxx| 国产精品三级在线观看| 香蕉成人啪国产精品视频综合网| 精品亚洲porn| 在线观看日韩高清av| 日韩视频免费直播| 亚洲天堂久久久久久久| 麻豆久久久久久久| 91麻豆国产福利精品| 精品国产一区二区三区久久影院| 中文字幕制服丝袜一区二区三区 | 欧美一区二区三区婷婷月色| 亚洲国产电影在线观看| 日韩福利视频网| 成人不卡免费av| 精品久久国产老人久久综合| 亚洲资源在线观看| 国产成人午夜99999| 7799精品视频| 亚洲色欲色欲www| 国产揄拍国内精品对白| 欧美欧美午夜aⅴ在线观看| 国产精品视频第一区| 久久精品国产亚洲5555| 在线看一区二区| 久久精品亚洲一区二区三区浴池| 亚洲丶国产丶欧美一区二区三区| 国产成人综合网站| 欧美一级久久久久久久大片| 亚洲国产美国国产综合一区二区| 高清不卡一区二区| 精品国产一区二区三区久久久蜜月 | 亚洲午夜久久久久久久久电影院 | 欧美日韩久久一区二区| 日本一区二区不卡视频| 麻豆极品一区二区三区| 欧美日韩中文字幕一区| 亚洲欧美日韩电影| 成人av电影免费观看| 国产欧美综合色| 狠狠狠色丁香婷婷综合激情| 正在播放亚洲一区| 日韩影院在线观看| 欧美午夜一区二区三区免费大片| 亚洲天天做日日做天天谢日日欢| 国产精品一区二区三区四区| 日韩欧美的一区二区| 五月天久久比比资源色| 欧美性视频一区二区三区| 亚洲欧美日韩电影| 日本韩国欧美在线| 亚洲最大成人综合| 欧美制服丝袜第一页| 一区二区三区在线观看欧美| 色香蕉久久蜜桃| 亚洲精品视频一区二区| 欧美亚洲动漫制服丝袜| 亚洲v中文字幕| 欧美一区二区三区在线观看视频| 日韩有码一区二区三区|