Table of Contents

Class PQS

Namespace
KSP.Rendering.Planets
Assembly
Assembly-CSharp.dll
[AwesomeTechnologiesScriptOrder(3)]
public class PQS : MonoBehaviour
Inheritance
PQS
Extension Methods

Constructors

PQS()

public PQS()

Fields

BUFFER_SIZE

public const int BUFFER_SIZE = 12000

Field Value

int

EmptyDecalInstanceList

public NativeList<DecalInstance> EmptyDecalInstanceList

Field Value

NativeList<DecalInstance>

FixedLevel

public int FixedLevel

Field Value

int

PQRenderData

public PQData PQRenderData

Field Value

PQData

PQSPositionId

public static readonly int PQSPositionId

Field Value

int

PQSRenderer

public PQSRenderer PQSRenderer

Field Value

PQSRenderer

PQSToWorldMtxId

public static readonly int PQSToWorldMtxId

Field Value

int

SCALED_SPACE_MESH_SCALE

public const double SCALED_SPACE_MESH_SCALE = 1000

Field Value

double

ScaledSpaceTextureGeneratorSettings

public ScaledSpaceTextureGeneratorSettings ScaledSpaceTextureGeneratorSettings

Field Value

ScaledSpaceTextureGeneratorSettings

UseFixedLevel

public bool UseFixedLevel

Field Value

bool

WorldToPQSMtxId

public static readonly int WorldToPQSMtxId

Field Value

int

circumference

public double circumference

Field Value

double

collapseDelta

public double collapseDelta

Field Value

double

data

public PQSData data

Field Value

PQSData

generatePhysics

public bool generatePhysics

Field Value

bool

graphicsStats

public PQS.StatCollection graphicsStats

Field Value

PQS.StatCollection

halfChord

public double halfChord

Field Value

double

interestPositions

public List<Transform> interestPositions

Field Value

List<Transform>

isActive

public bool isActive

Field Value

bool

isAlive

public bool isAlive

Field Value

bool

isStarted

public bool isStarted

Field Value

bool

isSubdivisionEnabled

public bool isSubdivisionEnabled

Field Value

bool

maxRaycastDistance

public float maxRaycastDistance

Field Value

float

parentSphere

public PQS parentSphere

Field Value

PQS

physicsStats

public PQS.StatCollection physicsStats

Field Value

PQS.StatCollection

primaryTargetAltitude

public double primaryTargetAltitude

Field Value

double

primaryTargetDistance

public double primaryTargetDistance

Field Value

double

quadAllowBuild

public bool quadAllowBuild

Field Value

bool

radiusMax

public double radiusMax

Field Value

double

radiusMin

public double radiusMin

Field Value

double

radiusSquared

public double radiusSquared

Field Value

double

settings

public PQSGlobalSettings settings

Field Value

PQSGlobalSettings

trackStats

public bool trackStats

Field Value

bool

visRad

public double visRad

Field Value

double

visRadDelta

public double visRadDelta

Field Value

double

waterStats

public PQS.StatCollection waterStats

Field Value

PQS.StatCollection

Properties

AtmosphereData

public AtmosphereDataModelComponent AtmosphereData { get; }

Property Value

AtmosphereDataModelComponent

CoreCelestialBodyData

public CoreCelestialBodyData CoreCelestialBodyData { get; }

Property Value

CoreCelestialBodyData

HasPrimaryTarget

public bool HasPrimaryTarget { get; }

Property Value

bool

HasPrimaryTargetForRendering

public bool HasPrimaryTargetForRendering { get; }

Property Value

bool

HasSecondaryTarget

public bool HasSecondaryTarget { get; }

Property Value

bool

LightData

public LightData LightData { get; }

Property Value

LightData

PlanetSimBehavior

public CelestialBodyBehavior PlanetSimBehavior { get; }

Property Value

CelestialBodyBehavior

PrimaryTargetProvider

public PQSTargetProvider PrimaryTargetProvider { get; }

Property Value

PQSTargetProvider

ScaledRenderer

public MeshRenderer ScaledRenderer { get; }

Property Value

MeshRenderer

SecondaryTargetProvider

public PQSTargetProvider SecondaryTargetProvider { get; }

Property Value

PQSTargetProvider

VSPInstance

public Material VSPInstance { get; }

Property Value

Material

primaryTargetHeight

public double primaryTargetHeight { get; }

Property Value

double

primaryTargetObserverHeight

public double primaryTargetObserverHeight { get; }

Property Value

double

primaryTargetObserverTerrainHeight

public double primaryTargetObserverTerrainHeight { get; }

Property Value

double

relativePrimaryTargetObserverPosition

public Vector3d relativePrimaryTargetObserverPosition { get; }

Property Value

Vector3d

relativePrimaryTargetObserverPositionNormalized

public Vector3d relativePrimaryTargetObserverPositionNormalized { get; }

Property Value

Vector3d

relativePrimaryTargetPosition

public Vector3d relativePrimaryTargetPosition { get; }

Property Value

Vector3d

relativePrimaryTargetPositionNormalized

public Vector3d relativePrimaryTargetPositionNormalized { get; }

Property Value

Vector3d

relativePrimaryTargetPositionOnRadiusSphere

public Vector3d relativePrimaryTargetPositionOnRadiusSphere { get; }

Property Value

Vector3d

relativeSecondaryTargetPosition

public Vector3d relativeSecondaryTargetPosition { get; }

Property Value

Vector3d

secondaryTargetAltitude

public double secondaryTargetAltitude { get; }

Property Value

double

Methods

ActivateSphere()

public void ActivateSphere()

AddStats(StatCollection, int, int, int, int, int)

public void AddStats(PQS.StatCollection c, int total, int added, int destroyed, int cached, int changed)

Parameters

c PQS.StatCollection
total int
added int
destroyed int
cached int
changed int

AllocInterestPositions()

public NativeList<double3> AllocInterestPositions()

Returns

NativeList<double3>

DeactivateSphere()

public void DeactivateSphere()

GetAltitude(Vector3d)

public double GetAltitude(Vector3d worldPosition)

Parameters

worldPosition Vector3d

Returns

double

GetBiomeDataAtPosition(Vector3)

public PQSData.BiomeSurfaceData GetBiomeDataAtPosition(Vector3 pos)

Parameters

pos Vector3

Returns

PQSData.BiomeSurfaceData

GetBiomeMaskAtTextureCoordinate(Vector2)

public Color GetBiomeMaskAtTextureCoordinate(Vector2 texCoord)

Parameters

texCoord Vector2

Returns

Color

GetBiomeTextureWeights(int)

public Vector4 GetBiomeTextureWeights(int biomeIndex)

Parameters

biomeIndex int

Returns

Vector4

GetDominantBiomeIndexFromBiomeMask(Color)

public int GetDominantBiomeIndexFromBiomeMask(Color biomeMaskWeights)

Parameters

biomeMaskWeights Color

Returns

int

GetHeight(Vector2, Vector3)

public double GetHeight(Vector2 uv, Vector3 radialVector)

Parameters

uv Vector2
radialVector Vector3

Returns

double

GetRelativeAltitude(Vector3)

public double GetRelativeAltitude(Vector3 worldPosition)

Parameters

worldPosition Vector3

Returns

double

GetRelativeDirection(Vector3d)

public Vector3d GetRelativeDirection(Vector3d worldDirection)

Parameters

worldDirection Vector3d

Returns

Vector3d

GetRelativeDistance(Vector3)

public double GetRelativeDistance(Vector3 worldPosition)

Parameters

worldPosition Vector3

Returns

double

GetRelativeDistanceSqr(Vector3)

public double GetRelativeDistanceSqr(Vector3 worldDirection)

Parameters

worldDirection Vector3

Returns

double

GetRelativePosition(Vector3d)

public Vector3d GetRelativePosition(Vector3d worldPosition)

Parameters

worldPosition Vector3d

Returns

Vector3d

GetSurfaceHeight(Vector3d)

public double GetSurfaceHeight(Vector3d radialVector)

Parameters

radialVector Vector3d

Returns

double

GetTransition(bool)

public float GetTransition(bool scaled = false)

Parameters

scaled bool

Returns

float

GetVertexSphericalUVs(Vector3)

public Vector2 GetVertexSphericalUVs(Vector3 pos)

Parameters

pos Vector3

Returns

Vector2

GetWorldPosition(Vector3d)

public Vector3d GetWorldPosition(Vector3d localPosition)

Parameters

localPosition Vector3d

Returns

Vector3d

IsRunning()

public bool IsRunning()

Returns

bool

LineSphereIntersection(Vector3d, Vector3d, double, out Vector3d)

public static bool LineSphereIntersection(Vector3d relPos, Vector3d relVel, double radius, out Vector3d relIntersection)

Parameters

relPos Vector3d
relVel Vector3d
radius double
relIntersection Vector3d

Returns

bool

OnSettingChanged(Setting)

public void OnSettingChanged(Setting setting)

Parameters

setting Setting

RayIntersection(Vector3, Vector3, out double)

public bool RayIntersection(Vector3 worldStart, Vector3 worldDirection, out double intersectionDistance)

Parameters

worldStart Vector3
worldDirection Vector3
intersectionDistance double

Returns

bool

RayIntersection(Vector3, Vector3, out Vector3d)

public bool RayIntersection(Vector3 worldStart, Vector3 worldDirection, out Vector3d intersection)

Parameters

worldStart Vector3
worldDirection Vector3
intersection Vector3d

Returns

bool

RebuildSphere()

public void RebuildSphere()

SetCelestialBodyBehavior(CelestialBodyBehavior)

public void SetCelestialBodyBehavior(CelestialBodyBehavior cbBehavior)

Parameters

cbBehavior CelestialBodyBehavior

SetCoreCelestialBodyData(CoreCelestialBodyData)

public void SetCoreCelestialBodyData(CoreCelestialBodyData cbData)

Parameters

cbData CoreCelestialBodyData

SetLightData(LightData)

public void SetLightData(LightData lightData)

Parameters

lightData LightData

SetScaledAtmosphereTransition(float, float)

public void SetScaledAtmosphereTransition(float transition, float ditherScale)

Parameters

transition float
ditherScale float

SetScaledMeshTransition(float, float)

public void SetScaledMeshTransition(float transition, float ditherScale)

Parameters

transition float
ditherScale float

SetScaledSpaceMaterial(Material)

public void SetScaledSpaceMaterial(Material material)

Parameters

material Material

SetScaledSpaceRenderer(MeshRenderer)

public void SetScaledSpaceRenderer(MeshRenderer renderer)

Parameters

renderer MeshRenderer

SetSecondaryTarget(PQSTargetProvider)

public void SetSecondaryTarget(PQSTargetProvider targetProvider)

Parameters

targetProvider PQSTargetProvider

SetTarget(PQSTargetProvider)

public void SetTarget(PQSTargetProvider targetProvider)

Parameters

targetProvider PQSTargetProvider

Sync()

public void Sync()

SyncVSPMat()

protected void SyncVSPMat()

UpdateSphere()

public void UpdateSphere()

Events

SphereActivated

public event PQS.OnEvent SphereActivated

Event Type

PQS.OnEvent

SphereDeactivated

public event PQS.OnEvent SphereDeactivated

Event Type

PQS.OnEvent

onDestroyed

public event PQS.OnEvent onDestroyed

Event Type

PQS.OnEvent

onStarted

public event PQS.OnEvent onStarted

Event Type

PQS.OnEvent

onUpdateFinished

public event PQS.OnEvent onUpdateFinished

Event Type

PQS.OnEvent