CubemapFaceCoordsI

Description

struct Tinman.Terrain.Mapping.CubemapFaceCoordsI

Represents a point on a cubemap face with 32-bit integer precision.

Public / Constants

Undefined


public static readonly attribute Undefined → (CubemapFaceCoordsI)

Undefined set of cubemap face coordinates.

Zero


public static readonly attribute Zero → (CubemapFaceCoordsI)

Coordinates (0,0) on CubemapFace.NegZ.

Public / Constructors

Cubemap​Face​Coords​I


public constructor CubemapFaceCoordsI → (3)

in : int32

Cubemap face X-coordinate.

in : int32

Cubemap face Y-coordinate.

face opt : CubemapFace = CubemapFace.NegZ

The cubemap face.

Creates a new instance of CubemapFaceCoordsD.

Public / Methods

Clip


public method Clip → (2)

width in : int32

[>0]
Width of clip bounds.

height in : int32

[>0]
Height of clip bounds.

returns → CubemapFaceCoordsI

The resulting coordinates.

Clips these coordinates at the given bounds.

Shift


[Pure]
public method Shift → (1)

amount in : int32

The number of bits to shift leftwards. Specify a negative number for shifting rightwards.

returns → CubemapFaceCoordsI

The shifted coordinates.

Shifts the cubemap face coordinates.

Wrap


public method Wrap → (1)

in : int32

Maximum cubemap coordinate.

returns → CubemapFaceCoordsI

The resulting coordinates.

Wraps these coordinates around the cubemap edges if necessary.

Public / Attributes

Face


public readonly attribute Face → (CubemapFace)

The cubemap face.

Is​Undefined


public attribute IsUndefined → (get)

value : bool

true if the coordinates are undefined, false if not.

Is this an undefined set of cubemap face coordinates?

X


public readonly attribute X → (int32)

Cubemap face X-coordinate.

XY


public attribute XY → (get)

value : Vec2I

The coordinates.

Returns the face X- and Y-coordinates.

Y


public readonly attribute Y → (int32)

Cubemap face Y-coordinate.

Configuration

Config


public static attribute Config → (get)

value : IConfigurator<CubemapFaceCoordsI>

[not-null]
The configurator object.

The configurator object for this type.

Serialization

Serializer


public static readonly attribute Serializer → (ITypeSerializerEx<CubemapFaceCoordsI>)

The serialization helper object for values of CubemapFaceCoordsI.