CLASSES
TagsA - Z

CSG

Description

class CSG

Members

matrix : Matrix

The matrix

position : Vector3

The position

rotation : Vector3

The rotation

rotationQuaternion : Quaternion

scaling : Vector3

The scaling

Methods

static FromMesh(mesh) CSG

Convert Mesh to CSG

Parameters

Name Type Description
mesh Mesh @param mesh

clone() CSG

Clone this CSG

union(csg) CSG

Union the CSG

Parameters

Name Type Description
csg CSG @param csg

unionInPlace(csg) void

Union in place

Parameters

Name Type Description
csg CSG @param csg

subtract(csg) CSG

Subtract the CSG

Parameters

Name Type Description
csg CSG @param csg

subtractInPlace(csg) void

Subtract in place

Parameters

Name Type Description
csg CSG @param csg

intersect(csg) CSG

Intersect first solid with the second

Parameters

Name Type Description
csg CSG @param csg

intersectInPlace(csg) void

Intersect in place

Parameters

Name Type Description
csg CSG @param csg

inverse() CSG

Return a new CSG solid with solid and empty space swtiched. This solid is not modified.

inverseInPlace() void

Inverse in place

copyTransformAttributes(csg) CSG

This is used to keep meshes transformations so they can be restored when we build back a Mesh NB : All CSG operations are performed in world coordinates

Parameters

Name Type Description
csg CSG @param csg

buildMeshGeometry(name, scene, keepSubMeshes) Mesh

Build raw mesh from CSG Coordinates here are in world space

Parameters

Name Type Description
name string @param name
scene Scene @param scene
keepSubMeshes boolean @param keepSubMeshes

toMesh(name, material, scene, keepSubMeshes) Mesh

Parameters

Name Type Description
name string @param name
material Material @param material
scene Scene @param scene