-
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.
- Loading branch information
1 parent
bf30eaa
commit 5d58ad5
Showing
11 changed files
with
261 additions
and
31 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
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
45 changes: 45 additions & 0 deletions
45
sentinel/src/main/java/com/hellblazer/luciferase/sentinel/cast/AbstractSpatial.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,45 @@ | ||
/** | ||
* 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.cast; | ||
|
||
import javax.vecmath.Point3f; | ||
import javax.vecmath.Tuple3f; | ||
|
||
/** | ||
* @author hal.hildebrand | ||
*/ | ||
public class AbstractSpatial { | ||
|
||
protected Point3f location; | ||
|
||
public AbstractSpatial(Point3f location) { | ||
this.location = location; | ||
} | ||
|
||
public Point3f getLocation() { | ||
return location; | ||
} | ||
|
||
public Point3f moveBy(Tuple3f delta) { | ||
location.add(delta); | ||
return location; | ||
} | ||
|
||
public void setLocation(Point3f location) { | ||
this.location = location; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
sentinel/src/main/java/com/hellblazer/luciferase/sentinel/cast/SpatialPublish.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,29 @@ | ||
/** | ||
* 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.cast; | ||
|
||
import javax.vecmath.Point3f; | ||
|
||
/** | ||
* @author hal.hildebrand | ||
*/ | ||
public class SpatialPublish extends AbstractSpatial { | ||
|
||
public SpatialPublish(Point3f location) { | ||
super(location); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
sentinel/src/main/java/com/hellblazer/luciferase/sentinel/cast/SpatialSubscription.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,29 @@ | ||
/** | ||
* 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.cast; | ||
|
||
import javax.vecmath.Point3f; | ||
|
||
/** | ||
* @author hal.hildebrand | ||
*/ | ||
abstract public class SpatialSubscription extends AbstractSpatial { | ||
|
||
public SpatialSubscription(Point3f location) { | ||
super(location); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
sentinel/src/main/java/com/hellblazer/luciferase/sentinel/cast/SphericalPublish.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,46 @@ | ||
/** | ||
* 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.cast; | ||
|
||
import javax.vecmath.Point3f; | ||
|
||
/** | ||
* @author hal.hildebrand | ||
*/ | ||
public class SphericalPublish extends SpatialPublish { | ||
protected float radius; | ||
protected float radiusSquared; | ||
|
||
public SphericalPublish(Point3f location, float radius) { | ||
super(location); | ||
this.radius = radius; | ||
this.radiusSquared = radius * radius; | ||
} | ||
|
||
public float getRadius() { | ||
return radius; | ||
} | ||
|
||
public float getRadiusSquared() { | ||
return radiusSquared; | ||
} | ||
|
||
public void setRadius(float radius) { | ||
this.radius = radius; | ||
radiusSquared = radius * radius; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
sentinel/src/main/java/com/hellblazer/luciferase/sentinel/cast/SphericalSubscription.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,46 @@ | ||
/** | ||
* 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.cast; | ||
|
||
import javax.vecmath.Point3f; | ||
|
||
/** | ||
* @author hal.hildebrand | ||
*/ | ||
public class SphericalSubscription extends SpatialSubscription { | ||
protected float radius; | ||
protected float radiusSquared; | ||
|
||
public SphericalSubscription(Point3f location, float radius) { | ||
super(location); | ||
this.radius = radius; | ||
this.radiusSquared = radius * radius; | ||
} | ||
|
||
public float getRadius() { | ||
return radius; | ||
} | ||
|
||
public float getRadiusSquared() { | ||
return radiusSquared; | ||
} | ||
|
||
public void setRadius(float radius) { | ||
this.radius = radius; | ||
radiusSquared = radius * radius; | ||
} | ||
} |
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
Oops, something went wrong.