Clean up use of transforms in scene graph.

This commit is contained in:
jmsgrogan 2023-01-19 17:37:26 +00:00
parent 3915a40c96
commit f26ee2ebc4
37 changed files with 238 additions and 242 deletions

View file

@ -1,9 +1,10 @@
#include "GridNode.h"
#include "MeshPrimitives.h"
#include "SceneModel.h"
GridNode::GridNode(const Point& location)
: MaterialNode(location)
GridNode::GridNode(const Transform& transform)
: MaterialNode(transform)
{
}
@ -30,7 +31,7 @@ void GridNode::setWidth(double width)
{
if (mWidth != width)
{
mTransformIsDirty = true;
mGeometryIsDirty = true;
mWidth = width;
}
}
@ -39,7 +40,7 @@ void GridNode::setHeight(double height)
{
if (mHeight != height)
{
mTransformIsDirty = true;
mGeometryIsDirty = true;
mHeight = height;
}
}
@ -124,8 +125,8 @@ void GridNode::update(SceneInfo* sceneInfo)
{
auto size = mHeight > mWidth ? mWidth : mHeight;
mBackgroundModel->updateTransform({mLocation, static_cast<double>(size), static_cast<double>(size)});
mOutlineModel->updateTransform({mLocation, static_cast<double>(size), static_cast<double>(size)});
//mBackgroundModel->updateTransform({mLocation, static_cast<double>(size), static_cast<double>(size)});
//mOutlineModel->updateTransform({mLocation, static_cast<double>(size), static_cast<double>(size)});
mTransformIsDirty = false;
}