Base: refactor InventorBuilder
This commit is contained in:
@@ -546,6 +546,33 @@ void PolygonOffsetItem::write(InventorOutput& out) const
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Coordinate3Item::Coordinate3Item(const std::vector<Vector3f>& points)
|
||||
: points(points)
|
||||
{
|
||||
}
|
||||
|
||||
void Coordinate3Item::write(InventorOutput& out) const
|
||||
{
|
||||
beginPoint(out);
|
||||
InventorFieldWriter writer;
|
||||
writer.write<Vector3f>("point", points, out);
|
||||
endPoint(out);
|
||||
}
|
||||
|
||||
void Coordinate3Item::beginPoint(InventorOutput& out) const
|
||||
{
|
||||
out.writeLine("Coordinate3 {");
|
||||
out.increaseIndent();
|
||||
}
|
||||
|
||||
void Coordinate3Item::endPoint(InventorOutput& out) const
|
||||
{
|
||||
out.decreaseIndent();
|
||||
out.writeLine("}");
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void PointSetItem::write(InventorOutput& out) const
|
||||
{
|
||||
out.writeLine("PointSet { }");
|
||||
|
||||
@@ -354,6 +354,21 @@ private:
|
||||
PolygonOffset offset;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief The Coordinate3Item class supports the SoCoordinate3 node.
|
||||
*/
|
||||
class BaseExport Coordinate3Item : public NodeItem
|
||||
{
|
||||
public:
|
||||
Coordinate3Item(const std::vector<Vector3f>& points);
|
||||
void write(InventorOutput& out) const override;
|
||||
|
||||
private:
|
||||
void beginPoint(InventorOutput& out) const;
|
||||
void endPoint(InventorOutput& out) const;
|
||||
std::vector<Vector3f> points;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief The PointSetItem class supports the SoPointSet node.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user