Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Properties | List of all members
FinePrint.Waypoint Class Reference

Public Member Functions

void CleanupMapNode ()
 
void RandomizeAwayFrom (double originLatitude, double originLongitude, double minimumDistance, double maximumDistance, int samples=3, bool waterAllowed=true, System.Random generator=null)
 
void RandomizeAwayFrom (double originLatitude, double originLongitude, double maximumDistance, int samples=3, bool waterAllowed=true, System.Random generator=null)
 
void RandomizeNear (double centerLatitude, double centerLongitude, double minimumDistance, double maximumDistance, bool waterAllowed=true, System.Random generator=null)
 
void RandomizeNear (double centerLatitude, double centerLongitude, double maximumDistance, bool waterAllowed=true, System.Random generator=null)
 
void SetFadeRange (double referenceAltitude=-1)
 
void setName (bool uniqueSites=true, bool allowNamed=true)
 
void SetupMapNode ()
 
void UpdateWaypoint (bool mapOpen, bool clicked, CelestialBody focusBody, Vector3d cameraPosition)
 
 Waypoint ()
 
 Waypoint (Waypoint that)
 

Public Attributes

float alphaRatio = -1
 
double altitude = 0
 
bool blocksInput = true
 
string celestialName
 
Contract contractReference = null
 
bool enableMarker = true
 
bool enableTooltip = true
 
double fadeRange = double.MaxValue
 
double height
 
float iconAlpha = 0
 
int iconSize = 16
 
string id = "default"
 
int index
 
bool isClustered = false
 
bool isCustom = false
 
bool isExplored
 
bool isMission = false
 Waypoint created specifically for a mission. We don't save these. More...
 
bool isNavigatable = false
 
bool isOccluded = false
 
bool isOnSurface = false
 
bool landLocked = false
 
double latitude
 
double longitude
 
const float maximumAlpha = 1.0f
 
const float minimumAlpha = 0.6f
 
string name = "Site"
 
Guid navigationId = Guid.Empty
 Unique lookup key More...
 
MapNode node
 
string nodeCaption1
 
string nodeCaption2
 
string nodeCaption3
 
Vector3 orbitPosition
 
double radius
 
int seed
 
bool visible = true
 
bool withinZoom
 
Vector3d worldPosition
 

Properties

CelestialBody celestialBody [get]
 
string FullName [get]
 
int uniqueSeed [get]
 Uses Cantor's pairing function to throw together the waypoint id and the contract seed without resulting in hash collision. More...
 

Constructor & Destructor Documentation

FinePrint.Waypoint.Waypoint ( )
inline
FinePrint.Waypoint.Waypoint ( Waypoint  that)
inline

Member Function Documentation

void FinePrint.Waypoint.CleanupMapNode ( )
inline
void FinePrint.Waypoint.RandomizeAwayFrom ( double  originLatitude,
double  originLongitude,
double  minimumDistance,
double  maximumDistance,
int  samples = 3,
bool  waterAllowed = true,
System.Random  generator = null 
)
inline

< We want to randomize the position, but generally away from a specific point. The reason we sample a few times is because this will naturally weave away from the origin as well as water/poles.

void FinePrint.Waypoint.RandomizeAwayFrom ( double  originLatitude,
double  originLongitude,
double  maximumDistance,
int  samples = 3,
bool  waterAllowed = true,
System.Random  generator = null 
)
inline
void FinePrint.Waypoint.RandomizeNear ( double  centerLatitude,
double  centerLongitude,
double  minimumDistance,
double  maximumDistance,
bool  waterAllowed = true,
System.Random  generator = null 
)
inline

< Use limited iterations to prevent a land search on a purely oceanic planet from locking up the game.

< Expand the search radius by 5% with each iteration to account for the possibility that we might be searching for land in the middle of the ocean.

void FinePrint.Waypoint.RandomizeNear ( double  centerLatitude,
double  centerLongitude,
double  maximumDistance,
bool  waterAllowed = true,
System.Random  generator = null 
)
inline
void FinePrint.Waypoint.SetFadeRange ( double  referenceAltitude = -1)
inline

< For things in orbit, we need to leave some defaults, since orbit renderers fade at a set distance.

void FinePrint.Waypoint.setName ( bool  uniqueSites = true,
bool  allowNamed = true 
)
inline
void FinePrint.Waypoint.SetupMapNode ( )
inline
void FinePrint.Waypoint.UpdateWaypoint ( bool  mapOpen,
bool  clicked,
CelestialBody  focusBody,
Vector3d  cameraPosition 
)
inline

< Cache a few things that we'll need more than once.

Member Data Documentation

float FinePrint.Waypoint.alphaRatio = -1
double FinePrint.Waypoint.altitude = 0
bool FinePrint.Waypoint.blocksInput = true
string FinePrint.Waypoint.celestialName
Contract FinePrint.Waypoint.contractReference = null
bool FinePrint.Waypoint.enableMarker = true
bool FinePrint.Waypoint.enableTooltip = true
double FinePrint.Waypoint.fadeRange = double.MaxValue
double FinePrint.Waypoint.height
float FinePrint.Waypoint.iconAlpha = 0
int FinePrint.Waypoint.iconSize = 16
string FinePrint.Waypoint.id = "default"
int FinePrint.Waypoint.index
bool FinePrint.Waypoint.isClustered = false
bool FinePrint.Waypoint.isCustom = false
bool FinePrint.Waypoint.isExplored
bool FinePrint.Waypoint.isMission = false

Waypoint created specifically for a mission. We don't save these.

bool FinePrint.Waypoint.isNavigatable = false
bool FinePrint.Waypoint.isOccluded = false
bool FinePrint.Waypoint.isOnSurface = false
bool FinePrint.Waypoint.landLocked = false
double FinePrint.Waypoint.latitude
double FinePrint.Waypoint.longitude
const float FinePrint.Waypoint.maximumAlpha = 1.0f
const float FinePrint.Waypoint.minimumAlpha = 0.6f
string FinePrint.Waypoint.name = "Site"
Guid FinePrint.Waypoint.navigationId = Guid.Empty

Unique lookup key

MapNode FinePrint.Waypoint.node
string FinePrint.Waypoint.nodeCaption1
string FinePrint.Waypoint.nodeCaption2
string FinePrint.Waypoint.nodeCaption3
Vector3 FinePrint.Waypoint.orbitPosition
double FinePrint.Waypoint.radius
int FinePrint.Waypoint.seed
bool FinePrint.Waypoint.visible = true
bool FinePrint.Waypoint.withinZoom
Vector3d FinePrint.Waypoint.worldPosition

Property Documentation

CelestialBody FinePrint.Waypoint.celestialBody
get
string FinePrint.Waypoint.FullName
get
int FinePrint.Waypoint.uniqueSeed
get

Uses Cantor's pairing function to throw together the waypoint id and the contract seed without resulting in hash collision.


The documentation for this class was generated from the following file: