Show / Hide Table of Contents

Class RoomTemplateGrid2D

Represents a room template - an outline of a room together with all possible door positions.

Inheritance
System.Object
RoomTemplateGrid2D
Namespace: Edgar.GraphBasedGenerator.Grid2D
Assembly: Edgar.dll
Syntax
public class RoomTemplateGrid2D : Object

Constructors

RoomTemplateGrid2D(PolygonGrid2D, IDoorModeGrid2D, String, Nullable<RoomTemplateRepeatMode>, List<TransformationGrid2D>)

Declaration
public RoomTemplateGrid2D(PolygonGrid2D outline, IDoorModeGrid2D doors, string name = null, Nullable<RoomTemplateRepeatMode> repeatMode = null, List<TransformationGrid2D> allowedTransformations = null)
Parameters
Type Name Description
PolygonGrid2D outline

See the Outline property.

IDoorModeGrid2D doors

See the Doors property.

System.String name

See the Name property.

System.Nullable<RoomTemplateRepeatMode> repeatMode

See the RepeatMode property.

System.Collections.Generic.List<TransformationGrid2D> allowedTransformations

See the AllowedTransformations property.

Properties

AllowedTransformations

How can the room template be transformed.

Declaration
public List<TransformationGrid2D> AllowedTransformations { get; }
Property Value
Type Description
System.Collections.Generic.List<TransformationGrid2D>
Remarks

By default only the Identity transformation is enabled which means that the room template stays as is. If e.g. the Rotate90 transformation is allowed, the generator may decide to rotate the room when it tries to find a valid layout.

See TransformationGrid2D.

Doors

Available door positions of the room template.

Declaration
public IDoorModeGrid2D Doors { get; }
Property Value
Type Description
IDoorModeGrid2D
Remarks

See SimpleDoorModeGrid2D or ManualDoorModeGrid2D for available door modes.

Name

Name of the room template.

Declaration
public string Name { get; }
Property Value
Type Description
System.String
Remarks

Used mainly for debugging purposes.

Outline

Outline of the room template.

Declaration
public PolygonGrid2D Outline { get; }
Property Value
Type Description
PolygonGrid2D

RepeatMode

Settings regarding if the room template can be used multiple times in a level.

Declaration
public Nullable<RoomTemplateRepeatMode> RepeatMode { get; }
Property Value
Type Description
System.Nullable<RoomTemplateRepeatMode>
Remarks

See RoomTemplateRepeatMode.

Back to top Generated by DocFX