Skip to content
Snippets Groups Projects
Commit 800eb653 authored by MaZiFAU's avatar MaZiFAU
Browse files

MMTTerm & FunctionFact: now savable

parent 2004f759
No related branches found
No related tags found
No related merge requests found
Showing
with 15156 additions and 418 deletions
fileFormatVersion: 2
guid: 8ac5a9fb8f513cb45ac53b8b8108f5bc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File added
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
==============================================================================
The following notice applies to a small portion of the code:
The MIT License (MIT)
Copyright (c) Microsoft Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
fileFormatVersion: 2
guid: 301b7f85f7db42f43ba1de1eb9171df3
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 2c02eae7182b7b9439d234e0c3c468ce
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 99aaade9aebe6fa4a89590d585727759
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2a95cde6af78e274d8ad315bd4735054
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File added
fileFormatVersion: 2
guid: bb6220cc6a89fbd4da9723d767b62041
labels:
- NuGetForUnity
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 254d1481ea9fe27418aa0f92557d346e
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File added
fileFormatVersion: 2
guid: 76bb6f26c5b24c347b9698ab410378cb
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -324,48 +324,56 @@ MonoBehaviour: ...@@ -324,48 +324,56 @@ MonoBehaviour:
factscreenContent: {fileID: 4838871000058222821} factscreenContent: {fileID: 4838871000058222821}
factSpotPrefab: {fileID: 7124463502404826001, guid: 04d12e0a0a5aa884c8c7dff56f4963f6, factSpotPrefab: {fileID: 7124463502404826001, guid: 04d12e0a0a5aa884c8c7dff56f4963f6,
type: 3} type: 3}
prefab_Point: {fileID: 858001163752551619, guid: f019e9f67e8dab947bc60028223b6cec, PrefabtTypeReadonly:
type: 3} - AbstractLineFact
prefab_Distance: {fileID: 4221381813544557775, guid: 8106c748f1aeb084d87fdc71dd009b67, - AbstractLineFactWrappedCRTP`1[T]
type: 3} - AngleCircleLineFact
prefab_Angle: {fileID: 6643637775379894484, guid: 30fcd362f34a9844fba66065924c6143, - AngleFact
type: 3} - AreaCircleFact
prefab_Default: {fileID: 858001163752551619, guid: f019e9f67e8dab947bc60028223b6cec, - CircleFact
type: 3} - ConeVolumeFact
prefab_OnLine: {fileID: 6050914136827205310, guid: 496d04605465c7f4dba7638cc6e2dc6e, - CylinderVolumeFact
type: 3} - EqualCirclesFact
prefab_Line: {fileID: 7510387096843212865, guid: d6ee990520a44954fb494468665d19e9, - Fact
type: 3} - FactWrappedCRTP`1[T]
prefab_ParallelLineFact: {fileID: 7510387096843212865, guid: 9f086cfbfeb0dfd46af67395aa17aafa, - FunctionFact`2[T0,TResult]
type: 3} - LineFact
prefab_RectangleFact: {fileID: 8156936215466465834, guid: b6f35afcaff5d8a40bf8f792eb3299e6, - OnCircleFact
type: 3} - OnLineFact
prefab_RadiusFact: {fileID: 2513701074329712390, guid: 5b54aca5b2f2bfa48968656ed3bea181, - OrthogonalCircleLineFact
type: 3} - ParallelLineFact
prefab_AreaCircle: {fileID: 7016901710118546043, guid: 210f1e1acf16abf40a39587074c4d25a, - PointFact
type: 3} - RadiusFact
prefab_ConeVolume: {fileID: 2523593828849809055, guid: 992edeb4264d0fa49b0f9b35b9ab85ce, - RayFact
type: 3} - RightAngleFact
prefab_OrthogonalCircleLine: {fileID: 8554350198830106250, guid: 9ce7444f588cd054989126eaff75c5f3, - TestFact
type: 3} - TruncatedConeVolumeFact
prefab_TruncatedConeVolume: {fileID: 4123133807278660472, guid: 9d0019fa4b5725a49bdfc78c4d67661e, - UnEqualCirclesFact
type: 3} PrefabDataConfig:
prefab_RightAngle: {fileID: 3080888058940174091, guid: 389563c758e86d848b3341576b90b7e4, - {fileID: 7510387096843212865, guid: d6ee990520a44954fb494468665d19e9, type: 3}
type: 3} - {fileID: 7510387096843212865, guid: d6ee990520a44954fb494468665d19e9, type: 3}
prefab_CylinderVolume: {fileID: 5287418535931939099, guid: 30d09e8685950994893b3b6388a8906c, - {fileID: 4902928549420802332, guid: 62cec72d28de59d4c8ae782957cc10a1, type: 3}
type: 3} - {fileID: 6643637775379894484, guid: 30fcd362f34a9844fba66065924c6143, type: 3}
prefab_EqualFact: {fileID: 7523305359074541435, guid: 5f461930be2eb074193dc12eb60e10b2, - {fileID: 7016901710118546043, guid: 210f1e1acf16abf40a39587074c4d25a, type: 3}
type: 3} - {fileID: 6636443472981757786, guid: 9d08fd45bc83c7c42a9be42f5309c6c2, type: 3}
prefab_UnEqualFact: {fileID: 5769925203401971992, guid: 047cd3a517f781846a1f983394b4bb7b, - {fileID: 2523593828849809055, guid: 992edeb4264d0fa49b0f9b35b9ab85ce, type: 3}
type: 3} - {fileID: 5287418535931939099, guid: 30d09e8685950994893b3b6388a8906c, type: 3}
prefab_CircleFact: {fileID: 6636443472981757786, guid: 9d08fd45bc83c7c42a9be42f5309c6c2, - {fileID: 7523305359074541435, guid: 5f461930be2eb074193dc12eb60e10b2, type: 3}
type: 3} - {fileID: 2846439484187545958, guid: 5dc76e187eae4214697491bfb42773e8, type: 3}
prefab_OnCircleFact: {fileID: 2115817999818309900, guid: df93bd4d977e4ab42a626f7bd06596d6, - {fileID: 2846439484187545958, guid: 5dc76e187eae4214697491bfb42773e8, type: 3}
type: 3} - {fileID: 2846439484187545958, guid: 5dc76e187eae4214697491bfb42773e8, type: 3}
prefab_AngleCircleLineFact: {fileID: 4902928549420802332, guid: 62cec72d28de59d4c8ae782957cc10a1, - {fileID: 4221381813544557775, guid: 8106c748f1aeb084d87fdc71dd009b67, type: 3}
type: 3} - {fileID: 2115817999818309900, guid: df93bd4d977e4ab42a626f7bd06596d6, type: 3}
prefab_TestFact: {fileID: 2846439484187545958, guid: 5dc76e187eae4214697491bfb42773e8, - {fileID: 6050914136827205310, guid: 496d04605465c7f4dba7638cc6e2dc6e, type: 3}
type: 3} - {fileID: 8554350198830106250, guid: 9ce7444f588cd054989126eaff75c5f3, type: 3}
- {fileID: 7510387096843212865, guid: 9f086cfbfeb0dfd46af67395aa17aafa, type: 3}
- {fileID: 858001163752551619, guid: f019e9f67e8dab947bc60028223b6cec, type: 3}
- {fileID: 2513701074329712390, guid: 5b54aca5b2f2bfa48968656ed3bea181, type: 3}
- {fileID: 7510387096843212865, guid: d6ee990520a44954fb494468665d19e9, type: 3}
- {fileID: 3080888058940174091, guid: 389563c758e86d848b3341576b90b7e4, type: 3}
- {fileID: 2846439484187545958, guid: 5dc76e187eae4214697491bfb42773e8, type: 3}
- {fileID: 4123133807278660472, guid: 9d0019fa4b5725a49bdfc78c4d67661e, type: 3}
- {fileID: 5769925203401971992, guid: 047cd3a517f781846a1f983394b4bb7b, type: 3}
--- !u!1 &4600560360496770457 --- !u!1 &4600560360496770457
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -477,7 +485,7 @@ RectTransform: ...@@ -477,7 +485,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: -26820}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &8823539307371861913 --- !u!114 &8823539307371861913
......
...@@ -38,7 +38,7 @@ RenderSettings: ...@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.4410865, g: 0.48984045, b: 0.5699203, a: 1} m_IndirectSpecularColor: {r: 0.44100717, g: 0.4898312, b: 0.5698877, a: 1}
m_UseRadianceAmbientProbe: 0 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
...@@ -3870,7 +3870,7 @@ Mesh: ...@@ -3870,7 +3870,7 @@ Mesh:
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: pb_Mesh79004 m_Name: pb_Mesh26262
serializedVersion: 10 serializedVersion: 10
m_SubMeshes: m_SubMeshes:
- serializedVersion: 2 - serializedVersion: 2
...@@ -15674,6 +15674,7 @@ Transform: ...@@ -15674,6 +15674,7 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 117995034} - {fileID: 117995034}
- {fileID: 1969802978}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 3 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
...@@ -39556,6 +39557,11 @@ PrefabInstance: ...@@ -39556,6 +39557,11 @@ PrefabInstance:
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 138451363481385448, guid: caf448c160a07214f8cf74da91506980,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -0.000061035156
objectReference: {fileID: 0}
- target: {fileID: 176107170605012170, guid: caf448c160a07214f8cf74da91506980, - target: {fileID: 176107170605012170, guid: caf448c160a07214f8cf74da91506980,
type: 3} type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
...@@ -39719,7 +39725,7 @@ PrefabInstance: ...@@ -39719,7 +39725,7 @@ PrefabInstance:
- target: {fileID: 1884886062868963456, guid: caf448c160a07214f8cf74da91506980, - target: {fileID: 1884886062868963456, guid: caf448c160a07214f8cf74da91506980,
type: 3} type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 2.999939 value: 3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1898191558618400828, guid: caf448c160a07214f8cf74da91506980, - target: {fileID: 1898191558618400828, guid: caf448c160a07214f8cf74da91506980,
type: 3} type: 3}
...@@ -40576,6 +40582,11 @@ PrefabInstance: ...@@ -40576,6 +40582,11 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8844380286665921678, guid: caf448c160a07214f8cf74da91506980,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -0.000061035156
objectReference: {fileID: 0}
- target: {fileID: 9129805130208836062, guid: caf448c160a07214f8cf74da91506980, - target: {fileID: 9129805130208836062, guid: caf448c160a07214f8cf74da91506980,
type: 3} type: 3}
propertyPath: m_PresetInfoIsWorld propertyPath: m_PresetInfoIsWorld
...@@ -55487,6 +55498,134 @@ Transform: ...@@ -55487,6 +55498,134 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 1967470652} m_PrefabInstance: {fileID: 1967470652}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &1969802977
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1969802978}
- component: {fileID: 1969802982}
- component: {fileID: 1969802981}
- component: {fileID: 1969802980}
- component: {fileID: 1969802979}
- component: {fileID: 1969802983}
m_Layer: 0
m_Name: Ball
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &1969802978
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1969802977}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 12.003, y: 1.871, z: -7.259}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 642235746}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &1969802979
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1969802977}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!135 &1969802980
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1969802977}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1969802981
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1969802977}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &1969802982
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1969802977}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!114 &1969802983
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1969802977}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 04a4ac0a27312d04787dc2494b7aa690, type: 3}
m_Name:
m_EditorClassIdentifier:
repeat: 1
--- !u!1001 &1970241703 --- !u!1001 &1970241703
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -61733,6 +61872,11 @@ PrefabInstance: ...@@ -61733,6 +61872,11 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5570756160813794731, guid: b07552db700124a4680401e6fb94c186,
type: 3}
propertyPath: modfire
value: mod+fire
objectReference: {fileID: 0}
- target: {fileID: 5635130245654377298, guid: b07552db700124a4680401e6fb94c186, - target: {fileID: 5635130245654377298, guid: b07552db700124a4680401e6fb94c186,
type: 3} type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
...@@ -2,14 +2,20 @@ ...@@ -2,14 +2,20 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using static CommunicationEvents; using static CommunicationEvents;
using static UnityEditor.PlayerSettings;
using static CanonBallProblemCalculator;
using Unity.Mathematics;
using System;
public class GenerateDemoFiles public class GenerateDemoFiles
{ {
static bool firstcall = true; static bool firstcall = true;
public static void GenerateAll() public static void GenerateAll()
{ {
if (!firstcall) return; if (!firstcall) return;
if (GameObject.FindObjectOfType<GadgetBehaviour>(true) == null) { if (GameObject.FindObjectOfType<GadgetBehaviour>(true) == null)
{
Debug.LogError("Cannot GenerateDemoFiles without populated GadgetManager"); Debug.LogError("Cannot GenerateDemoFiles without populated GadgetManager");
return; return;
} }
...@@ -19,6 +25,7 @@ public static void GenerateAll() ...@@ -19,6 +25,7 @@ public static void GenerateAll()
GenerateTreeStage(); GenerateTreeStage();
GenerateRiverStage(); GenerateRiverStage();
GenerateCanonBallStage();
} }
public static void GenerateTreeStage() public static void GenerateTreeStage()
...@@ -27,17 +34,15 @@ public static void GenerateTreeStage() ...@@ -27,17 +34,15 @@ public static void GenerateTreeStage()
float minimalSolutionHight = 6; float minimalSolutionHight = 6;
// Generate Stage // Generate Stage
// TODO? use constructor
Stage demo = new Stage Stage demo = new Stage
{ (
number = 1, number: 1,
category = "Demo Category", category: "Demo Category",
name = "TechDemo A", name: "TechDemo A",
scene = "RiverWorld", scene: "RiverWorld",
description = "Tree Stage", description: "Tree Stage",
use_install_folder = true, local: false
//hierarchie = new List<Directories> { /*Directories.Stages*/ } );
};
// needed to generate facts // needed to generate facts
StageStatic.StageOfficial = new Dictionary<string, Stage> StageStatic.StageOfficial = new Dictionary<string, Stage>
...@@ -77,17 +82,15 @@ public static void GenerateRiverStage() ...@@ -77,17 +82,15 @@ public static void GenerateRiverStage()
float minimalSolutionHight = 6; float minimalSolutionHight = 6;
// Generate Stage // Generate Stage
// TODO? use constructor
Stage demo = new Stage Stage demo = new Stage
{ (
number = 2, number: 2,
category = "Demo Category", category: "Demo Category",
name = "TechDemo B", name: "TechDemo B",
scene = "RiverWorld", scene: "RiverWorld",
description = "River Stage", description: "River Stage",
use_install_folder = true, local: false
//hierarchie = new List<Directories> { /*Directories.Stages*/ } );
};
// needed to generate facts // needed to generate facts
StageStatic.StageOfficial = new Dictionary<string, Stage> StageStatic.StageOfficial = new Dictionary<string, Stage>
...@@ -123,4 +126,126 @@ public static void GenerateRiverStage() ...@@ -123,4 +126,126 @@ public static void GenerateRiverStage()
StageStatic.SetMode(StageStatic.Mode.Create); StageStatic.SetMode(StageStatic.Mode.Create);
StageStatic.stage.store(false, true); StageStatic.stage.store(false, true);
} }
public static void GenerateCanonBallStage()
{
// Params //List<Wall> walls, T starPos, T starVec, T gravity, int dimension
int
dim_const = 0,
dim_A = 2,
dim_B = 1;
float Py_factor = 0.04905f; // 2f / 100f;
float2 StartPos_py = new(380, 300);
float2 StartVec_py = new(-490, 150);
float2 Gravity_py = new(0, -200);
(int x, int y, int width, int angle_deg, double bounce)[] PythonParams = {
(250, 0, 50, 0, 2.0 ),
(0, 0, 400, 90, 0.9 ),
(400, 0, 400, 90, 0.9),
(0, 400, 400, 0, 0.9),
(50, 200, 100, 45, 1),
(150, 100, 50, 0, 0.9),
(200, 200, 100, 120, 0.9),
(300, 300, 80, 150, 0.9),
(300, 100, 100, 30, 0.8),
(50, 50, 100, 60, 0.9),
(300, 0, 100, 0, 0.4),
(0, 0, 250, 0, 0.1),
};
//Parse PythonParams
Vector3
StartPos = Vector3.zero,
StartVec = Vector3.zero,
Gravity = Vector3.zero;
StartPos[dim_A] = StartPos_py[0] * Py_factor;
StartPos[dim_B] = StartPos_py[1] * Py_factor;
StartVec[dim_A] = StartVec_py[0] * Py_factor;
StartVec[dim_B] = StartVec_py[1] * Py_factor;
Gravity[dim_A] = Gravity_py[0] * Py_factor;
Gravity[dim_B] = Gravity_py[1] * Py_factor;
float[,,] Wall_parameter = new float[PythonParams.Length, 2, 2];
float[] Bounce_parameter = new float[PythonParams.Length];
for (uint i = 0; i < PythonParams.Length; i++)
{
Wall_parameter[i, 0, 0] = Py_factor * (PythonParams[i].x);
Wall_parameter[i, 0, 1] = Py_factor * (PythonParams[i].y);
Wall_parameter[i, 1, 0] = Py_factor * (PythonParams[i].x + PythonParams[i].width * Mathf.Cos(MathfExtensions.ToRadians(PythonParams[i].angle_deg)));
Wall_parameter[i, 1, 1] = Py_factor * (PythonParams[i].y + PythonParams[i].width * Mathf.Sin(MathfExtensions.ToRadians(PythonParams[i].angle_deg)));
Bounce_parameter[i] = (float)PythonParams[i].bounce;
}
// Generate Stage
Stage demo = new Stage
(
number: 2,
category: "Demo Category",
name: "CanonBall A",
scene: "RiverWorld",
description: "CanonBall Test",
local: false
);
// needed to generate facts
StageStatic.StageOfficial = new Dictionary<string, Stage>
{
{ demo.name, demo },
};
StageStatic.SetStage(demo.name, false);
// Populate Solution
List<Wall> Walls = new();
for (int i = 0; i < PythonParams.Length; i++)
{
Vector3 tmpVec = Vector3.zero;
tmpVec[dim_A] = Wall_parameter[i, 0, 0];
tmpVec[dim_B] = Wall_parameter[i, 0, 1];
PointFact topA = new(tmpVec, Vector3.up, StageStatic.stage.solution);
string topAURI = StageStatic.stage.solution.Add(topA, out _, false, null, null);
tmpVec[dim_A] = Wall_parameter[i, 1, 0];
tmpVec[dim_B] = Wall_parameter[i, 1, 1];
PointFact topB = new(tmpVec, Vector3.up, StageStatic.stage.solution);
string topBURI = StageStatic.stage.solution.Add(topB, out _, true, null, null);
LineFact topology = new LineFact(topAURI, topBURI, StageStatic.stage.solution);
StageStatic.stage.solution.Add(topology, out _, true, null, null);
Walls.Add(new(topology, Bounce_parameter[i]));
}
// Set Solution
string BallURI = StageStatic.stage.solution.Add(
new PointFact(StartPos, Vector3.up, StageStatic.stage.solution),
out _, false, null, null);
List<FunctionFact<float, Vector3>> targetfunc = new CanonBallProblemCalculator(Walls, StartPos, StartVec, Gravity, dim_const, dim_A, dim_B, StageStatic.stage.solution).Compute();
foreach (var func in targetfunc)
StageStatic.stage.solution.Add(func, out _, true, null, null);
//TODO: save as omdoc
// ball + attach funcs + cheat + generate demo button?
//StageStatic.stage.solution.ValidationSet =
// new List<SolutionOrganizer.SubSolution> {
// new SolutionOrganizer.SubSolution(new HashSet<string> { target_Id }, null, null, new LineFactHightDirectionComparer()),
// new SolutionOrganizer.SubSolution(new HashSet<string> { target_Id }, null, null, new LineSpanningOverRiverWorldComparer()),
// new SolutionOrganizer.SubSolution(null, new List<int> { 1 }, new List<int> { 0 }, new LineFactHightComparer()),
// };
// Set Gadgets/ Scrolls
StageStatic.stage.AllowedGadgets = null;
StageStatic.stage.AllowedScrolls = null;
// Save
StageStatic.SetMode(StageStatic.Mode.Create);
StageStatic.stage.store(false, true);
}
} }
using Newtonsoft.Json;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using static JSONManager;
/// <summary>
/// Base-class for 1D-Facts
/// </summary>
public abstract class AbstractLineFact : FactWrappedCRTP<AbstractLineFact>
{
/// @{ <summary>
/// One <see cref="Fact.Id">Id</see> of two <see cref="PointFact"/> defining <see cref="Dir"/>.
/// </summary>
public string Pid1, Pid2;
/// @}
/// <summary>
/// Normalized Direction from <see cref="Pid1"/> to <see cref="Pid2"/>.
/// </summary>
public Vector3 Dir;
/// <summary>
/// \copydoc Fact.Fact()
/// </summary>
protected AbstractLineFact() : base()
{
Pid1 = null;
Pid2 = null;
Dir = Vector3.zero;
}
/// <summary>
/// Copies <paramref name="fact"/> by initiating new MMT %Fact.
/// </summary>
/// <param name="fact">Fact to be copied</param>
/// <param name="old_to_new"><c>Dictionary</c> mapping <paramref name="fact"/>.<see cref="getDependentFactIds"/> in <paramref name="fact"/>.<see cref="Fact._Facts"/> to corresponding <see cref="Fact.Id"/> in <paramref name="organizer"/> </param>
/// <param name="organizer">sets <see cref="_Facts"/></param>
protected AbstractLineFact(AbstractLineFact fact, Dictionary<string, string> old_to_new, FactOrganizer organizer) : base(fact, organizer)
{
set_public_members(old_to_new[fact.Pid1], old_to_new[fact.Pid2]);
}
/// <summary>
/// Standard Constructor
/// </summary>
/// <param name="pid1">sets <see cref="AbstractLineFact.Pid1"/></param>
/// <param name="pid2">sets <see cref="AbstractLineFact.Pid2"/></param>
/// <param name="organizer">sets <see cref="Fact._Facts"/></param>
protected AbstractLineFact(string pid1, string pid2, FactOrganizer organizer) : base(organizer)
{
set_public_members(pid1, pid2);
}
/// <summary>
/// Bypasses initialization of new MMT %Fact by using existend URI, _which is not checked for existence_.
/// </summary>
/// <param name="pid1">sets <see cref="Pid1"/></param>
/// <param name="pid2">sets <see cref="Pid2"/></param>
/// <param name="backendURI">MMT URI</param>
/// <param name="organizer">sets <see cref="Fact._Facts"/></param>
protected AbstractLineFact(string pid1, string pid2, string backendURI, FactOrganizer organizer) : base(organizer)
{
set_public_members(pid1, pid2);
this._URI = backendURI;
}
/// <summary>
/// Initiates <see cref="Pid1"/>, <see cref="Pid2"/>, <see cref="Dir"/>
/// </summary>
/// <param name="pid1">sets <see cref="Pid1"/></param>
/// <param name="pid2">sets <see cref="Pid2"/></param>
private void set_public_members(string pid1, string pid2)
{
this.Pid1 = pid1;
this.Pid2 = pid2;
PointFact pf1 = _Facts[pid1] as PointFact;
PointFact pf2 = _Facts[pid2] as PointFact;
this.Dir = (pf2.Point - pf1.Point).normalized;
}
/// \copydoc Fact.hasDependentFacts
public override bool hasDependentFacts()
{
return true;
}
/// \copydoc Fact.getDependentFactIds
public override string[] getDependentFactIds()
{
return new string[] { Pid1, Pid2 };
}
/// \copydoc Fact.GetHashCode
public override int GetHashCode()
{
return this.Pid1.GetHashCode() ^ this.Pid2.GetHashCode();
}
}
/// <summary>
/// Implements CRTP for <see cref="AbstractLineFact"/>; Escalates constructors;
/// </summary>
/// <typeparam name="T">class, which inherits from AbstractLineFactWrappedCRTP</typeparam>
public abstract class AbstractLineFactWrappedCRTP<T> : AbstractLineFact where T : AbstractLineFactWrappedCRTP<T>
{
/// <summary>\copydoc Fact.Fact</summary>
protected AbstractLineFactWrappedCRTP() : base() { }
/// <summary>\copydoc AbstractLineFact.AbstractLineFact(AbstractLineFact, Dictionary{string, string}, FactOrganizer)</summary>
protected AbstractLineFactWrappedCRTP(AbstractLineFactWrappedCRTP<T> fact, Dictionary<string, string> old_to_new, FactOrganizer organizer) : base(fact, old_to_new, organizer) { }
/// <summary>\copydoc AbstractLineFact.AbstractLineFact(string, string, FactOrganizer)</summary>
protected AbstractLineFactWrappedCRTP(string pid1, string pid2, FactOrganizer organizer) : base(pid1, pid2, organizer) { }
/// <summary>\copydoc AbstractLineFact.AbstractLineFact(string, string, string, FactOrganizer)</summary>
protected AbstractLineFactWrappedCRTP(string pid1, string pid2, string backendURI, FactOrganizer organizer) : base(pid1, pid2, backendURI, organizer) { }
/// \copydoc Fact.Equivalent(Fact, Fact)
protected override bool EquivalentWrapped(AbstractLineFact f1, AbstractLineFact f2)
=> EquivalentWrapped((T)f1, (T)f2);
/// <summary>CRTP step of <see cref="EquivalentWrapped(AbstractLineFact, AbstractLineFact)"/></summary>
protected abstract bool EquivalentWrapped(T f1, T f2);
}
/// <summary>
/// Line within 3D Space of finite length
/// </summary>
public class LineFact : AbstractLineFactWrappedCRTP<LineFact>
{
/// \copydoc Fact.s_type
[JsonProperty]
protected static new string s_type = "LineFact";
/// <summary> Distance between <see cref="AbstractLineFact.Pid1"/> and <see cref="AbstractLineFact.Pid2"/></summary>
public float Distance;
/// <summary> \copydoc Fact.Fact </summary>
public LineFact() : base()
{
Distance = 0;
}
/// <summary> \copydoc AbstractLineFact.AbstractLineFact(AbstractLineFact, Dictionary<string, string>, FactOrganizer) </summary>
public LineFact(LineFact fact, Dictionary<string, string> old_to_new, FactOrganizer organizer) : base(fact, old_to_new, organizer)
=> init(old_to_new[fact.Pid1], old_to_new[fact.Pid2]);
/// <summary> \copydoc AbstractLineFact.AbstractLineFact(string, string, string, FactOrganizer) </summary>
public LineFact(string pid1, string pid2, string backendURI, FactOrganizer organizer) : base(pid1, pid2, backendURI, organizer)
{
SetDistance();
_ = this.Label;
}
/// <summary> \copydoc AbstractLineFact.AbstractLineFact(string, string, FactOrganizer) </summary>
public LineFact(string pid1, string pid2, FactOrganizer organizer) : base(pid1, pid2, organizer)
=> init(pid1, pid2);
/// <summary>
/// Initiates <see cref="AbstractLineFact.Pid1"/>, <see cref="AbstractLineFact.Pid2"/>, <see cref="Fact._URI"/> and creates MMT %Fact Server-Side
/// </summary>
/// <param name="pid1">sets <see cref="AbstractLineFact.Pid1"/></param>
/// <param name="pid2">sets <see cref="AbstractLineFact.Pid2"/></param>
private void init(string pid1, string pid2)
{
SetDistance();
PointFact pf1 = _Facts[pid1] as PointFact;
PointFact pf2 = _Facts[pid2] as PointFact;
float v = (pf1.Point - pf2.Point).magnitude;
MMTTerm lhs =
new OMA(
new OMS(MMTURIs.Metric),
new List<MMTTerm> {
new OMS(pid1),
new OMS(pid2)
}
);
MMTTerm valueTp = new OMS(MMTURIs.RealLit);
MMTTerm value = new OMF(v);
MMTValueDeclaration mmtDecl = new(this.Label, lhs, valueTp, value);
AddFactResponse.sendAdd(mmtDecl, out this._URI);
}
/// \copydoc Fact.parseFact(Scroll.ScrollFact)
public new static LineFact parseFact(Scroll.ScrollFact fact)
{
string uri = fact.@ref.uri;
string pointAUri = ((OMS)((OMA)((Scroll.ScrollValueFact)fact).lhs).arguments[0]).uri;
string pointBUri = ((OMS)((OMA)((Scroll.ScrollValueFact)fact).lhs).arguments[1]).uri;
if (StageStatic.stage.factState.ContainsKey(pointAUri)
&& StageStatic.stage.factState.ContainsKey(pointBUri))
return new LineFact(pointAUri, pointBUri, uri, StageStatic.stage.factState);
//If dependent facts do not exist return null
else return null;
}
/// \copydoc Fact.generateLabel
protected override string generateLabel()
=> "[" + _Facts[Pid1].Label + _Facts[Pid2].Label + "]";
/// \copydoc Fact.instantiateDisplay(GameObject, Transform)
public override GameObject instantiateDisplay(GameObject prefab, Transform transform)
{
var obj = GameObject.Instantiate(prefab, Vector3.zero, Quaternion.identity, transform);
obj.transform.GetChild(0).gameObject.GetComponent<TextMeshProUGUI>().text = _Facts[this.Pid1].Label;
obj.transform.GetChild(1).gameObject.GetComponent<TextMeshProUGUI>().text = _Facts[this.Pid2].Label;
obj.GetComponent<FactWrapper>().fact = this;
return obj;
}
/// \copydoc Fact.Equivalent(Fact, Fact)
protected override bool EquivalentWrapped(LineFact f1, LineFact f2)
{
if ((f1.Pid1 == f2.Pid1 && f1.Pid2 == f2.Pid2))// ||
//(f1.Pid1 == f2.Pid2 && f1.Pid2 == f2.Pid1))
return true;
PointFact p1f1 = (PointFact)_Facts[f1.Pid1];
PointFact p2f1 = (PointFact)_Facts[f1.Pid2];
PointFact p1f2 = (PointFact)_Facts[f2.Pid1];
PointFact p2f2 = (PointFact)_Facts[f2.Pid2];
return (p1f1.Equivalent(p1f2) && p2f1.Equivalent(p2f2))
;//|| (p1f1.Equivalent(p2f2) && p2f1.Equivalent(p1f2));
}
/// <summary> Calculates and sets <see cref="Distance"/>; <remarks> <see cref="AbstractLineFact.Pid1"/> and <see cref="AbstractLineFact.Pid2"/> needs to be set first.</remarks></summary>
private void SetDistance()
=> this.Distance = Vector3.Distance(((PointFact)_Facts[Pid1]).Point, ((PointFact)_Facts[Pid2]).Point);
}
/// <summary>
/// Ray within 3D Space of infinite length
/// </summary>
public class RayFact : AbstractLineFactWrappedCRTP<RayFact>
{
/// \copydoc Fact.s_type
[JsonProperty]
protected static new string s_type = "RayFact";
/// <summary> \copydoc Fact.Fact </summary>
public RayFact() : base() { }
/// <summary> \copydoc AbstractLineFact.AbstractLineFact(AbstractLineFact, Dictionary<string, string>, FactOrganizer) </summary>
public RayFact(RayFact fact, Dictionary<string, string> old_to_new, FactOrganizer organizer) : base(fact, old_to_new, organizer)
=> init(old_to_new[fact.Pid1], old_to_new[fact.Pid2]);
/// <summary> \copydoc AbstractLineFact.AbstractLineFact(string, string, string, FactOrganizer) </summary>
public RayFact(string pid1, string pid2, string backendURI, FactOrganizer organizer) : base(pid1, pid2, backendURI, organizer)
=> _ = this.Label;
/// <summary> \copydoc AbstractLineFact.AbstractLineFact(string, string, FactOrganizer) </summary>
public RayFact(string pid1, string pid2, FactOrganizer organizer) : base(pid1, pid2, organizer)
=> init(pid1, pid2);
/// <summary>
/// Initiates <see cref="AbstractLineFact.Pid1"/>, <see cref="AbstractLineFact.Pid2"/>, <see cref="Fact._URI"/> and creates MMT %Fact Server-Side
/// </summary>
/// <param name="pid1">sets <see cref="AbstractLineFact.Pid1"/></param>
/// <param name="pid2">sets <see cref="AbstractLineFact.Pid2"/></param>
private void init(string pid1, string pid2)
{
MMTTerm tp = new OMS(MMTURIs.LineType);
MMTTerm df = new OMA(
new OMS(MMTURIs.LineOf),
new List<MMTTerm> {
new OMS(pid1),
new OMS(pid2)
});
AddFactResponse.sendAdd(new MMTSymbolDeclaration(this.Label, tp, df), out this._URI);
ParsingDictionary.parseTermsToId[df.ToString()] = this._URI;
}
/// \copydoc Fact.parseFact(Scroll.ScrollFact)
public new static RayFact parseFact(Scroll.ScrollFact fact)
{
string uri = fact.@ref.uri;
if ((OMA)((Scroll.ScrollSymbolFact)fact).df == null)
return null;
string pointAUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[0]).uri;
string pointBUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[1]).uri;
if (StageStatic.stage.factState.ContainsKey(pointAUri)
&& StageStatic.stage.factState.ContainsKey(pointBUri))
return new RayFact(pointAUri, pointBUri, uri, StageStatic.stage.factState);
//If dependent facts do not exist return null
else return null;
}
/// \copydoc Fact.generateLabel
protected override string generateLabel()
{
// TODO this string is too large to properly depict on scrolls.
// return "]" + _Facts[Pid1].Label + _Facts[Pid2].Label + "[";
return _Facts[Pid1].Label + _Facts[Pid2].Label;
}
/// \copydoc Fact.instantiateDisplay(GameObject, Transform)
public override GameObject instantiateDisplay(GameObject prefab, Transform transform)
{
var obj = GameObject.Instantiate(prefab, Vector3.zero, Quaternion.identity, transform);
obj.transform.GetChild(0).gameObject.GetComponent<TextMeshProUGUI>().text = this.Label;
obj.GetComponent<FactWrapper>().fact = this;
return obj;
}
/// \copydoc Fact.Equivalent(Fact, Fact)
protected override bool EquivalentWrapped(RayFact f1, RayFact f2)
{
if (!Math3d.IsApproximatelyParallel(f1.Dir, f2.Dir))
return false;
PointFact p1f1 = (PointFact)_Facts[f1.Pid1];
PointFact p1f2 = (PointFact)_Facts[f2.Pid1];
PointFact p2f2 = (PointFact)_Facts[f2.Pid2];
return Math3d.IsPointApproximatelyOnLine(p1f1.Point, f1.Dir, p1f2.Point)
&& Math3d.IsPointApproximatelyOnLine(p1f1.Point, f1.Dir, p2f2.Point);
}
}
fileFormatVersion: 2
guid: b1d98bc4e2d28a94e86af34da79e2c1e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
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