Interface: IMutableVolumeTextureSlab<TextureType>
A texture whose basis point moves.
A slab of this kind holds two textures. The owner writes the back texture and a draw reads the front texture, so a re-point never tears an image that a draw is reading. A slab is small — the worked example uses 25 frames — so the second texture costs little beside the problems that it removes.
The owner drives the state. It calls beginRender when a draw starts and
endRender when that draw stops, and no other party may do so.
Type Parameters
• TextureType = unknown
Properties
bytes
readonlybytes:number
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:65
dirty
dirty:
BoundsIJK[]
The regions of the back texture that must refill.
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:77
grid
readonlygrid:VoxelGrid
The grid of the front texture, which is what a draw reads.
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:69
hasPendingFill
readonlyhasPendingFill:boolean
True while the back texture holds a fill that nothing published yet.
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:75
id
readonlyid:string
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:62
inFlight
readonlyinFlight:boolean
True while a draw reads the front texture.
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:73
mutability
readonlymutability:"owned"
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:63
ownerId
readonlyownerId:string
The one owner of this slab, which is a viewport in this version.
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:67
pendingGrid
readonlypendingGrid:VoxelGrid
The grid of the back texture, which the owner writes.
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:71
statistic
readonlystatistic:VoxelStatistic
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:64
Methods
beginRender()
beginRender():
TextureType
The owner states that a draw starts, and takes the front texture.
Returns
TextureType
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:93
endRender()
endRender():
void
The owner states that the draw stopped.
Returns
void
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:95
publish()
publish():
boolean
Publishes the back texture, so the next draw reads it.
A publish while a draw is in flight defers the exchange to endRender,
because the exchange would otherwise take the texture out from under that
draw.
Returns
boolean
true when the exchange happened now
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:91
retarget()
retarget(
grid):void
Points the back texture at a new basis. A draw reads the front, so this is safe.
Parameters
• grid: VoxelGrid
Returns
void
Defined in
packages/core/src/cache/classes/VolumeTextureSet.ts:79
writeTarget()
writeTarget():
TextureType
The back texture, which the owner fills.
Returns
TextureType