src/linetypes/circularprimitive.h

Wed, 25 May 2022 18:33:38 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Wed, 25 May 2022 18:33:38 +0300
changeset 198
eb9d900dc79a
parent 186
922662adb72a
permissions
-rw-r--r--

fix up things and remove unnecessary code

#pragma once
#include "compoundobject.h"
#include "propertygenerics.h"

namespace ldraw
{
	class CircularPrimitive;
}

class ldraw::CircularPrimitive : public CompoundObject
{
public:
	using BaseClass = CompoundObject;
	CircularPrimitive() = default;
	CircularPrimitive(CircularPrimitiveType type, int segments, int divisions);
	QVariant getProperty(Property property) const override;
	QString textRepresentation() const override;
	static QString circularPrimitiveTypeName(CircularPrimitiveType type);
	Type typeIdentifier() const override;
	QDataStream& serialize(QDataStream& stream) const override;
	QDataStream& deserialize(QDataStream& stream) override;
	QString toLDrawCode() const override;
	QString iconName() const override;
	QString typeName() const override;
	void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext*) const override;
	float fraction() const;
	CircularPrimitiveType type = Circle;
	int segments = 16;
	int divisions = 16;
};

mercurial