Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Properties | List of all members
CommNet.CommNetwork Class Reference
Inheritance diagram for CommNet.CommNetwork:

Public Member Functions

override CommNode Add (CommNode conn)
 
string CreateDebug ()
 
virtual bool FindClosestControlSource (CommNode from, CommPath path=null)
 Find the closest control source of any type More...
 
override CommNode FindClosestWhere (CommNode start, CommPath path, Func< CommNode, CommNode, bool > where)
 Find the best path to the closest node that matches the where condition More...
 
virtual bool FindHome (CommNode from, CommPath path=null)
 Find a path to home, syntactic sugar for FindClosestWhere() where where IsHome More...
 
override bool FindPath (CommNode start, CommPath path, CommNode end)
 Find best path between start and end More...
 
override void Rebuild ()
 Rebuild the graph More...
 
override bool Remove (CommNode conn)
 

Protected Member Functions

override void CreateShortestPathTree (CommNode start, CommNode end)
 
override bool SetNodeConnection (CommNode a, CommNode b)
 Updates connection state between two nodes, setting connected or not More...
 
virtual bool TestOcclusion (Vector3d aPos, Occluder a, Vector3d bPos, Occluder b, double distance)
 Returns true if not occluded (sue me) More...
 
virtual bool TryConnect (CommNode a, CommNode b, double distance, bool aCanRelay, bool bCanRelay, bool bothRelay)
 Given nodes a and b are in range, try connecting them and store whether both can relay and whether each individually can using the other's non-relay transmitter More...
 
override void UpdateShortestPath (CommNode a, CommNode b, CommLink link, double bestCost, CommNode startNode, CommNode endNode)
 
override CommNode UpdateShortestWhere (CommNode a, CommNode b, CommLink link, double bestCost, CommNode startNode, Func< CommNode, CommNode, bool > whereClause)
 

Static Protected Member Functions

static bool IsControlSource (CommNode start, CommNode a)
 
static bool IsHome (CommNode start, CommNode a)
 

Protected Attributes

bool isDirty = false
 

Properties

bool IsDirty [get]
 

Member Function Documentation

override CommNode CommNet.CommNetwork.Add ( CommNode  conn)
inline
string CommNet.CommNetwork.CreateDebug ( )
inline
override void CommNet.CommNetwork.CreateShortestPathTree ( CommNode  start,
CommNode  end 
)
inlineprotected

< Reset all cells

< Add the root node to the candidate list.

< Process the candidate list until empty.

virtual bool CommNet.CommNetwork.FindClosestControlSource ( CommNode  from,
CommPath  path = null 
)
inlinevirtual

Find the closest control source of any type

Parameters
from
path
Returns
override CommNode CommNet.CommNetwork.FindClosestWhere ( CommNode  start,
CommPath  path,
Func< CommNode, CommNode, bool >  where 
)
inline

Find the best path to the closest node that matches the where condition

Parameters
start
path
where
Returns

< Reset all cells

< Add the root node to the candidate list.

< Process the candidate list until empty.

virtual bool CommNet.CommNetwork.FindHome ( CommNode  from,
CommPath  path = null 
)
inlinevirtual

Find a path to home, syntactic sugar for FindClosestWhere() where where IsHome

Parameters
from
path
Returns
override bool CommNet.CommNetwork.FindPath ( CommNode  start,
CommPath  path,
CommNode  end 
)
inline

Find best path between start and end

Parameters
start
path
end
Returns
static bool CommNet.CommNetwork.IsControlSource ( CommNode  start,
CommNode  a 
)
inlinestaticprotected
static bool CommNet.CommNetwork.IsHome ( CommNode  start,
CommNode  a 
)
inlinestaticprotected
override void CommNet.CommNetwork.Rebuild ( )
inline

Rebuild the graph

override bool CommNet.CommNetwork.Remove ( CommNode  conn)
inline
override bool CommNet.CommNetwork.SetNodeConnection ( CommNode  a,
CommNode  b 
)
inlineprotected

Updates connection state between two nodes, setting connected or not

Parameters
a
b
Returns

< handle distance offset

< test occlusion, try connecting

virtual bool CommNet.CommNetwork.TestOcclusion ( Vector3d  aPos,
Occluder  a,
Vector3d  bPos,
Occluder  b,
double  distance 
)
inlineprotectedvirtual

Returns true if not occluded (sue me)

Parameters
a
b
aPos
bPos
distance
Returns
virtual bool CommNet.CommNetwork.TryConnect ( CommNode  a,
CommNode  b,
double  distance,
bool  aCanRelay,
bool  bCanRelay,
bool  bothRelay 
)
inlineprotectedvirtual

Given nodes a and b are in range, try connecting them and store whether both can relay and whether each individually can using the other's non-relay transmitter

Parameters
a
b
distance
aCanRelay
bCanRelay
bothRelay
Returns
override void CommNet.CommNetwork.UpdateShortestPath ( CommNode  a,
CommNode  b,
CommLink  link,
double  bestCost,
CommNode  startNode,
CommNode  endNode 
)
inlineprotected
override CommNode CommNet.CommNetwork.UpdateShortestWhere ( CommNode  a,
CommNode  b,
CommLink  link,
double  bestCost,
CommNode  startNode,
Func< CommNode, CommNode, bool >  whereClause 
)
inlineprotected

Member Data Documentation

bool CommNet.CommNetwork.isDirty = false
protected

Property Documentation

bool CommNet.CommNetwork.IsDirty
get

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