raywrapper.h

来自「使用stl技术,(还没看,是听说的)」· C头文件 代码 · 共 31 行

H
31
字号
#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 + =
减小字号Ctrl + -
显示快捷键?