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
partsIEnumerable<PackInPart>The objects, placed in this order.
Exceptions
- ArgumentNullException
partsisnull.
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
Remarks
An object whose base is a part's is not disabled. The save records the objects as disabled.
Exceptions
- ArgumentNullException
partsisnull.
Parts
The objects, placed in this order.
public IReadOnlyList<PackInPart> Parts { get; }
Property Value
Exceptions
- ArgumentNullException
partsisnull.
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
Exceptions
- ArgumentNullException
partsisnull.
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
Exceptions
- ArgumentNullException
partsisnull.
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
tesTESThe game's world, which measures the ground.
positionNiPoint3The point the search starts from, which is tested first.
searchRadiusfloatThe farthest horizontal distance from
positionthat 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
searchRadiusis 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
tesTESThe game's world, which measures the ground.
originNiPoint3The point the parts are offset from, on the ground, as
PlacePackInAsyncreceives it.
Returns
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
partsisnull.