|
计算一个模型的中心 但是可以不受包围球 或 包围盒的影响
struct ComputeBoundingSphereCallback : public osg::Object
{
ComputeBoundingSphereCallback() {}
ComputeBoundingSphereCallback(const ComputeBoundingSphereCallback&,const CopyOp&) {}
META_Object(osg,ComputeBoundingSphereCallback);
virtual BoundingSphere computeBound(const osg::Node&) const { return BoundingSphere(); }
};
/** Set the compute bound callback to override the default computeBound.*/
void setComputeBoundingSphereCallback(ComputeBoundingSphereCallback* callback) { _computeBoundCallback = callback; }
/** Get the compute bound callback.*/
ComputeBoundingSphereCallback* getComputeBoundingSphereCallback() { return _computeBoundCallback.get(); }
/** Get the const compute bound callback.*/
const ComputeBoundingSphereCallback* getComputeBoundingSphereCallback() const { return _computeBoundCallback.get(); }
就是 这里的函数把 osg新人 希望前辈们 指教下 谢谢了 |
|