Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UFrameIT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FrameIT
UFrameIT
Commits
48efe994
Commit
48efe994
authored
3 years ago
by
Marco Zimmer
Browse files
Options
Downloads
Patches
Plain Diff
+FactOrganizer: changed Key to URI
parent
323e2574
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Assets/Scripts/InteractionEngine/Fact.cs
+15
-1
15 additions, 1 deletion
Assets/Scripts/InteractionEngine/Fact.cs
Assets/Scripts/InteractionEngine/FactManager.cs
+1
-23
1 addition, 23 deletions
Assets/Scripts/InteractionEngine/FactManager.cs
with
16 additions
and
24 deletions
Assets/Scripts/InteractionEngine/Fact.cs
+
15
−
1
View file @
48efe994
...
...
@@ -84,7 +84,7 @@ public void rename(string newLabel)
public
virtual
void
delete
()
{
//TODO: MMT
//TODO: MMT
: delete over there
}
public
abstract
bool
Equivalent
(
Fact
f2
);
...
...
@@ -98,6 +98,20 @@ public virtual void delete()
protected
string
generateLetter
()
{
return
((
char
)(
64
+
LabelId
++
+
1
)).
ToString
();
/* Keeping track of free Ids
private static List<int> NextEmpties = new List<int>();
NextEmpties.Add(LabelId++);
public int GetFirstEmptyID()
{
NextEmpties.Sort();
int id = NextEmpties[0];
NextEmpties.RemoveAt(0);
if (NextEmpties.Count == 0)
NextEmpties.Add(LabelId++);
}*/
}
}
...
...
This diff is collapsed.
Click to expand it.
Assets/Scripts/InteractionEngine/FactManager.cs
+
1
−
23
View file @
48efe994
...
...
@@ -7,15 +7,7 @@
public
class
FactManager
:
MonoBehaviour
{
private
List
<
int
>
NextEmpties
=
new
List
<
int
>();
// Start is called before the first frame update
void
Start
()
{
NextEmpties
.
Add
(
0
);
}
//TODO! communicate success
//TODO! communicate success/ failure
public
static
Fact
AddFactIfNotFound
(
Fact
fact
,
out
bool
exists
,
bool
samestep
)
{
return
Facts
[
Facts
.
Add
(
fact
,
out
exists
,
samestep
)];
...
...
@@ -75,23 +67,9 @@ void AddHitIfOnLine(RaycastHit hit)
return
rayFact
;
}
public
AngleFact
AddAngleFact
(
string
pid1
,
string
pid2
,
string
pid3
,
bool
samestep
=
false
)
{
return
(
AngleFact
)
AddFactIfNotFound
(
new
AngleFact
(
pid1
,
pid2
,
pid3
),
out
bool
obsolete
,
samestep
);
}
public
int
GetFirstEmptyID
()
{
NextEmpties
.
Sort
();
int
id
=
NextEmpties
[
0
];
NextEmpties
.
RemoveAt
(
0
);
if
(
NextEmpties
.
Count
==
0
)
NextEmpties
.
Add
(
id
+
1
);
Debug
.
Log
(
"place fact at "
+
id
);
return
id
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment