From 086be790d02818c8d58f30370c77e325d10d8df3 Mon Sep 17 00:00:00 2001
From: Leonardo Zide <leozide@gmail.com>
Date: Thu, 28 Dec 2023 10:27:00 -0800
Subject: [PATCH] Removed Get/SetValue.

---
 common/light.cpp | 18 +++++++++---------
 common/light.h   |  4 ++--
 common/object.h  | 11 -----------
 common/piece.h   |  4 ++--
 4 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/common/light.cpp b/common/light.cpp
index fcb85d48..83319c7f 100644
--- a/common/light.cpp
+++ b/common/light.cpp
@@ -484,32 +484,32 @@ bool lcLight::SetLightType(lcLightType LightType)
 
 void lcLight::SetColor(const lcVector3& Color, lcStep Step, bool AddKey)
 {
-	mColor.SetValue(Color, Step, AddKey);
+	mColor.ChangeKey(Color, Step, AddKey);
 }
 
 void lcLight::SetAttenuationDistance(float Distance, lcStep Step, bool AddKey)
 {
-	mAttenuationDistance.SetValue(Distance, Step, AddKey);
+	mAttenuationDistance.ChangeKey(Distance, Step, AddKey);
 }
 
 void lcLight::SetAttenuationPower(float Power, lcStep Step, bool AddKey)
 {
-	mAttenuationPower.SetValue(Power, Step, AddKey);
+	mAttenuationPower.ChangeKey(Power, Step, AddKey);
 }
 
 void lcLight::SetSpotConeAngle(float Angle, lcStep Step, bool AddKey)
 {
-	mSpotConeAngle.SetValue(Angle, Step, AddKey);
+	mSpotConeAngle.ChangeKey(Angle, Step, AddKey);
 }
 
 void lcLight::SetSpotPenumbraAngle(float Angle, lcStep Step, bool AddKey)
 {
-	mSpotPenumbraAngle.SetValue(Angle, Step, AddKey);
+	mSpotPenumbraAngle.ChangeKey(Angle, Step, AddKey);
 }
 
 void lcLight::SetSpotTightness(float Tightness, lcStep Step, bool AddKey)
 {
-	mSpotTightness.SetValue(Tightness, Step, AddKey);
+	mSpotTightness.ChangeKey(Tightness, Step, AddKey);
 }
 
 bool lcLight::SetAreaShape(lcLightAreaShape AreaShape)
@@ -528,7 +528,7 @@ bool lcLight::SetAreaShape(lcLightAreaShape AreaShape)
 
 bool lcLight::SetAreaGrid(lcVector2i AreaGrid, lcStep Step, bool AddKey)
 {
-	mAreaGrid.SetValue(AreaGrid, Step, AddKey);
+	mAreaGrid.ChangeKey(AreaGrid, Step, AddKey);
 
 	return true;
 }
@@ -538,12 +538,12 @@ void lcLight::SetSize(lcVector2 Size, lcStep Step, bool AddKey)
 	if (mLightType == lcLightType::Area && (mAreaShape == lcLightAreaShape::Square || mAreaShape == lcLightAreaShape::Disk))
 		Size[1] = Size[0];
 
-	mSize.SetValue(Size, Step, AddKey);
+	mSize.ChangeKey(Size, Step, AddKey);
 }
 
 void lcLight::SetPower(float Power, lcStep Step, bool AddKey)
 {
-	mPower.SetValue(Power, Step, AddKey);
+	mPower.ChangeKey(Power, Step, AddKey);
 }
 
 bool lcLight::SetCastShadow(bool CastShadow)
diff --git a/common/light.h b/common/light.h
index f30acdb7..9176156b 100644
--- a/common/light.h
+++ b/common/light.h
@@ -167,12 +167,12 @@ public:
 
 	void SetPosition(const lcVector3& Position, lcStep Step, bool AddKey)
 	{
-		mPosition.SetValue(Position, Step, AddKey);
+		mPosition.ChangeKey(Position, Step, AddKey);
 	}
 
 	void SetRotation(const lcMatrix33& Rotation, lcStep Step, bool AddKey)
 	{
-		mRotation.SetValue(Rotation, Step, AddKey);
+		mRotation.ChangeKey(Rotation, Step, AddKey);
 	}
 
 	lcVector3 GetRotationCenter() const
diff --git a/common/object.h b/common/object.h
index f87bf2a1..2d299ad2 100644
--- a/common/object.h
+++ b/common/object.h
@@ -63,17 +63,6 @@ public:
 		return mValue;
 	}
 
-	const T& GetValue() const
-	{
-		return mValue;
-	}
-
-	void SetValue(const T& Value, lcStep Step, bool AddKey)
-	{
-		mValue = Value;
-		ChangeKey(Value, Step, AddKey);
-	}
-
 	void Update(lcStep Step)
 	{
 		mValue = CalculateKey(Step);
diff --git a/common/piece.h b/common/piece.h
index 9f1da46b..0d33833b 100644
--- a/common/piece.h
+++ b/common/piece.h
@@ -269,12 +269,12 @@ public:
 
 	void SetPosition(const lcVector3& Position, lcStep Step, bool AddKey)
 	{
-		mPosition.SetValue(Position, Step, AddKey);
+		mPosition.ChangeKey(Position, Step, AddKey);
 	}
 
 	void SetRotation(const lcMatrix33& Rotation, lcStep Step, bool AddKey)
 	{
-		mRotation.SetValue(Rotation, Step, AddKey);
+		mRotation.ChangeKey(Rotation, Step, AddKey);
 	}
 
 	lcVector3 GetRotationCenter() const