reckfellENGINE

CsgMesh3D

A CSG Mesh shape that uses a mesh resource.

On this page
class CsgMesh3DReckfellSharpInherits CsgPrimitive3D

A CSG Mesh shape that uses a mesh resource.

This CSG node allows you to use any mesh resource as a CSG shape, provided it is manifold. A manifold shape is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more than two faces. See also CsgPolygon3D for drawing 2D extruded polygons to be used as CSG nodes. Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a MeshInstance3D with a PrimitiveMesh. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.

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

Constructors1

CsgMesh3DConstructor
# CsgMesh3D
C#
public CsgMesh3D();

Properties2

MaterialProperty
# Material
C#
public Material Material { get; set; }

The Material used in drawing the CSG shape.

MeshProperty
# Mesh
C#
public Mesh Mesh { get; set; }

The Mesh resource to use as a CSG shape. Note: Some Mesh types such as PlaneMesh, PointMesh, QuadMesh, and RibbonTrailMesh are excluded from the type hint for this property, as these primitives are non-manifold and thus not compatible with the CSG algorithm. Note: When using an ArrayMesh, all vertex attributes except Mesh.ArrayType.Vertex, Mesh.ArrayType.Normal and Mesh.ArrayType.TexUV are left unused. Only Mesh.ArrayType.Vertex and Mesh.ArrayType.TexUV will be passed to the GPU. Mesh.ArrayType.Normal is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal.

Methods4

GetMaterialMaterial
# GetMaterial
C#
public Material GetMaterial();
Returns Material
GetMeshMesh
# GetMesh
C#
public Mesh GetMesh();
Returns Mesh
SetMaterialvoid
# SetMaterial
C#
public void SetMaterial(Material material);
Parameters
NameTypeDefault
materialMaterial—
SetMeshvoid
# SetMesh
C#
public void SetMesh(Mesh mesh);
Parameters
NameTypeDefault
meshMesh—
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.