Clean up of scene nodes to support 2d and non int positioning.
This commit is contained in:
parent
1eeaebd0a9
commit
672b31b603
45 changed files with 341 additions and 200 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "CircleNode.h"
|
||||
|
||||
BlochSphereNode::BlochSphereNode(const DiscretePoint& location)
|
||||
BlochSphereNode::BlochSphereNode(const Point& location)
|
||||
: AbstractVisualNode(location, "BlochSphereNode")
|
||||
{
|
||||
|
||||
|
@ -23,7 +23,7 @@ void BlochSphereNode::setSize(double size)
|
|||
}
|
||||
}
|
||||
|
||||
void BlochSphereNode::update(FontsManager* fontsManager)
|
||||
void BlochSphereNode::update(SceneInfo* sceneInfo)
|
||||
{
|
||||
if (!mContentDirty)
|
||||
{
|
||||
|
|
|
@ -11,11 +11,11 @@ class LineNode;
|
|||
class BlochSphereNode : public AbstractVisualNode
|
||||
{
|
||||
public:
|
||||
BlochSphereNode(const DiscretePoint& location);
|
||||
BlochSphereNode(const Point& location);
|
||||
|
||||
void setContent(BlochSphere* content);
|
||||
|
||||
void update(FontsManager* fontsManager) override;
|
||||
void update(SceneInfo* sceneInfo) override;
|
||||
|
||||
void setSize(double size);
|
||||
private:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
TEST_CASE(TestBlochSphereNode, "quantum_computing")
|
||||
{
|
||||
auto node = std::make_unique<BlochSphereNode>(DiscretePoint(0.5, 0.5));
|
||||
auto node = std::make_unique<BlochSphereNode>(Point(0.5, 0.5));
|
||||
|
||||
Qubit state({ 1.0, 0.0 }, { 0.0, 0.0 });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue