1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 12:53:52 +00:00
openmw/apps/opencs/view/render/brushdraw.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1 KiB
C++
Raw Normal View History

#ifndef CSV_RENDER_BRUSHDRAW_H
#define CSV_RENDER_BRUSHDRAW_H
2022-10-10 11:41:36 +00:00
#include <osg/Vec3d>
#include <osg/ref_ptr>
#include "../widget/brushshapes.hpp"
2022-10-10 11:41:36 +00:00
namespace osg
{
class Geometry;
class Group;
}
namespace CSVRender
{
class BrushDraw
{
public:
BrushDraw(osg::ref_ptr<osg::Group> parentNode, bool textureMode = false);
~BrushDraw();
void update(osg::Vec3d point, int brushSize, CSVWidget::BrushShape toolShape);
void hide();
private:
void buildPointGeometry(const osg::Vec3d& point);
void buildSquareGeometry(const float& radius, const osg::Vec3d& point);
void buildCircleGeometry(const float& radius, const osg::Vec3d& point);
void buildCustomGeometry(const float& radius, const osg::Vec3d& point);
float getIntersectionHeight(const osg::Vec3d& point);
osg::ref_ptr<osg::Group> mParentNode;
osg::ref_ptr<osg::Group> mBrushDrawNode;
osg::ref_ptr<osg::Geometry> mGeometry;
bool mTextureMode;
float mLandSizeFactor;
};
}
#endif