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

Classes

class  LODRange
 

Public Member Functions

void CheckLocals ()
 
override void OnPostSetup ()
 
override void OnSetup ()
 Run on Setup of PQS. Runs Setup() and SetActive(false) on all objects in the lod array. More...
 
override void OnSphereActive ()
 
override void OnSphereInactive ()
 
override void OnSphereReset ()
 
override bool OnSphereStart ()
 
override void OnUpdateFinished ()
 
void Orientate (bool allowReposition=true)
 Orientate the PQSCity to it's position on the PQS Sphere. If the CelestialBody parent transform has not been set or found then it will attempt to reset/find the CelestialBody component in the parent transforms. Will also set any spawnpoint Lat, Lon, Alt if there is an attached LaunchSite or SpaceCenterFacility reference assigned. More...
 
void OrientateToOrigin ()
 
void OrientateToWorld ()
 
void Randomize ()
 
virtual void ResetCelestialBody ()
 Will reset the CelestialBody parent transform reference. The transform for this PQSCity component should be a child of a CelestialBody component transform. More...
 
- Public Member Functions inherited from PQSMod
virtual double GetVertexMaxHeight ()
 
virtual double GetVertexMinHeight ()
 
virtual void OnMeshBuild ()
 
virtual void OnPreUpdate ()
 
virtual void OnQuadBuilt (PQ quad)
 
virtual void OnQuadCreate (PQ quad)
 
virtual void OnQuadDestroy (PQ quad)
 
virtual void OnQuadPreBuild (PQ quad)
 
virtual void OnQuadUpdate (PQ quad)
 
virtual void OnQuadUpdateNormals (PQ quad)
 
virtual void OnSphereStarted ()
 
virtual void OnSphereTransformUpdate ()
 
virtual void OnVertexBuild (PQS.VertexBuildData data)
 
virtual void OnVertexBuildHeight (PQS.VertexBuildData data)
 
void RebuildSphere ()
 

Static Public Member Functions

static int GetPQSCitySeed (PQSCity city)
 
static int GetPQSCitySeed (string name, string body)
 
static int GetStableHashCode (string str, bool Bit32=false)
 

Public Attributes

double alt
 
bool debugOrientated
 
float frameDelta
 check if you want the city to randomize its position persistently on startup More...
 
float individualPOIRange = 100
 This POIs individual range More...
 
double lat
 
LaunchSite launchSite
 Contains reference to LaunchSite if this PQSCity2 is part of a LaunchSite. More...
 
LODRange[] lod
 how often to test when pqs is active. 0 = every frame More...
 
double lon
 
bool randomizeOnSphere = false
 check if you want the city snap to sphere at runtime More...
 
float reorientFinalAngle
 
Vector3 reorientInitialUp
 degrees from north More...
 
bool reorientToSphere
 initial up More...
 
Vector3 repositionRadial
 and a radius height offset for snap More...
 
double repositionRadiusOffset
 check this if you want the city to reorient its up direction at runtime More...
 
bool repositionToSphere
 check if you want to use actual surface height More...
 
bool repositionToSphereSurface = false
 check if you want to use actual surface height More...
 
bool repositionToSphereSurfaceAddHeight = false
 actual radial position of this (if using snap) More...
 
PSystemSetup.SpaceCenterFacility spaceCenterFacility
 Contains reference to SpaceCenterFacility if this PQSCity2 is part of a SpaceCenterFacility. More...
 
- Public Attributes inherited from PQSMod
bool modEnabled = true
 
int order = 100
 
PQS.ModiferRequirements requirements
 
PQS sphere
 

Protected Member Functions

virtual void Start ()
 

Protected Attributes

Vector3d planetRelativePosition = Vector3d.zero
 

Properties

CelestialBody celestialBody [get]
 The CelestialBody this PQSCity is located on. More...
 
bool InPOIRange [get]
 Whether the PQSCity2 is less than the POIRange from teh active vessel More...
 
override Vector3d PlanetRelativePosition [get]
 
double POIRange [get]
 The POIRange from the active vessel More...
 
override string SurfaceObjectName [get]
 
- Properties inherited from PQSSurfaceObject
virtual string DisplaySurfaceObjectName [get]
 
virtual Vector3d PlanetRelativePosition [get]
 
virtual string SurfaceObjectName [get]
 

Member Function Documentation

void PQSCity.CheckLocals ( )
inline
static int PQSCity.GetPQSCitySeed ( PQSCity  city)
inlinestatic
static int PQSCity.GetPQSCitySeed ( string  name,
string  body 
)
inlinestatic
static int PQSCity.GetStableHashCode ( string  str,
bool  Bit32 = false 
)
inlinestatic
override void PQSCity.OnPostSetup ( )
inlinevirtual

Reimplemented from PQSMod.

override void PQSCity.OnSetup ( )
inlinevirtual

Run on Setup of PQS. Runs Setup() and SetActive(false) on all objects in the lod array.

Reimplemented from PQSMod.

override void PQSCity.OnSphereActive ( )
inlinevirtual

Reimplemented from PQSMod.

override void PQSCity.OnSphereInactive ( )
inlinevirtual

Reimplemented from PQSMod.

override void PQSCity.OnSphereReset ( )
inlinevirtual

Reimplemented from PQSMod.

override bool PQSCity.OnSphereStart ( )
inlinevirtual

Reimplemented from PQSMod.

override void PQSCity.OnUpdateFinished ( )
inlinevirtual

Reimplemented from PQSMod.

void PQSCity.Orientate ( bool  allowReposition = true)
inline

Orientate the PQSCity to it's position on the PQS Sphere. If the CelestialBody parent transform has not been set or found then it will attempt to reset/find the CelestialBody component in the parent transforms. Will also set any spawnpoint Lat, Lon, Alt if there is an attached LaunchSite or SpaceCenterFacility reference assigned.

Parameters
allowReposition

< radius snap if req

void PQSCity.OrientateToOrigin ( )
inline
void PQSCity.OrientateToWorld ( )
inline
void PQSCity.Randomize ( )
inline
virtual void PQSCity.ResetCelestialBody ( )
inlinevirtual

Will reset the CelestialBody parent transform reference. The transform for this PQSCity component should be a child of a CelestialBody component transform.

virtual void PQSCity.Start ( )
inlineprotectedvirtual

Member Data Documentation

double PQSCity.alt
bool PQSCity.debugOrientated
float PQSCity.frameDelta

check if you want the city to randomize its position persistently on startup

float PQSCity.individualPOIRange = 100

This POIs individual range

double PQSCity.lat
LaunchSite PQSCity.launchSite

Contains reference to LaunchSite if this PQSCity2 is part of a LaunchSite.

LODRange [] PQSCity.lod

how often to test when pqs is active. 0 = every frame

double PQSCity.lon
Vector3d PQSCity.planetRelativePosition = Vector3d.zero
protected
bool PQSCity.randomizeOnSphere = false

check if you want the city snap to sphere at runtime

float PQSCity.reorientFinalAngle
Vector3 PQSCity.reorientInitialUp

degrees from north

bool PQSCity.reorientToSphere

initial up

Vector3 PQSCity.repositionRadial

and a radius height offset for snap

double PQSCity.repositionRadiusOffset

check this if you want the city to reorient its up direction at runtime

bool PQSCity.repositionToSphere

check if you want to use actual surface height

bool PQSCity.repositionToSphereSurface = false

check if you want to use actual surface height

bool PQSCity.repositionToSphereSurfaceAddHeight = false

actual radial position of this (if using snap)

PSystemSetup.SpaceCenterFacility PQSCity.spaceCenterFacility

Contains reference to SpaceCenterFacility if this PQSCity2 is part of a SpaceCenterFacility.

Property Documentation

CelestialBody PQSCity.celestialBody
get

The CelestialBody this PQSCity is located on.

bool PQSCity.InPOIRange
get

Whether the PQSCity2 is less than the POIRange from teh active vessel

override Vector3d PQSCity.PlanetRelativePosition
get
double PQSCity.POIRange
get

The POIRange from the active vessel

override string PQSCity.SurfaceObjectName
get

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