Bug 1458

Summary: GraphUI Z-Epsilon Support: Expose Z-Epsilon API in Scene and utilization in Button
Product: [JogAmp] GraphUI Reporter: Sven Gothel <sgothel>
Component: CoreAssignee: Sven Gothel <sgothel>
Severity: normal    
Priority: P4    
Version: 2.6.0   
Hardware: All   
OS: all   
bc4a97a3751b32a7825a41481959f04ff3efb3d2 d5b17eddf7e7f1c33b269a3a2ed8eca959c6d639
Workaround: ---
Bug Depends on:    
Bug Blocks: 1454    

Description Sven Gothel 2023-09-24 01:49:29 CEST
Z-Epsilon is approximately the smallest Z value recognized by the graphics stack
to make a difference in Z positioning.

Z-Epsilon depends on the current projection matrix,
i.e. Z distance of the viewer.
See http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html

z_epsilon = z * z / ( zNear * ( 1 << zBits ) - z );

We utilize Z-Epsilon as the smallest offset between the button background shape
and the label text.

We also utilize Z-Epsilon as the offset to elevate the active (selected) shape (add z-offset) and select (pick) in Z descending order (Bug 1454).
Comment 1 Sven Gothel 2023-09-24 01:50:43 CEST
GraphUI Scene: Expose Z-Epsilon API for default and current PMVMatrixSetup values; Button add Z-Epsilon API for ctor and setLabelZOffset(..)


GraphUI Enhance: API doc; Scene/Button Z-offset and -epsilon; Push temp AffineTransform to local method; Simplify BaseButton setCorner(0) -> setPerp(); Protected abstract ctor