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
CanRotate
Whether the footprint can be rotated.
public bool CanRotate { get; set; }
Property Value
Id
Unique identifier for the footprint.
public string Id { get; set; }
Property Value
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
ShapeType
Type of footprint shape.
public FootprintShapeType ShapeType { get; set; }
Property Value
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
gridPositionCoreVector2IThe base grid position
rotationintRotation in degrees (0, 90, 180, 270)
flipHorizontalboolWhether to flip horizontally
flipVerticalboolWhether to flip vertically
Returns
- List<CoreVector2I>
List of occupied grid positions