FastUIDraw
Public Types | Public Member Functions | Public Attributes | List of all members
fastuidraw::PainterClipEquations Class Reference

A PainterClipEquations stores the clip equation for Painter. More...

#include <painter_clip_equations.hpp>

Public Types

enum  clip_equations_data_offset_t {
  clip0_coeff_x, clip0_coeff_y, clip0_coeff_w, clip1_coeff_x,
  clip1_coeff_y, clip1_coeff_w, clip2_coeff_x, clip2_coeff_y,
  clip2_coeff_w, clip3_coeff_x, clip3_coeff_y, clip3_coeff_w,
  clip_data_size
}
 Enumeration that provides offsets for the elements of the clip equation offsets in units of uint32_t. More...
 

Public Member Functions

 PainterClipEquations (void)
 
unsigned int data_size (void) const
 
void pack_data (c_array< uvec4 > dst) const
 

Public Attributes

vecN< vec3, 4 > m_clip_equations
 

Detailed Description

A PainterClipEquations stores the clip equation for Painter.

Each vec3 gives a clip equation in 3D API clip coordinats (i.e. after PainterItemMatrix transformation is applied) as dot(clip_vector, p) >= 0.

Definition at line 42 of file painter_clip_equations.hpp.

Member Enumeration Documentation

◆ clip_equations_data_offset_t

Enumeration that provides offsets for the elements of the clip equation offsets in units of uint32_t.

Enumerator
clip0_coeff_x 

offset to x-coefficient for clip equation 0 (i.e. m_clip_equations[0].x)

clip0_coeff_y 

offset to y-coefficient for clip equation 0 (i.e. m_clip_equations[0].y)

clip0_coeff_w 

offset to w-coefficient for clip equation 0 (i.e. m_clip_equations[0].z)

clip1_coeff_x 

offset to x-coefficient for clip equation 1 (i.e. m_clip_equations[1].x)

clip1_coeff_y 

offset to y-coefficient for clip equation 1 (i.e. m_clip_equations[1].y)

clip1_coeff_w 

offset to w-coefficient for clip equation 1 (i.e. m_clip_equations[1].z)

clip2_coeff_x 

offset to x-coefficient for clip equation 2 (i.e. m_clip_equations[2].x)

clip2_coeff_y 

offset to y-coefficient for clip equation 2 (i.e. m_clip_equations[2].y)

clip2_coeff_w 

offset to w-coefficient for clip equation 2 (i.e. m_clip_equations[2].z)

clip3_coeff_x 

offset to x-coefficient for clip equation 3 (i.e. m_clip_equations[3].x)

clip3_coeff_y 

offset to y-coefficient for clip equation 3 (i.e. m_clip_equations[3].y)

clip3_coeff_w 

offset to w-coefficient for clip equation 3 (i.e. m_clip_equations[3].z)

clip_data_size 

number of elements for clip equations

Definition at line 51 of file painter_clip_equations.hpp.

Constructor & Destructor Documentation

◆ PainterClipEquations()

fastuidraw::PainterClipEquations::PainterClipEquations ( void  )
inline

Ctor, initializes all clip equations as $ z \geq 0$

Definition at line 75 of file painter_clip_equations.hpp.

Member Function Documentation

◆ data_size()

unsigned int fastuidraw::PainterClipEquations::data_size ( void  ) const
inline

Returns the length of the data needed to encode the data. Data is padded to be multiple of 4.

Definition at line 91 of file painter_clip_equations.hpp.

◆ pack_data()

void fastuidraw::PainterClipEquations::pack_data ( c_array< uvec4 dst) const

Pack the values as according to clip_equations_data_offset_t

Parameters
dstplace to which to pack data

Member Data Documentation

◆ m_clip_equations

vecN<vec3, 4> fastuidraw::PainterClipEquations::m_clip_equations

Each element of m_clip_equations specifies a clipping plane in 3D API clip-space as

dot(m_clip_equations[i], p) >= 0

Definition at line 103 of file painter_clip_equations.hpp.


The documentation for this class was generated from the following file: