|
|
|
@ -8,11 +8,11 @@
|
|
|
|
|
|
|
|
|
|
#include <osgUtil/LineSegmentIntersector>
|
|
|
|
|
|
|
|
|
|
#include <components/sceneutil/vismask.hpp>
|
|
|
|
|
|
|
|
|
|
#include "../../model/world/cellcoordinates.hpp"
|
|
|
|
|
#include "../widget/brushshapes.hpp"
|
|
|
|
|
|
|
|
|
|
#include "mask.hpp"
|
|
|
|
|
|
|
|
|
|
CSVRender::BrushDraw::BrushDraw(osg::ref_ptr<osg::Group> parentNode, bool textureMode) :
|
|
|
|
|
mParentNode(parentNode), mTextureMode(textureMode)
|
|
|
|
|
{
|
|
|
|
@ -44,7 +44,7 @@ float CSVRender::BrushDraw::getIntersectionHeight (const osg::Vec3d& point)
|
|
|
|
|
intersector->setIntersectionLimit(osgUtil::LineSegmentIntersector::NO_LIMIT);
|
|
|
|
|
osgUtil::IntersectionVisitor visitor(intersector);
|
|
|
|
|
|
|
|
|
|
visitor.setTraversalMask(Mask_Terrain);
|
|
|
|
|
visitor.setTraversalMask(SceneUtil::Mask_Terrain);
|
|
|
|
|
|
|
|
|
|
mParentNode->accept(visitor);
|
|
|
|
|
|
|
|
|
@ -255,7 +255,7 @@ void CSVRender::BrushDraw::buildCustomGeometry(const float& radius, const osg::V
|
|
|
|
|
void CSVRender::BrushDraw::update(osg::Vec3d point, int brushSize, CSVWidget::BrushShape toolShape)
|
|
|
|
|
{
|
|
|
|
|
if (mBrushDrawNode->containsNode(mGeometry)) mBrushDrawNode->removeChild(mGeometry);
|
|
|
|
|
mBrushDrawNode->setNodeMask (Mask_EditModeCursor);
|
|
|
|
|
mBrushDrawNode->setNodeMask (SceneUtil::Mask_GUI);
|
|
|
|
|
float radius = (mLandSizeFactor * brushSize) / 2;
|
|
|
|
|
osg::Vec3d snapToGridPoint = point;
|
|
|
|
|
if (mTextureMode)
|
|
|
|
|