osgSim.DirectionalSector 是OpenSceneGraph中的类,用于描述一个方向角度区间,可用于过滤可视范围或进行场景剪裁等操作。
osg::Referenced → osgSim::Sector
↳ osgSim::DirectionalSector
#include <osgSim/DirectionalSector>
class DirectionalSector : public osgSim::Sector
float minAzim:最小方位角,以弧度为单位。
float maxAzim:最大方位角,以弧度为单位。
osgSim::DirectionalSector(float minAzim, float maxAzim);
参数:
osg::BoundingSphere osgSim::DirectionalSector::computeBound():
计算此 DirectionalSector 对象的包围球。
bool osgSim::DirectionalSector::contains(double azimuth, double elevation) const:
检查给定的方位角和俯仰角是否在此 DirectionalSector 对象中。
参数:
返回值:
#include <osgSim/DirectionalSector>
osgSim::DirectionalSector* sector = new osgSim::DirectionalSector(0.785,1.571);
bool contains = sector->contains(1.047, 0.785);
osg::BoundingSphere bs = sector->computeBound();
[1] OpenSceneGraph 3.6.5 Documentation - osgSim.DirectionalSector. https://osgdoc.xpdian.com/osg36docs/osgsim/html/classosg_sim_1_1_directional_sector.html. Accessed 10 July 2021.