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

HermiteDataHelper

Extends:

three~Group → HermiteDataHelper

A Hermite data helper.

Static Member Summary

Static Public Members
public static set

Sets the material value for grid points that represent air.

Constructor Summary

Public Constructor
public

constructor(cellPosition: Vector3, cellSize: Number, data: HermiteData, useMaterialIndices: Boolean, useEdgeData: Boolean)

Constructs a new Hermite data helper.

Member Summary

Public Members
public

cellPosition: Vector3

The position of the volume data cell.

public

The size of the volume data cell.

public

The volume data.

public get

edges: Group

The edges.

public get

gridPoints: Group

The grid points.

public

The name of this object.

public get

normals: Group

The normals.

public

pointsMaterial: PointsMaterial

The material of the grid points.

Method Summary

Public Methods
public

Destroys the current helper geometry.

public

set(cellPosition: Vector3, cellSize: Number, data: HermiteData): HermiteDataHelper

Sets the cell position, size and data.

public

update(useMaterialIndices: Boolean, useEdgeData: Boolean): HermiteDataHelper

Creates the helper geometry.

Static Public Members

public static set air: Material source

Sets the material value for grid points that represent air.

Public Constructors

public constructor(cellPosition: Vector3, cellSize: Number, data: HermiteData, useMaterialIndices: Boolean, useEdgeData: Boolean) source

Constructs a new Hermite data helper.

Params:

NameTypeAttributeDescription
cellPosition Vector3

The position of the volume data cell.

cellSize Number

The size of the volume data cell.

data HermiteData

The volume data. Must be uncompressed.

useMaterialIndices Boolean
  • optional
  • default: false

Whether points should be created for solid material indices.

useEdgeData Boolean
  • optional
  • default: true

Whether edges with intersection points and normals should be created.

Public Members

public cellPosition: Vector3 source

The position of the volume data cell.

public cellSize: Number source

The size of the volume data cell.

public data: HermiteData source

The volume data.

public get edges: Group source

The edges.

public get gridPoints: Group source

The grid points.

public name: string source

The name of this object.

public get normals: Group source

The normals.

public pointsMaterial: PointsMaterial source

The material of the grid points.

Public Methods

public dispose() source

Destroys the current helper geometry.

public set(cellPosition: Vector3, cellSize: Number, data: HermiteData): HermiteDataHelper source

Sets the cell position, size and data.

Params:

NameTypeAttributeDescription
cellPosition Vector3

The position of the volume data cell.

cellSize Number

The size of the volume data cell.

data HermiteData

The volume data. Must be uncompressed.

Return:

HermiteDataHelper

This helper.

public update(useMaterialIndices: Boolean, useEdgeData: Boolean): HermiteDataHelper source

Creates the helper geometry.

Params:

NameTypeAttributeDescription
useMaterialIndices Boolean
  • optional
  • default: false

Whether points should be created for solid material indices.

useEdgeData Boolean
  • optional
  • default: true

Whether edges with intersection points and normals should be created.

Return:

HermiteDataHelper

This helper.

Throw:

Error

Throws an error if the current cell position, cell size or data is invalid.