Class: Surface
Surface class for storing surface data Each Surface represents a single segment in a 3D volume.
Constructors
new Surface()
new Surface(
props):Surface
Creates an instance of Surface.
Parameters
• props: SurfaceData
The properties to initialize the Surface with.
Returns
Defined in
packages/core/src/cache/classes/Surface.ts:23
Properties
frameOfReferenceUID
readonlyframeOfReferenceUID:string
Defined in
packages/core/src/cache/classes/Surface.ts:12
id
readonlyid:string
Defined in
packages/core/src/cache/classes/Surface.ts:10
sizeInBytes
readonlysizeInBytes:number
Defined in
packages/core/src/cache/classes/Surface.ts:11
Accessors
centroid
getcentroid():Point3
Gets the centroid of the surface.
Returns
The centroid of the surface.
Defined in
packages/core/src/cache/classes/Surface.ts:127
color
getcolor():RGB
Gets the color of the surface.
setcolor(color):void
Sets the color of the surface.
Parameters
• color: RGB
The new color for the surface.
Returns
The color of the surface.
Defined in
packages/core/src/cache/classes/Surface.ts:70
flatPointsArray
getflatPointsArray():number[]
Gets a flat array of all points.
Returns
number[]
A flat array of all points.
Defined in
packages/core/src/cache/classes/Surface.ts:135
points
getpoints():number[]
Gets the points of the surface.
setpoints(points):void
Sets the points of the surface and updates the centroid.
Parameters
• points: number[]
The new points for the surface.
Returns
number[]
The points of the surface.
Defined in
packages/core/src/cache/classes/Surface.ts:86
polys
getpolys():number[]
Gets the polygons of the surface.
setpolys(polys):void
Sets the polygons of the surface.
Parameters
• polys: number[]
The new polygons for the surface.
Returns
number[]
The polygons of the surface.
Defined in
packages/core/src/cache/classes/Surface.ts:103
segmentIndex
getsegmentIndex():number
Gets the segment index of the surface.
Returns
number
The segment index of the surface.
Defined in
packages/core/src/cache/classes/Surface.ts:119
totalNumberOfPoints
gettotalNumberOfPoints():number
Gets the total number of points in the surface.
Returns
number
The total number of points.