Kerbal Space Program
1.12.4
|
Public Member Functions | |
override bool | InRange (Vector3d source, double distance) |
Override this to false in case of a radius being 0 More... | |
OccluderHorizonCulling (Transform transform, double radiusX, double radiusY, double radiusZ) | |
The radii in each axis (in local space). Note that position and invRotation must be kept updated per tick. More... | |
override bool | Raycast (Vector3d source, Vector3d dest) |
Does the ray from source to dest hit the occluder? NOTE: requires position to be updated, and invRotation as well (to rotate the positions to body-centric) via https://cesiumjs.org/2013/04/25/Horizon-culling/ More... | |
override void | Update () |
Protected Attributes | |
CelestialBody | body |
QuaternionD | invRotation |
double | radiusXRecip |
double | radiusYRecip |
double | radiusZRecip |
Transform | transform |
bool | useBody = false |
Additional Inherited Members | |
Public Attributes inherited from CommNet.Occluder | |
Vector3d | position |
double | radius |
|
inline |
The radii in each axis (in local space). Note that position and invRotation must be kept updated per tick.
radiusX | |
radiusY | |
radiusZ |
|
inlinevirtual |
Override this to false in case of a radius being 0
source | |
distance |
Reimplemented from CommNet.Occluder.
|
inlinevirtual |
Does the ray from source to dest hit the occluder? NOTE: requires position to be updated, and invRotation as well (to rotate the positions to body-centric) via https://cesiumjs.org/2013/04/25/Horizon-culling/
source | |
dest |
< Swap if dest is actually closer than source
< Unit-sphere vector from body center to source
< Unit-sphere vector from body center to dest
< distance from source to sphere surface
< dot of source->dest and source->sphere surface, i.e. projection of source->dest along axis to sphere center
< then check the dot. If source->dest is not in the same direction as source->center, we're safe, else occluded.
Implements CommNet.Occluder.
|
inlinevirtual |
Reimplemented from CommNet.Occluder.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |