Home Reference Source
import {ConstructiveSolidGeometry} from 'rabbit-hole'
public class | source

ConstructiveSolidGeometry

Constructive Solid Geometry combines Signed Distance Functions by using Boolean operators to generate and transform volume data.

Static Method Summary

Static Public Methods
public static

Transforms the given Hermite data in two steps:

Static Public Methods

public static run(min: Number[], size: Number, data: HermiteData, sdf: SignedDistanceFunction): HermiteData source

Transforms the given Hermite data in two steps:

  1. Generate data by executing the given SDF
  2. Combine the generated data with the given data

Params:

NameTypeAttributeDescription
min Number[]

The lower bounds of the volume data cell.

size Number

The size of the volume data cell.

data HermiteData

The volume data that should be modified.

sdf SignedDistanceFunction

An SDF.

Return:

HermiteData

The modified, uncompressed data or null if the result is empty.