Fix linux build.

This commit is contained in:
James Grogan 2023-01-28 16:58:26 +00:00
parent a6d92e142f
commit 9e1d951520
50 changed files with 1586 additions and 1192 deletions

View file

@ -4,60 +4,60 @@
#include "PolygonNode.h"
LineEndNode::LineEndNode(const Transform& t)
: MaterialNode(t)
: MaterialNode(t)
{
}
void LineEndNode::setStyle(LineEndNode::Style style)
{
if (mStyle != style)
{
mStyle = style;
mContentDirty = true;
}
if (mStyle != style)
{
mStyle = style;
mContentDirty = true;
}
}
void LineEndNode::setSize(double size)
{
if (mSize != size)
{
mSize = size;
mContentDirty = true;
}
if (mSize != size)
{
mSize = size;
mContentDirty = true;
}
}
void LineEndNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
void LineEndNode::createOrUpdateGeometry(SceneInfo*)
{
if (!mContentNode)
{
if (mStyle == Style::CLOSED_ARROW)
{
auto polygon = std::make_unique<PolygonNode>();
auto p0 = Point(0.0, -mSize / 2.0);
auto p1 = Point(mSize, 0.0);
auto p2 = Point(0.0, mSize / 2.0);
polygon->setPoints({ p0, p1, p2 });
polygon->setFillColor({ 0, 0, 0 });
if (!mContentNode)
{
if (mStyle == Style::CLOSED_ARROW)
{
auto polygon = std::make_unique<PolygonNode>();
auto p0 = Point(0.0, -mSize / 2.0);
auto p1 = Point(mSize, 0.0);
auto p2 = Point(0.0, mSize / 2.0);
polygon->setPoints({ p0, p1, p2 });
polygon->setFillColor({ 0, 0, 0 });
mContentNode = std::move(polygon);
addChild(mContentNode.get());
}
}
mContentNode = std::move(polygon);
addChild(mContentNode.get());
}
}
}
void LineEndNode::update(SceneInfo* sceneInfo)
{
if (mContentDirty)
{
createOrUpdateGeometry(sceneInfo);
mContentDirty = false;
}
if (mContentDirty)
{
createOrUpdateGeometry(sceneInfo);
mContentDirty = false;
}
if (mMaterialIsDirty)
{
//updateMaterial();
mMaterialIsDirty = false;
}
}
if (mMaterialIsDirty)
{
//updateMaterial();
mMaterialIsDirty = false;
}
}