Table of Contents

Class FootprintData

Namespace
MoonBark.GridPlacement.Core.Data.Placement
Assembly
MoonBark.GridPlacement.Core.dll

Core footprint data without Godot dependencies. Describes the space occupied by a building or object.

public class FootprintData
Inheritance
FootprintData
Inherited Members

Properties

CanFlip

Whether the footprint can be flipped.

public bool CanFlip { get; set; }

Property Value

bool

CanRotate

Whether the footprint can be rotated.

public bool CanRotate { get; set; }

Property Value

bool

Id

Unique identifier for the footprint.

public string Id { get; set; }

Property Value

string

Offset

Offset from the origin position.

public CoreVector2I Offset { get; set; }

Property Value

CoreVector2I

PolygonPoints

Custom polygon points for complex shapes. Used when ShapeType is Custom.

public List<CoreVector2I> PolygonPoints { get; set; }

Property Value

List<CoreVector2I>

Radius

Radius for circular shapes. Used when ShapeType is Circle.

public int Radius { get; set; }

Property Value

int

ShapeType

Type of footprint shape.

public FootprintShapeType ShapeType { get; set; }

Property Value

FootprintShapeType

Size

Size of the footprint in grid units.

public CoreVector2I Size { get; set; }

Property Value

CoreVector2I

Methods

GetOccupiedPositions(CoreVector2I, int, bool, bool)

Gets the footprint positions at a given grid position.

public List<CoreVector2I> GetOccupiedPositions(CoreVector2I gridPosition, int rotation = 0, bool flipHorizontal = false, bool flipVertical = false)

Parameters

gridPosition CoreVector2I

The base grid position

rotation int

Rotation in degrees (0, 90, 180, 270)

flipHorizontal bool

Whether to flip horizontally

flipVertical bool

Whether to flip vertically

Returns

List<CoreVector2I>

List of occupied grid positions