Show / Hide Table of Contents

Class SimpleDoorModeGrid2D

Mode that is used to generate doors of a specified length on all sides of the polygon. The only condition is that doors are at least CornerDistance tiles far from corners.

Inheritance
System.Object
SimpleDoorModeGrid2D
Implements
IDoorModeGrid2D
IDoorMode<DoorLineGrid2D, PolygonGrid2D>
Namespace: Edgar.GraphBasedGenerator.Grid2D
Assembly: Edgar.dll
Syntax
public class SimpleDoorModeGrid2D : Object, IDoorModeGrid2D, IDoorMode<DoorLineGrid2D, PolygonGrid2D>

Constructors

SimpleDoorModeGrid2D(Int32, Int32, IDoorSocket)

Declaration
public SimpleDoorModeGrid2D(int doorLength, int cornerDistance, IDoorSocket doorSocket = null)
Parameters
Type Name Description
System.Int32 doorLength

See the DoorLength property.

System.Int32 cornerDistance

See the CornerDistance property.

IDoorSocket doorSocket

See the DoorSocket property.

Properties

CornerDistance

How far from the corners must the door be.

Declaration
public int CornerDistance { get; }
Property Value
Type Description
System.Int32

DoorLength

Length of doors.

Declaration
public int DoorLength { get; }
Property Value
Type Description
System.Int32

DoorSocket

Door socket. Only doors with the same socket (test with .Equals()) can be connected.

Declaration
public IDoorSocket DoorSocket { get; }
Property Value
Type Description
IDoorSocket

Methods

GetDoors(PolygonGrid2D)

Declaration
public List<DoorLineGrid2D> GetDoors(PolygonGrid2D roomShape)
Parameters
Type Name Description
PolygonGrid2D roomShape
Returns
Type Description
System.Collections.Generic.List<DoorLineGrid2D>

Implements

IDoorModeGrid2D
IDoorMode<TDoor, TRoomShape>
Back to top Generated by DocFX