Improve node to svg conversion.
This commit is contained in:
parent
64f0b3e77a
commit
26ecae46b3
22 changed files with 403 additions and 126 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "BlochSphereNode.h"
|
||||
|
||||
#include "CircleNode.h"
|
||||
#include "LineNode.h"
|
||||
|
||||
BlochSphereNode::BlochSphereNode(const Point& location)
|
||||
: AbstractVisualNode(location, "BlochSphereNode")
|
||||
|
@ -32,9 +33,17 @@ void BlochSphereNode::update(SceneInfo* sceneInfo)
|
|||
|
||||
mChildren.clear();
|
||||
|
||||
auto loc = DiscretePoint(mSize / 2.0, mSize / 2.0);
|
||||
auto loc = Point(mSize / 2.0, mSize / 2.0);
|
||||
mInnerCircle = std::make_unique<CircleNode>(loc, mSize / 2.0);
|
||||
mInnerCircle->setMinorRadius(mSize / 4.0);
|
||||
|
||||
mOuterCircle = std::make_unique<CircleNode>(loc, mSize/2.0);
|
||||
|
||||
addChild(mOuterCircle.get());
|
||||
mCentreCircle = std::make_unique<CircleNode>(loc, mSize / 50.0);
|
||||
mCentreCircle->setFillColor(Color(0, 0, 0));
|
||||
mCentreCircle->setHasStrokeColor(false);
|
||||
|
||||
addChild(mInnerCircle.get());
|
||||
addChild(mOuterCircle.get());
|
||||
addChild(mCentreCircle.get());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue