mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 19:15:33 +00:00
Remove unneeded constructors, only initialize in cpp, minor fixes
This commit is contained in:
parent
ec2ff2a9b0
commit
66fba7cc51
5 changed files with 10 additions and 24 deletions
|
@ -67,7 +67,7 @@ float CSVRender::BrushDraw::getIntersectionHeight (const osg::Vec3d& point)
|
|||
|
||||
void CSVRender::BrushDraw::buildPointGeometry(const osg::Vec3d& point)
|
||||
{
|
||||
osg::ref_ptr<osg::Geometry> geom = new osg::Geometry();
|
||||
osg::ref_ptr<osg::Geometry> geom (new osg::Geometry());
|
||||
osg::ref_ptr<osg::Vec3Array> vertices (new osg::Vec3Array());
|
||||
osg::ref_ptr<osg::Vec4Array> colors (new osg::Vec4Array());
|
||||
const float brushOutlineHeight (1.0f);
|
||||
|
@ -115,7 +115,7 @@ void CSVRender::BrushDraw::buildPointGeometry(const osg::Vec3d& point)
|
|||
|
||||
void CSVRender::BrushDraw::buildSquareGeometry(const float& radius, const osg::Vec3d& point)
|
||||
{
|
||||
osg::ref_ptr<osg::Geometry> geom = new osg::Geometry();
|
||||
osg::ref_ptr<osg::Geometry> geom (new osg::Geometry());
|
||||
osg::ref_ptr<osg::Vec3Array> vertices (new osg::Vec3Array());
|
||||
osg::ref_ptr<osg::Vec4Array> colors (new osg::Vec4Array());
|
||||
|
||||
|
@ -212,7 +212,7 @@ void CSVRender::BrushDraw::buildSquareGeometry(const float& radius, const osg::V
|
|||
|
||||
void CSVRender::BrushDraw::buildCircleGeometry(const float& radius, const osg::Vec3d& point)
|
||||
{
|
||||
osg::ref_ptr<osg::Geometry> geom = new osg::Geometry();
|
||||
osg::ref_ptr<osg::Geometry> geom (new osg::Geometry());
|
||||
osg::ref_ptr<osg::Vec3Array> vertices (new osg::Vec3Array());
|
||||
osg::ref_ptr<osg::Vec4Array> colors (new osg::Vec4Array());
|
||||
const int amountOfPoints = (osg::PI * 2.0f) * radius / 20;
|
||||
|
@ -222,7 +222,7 @@ void CSVRender::BrushDraw::buildCircleGeometry(const float& radius, const osg::V
|
|||
|
||||
for (int i = 0; i < amountOfPoints + 2; i++)
|
||||
{
|
||||
float angle (static_cast<float>(i) * step);
|
||||
float angle (i * step);
|
||||
vertices->push_back(osg::Vec3d(
|
||||
point.x() + radius * cosf(angle),
|
||||
point.y() + radius * sinf(angle),
|
||||
|
|
|
@ -50,12 +50,6 @@ CSVRender::TerrainShapeMode::TerrainShapeMode (WorldspaceWidget *worldspaceWidge
|
|||
{
|
||||
}
|
||||
|
||||
CSVRender::TerrainShapeMode::~TerrainShapeMode ()
|
||||
{
|
||||
if (mBrushDraw)
|
||||
mBrushDraw.reset();
|
||||
}
|
||||
|
||||
void CSVRender::TerrainShapeMode::activate(CSVWidget::SceneToolbar* toolbar)
|
||||
{
|
||||
if (!mTerrainShapeSelection)
|
||||
|
|
|
@ -58,7 +58,6 @@ namespace CSVRender
|
|||
|
||||
/// Editmode for terrain shape grid
|
||||
TerrainShapeMode(WorldspaceWidget*, osg::Group* parentNode, QWidget* parent = nullptr);
|
||||
~TerrainShapeMode();
|
||||
|
||||
void primaryOpenPressed (const WorldspaceHitResult& hit) final;
|
||||
|
||||
|
|
|
@ -52,12 +52,6 @@ CSVRender::TerrainTextureMode::TerrainTextureMode (WorldspaceWidget *worldspaceW
|
|||
{
|
||||
}
|
||||
|
||||
CSVRender::TerrainTextureMode::~TerrainTextureMode ()
|
||||
{
|
||||
if (mBrushDraw)
|
||||
mBrushDraw.reset();
|
||||
}
|
||||
|
||||
void CSVRender::TerrainTextureMode::activate(CSVWidget::SceneToolbar* toolbar)
|
||||
{
|
||||
if(!mTextureBrushScenetool)
|
||||
|
|
|
@ -52,7 +52,6 @@ namespace CSVRender
|
|||
|
||||
/// \brief Editmode for terrain texture grid
|
||||
TerrainTextureMode(WorldspaceWidget*, osg::Group* parentNode, QWidget* parent = nullptr);
|
||||
~TerrainTextureMode();
|
||||
|
||||
void primaryOpenPressed (const WorldspaceHitResult& hit) final;
|
||||
|
||||
|
@ -107,15 +106,15 @@ namespace CSVRender
|
|||
bool allowLandTextureEditing(std::string textureFileName);
|
||||
|
||||
std::string mCellId;
|
||||
std::string mBrushTexture = "L0#0";
|
||||
int mBrushSize = 1;
|
||||
CSVWidget::BrushShape mBrushShape = CSVWidget::BrushShape_Point;
|
||||
std::string mBrushTexture;
|
||||
int mBrushSize;
|
||||
CSVWidget::BrushShape mBrushShape;
|
||||
std::unique_ptr<BrushDraw> mBrushDraw;
|
||||
std::vector<std::pair<int, int>> mCustomBrushShape;
|
||||
CSVWidget::SceneToolTextureBrush *mTextureBrushScenetool = nullptr;
|
||||
int mDragMode = InteractionType_None;
|
||||
CSVWidget::SceneToolTextureBrush *mTextureBrushScenetool;
|
||||
int mDragMode;
|
||||
osg::Group* mParentNode;
|
||||
bool mIsEditing = false;
|
||||
bool mIsEditing;
|
||||
std::unique_ptr<TerrainSelection> mTerrainTextureSelection;
|
||||
|
||||
const int cellSize {ESM::Land::REAL_SIZE};
|
||||
|
|
Loading…
Reference in a new issue