Class CbtrPickable
public class CbtrPickable : Pickable, IGetPickable, IDisposable
- Inheritance
-
CbtrPickable
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
CbtrPickable()
Initializes a new instance of the CbtrPickable class with default white color.
public CbtrPickable()
CbtrPickable(vec3f_t)
Initializes a new instance of the CbtrPickable class with specified color.
public CbtrPickable(vec3f_t rgb)
Parameters
rgbvec3f_tThe RGB color for the pickable object.
CbtrPickable(vec3f_t, int)
Initializes a new instance with a bucket-count hint for the native node map. The default map is sized for an attachment that spans a tree (1024 buckets, 8-16 KB: the workpiece base); an attachment that holds one leaf plus the stems that pick it as dominant, such as a Diff leaf, passes 1, and so does a strip position (play-core migration p17b): born small, a position's map is grown by the attach of the nodes its step cuts and shrunk to them right after, so a play without a workpiece tree – no attach, no shrink – keeps no 1024-bucket table per position.
protected CbtrPickable(vec3f_t rgb, int nodeMapBucketHint)
Parameters
rgbvec3f_tThe RGB color for the pickable object.
nodeMapBucketHintintInitial bucket count of the native attached-node map.
Properties
AttachedNodeCount
Internal Use Only (p17b). The entries the native map holds (cbtr_attachment__node_map_size, under the map's
mutex): the nodes carrying this attachment, plus the entries of nodes that died without erasing themselves (an
attachment that outlives its tree keeps them until it is disposed) and of nodes detached from it under the tree's
gate (DetachUnderWriteGate(IReadOnlyCollection<CbtrPickable>): the node's pointer is nulled, the entry stays until the dispose)
– the count behind IsAttached; 0 once disposed.
public int AttachedNodeCount { get; }
Property Value
AttachmentPriority
The color and Pickable priority if several attachments occupied at the same pixel. NAN is the lowest priority. the smaller number is the lower priority.
public virtual double AttachmentPriority { get; set; }
Property Value
IsAttached
Internal Use Only. Whether any cube-tree node carries this attachment
(cbtr_attachment__is_attached: the native node map is not empty) – true after a cut that
modified nodes, still true after a shrink, false once disposed. A flag, not a count: the native
side answers 0 / 1. Read by the facts that pin the geometry step's attach (play-core migration P13).
public bool IsAttached { get; }
Property Value
IsColorTableCovered
True when this attachment's color is served by the native attachment color table, i.e. a Rgb change reaches the screen without cleaning the affected drawing caches. When false (no picking id, or the id exceeds the table ceiling) callers must keep the legacy CleanAttachedCbtrNodesDrawingCache() after a recolor.
public bool IsColorTableCovered { get; }
Property Value
NativeAttachmentHandle
Internal Use Only (play-core migration P17). The native attachment's handle as the machining pipeline's in-record
carries it (attachment): a step's position is made before its submit and retired after the drain, so the
pool reads the attachment only inside the step's cut; Zero for none.
public nint NativeAttachmentHandle { get; }
Property Value
NodeMapBucketCount
Internal Use Only (play-core migration p17b). The bucket count of the native map of the nodes carrying this
attachment (cbtr_attachment__node_map_bucket_count, read under the map's own mutex): the size the map was
born at or grew to – a map always has at least one bucket – and what ShrinkToFitNodeMap() brought it
down to; 0 once disposed. Read by the facts that pin a strip position born without a tree holding a small map.
public int NodeMapBucketCount { get; }
Property Value
Rgb
Color RGB.
public virtual vec3d_t Rgb { get; set; }
Property Value
Methods
CleanAttachedCbtrNodesDrawingCache()
CleanAttachedNodesDrawingCache. Not thread safe with substraction process.
public void CleanAttachedCbtrNodesDrawingCache()
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposingbool
Highlight(bool)
Highlight the CbtrPickable by triangles line. Only one CbtrPickable can be highlighted on a CubeTree.
public void Highlight(bool b)
Parameters
bboolhighligt or not
OnMouseEnter(ui_event_type, DispEngine)
Behavior on mouse enter
public override void OnMouseEnter(ui_event_type e, DispEngine dispEngine)
Parameters
eui_event_typeevent type
dispEngineDispEnginedisplay engine
OnMouseLeave(ui_event_type, DispEngine)
Behavior on mouse leave
public override void OnMouseLeave(ui_event_type e, DispEngine dispEngine)
Parameters
eui_event_typeevent type
dispEngineDispEnginedisplay engine
ShrinkToFitNodeMap()
Shrinks the native map of the nodes carrying this attachment to its size: the map the cuts
grew is rehashed to what it holds. Serialised against the subtraction and the node erase by
the attachment's own mutex (since 2026-06), so it may run while another thread cuts; the
play pipeline runs it inside the geometry step of the position's own cut since play-core
migration P13 (machining_geom_step__run), and ClStrip.ShrinkAttachmentMemory
runs it over every position on a tool change.
public void ShrinkToFitNodeMap()