reckfellENGINE

PlaneMesh

Rectangular grid with selectable normal axis and local center.

On this page
class PlaneMeshReckfellSharpInherits PrimitiveMesh

PlaneMesh generates one rectangular surface. Orientation selects the normal axis, Size gives the two dimensions and CenterOffset shifts vertices. With w = SubdivideWidth and d = SubdivideDepth the grid has (w + 2) * (d + 2) vertices and 2 * (w + 1) * (d + 1) triangles.

This is not automatically a double-sided or infinite surface. Material, AddUV2 and UV2Padding are inherited from PrimitiveMesh. See LightmapGI for lighting; representing thickness in volumetric GI requires additional geometry.

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

Constructors1

PlaneMeshConstructor
# PlaneMesh
C#
public PlaneMesh();

Creates a 2×2 XZ rectangle with normal +Y, centered at (0, 0, 0). Without subdivisions it has 4 vertices and 2 triangles. It has zero thickness; a wall, physics shape or closed volume needs the corresponding additional setup.

Properties5

CenterOffsetProperty
# CenterOffset
C#
public Vector3 CenterOffset { get; set; }

Local offset applied to every vertex, default (0, 0, 0). Changes geometry and its Aabb within the resource, not MeshInstance3D Position. A shared resource applies the change to every instance.

OrientationProperty
# Orientation
C#
public PlaneMesh.OrientationEnum Orientation { get; set; }

Positive normal axis: X, Y or Z; defaults to Y. Y creates an XZ plane, X a YZ plane and Z an XY plane. Changes resource geometry, not instance Transform. Supply a valid enum value; back-side visibility and double-sided rendering depend on orientation and material.

SizeProperty
# Size
C#
public Vector2 Size { get; set; }

Two full rectangle dimensions, default (2, 2). With Orientation Y, size X maps to local X and size Y to local Z; with X they map to Z and Y; with Z to X and Y. These are resource-local axes, not the Entity world rotation. Use finite positive dimensions. Changes update geometry and the lightmap hint when AddUV2 is enabled.

SubdivideDepthProperty
# SubdivideDepth
C#
public int SubdivideDepth { get; set; }

Additional cuts along the second Size.Y direction, default 0. Negative input is stored as 0. This is not necessarily local Z: with Orientation X or Z the second direction is Y. Segment count is value + 1.

SubdivideWidthProperty
# SubdivideWidth
C#
public int SubdivideWidth { get; set; }

Additional cuts along the first Size.X direction, default 0. Negative input is stored as 0. Segment count is value + 1; the corresponding local XYZ axis depends on Orientation. Regenerates geometry without changing dimensions.

Methods10

GetCenterOffsetVector3
# GetCenterOffset
C#
public Vector3 GetCenterOffset();

Returns CenterOffset. Local offset applied to every vertex, default (0, 0, 0). Changes geometry and its Aabb within the resource, not MeshInstance3D Position. A shared resource applies the change to every instance.

Returns Vector3

Current CenterOffset in the mesh resource.

GetOrientationPlaneMesh.OrientationEnum
# GetOrientation
C#
public PlaneMesh.OrientationEnum GetOrientation();

Returns Orientation. Positive normal axis: X, Y or Z; defaults to Y. Y creates an XZ plane, X a YZ plane and Z an XY plane. Changes resource geometry, not instance Transform. Supply a valid enum value; back-side visibility and double-sided rendering depend on orientation and material.

Returns PlaneMesh.OrientationEnum

Current Orientation in the mesh resource.

GetSizeVector2
# GetSize
C#
public Vector2 GetSize();

Returns Size. Two full rectangle dimensions, default (2, 2). With Orientation Y, size X maps to local X and size Y to local Z; with X they map to Z and Y; with Z to X and Y. These are resource-local axes, not the Entity world rotation. Use finite positive dimensions. Changes update geometry and the lightmap hint when AddUV2 is enabled.

Returns Vector2

Current Size in the mesh resource.

GetSubdivideDepthint
# GetSubdivideDepth
C#
public int GetSubdivideDepth();

Returns SubdivideDepth. Additional cuts along the second Size.Y direction, default 0. Negative input is stored as 0. This is not necessarily local Z: with Orientation X or Z the second direction is Y. Segment count is value + 1.

Returns int

Current SubdivideDepth in the mesh resource.

GetSubdivideWidthint
# GetSubdivideWidth
C#
public int GetSubdivideWidth();

Returns SubdivideWidth. Additional cuts along the first Size.X direction, default 0. Negative input is stored as 0. Segment count is value + 1; the corresponding local XYZ axis depends on Orientation. Regenerates geometry without changing dimensions.

Returns int

Current SubdivideWidth in the mesh resource.

SetCenterOffsetvoid
# SetCenterOffset
C#
public void SetCenterOffset(Vector3 offset);

Sets CenterOffset. Local offset applied to every vertex, default (0, 0, 0). Changes geometry and its Aabb within the resource, not MeshInstance3D Position. A shared resource applies the change to every instance.

Parameters
NameTypeDefault
offsetVector3—
offset

New CenterOffset value, applied to the resource rather than one instance.

SetOrientationvoid
# SetOrientation
C#
public void SetOrientation(PlaneMesh.OrientationEnum orientation);

Sets Orientation. Positive normal axis: X, Y or Z; defaults to Y. Y creates an XZ plane, X a YZ plane and Z an XY plane. Changes resource geometry, not instance Transform. Supply a valid enum value; back-side visibility and double-sided rendering depend on orientation and material.

Parameters
NameTypeDefault
orientationPlaneMesh.OrientationEnum—
orientation

New Orientation value, applied to the resource rather than one instance.

SetSizevoid
# SetSize
C#
public void SetSize(Vector2 size);

Sets Size. Two full rectangle dimensions, default (2, 2). With Orientation Y, size X maps to local X and size Y to local Z; with X they map to Z and Y; with Z to X and Y. These are resource-local axes, not the Entity world rotation. Use finite positive dimensions. Changes update geometry and the lightmap hint when AddUV2 is enabled.

Parameters
NameTypeDefault
sizeVector2—
size

New Size value, applied to the resource rather than one instance.

SetSubdivideDepthvoid
# SetSubdivideDepth
C#
public void SetSubdivideDepth(int subdivide);

Sets SubdivideDepth. Additional cuts along the second Size.Y direction, default 0. Negative input is stored as 0. This is not necessarily local Z: with Orientation X or Z the second direction is Y. Segment count is value + 1.

Parameters
NameTypeDefault
subdivideint—
subdivide

New SubdivideDepth value, applied to the resource rather than one instance.

SetSubdivideWidthvoid
# SetSubdivideWidth
C#
public void SetSubdivideWidth(int subdivide);

Sets SubdivideWidth. Additional cuts along the first Size.X direction, default 0. Negative input is stored as 0. Segment count is value + 1; the corresponding local XYZ axis depends on Orientation. Regenerates geometry without changing dimensions.

Parameters
NameTypeDefault
subdivideint—
subdivide

New SubdivideWidth value, applied to the resource rather than one instance.

PlaneMesh.OrientationEnum

ValueDescription
X = 0

Normal points along +X; the rectangle lies in local YZ.

Y = 1

Normal points along +Y; the rectangle lies in local XZ.

Z = 2

Normal points along +Z; the rectangle lies in local XY.

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.