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:24
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:144
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:72
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:152
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:88
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:105
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:121
totalNumberOfPoints
gettotalNumberOfPoints():number
Gets the total number of points in the surface.
Returns
number
The total number of points.
Defined in
packages/core/src/cache/classes/Surface.ts:160
visible
getvisible():boolean
Gets the visibility of the surface.
setvisible(visible):void
Sets the visibility of the surface.
Parameters
• visible: boolean
The new visibility for the surface.
Returns
boolean