-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import Thoth, adapt (heavily) to Sentinel. First skeleton + muscle
- Loading branch information
1 parent
6c77645
commit e013247
Showing
17 changed files
with
1,216 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
sentinel/src/main/java/com/hellblazer/luciferase/sentinel/SOI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/** | ||
* Copyright (C) 2023 Hal Hildebrand. All rights reserved. | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU Affero General Public License as published by the Free | ||
* Software Foundation, either version 3 of the License, or (at your option) any | ||
* later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.hellblazer.luciferase.sentinel; | ||
|
||
import java.util.Collection; | ||
|
||
import javax.vecmath.Tuple3f; | ||
|
||
import com.hellblazer.luciferase.thoth.Perceiving; | ||
import com.hellblazer.luciferase.thoth.impl.Node; | ||
import com.hellblazer.luciferase.thoth.impl.SphereOfInteraction; | ||
|
||
/** | ||
* Sentinel implementation of the Thoth sphere o' interaction | ||
* | ||
* @author hal.hildebrand | ||
*/ | ||
public class SOI implements SphereOfInteraction { | ||
|
||
@Override | ||
public <T extends Perceiving> Node<T> closestTo(Tuple3f point3f) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public <T extends Perceiving> Node<T> getAliased(Node<?> node) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public Collection<Node<?>> getEnclosingNeighbors(Node<?> id) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public Iterable<Node<?>> getNodes() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public Collection<Node<?>> getPeers() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean includes(Node<?> node) { | ||
// TODO Auto-generated method stub | ||
return false; | ||
} | ||
|
||
@Override | ||
public <T extends Perceiving> void insert(Node<T> id, Tuple3f point3f) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public <T extends Perceiving> boolean isBoundary(Node<T> node, Tuple3f center, float radiusSquared) { | ||
// TODO Auto-generated method stub | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isEnclosing(Node<?> node, Node<?> center_node_id) { | ||
// TODO Auto-generated method stub | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean overlaps(Node<?> node, Tuple3f center, float radiusSquared) { | ||
// TODO Auto-generated method stub | ||
return false; | ||
} | ||
|
||
@Override | ||
public void remove(Node<?> node) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public void update(Node<?> node, Tuple3f coord) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
sentinel/src/main/java/com/hellblazer/luciferase/thoth/Cursor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* Copyright (C) 2008 Hal Hildebrand. All rights reserved. | ||
* | ||
* This file is part of the Thoth Interest Management and Load Balancing | ||
* Framework. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.hellblazer.luciferase.thoth; | ||
|
||
/** | ||
* | ||
* @author <a href="mailto:hal.hildebrand@gmail.com">Hal Hildebrand</a> | ||
* | ||
*/ | ||
|
||
public interface Cursor extends Movable, Locatable { | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
sentinel/src/main/java/com/hellblazer/luciferase/thoth/Locatable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Copyright (C) 2008 Hal Hildebrand. All rights reserved. | ||
* | ||
* This file is part of the Thoth Interest Management and Load Balancing | ||
* Framework. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.hellblazer.luciferase.thoth; | ||
|
||
import javax.vecmath.Tuple3f; | ||
|
||
/** | ||
* | ||
* @author <a href="mailto:hal.hildebrand@gmail.com">Hal Hildebrand</a> | ||
* | ||
*/ | ||
|
||
public interface Locatable { | ||
|
||
Tuple3f getLocation(); | ||
} |
35 changes: 35 additions & 0 deletions
35
sentinel/src/main/java/com/hellblazer/luciferase/thoth/Movable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (C) 2008 Hal Hildebrand. All rights reserved. | ||
* | ||
* This file is part of the Thoth Interest Management and Load Balancing | ||
* Framework. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.hellblazer.luciferase.thoth; | ||
|
||
import javax.vecmath.Tuple3f; | ||
|
||
/** | ||
* | ||
* @author <a href="mailto:hal.hildebrand@gmail.com">Hal Hildebrand</a> | ||
* | ||
*/ | ||
|
||
public interface Movable { | ||
|
||
void moveBy(Tuple3f velocity); | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
sentinel/src/main/java/com/hellblazer/luciferase/thoth/Perceiving.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Copyright (C) 2008 Hal Hildebrand. All rights reserved. | ||
* | ||
* This file is part of the Thoth Interest Management and Load Balancing | ||
* Framework. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.hellblazer.luciferase.thoth; | ||
|
||
import javax.vecmath.Point3f; | ||
import javax.vecmath.Vector3f; | ||
|
||
import com.hellblazer.primeMover.annotations.NonEvent; | ||
|
||
/** | ||
* | ||
* @author <a href="mailto:hal.hildebrand@gmail.com">Hal Hildebrand</a> | ||
* | ||
*/ | ||
|
||
public interface Perceiving { | ||
|
||
void fade(Perceiving neighbor); | ||
|
||
void move(Perceiving neighbor, Point3f location, Vector3f velocity); | ||
|
||
void notice(Perceiving neighbor, Point3f location); | ||
|
||
@NonEvent | ||
void setCursor(Cursor cursor); | ||
} |
Oops, something went wrong.