src/linetypes/subfilereference.cpp

changeset 183
97b591813c8b
parent 177
f69d53c053df
child 186
922662adb72a
--- a/src/linetypes/subfilereference.cpp	Sun Mar 13 20:26:28 2022 +0200
+++ b/src/linetypes/subfilereference.cpp	Tue Mar 15 18:52:48 2022 +0200
@@ -9,8 +9,7 @@
 	const QString& referenceName,
 	const Color color
 ) :
-	ColoredObject{color},
-	transformation{transformation},
+	CompoundObject{transformation, color},
 	referenceName{referenceName}
 {
 }
@@ -19,20 +18,17 @@
 {
 	switch (property)
 	{
-	case Property::Transformation:
-		return QVariant::fromValue(this->transformation);
 	case Property::ReferenceName:
 		return this->referenceName;
 	default:
-		return ColoredObject::getProperty(property);
+		return CompoundObject::getProperty(property);
 	}
 }
 
 void ldraw::SubfileReference::setProperty(SetPropertyResult* result, const PropertyKeyValue& pair)
 {
-	LDRAW_OBJECT_HANDLE_SET_PROPERTY(Transformation, {this->transformation = value;});
 	LDRAW_OBJECT_HANDLE_SET_PROPERTY(ReferenceName, {this->referenceName = value;});
-	ldraw::ColoredObject::setProperty(result, pair);
+	ldraw::CompoundObject::setProperty(result, pair);
 }
 
 QString ldraw::SubfileReference::textRepresentation() const
@@ -83,16 +79,6 @@
 	}
 }
 
-glm::vec3 ldraw::SubfileReference::position() const
-{
-	return this->transformation[3];
-}
-
-void ldraw::SubfileReference::invert()
-{
-	this->isInverted = not this->isInverted;
-}
-
 Model* ldraw::SubfileReference::resolve(const ModelId callingModelId, DocumentManager* documents) const
 {
 	return documents->findDependencyByName(callingModelId, this->referenceName);
@@ -105,12 +91,12 @@
 
 QDataStream& ldraw::SubfileReference::serialize(QDataStream &stream) const
 {
-	return ColoredObject::serialize(stream) << this->transformation << this->referenceName << this->isInverted;
+	return CompoundObject::serialize(stream) << this->referenceName;
 }
 
 QDataStream& ldraw::SubfileReference::deserialize(QDataStream &stream)
 {
-	return ColoredObject::deserialize(stream) >> this->transformation >> this->referenceName >> this->isInverted;
+	return CompoundObject::deserialize(stream) >> this->referenceName;
 }
 
 QString ldraw::SubfileReference::toLDrawCode() const

mercurial