mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-22 13:39:40 +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)
|
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::Vec3Array> vertices (new osg::Vec3Array());
|
||||||
osg::ref_ptr<osg::Vec4Array> colors (new osg::Vec4Array());
|
osg::ref_ptr<osg::Vec4Array> colors (new osg::Vec4Array());
|
||||||
const float brushOutlineHeight (1.0f);
|
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)
|
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::Vec3Array> vertices (new osg::Vec3Array());
|
||||||
osg::ref_ptr<osg::Vec4Array> colors (new osg::Vec4Array());
|
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)
|
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::Vec3Array> vertices (new osg::Vec3Array());
|
||||||
osg::ref_ptr<osg::Vec4Array> colors (new osg::Vec4Array());
|
osg::ref_ptr<osg::Vec4Array> colors (new osg::Vec4Array());
|
||||||
const int amountOfPoints = (osg::PI * 2.0f) * radius / 20;
|
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++)
|
for (int i = 0; i < amountOfPoints + 2; i++)
|
||||||
{
|
{
|
||||||
float angle (static_cast<float>(i) * step);
|
float angle (i * step);
|
||||||
vertices->push_back(osg::Vec3d(
|
vertices->push_back(osg::Vec3d(
|
||||||
point.x() + radius * cosf(angle),
|
point.x() + radius * cosf(angle),
|
||||||
point.y() + radius * sinf(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)
|
void CSVRender::TerrainShapeMode::activate(CSVWidget::SceneToolbar* toolbar)
|
||||||
{
|
{
|
||||||
if (!mTerrainShapeSelection)
|
if (!mTerrainShapeSelection)
|
||||||
|
|
|
@ -58,7 +58,6 @@ namespace CSVRender
|
||||||
|
|
||||||
/// Editmode for terrain shape grid
|
/// Editmode for terrain shape grid
|
||||||
TerrainShapeMode(WorldspaceWidget*, osg::Group* parentNode, QWidget* parent = nullptr);
|
TerrainShapeMode(WorldspaceWidget*, osg::Group* parentNode, QWidget* parent = nullptr);
|
||||||
~TerrainShapeMode();
|
|
||||||
|
|
||||||
void primaryOpenPressed (const WorldspaceHitResult& hit) final;
|
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)
|
void CSVRender::TerrainTextureMode::activate(CSVWidget::SceneToolbar* toolbar)
|
||||||
{
|
{
|
||||||
if(!mTextureBrushScenetool)
|
if(!mTextureBrushScenetool)
|
||||||
|
|
|
@ -52,7 +52,6 @@ namespace CSVRender
|
||||||
|
|
||||||
/// \brief Editmode for terrain texture grid
|
/// \brief Editmode for terrain texture grid
|
||||||
TerrainTextureMode(WorldspaceWidget*, osg::Group* parentNode, QWidget* parent = nullptr);
|
TerrainTextureMode(WorldspaceWidget*, osg::Group* parentNode, QWidget* parent = nullptr);
|
||||||
~TerrainTextureMode();
|
|
||||||
|
|
||||||
void primaryOpenPressed (const WorldspaceHitResult& hit) final;
|
void primaryOpenPressed (const WorldspaceHitResult& hit) final;
|
||||||
|
|
||||||
|
@ -107,15 +106,15 @@ namespace CSVRender
|
||||||
bool allowLandTextureEditing(std::string textureFileName);
|
bool allowLandTextureEditing(std::string textureFileName);
|
||||||
|
|
||||||
std::string mCellId;
|
std::string mCellId;
|
||||||
std::string mBrushTexture = "L0#0";
|
std::string mBrushTexture;
|
||||||
int mBrushSize = 1;
|
int mBrushSize;
|
||||||
CSVWidget::BrushShape mBrushShape = CSVWidget::BrushShape_Point;
|
CSVWidget::BrushShape mBrushShape;
|
||||||
std::unique_ptr<BrushDraw> mBrushDraw;
|
std::unique_ptr<BrushDraw> mBrushDraw;
|
||||||
std::vector<std::pair<int, int>> mCustomBrushShape;
|
std::vector<std::pair<int, int>> mCustomBrushShape;
|
||||||
CSVWidget::SceneToolTextureBrush *mTextureBrushScenetool = nullptr;
|
CSVWidget::SceneToolTextureBrush *mTextureBrushScenetool;
|
||||||
int mDragMode = InteractionType_None;
|
int mDragMode;
|
||||||
osg::Group* mParentNode;
|
osg::Group* mParentNode;
|
||||||
bool mIsEditing = false;
|
bool mIsEditing;
|
||||||
std::unique_ptr<TerrainSelection> mTerrainTextureSelection;
|
std::unique_ptr<TerrainSelection> mTerrainTextureSelection;
|
||||||
|
|
||||||
const int cellSize {ESM::Land::REAL_SIZE};
|
const int cellSize {ESM::Land::REAL_SIZE};
|
||||||
|
|
Loading…
Reference in a new issue