reckfellENGINE

OccluderPolygon2D

Defines a 2D polygon for LightOccluder2D.

On this page
class OccluderPolygon2DReckfellSharpInherits Resource

Defines a 2D polygon for LightOccluder2D.

Editor facility that helps you draw a 2D polygon used as resource for LightOccluder2D.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

OccluderPolygon2DConstructor
# OccluderPolygon2D
C#
public OccluderPolygon2D();

Properties3

ClosedProperty
# Closed
C#
public bool Closed { get; set; }

If true, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction.

CullModeProperty
# CullMode
C#
public OccluderPolygon2D.CullModeEnum CullMode { get; set; }

The culling mode to use.

PolygonProperty
# Polygon
C#
public Vector2[] Polygon { get; set; }

A Vector2 array with the index for polygon's vertices positions.

Methods7

GetCullModeOccluderPolygon2D.CullModeEnum
# GetCullMode
C#
public OccluderPolygon2D.CullModeEnum GetCullMode();
Returns OccluderPolygon2D.CullModeEnum
GetPolygonVector2[]
# GetPolygon
C#
public Vector2[] GetPolygon();
Returns Vector2[]
IsClosedbool
# IsClosed
C#
public bool IsClosed();
Returns bool
SetClosedvoid
# SetClosed
C#
public void SetClosed(bool closed);
Parameters
NameTypeDefault
closedbool—
SetCullModevoid
# SetCullMode
C#
public void SetCullMode(OccluderPolygon2D.CullModeEnum cullMode);
Parameters
NameTypeDefault
cullModeOccluderPolygon2D.CullModeEnum—
SetPolygon2 overloads
# SetPolygon · 1/2
C#
public void SetPolygon(Vector2[] polygon);
Parameters
NameTypeDefault
polygonVector2[]—
# SetPolygon · 2/2
C#
public void SetPolygon(ReadOnlySpan<Vector2> polygon);
Parameters
NameTypeDefault
polygonReadOnlySpan<Vector2>—

OccluderPolygon2D.CullModeEnum

ValueDescription
Clockwise = 1

Culling is performed in the clockwise direction. See OccluderPolygon2D.CullMode.

CounterClockwise = 2

Culling is performed in the counterclockwise direction. See OccluderPolygon2D.CullMode.

Disabled = 0

Culling is disabled. See OccluderPolygon2D.CullMode.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.