Table of Contents

Class PackIn

Namespace
SkyrimForge.Game
Assembly
SkyrimForge.Game.dll

A group of objects placed at offsets from one point, each laid on the ground, as a pack-in of the Creation Kit is.

public sealed class PackIn
Inheritance
PackIn
Inherited Members

Constructors

PackIn(IEnumerable<PackInPart>)

A group of objects placed at offsets from one point, each laid on the ground, as a pack-in of the Creation Kit is.

public PackIn(IEnumerable<PackInPart> parts)

Parameters

parts IEnumerable<PackInPart>

The objects, placed in this order.

Exceptions

ArgumentNullException

parts is null.

Properties

DisabledVegetationRadius

The radius around the origin in which vegetation is disabled before the parts are placed. Zero disables none.

public float DisabledVegetationRadius { get; init; }

Property Value

float

Remarks

An object whose base is a part's is not disabled. The save records the objects as disabled.

Exceptions

ArgumentNullException

parts is null.

Parts

The objects, placed in this order.

public IReadOnlyList<PackInPart> Parts { get; }

Property Value

IReadOnlyList<PackInPart>

Exceptions

ArgumentNullException

parts is null.

RayEndDepth

The distance below each object's position at which the ground ray ends. 600 units by default.

public float RayEndDepth { get; init; }

Property Value

float

Exceptions

ArgumentNullException

parts is null.

RayStartHeight

The distance above each object's position at which the ground ray starts. 300 units by default.

public float RayStartHeight { get; init; }

Property Value

float

Exceptions

ArgumentNullException

parts is null.

Methods

FindSite(TES, NiPoint3, float)

Returns the nearest tested ground point within searchRadius of position at which FitsAt(TES, NiPoint3) returns true.

public NiPoint3? FindSite(TES tes, NiPoint3 position, float searchRadius)

Parameters

tes TES

The game's world, which measures the ground.

position NiPoint3

The point the search starts from, which is tested first.

searchRadius float

The farthest horizontal distance from position that is tested.

Returns

NiPoint3?

The point on the ground, to pass to PlacePackInAsync, or null where no point within the radius fits.

Remarks

The points lie about 200 units apart on rings 200 units apart, nearest ring first. Each ground ray lengthens by the point's distance from position, so ground sloping at up to 45 degrees is found. The ground is the highest collision surface, which can be a roof, a bridge, or an actor. Call on the game's thread.

Exceptions

ArgumentOutOfRangeException

searchRadius is negative.

FitsAt(TES, NiPoint3)

Returns whether each part with a MaximumTilt lies on ground within that limit when placed at origin.

public bool FitsAt(TES tes, NiPoint3 origin)

Parameters

tes TES

The game's world, which measures the ground.

origin NiPoint3

The point the parts are offset from, on the ground, as PlacePackInAsync receives it.

Returns

bool

Remarks

The ground is measured only where its cell is loaded, and a part with a tilt limit over unmeasured ground does not fit. Call on the game's thread.

Exceptions

ArgumentNullException

parts is null.