src/linetypes/subfilereference.h

Thu, 30 Jan 2020 19:20:11 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 30 Jan 2020 19:20:11 +0200
changeset 35
98906a94732f
parent 33
4c41bfe2ec6e
child 77
028798a72591
permissions
-rw-r--r--

renamed the linetypes namespace to ldraw namespace and added more structures to it

#pragma once
#include "object.h"

class Model;

namespace ldraw
{
	class SubfileReference;
}

class ldraw::SubfileReference : public ColoredObject
{
public:
	SubfileReference() = default;
	SubfileReference(
		const glm::mat4& transformation,
		const QString &referenceName,
		const Color color = ldraw::mainColor);
	QVariant getProperty(Property property) const override;
	SetPropertyResult setProperty(Property property, const QVariant& value) override;
	QString textRepresentation() const override;
	void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const override;
	glm::vec3 position() const;
	void invert() override;
private:
	Model* resolve(DocumentManager* documents) const;
	glm::mat4 transformation;
	QString referenceName;
	bool isInverted = false;
};

mercurial