1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-06 09:39:49 +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.

37 lines
1.0 KiB
C++
Raw Normal View History

#ifndef CSV_RENDER_BRUSHDRAW_H
#define CSV_RENDER_BRUSHDRAW_H
#include <osg/Geometry>
2022-09-22 21:26:05 +03:00
#include <osg/Group>
#include "../widget/brushshapes.hpp"
2022-09-22 21:26:05 +03:00
#include <components/esm3/loadland.hpp>
namespace CSVRender
{
class BrushDraw
{
2022-09-22 21:26:05 +03:00
public:
BrushDraw(osg::ref_ptr<osg::Group> parentNode, bool textureMode = false);
~BrushDraw();
2022-09-22 21:26:05 +03:00
void update(osg::Vec3d point, int brushSize, CSVWidget::BrushShape toolShape);
void hide();
2022-09-22 21:26:05 +03:00
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);
2022-09-22 21:26:05 +03:00
osg::ref_ptr<osg::Group> mParentNode;
osg::ref_ptr<osg::Group> mBrushDrawNode;
osg::ref_ptr<osg::Geometry> mGeometry;
bool mTextureMode;
float mLandSizeFactor;
};
}
#endif