Skip to content
Snippets Groups Projects
Commit 03b32df1 authored by Paul-Walcher's avatar Paul-Walcher
Browse files

Revert "Renamed SquareFact to RectangleFact"

This reverts commit c6499889.
parent c6499889
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ GameObject: ...@@ -12,7 +12,7 @@ GameObject:
- component: {fileID: 1812690906255965161} - component: {fileID: 1812690906255965161}
- component: {fileID: 6950663371922587874} - component: {fileID: 6950663371922587874}
m_Layer: 15 m_Layer: 15
m_Name: Rectangle m_Name: Square
m_TagString: Selectable m_TagString: Selectable
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
......
...@@ -60623,12 +60623,6 @@ PrefabInstance: ...@@ -60623,12 +60623,6 @@ PrefabInstance:
value: value:
objectReference: {fileID: 6839596689016440457, guid: 3053a4bcf6f3c7c45ad438b69ffcde9b, objectReference: {fileID: 6839596689016440457, guid: 3053a4bcf6f3c7c45ad438b69ffcde9b,
type: 3} type: 3}
- target: {fileID: 2872381745209199267, guid: b07552db700124a4680401e6fb94c186,
type: 3}
propertyPath: Rectangle
value:
objectReference: {fileID: 6839596689016440457, guid: 3053a4bcf6f3c7c45ad438b69ffcde9b,
type: 3}
- target: {fileID: 2872381745209199267, guid: b07552db700124a4680401e6fb94c186, - target: {fileID: 2872381745209199267, guid: b07552db700124a4680401e6fb94c186,
type: 3} type: 3}
propertyPath: TestPoint propertyPath: TestPoint
...@@ -62780,17 +62774,11 @@ PrefabInstance: ...@@ -62780,17 +62774,11 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6898471569945669422, guid: b07552db700124a4680401e6fb94c186,
type: 3}
propertyPath: PrefabDataConfig.Array.data[29]
value:
objectReference: {fileID: 3080888058940174091, guid: 78a5636dd3b386a4e82a65390ad23c7d,
type: 3}
- target: {fileID: 6898471569945669422, guid: b07552db700124a4680401e6fb94c186, - target: {fileID: 6898471569945669422, guid: b07552db700124a4680401e6fb94c186,
type: 3} type: 3}
propertyPath: PrefabDataConfig.Array.data[30] propertyPath: PrefabDataConfig.Array.data[30]
value: value:
objectReference: {fileID: 3080888058940174091, guid: 389563c758e86d848b3341576b90b7e4, objectReference: {fileID: 3080888058940174091, guid: 78a5636dd3b386a4e82a65390ad23c7d,
type: 3} type: 3}
- target: {fileID: 6899268459312977207, guid: b07552db700124a4680401e6fb94c186, - target: {fileID: 6899268459312977207, guid: b07552db700124a4680401e6fb94c186,
type: 3} type: 3}
...@@ -63222,17 +63210,11 @@ PrefabInstance: ...@@ -63222,17 +63210,11 @@ PrefabInstance:
propertyPath: m_PresetInfoIsWorld propertyPath: m_PresetInfoIsWorld
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7743735189960969443, guid: b07552db700124a4680401e6fb94c186,
type: 3}
propertyPath: PrefabDataConfig.Array.data[29]
value:
objectReference: {fileID: 3080888058940174091, guid: 78a5636dd3b386a4e82a65390ad23c7d,
type: 3}
- target: {fileID: 7743735189960969443, guid: b07552db700124a4680401e6fb94c186, - target: {fileID: 7743735189960969443, guid: b07552db700124a4680401e6fb94c186,
type: 3} type: 3}
propertyPath: PrefabDataConfig.Array.data[30] propertyPath: PrefabDataConfig.Array.data[30]
value: value:
objectReference: {fileID: 3080888058940174091, guid: 389563c758e86d848b3341576b90b7e4, objectReference: {fileID: 3080888058940174091, guid: 78a5636dd3b386a4e82a65390ad23c7d,
type: 3} type: 3}
- target: {fileID: 7748114935345543003, guid: b07552db700124a4680401e6fb94c186, - target: {fileID: 7748114935345543003, guid: b07552db700124a4680401e6fb94c186,
type: 3} type: 3}
...@@ -17,7 +17,7 @@ public GameObject ...@@ -17,7 +17,7 @@ public GameObject
Ring, Ring,
Prism, Prism,
Cone, Cone,
Rectangle, Square,
Circle; Circle;
private void OnEnable() private void OnEnable()
...@@ -59,19 +59,19 @@ public void SpawnFactRepresentation(Fact fact) ...@@ -59,19 +59,19 @@ public void SpawnFactRepresentation(Fact fact)
SpawnCone(ConeVolumeFact); break; SpawnCone(ConeVolumeFact); break;
case TruncatedConeVolumeFact TruncatedConeVolumeFact: case TruncatedConeVolumeFact TruncatedConeVolumeFact:
SpawnTruncatedCone(TruncatedConeVolumeFact); break; SpawnTruncatedCone(TruncatedConeVolumeFact); break;
case RectangleFact rectangleFact: case SquareFact squareFact:
SpawnRectangle(rectangleFact); break; SpawnSquare(squareFact); break;
default: break; default: break;
}; };
} }
public void SpawnRectangle(RectangleFact fact){ public void SpawnSquare(SquareFact fact){
GameObject rectangle = GameObject.Instantiate(Rectangle); GameObject square = GameObject.Instantiate(Square);
rectangle.transform.SetPositionAndRotation(fact.Position, fact.Rotation); square.transform.SetPositionAndRotation(fact.Position, fact.Rotation);
rectangle.transform.localScale = Vector3.Scale(rectangle.transform.localScale, fact.LocalScale); square.transform.localScale = Vector3.Scale(square.transform.localScale, fact.LocalScale);
rectangle.GetComponentInChildren<TextMeshPro>().text = fact.GetLabel(StageStatic.stage.factState) + " = " + System.Math.Round(fact.Area, 2) + "m²"; square.GetComponentInChildren<TextMeshPro>().text = fact.GetLabel(StageStatic.stage.factState) + " = " + System.Math.Round(fact.Area, 2) + "m²";
} }
......
...@@ -72,8 +72,8 @@ public static class ParsingDictionary ...@@ -72,8 +72,8 @@ public static class ParsingDictionary
{ MMTConstants.FunctionFact, { MMTConstants.FunctionFact,
FunctionFact.parseFact }, FunctionFact.parseFact },
{ {
MMTConstants.RectangleType, MMTConstants.SquareType,
RectangleFact.parseFact SquareFact.parseFact
}, },
}; };
...@@ -115,7 +115,7 @@ public static class ParsingDictionary ...@@ -115,7 +115,7 @@ public static class ParsingDictionary
[JsonSubtypes.KnownSubType(typeof(QuadFact), nameof(QuadFact))] [JsonSubtypes.KnownSubType(typeof(QuadFact), nameof(QuadFact))]
[JsonSubtypes.KnownSubType(typeof(TriangleFact), nameof(TriangleFact))] [JsonSubtypes.KnownSubType(typeof(TriangleFact), nameof(TriangleFact))]
[JsonSubtypes.KnownSubType(typeof(RealLitFact), nameof(RealLitFact))] [JsonSubtypes.KnownSubType(typeof(RealLitFact), nameof(RealLitFact))]
[JsonSubtypes.KnownSubType(typeof(RectangleFact), nameof(RectangleFact))] [JsonSubtypes.KnownSubType(typeof(SquareFact), nameof(SquareFact))]
public abstract class Fact public abstract class Fact
{ {
[JsonIgnore] [JsonIgnore]
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
/// <summary> /// <summary>
/// Point in 3D Space /// Point in 3D Space
/// </summary> /// </summary>
public class RectangleFact : FactWrappedCRTP<RectangleFact> public class SquareFact : FactWrappedCRTP<SquareFact>
{ {
...@@ -45,13 +45,13 @@ protected void calculate_vectors(){ ...@@ -45,13 +45,13 @@ protected void calculate_vectors(){
} }
public RectangleFact() : base(){ public SquareFact() : base(){
this.PidA = null; this.PidA = null;
this.PidB = null; this.PidB = null;
this.PidC = null; this.PidC = null;
} }
[JsonConstructor] [JsonConstructor]
public RectangleFact( string PidA, string PidB, string PidC) : base() public SquareFact( string PidA, string PidB, string PidC) : base()
{ {
this.PidA = PidA; this.PidA = PidA;
...@@ -68,7 +68,7 @@ public RectangleFact( string PidA, string PidB, string PidC) : base() ...@@ -68,7 +68,7 @@ public RectangleFact( string PidA, string PidB, string PidC) : base()
/// </summary> /// </summary>
/// <param name="Point">sets <see cref="Point"/></param> /// <param name="Point">sets <see cref="Point"/></param>
/// <param name="ServerDefinition">MMT URI as OMS</param> /// <param name="ServerDefinition">MMT URI as OMS</param>
public RectangleFact(string PidA, string PidB, string PidC, SOMDoc ServerDefinition) : base() public SquareFact(string PidA, string PidB, string PidC, SOMDoc ServerDefinition) : base()
{ {
...@@ -100,7 +100,7 @@ public RectangleFact(string PidA, string PidB, string PidC, SOMDoc ServerDefinit ...@@ -100,7 +100,7 @@ public RectangleFact(string PidA, string PidB, string PidC, SOMDoc ServerDefinit
ret.Add(new RectangleFact(PidA, PidB, PidC, fact.@ref)); ret.Add(new SquareFact(PidA, PidB, PidC, fact.@ref));
//ParsingDictionary.parseTermsToId.TryAdd(defines.ToString(), fact.@ref.uri); //ParsingDictionary.parseTermsToId.TryAdd(defines.ToString(), fact.@ref.uri);
//ret.Add(new PointFact(SOMDoc.MakeVector3(defines), fact.@ref)); //ret.Add(new PointFact(SOMDoc.MakeVector3(defines), fact.@ref));
...@@ -123,7 +123,7 @@ protected override void RecalculateTransform() ...@@ -123,7 +123,7 @@ protected override void RecalculateTransform()
calculate_vectors(); calculate_vectors();
} }
/// \copydoc Fact.Equivalent(Fact, Fact) /// \copydoc Fact.Equivalent(Fact, Fact)
protected override bool EquivalentWrapped(RectangleFact f1, RectangleFact f2){ protected override bool EquivalentWrapped(SquareFact f1, SquareFact f2){
return ( return (
...@@ -138,20 +138,20 @@ protected override bool EquivalentWrapped(RectangleFact f1, RectangleFact f2){ ...@@ -138,20 +138,20 @@ protected override bool EquivalentWrapped(RectangleFact f1, RectangleFact f2){
protected override Fact _ReInitializeMe(Dictionary<string, string> old_to_new){ protected override Fact _ReInitializeMe(Dictionary<string, string> old_to_new){
return new RectangleFact(this.PidA, this.PidB, this.PidC); return new SquareFact(this.PidA, this.PidB, this.PidC);
} }
public override MMTFact MakeMMTDeclaration() public override MMTFact MakeMMTDeclaration()
{ {
SOMDoc tp = new OMS(MMTConstants.RectangleType); SOMDoc tp = new OMS(MMTConstants.SquareType);
return new MMTGeneralFact(_LastLabel, tp, Defines()); return new MMTGeneralFact(_LastLabel, tp, Defines());
} }
public override SOMDoc Defines() public override SOMDoc Defines()
=> new OMA( => new OMA(
new OMS(MMTConstants.RectangleCons), new OMS(MMTConstants.SquareCons),
new[] { new[] {
new OMS(PidA), new OMS(PidA),
new OMS(PidB), new OMS(PidB),
......
...@@ -40,9 +40,9 @@ public static class MMTConstants ...@@ -40,9 +40,9 @@ public static class MMTConstants
//public static readonly string RectangleFactmk = "http://mathhub.info/FrameIT/frameworld?FrameITRectangles?mkRectangle"; //public static readonly string RectangleFactmk = "http://mathhub.info/FrameIT/frameworld?FrameITRectangles?mkRectangle";
public static readonly string RectangleCons = "http://mathhub.info/FrameIT/frameworld?RectangleType?rectangleCons"; public static readonly string SquareCons = "http://mathhub.info/FrameIT/frameworld?SquareType?squareCons";
public static readonly string RectangleType = "http://mathhub.info/FrameIT/frameworld?RectangleType?rectangleType"; public static readonly string SquareType = "http://mathhub.info/FrameIT/frameworld?SquareType?squareType";
public static readonly string RectangleScroll = "http://mathhub.info/FrameIT/frameworld?RectangleScroll"; public static readonly string SquareScroll = "http://mathhub.info/FrameIT/frameworld?SquareScroll";
public static readonly string CircleType3d = "http://mathhub.info/FrameIT/frameworld?FrameITCircle?circleType3D"; public static readonly string CircleType3d = "http://mathhub.info/FrameIT/frameworld?FrameITCircle?circleType3D";
public static readonly string MkCircle3d = "http://mathhub.info/FrameIT/frameworld?FrameITCircle?circle3D"; public static readonly string MkCircle3d = "http://mathhub.info/FrameIT/frameworld?FrameITCircle?circle3D";
...@@ -151,8 +151,8 @@ public static class MMTConstants ...@@ -151,8 +151,8 @@ public static class MMTConstants
{ TypeType, { TypeType,
typeof(Type) }, typeof(Type) },
{ {
RectangleType, SquareType,
typeof(RectangleFact) typeof(SquareFact)
}, },
{ Point, { Point,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment