⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 raywrapper.h

📁 使用stl技术,(还没看,是听说的)
💻 H
字号:
#ifndef PYOGRE_OGRERAYWRAPPER_H_INCLUDED
# define PYOGRE_OGRERAYWRAPPER_H_INCLUDED

# include <OgreRay.h>
# include <OgrePlane.h>
# include <OgreSphere.h>
# include <OgreAxisAlignedBox.h>

inline 
boost::python::tuple Ray_intersects_plane_wrapper(Ogre::Ray & r, Ogre::Plane & p)
{
	std::pair<bool, Ogre::Real> result = r.intersects(p); 
	return boost::python::make_tuple( result.first, result.second );
} 

inline 
boost::python::tuple Ray_intersects_sphere_wrapper(Ogre::Ray & r, Ogre::Sphere & s)
{
	std::pair<bool, Ogre::Real> result = r.intersects(s); 
	return boost::python::make_tuple( result.first, result.second );
}

inline 
boost::python::tuple Ray_intersects_axisalignedbox_wrapper(Ogre::Ray & r, Ogre::AxisAlignedBox & a)
{
	std::pair<bool, Ogre::Real> result = r.intersects(a); 
	return boost::python::make_tuple( result.first, result.second );
}

#endif // PYOGRE_OGRERAYWRAPPER_H_INCLUDED

⌨️ 快捷键说明

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