Click or drag to resize

CentralBodiesFacetGetFromContext Method

Gets the CentralBodiesFacet instance from the calculation context. If the context does not contain a CentralBodiesFacet instance, one will be created.

Namespace:  AGI.Foundation.Celestial
Assembly:  AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 19.1.398.0 (19.1.398.0)
public static CentralBodiesFacet GetFromContext()

Return Value

Type: CentralBodiesFacet
The instance from the context.
If a CentralBodiesFacet instance does not already exist in the CalculationContext, a default one is created. The default CentralBodiesFacet instance has a default constructed instance of each central body. See the documentation for the default constructor of each central body class for information about the defaults. For example, see EarthCentralBody and SunCentralBody.
This example shows how to obtain the Earth central body:
EarthCentralBody earth = CentralBodiesFacet.GetFromContext().Earth;
See Also