HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RV_RenderUI Class Reference

#include <RV_RenderUI.h>

+ Inheritance diagram for RV_RenderUI:

Public Member Functions

 RV_RenderUI ()
 
virtual ~RV_RenderUI ()
 
void prepare (fpreal xperpixel, fpreal yperpixel, fpreal xorigin, fpreal yorigin)
 
virtual void draw (RV_Render *r, bool pickpass=false, int pick_depthpass=0)
 Draw all buffered primitives. More...
 
virtual void clearAllData ()
 Clear all buffered data. Also called at the end of draw. More...
 
void bumpLayer (int delta)
 
virtual void setZStart (fpreal32 zStart)
 Z value for use as the base for another object. More...
 
fpreal32 getZStart () const
 
fpreal32 getZEnd () const
 
void incrementZEnd ()
 
void setViewProjection (const UT_Matrix4F &view, const UT_Matrix4F &proj)
 
void copyViewFromGL (RE_RenderContext r, const UT_Matrix4F &proj)
 
void copyViewProjectionFromGL (RE_RenderContext r)
 Helper to copy view/projection matrices from the current OpenGL state. More...
 
fpreal32 getXPerPixel () const
 Get x or y distance in current units that corresponds to 1 pixel. More...
 
fpreal32 getYPerPixel () const
 
fpreal32 getXOrigin () const
 
fpreal32 getYOrigin () const
 
void pushColor ()
 These are options that can change per-vertex. More...
 
void pushColor (const UT_Color &c, fpreal32 a=1.0f)
 
void pushColor (fpreal32 r, fpreal32 g, fpreal32 b, fpreal32 a=1.0f)
 
void setColor (const UT_Color &c, fpreal32 a=1.0f)
 
void setColor (fpreal32 r, fpreal32 g, fpreal32 b, fpreal32 a=1.0f)
 
void setAlpha (fpreal32 a)
 
void popColor ()
 
void getColor (UT_Color &c) const
 
fpreal32 getAlpha () const
 
void pushPointSize (fpreal32 size)
 
void setPointSize (fpreal32 size)
 
void popPointSize ()
 
void pushPick (UT_Vector3i pick_base_id, UT_Vector3i pick_component_id, bool high_priority=false)
 
void setPickHighPriority (bool high_priority)
 
void popPick ()
 
void pushLineSmoothing (bool smooth_lines)
 
void pushLineSmoothing ()
 
void setLineSmoothing (bool smooth_lines)
 
void popLineSmoothing ()
 
void pushLineStyle (RE_LineStyle style)
 
void pushLineStyle ()
 
void setLineStyle (RE_LineStyle style)
 
void popLineStyle ()
 
void pushLineWidth (fpreal32 width)
 
void pushLineWidth ()
 
void setLineWidth (fpreal32 width)
 
void popLineWidth ()
 
void beginTriangles ()
 
void endTriangles ()
 
void addTriangles (const UT_Vector2FArray &pts)
 
void addTriangles (const UT_Vector3FArray &pts)
 
void beginTriangleFan ()
 
void endTriangleFan ()
 
void addTriangleFan (const UT_Vector2FArray &pts)
 
void addTriangleFan (const UT_Vector3FArray &pts)
 
void beginTriMesh ()
 
void endTriMesh ()
 
void addTriMesh (const UT_Vector2FArray &pts)
 
void addTriMesh (const UT_Vector3FArray &pts)
 
void beginQuads ()
 
void endQuads ()
 
void addQuads (const UT_Vector2FArray &pts)
 
void addQuads (const UT_Vector3FArray &pts)
 
void beginQuadStrip ()
 
void endQuadStrip ()
 
void addQuadStrip (const UT_Vector2FArray &pts)
 
void addQuadStrip (const UT_Vector3FArray &pts)
 
void beginPolygon (int concave)
 
void endPolygon ()
 
void addPolygon (const UT_Vector2FArray &pts, int concave=0)
 
void addPolygon (const UT_Vector3FArray &pts, int concave=0)
 
void beginLine ()
 
void beginClosedLine ()
 
void endLine ()
 
void beginLines ()
 
void endLines ()
 
void addLine (const UT_Vector2FArray &pts, bool closed=false, bool segments=false)
 
void addLine (const UT_Vector3FArray &pts, bool closed=false, bool segments=false)
 
void beginPoint ()
 
void endPoint ()
 
void drawViewportPoint (const float vtx[3], fpreal32 size)
 
void drawViewportPoint (const UT_Vector3F &vtx, fpreal32 size)
 
void c3DW (const fpreal32 clr[3])
 Set vertex attributes. More...
 
void c4DW (const fpreal32 clr[4])
 
void v2DW (const fpreal32 vtx[2])
 Create vertices for primitives. More...
 
void v2DI (const int vtx[2])
 
void vertex2DW (fpreal32 x, fpreal32 y)
 
void vertex2DI (int x, int y)
 
void vertex2DS (int x, int y)
 
void v3DW (const float vtx[3])
 
void vertex3DW (float x, float y, float z)
 
void rect2DW (fpreal32 x1, fpreal32 y1, fpreal32 x2, fpreal32 y2)
 Unfilled rectangles. More...
 
void rect2DS (int x1, int y1, int x2, int y2)
 
void box2DS (int x1, int y1, int x2, int y2)
 
void rectf2DW (fpreal32 x1, fpreal32 y1, fpreal32 x2, fpreal32 y2)
 Filled rectangles. More...
 
void rectf2DS (int x1, int y1, int x2, int y2)
 
void boxf2DS (int x1, int y1, int x2, int y2)
 
void circleW (float x, float y, float r)
 Unfilled circles and arcs. More...
 
void circleS (int x, int y, int r)
 
void arcW (float x, float y, float r, int angle_start, int angle_end)
 
void arcS (int x, int y, int r, int angle_start, int angle_end)
 
void circlefW (float x, float y, float r)
 Filled circles and arcs. More...
 
void circlefS (int x, int y, int r)
 
void arcfW (float x, float y, float r, int angle_start, int angle_end)
 
void arcfS (int x, int y, int r, int angle_start, int angle_end)
 
void ringfW (float x, float y, float inner_r, float outer_r)
 
void ringfS (int x, int y, int inner_r, int outer_r)
 
void sectorW (float x, float y, float inner_r, float outer_r, float angle_start, float angle_end)
 
void sectorfW (float x, float y, float inner_r, float outer_r, float angle_start, float angle_end)
 

Static Public Member Functions

static RV_ShaderProgramgetUIShader (RV_Instance *inst)
 
static RV_ShaderProgramgetUIPickShader (RV_Instance *inst)
 
static void cleanup ()
 
static fpreal32 getBufferedRenderZBump ()
 

Static Public Attributes

static constexpr int PICK_HIGH_PRIORITY_FLAG = 0x80000000
 

Protected Member Functions

virtual void addVertex (fpreal32 x, fpreal32 y, fpreal32 z)
 
void resetCurrentZ ()
 
bool hasAnyData ()
 
void clearSourceData ()
 

Protected Attributes

UT_Vector3Array myPositionData
 Basic vertex properties. More...
 
UT_Array< UT_Vector4FmyColorData
 
UT_Fpreal32Array myPointSizeData
 
UT_Fpreal32Array myWidthData
 
UT_Fpreal32Array myLineStyleData
 
UT_Array< UT_Vector3imyPickBaseData
 
UT_Array< UT_Vector3imyPickComponentData
 
UT_IntArray myTriangleElementData
 
UT_IntArray myLineElementData
 
UT_IntArray myLineDottedElementData
 
UT_IntArray myLineSmoothElementData
 
UT_IntArray myLineWideElementData
 
UT_IntArray myPointElementData
 

Detailed Description

Definition at line 43 of file RV_RenderUI.h.

Constructor & Destructor Documentation

RV_RenderUI::RV_RenderUI ( )
virtual RV_RenderUI::~RV_RenderUI ( )
virtual

Member Function Documentation

void RV_RenderUI::addLine ( const UT_Vector2FArray pts,
bool  closed = false,
bool  segments = false 
)

Lines can be either a single strip or multiple segments. If segments is true, each pair of vertices is a separate line segment. If closed is true, the last vertex will be connected to the first.

void RV_RenderUI::addLine ( const UT_Vector3FArray pts,
bool  closed = false,
bool  segments = false 
)
void RV_RenderUI::addPolygon ( const UT_Vector2FArray pts,
int  concave = 0 
)
void RV_RenderUI::addPolygon ( const UT_Vector3FArray pts,
int  concave = 0 
)
void RV_RenderUI::addQuads ( const UT_Vector2FArray pts)
void RV_RenderUI::addQuads ( const UT_Vector3FArray pts)
void RV_RenderUI::addQuadStrip ( const UT_Vector2FArray pts)
void RV_RenderUI::addQuadStrip ( const UT_Vector3FArray pts)
void RV_RenderUI::addTriangleFan ( const UT_Vector2FArray pts)
void RV_RenderUI::addTriangleFan ( const UT_Vector3FArray pts)
void RV_RenderUI::addTriangles ( const UT_Vector2FArray pts)
void RV_RenderUI::addTriangles ( const UT_Vector3FArray pts)
void RV_RenderUI::addTriMesh ( const UT_Vector2FArray pts)
void RV_RenderUI::addTriMesh ( const UT_Vector3FArray pts)
virtual void RV_RenderUI::addVertex ( fpreal32  x,
fpreal32  y,
fpreal32  z 
)
protectedvirtual
void RV_RenderUI::arcfS ( int  x,
int  y,
int  r,
int  angle_start,
int  angle_end 
)
void RV_RenderUI::arcfW ( float  x,
float  y,
float  r,
int  angle_start,
int  angle_end 
)
void RV_RenderUI::arcS ( int  x,
int  y,
int  r,
int  angle_start,
int  angle_end 
)
void RV_RenderUI::arcW ( float  x,
float  y,
float  r,
int  angle_start,
int  angle_end 
)
void RV_RenderUI::beginClosedLine ( )
void RV_RenderUI::beginLine ( )
void RV_RenderUI::beginLines ( )
void RV_RenderUI::beginPoint ( )
void RV_RenderUI::beginPolygon ( int  concave)
void RV_RenderUI::beginQuads ( )
void RV_RenderUI::beginQuadStrip ( )
void RV_RenderUI::beginTriangleFan ( )
void RV_RenderUI::beginTriangles ( )
void RV_RenderUI::beginTriMesh ( )
void RV_RenderUI::box2DS ( int  x1,
int  y1,
int  x2,
int  y2 
)
void RV_RenderUI::boxf2DS ( int  x1,
int  y1,
int  x2,
int  y2 
)
void RV_RenderUI::bumpLayer ( int  delta)

Change the rendering "layer". This just modifies the depth coordinate of the primitives.

void RV_RenderUI::c3DW ( const fpreal32  clr[3])
inline

Set vertex attributes.

Definition at line 333 of file RV_RenderUI.h.

void RV_RenderUI::c4DW ( const fpreal32  clr[4])
inline

Definition at line 337 of file RV_RenderUI.h.

void RV_RenderUI::circlefS ( int  x,
int  y,
int  r 
)
void RV_RenderUI::circlefW ( float  x,
float  y,
float  r 
)

Filled circles and arcs.

void RV_RenderUI::circleS ( int  x,
int  y,
int  r 
)
void RV_RenderUI::circleW ( float  x,
float  y,
float  r 
)

Unfilled circles and arcs.

static void RV_RenderUI::cleanup ( )
static
virtual void RV_RenderUI::clearAllData ( )
virtual

Clear all buffered data. Also called at the end of draw.

void RV_RenderUI::clearSourceData ( )
protected
void RV_RenderUI::copyViewFromGL ( RE_RenderContext  r,
const UT_Matrix4F proj 
)

Helper to copy view matrices from the current OpenGL state, and use provided projection matrix

void RV_RenderUI::copyViewProjectionFromGL ( RE_RenderContext  r)

Helper to copy view/projection matrices from the current OpenGL state.

virtual void RV_RenderUI::draw ( RV_Render r,
bool  pickpass = false,
int  pick_depthpass = 0 
)
virtual

Draw all buffered primitives.

void RV_RenderUI::drawViewportPoint ( const float  vtx[3],
fpreal32  size 
)
void RV_RenderUI::drawViewportPoint ( const UT_Vector3F vtx,
fpreal32  size 
)
void RV_RenderUI::endLine ( )
void RV_RenderUI::endLines ( )
void RV_RenderUI::endPoint ( )
void RV_RenderUI::endPolygon ( )
void RV_RenderUI::endQuads ( )
void RV_RenderUI::endQuadStrip ( )
void RV_RenderUI::endTriangleFan ( )
void RV_RenderUI::endTriangles ( )
void RV_RenderUI::endTriMesh ( )
fpreal32 RV_RenderUI::getAlpha ( ) const
static fpreal32 RV_RenderUI::getBufferedRenderZBump ( )
static
void RV_RenderUI::getColor ( UT_Color c) const
static RV_ShaderProgram* RV_RenderUI::getUIPickShader ( RV_Instance inst)
static
static RV_ShaderProgram* RV_RenderUI::getUIShader ( RV_Instance inst)
static
fpreal32 RV_RenderUI::getXOrigin ( ) const
inline

Definition at line 86 of file RV_RenderUI.h.

fpreal32 RV_RenderUI::getXPerPixel ( ) const
inline

Get x or y distance in current units that corresponds to 1 pixel.

Definition at line 84 of file RV_RenderUI.h.

fpreal32 RV_RenderUI::getYOrigin ( ) const
inline

Definition at line 87 of file RV_RenderUI.h.

fpreal32 RV_RenderUI::getYPerPixel ( ) const
inline

Definition at line 85 of file RV_RenderUI.h.

fpreal32 RV_RenderUI::getZEnd ( ) const
fpreal32 RV_RenderUI::getZStart ( ) const
bool RV_RenderUI::hasAnyData ( )
protected
void RV_RenderUI::incrementZEnd ( )
void RV_RenderUI::popColor ( )
void RV_RenderUI::popLineSmoothing ( )
void RV_RenderUI::popLineStyle ( )
void RV_RenderUI::popLineWidth ( )
void RV_RenderUI::popPick ( )
void RV_RenderUI::popPointSize ( )
void RV_RenderUI::prepare ( fpreal  xperpixel,
fpreal  yperpixel,
fpreal  xorigin,
fpreal  yorigin 
)
void RV_RenderUI::pushColor ( )

These are options that can change per-vertex.

void RV_RenderUI::pushColor ( const UT_Color c,
fpreal32  a = 1.0f 
)
void RV_RenderUI::pushColor ( fpreal32  r,
fpreal32  g,
fpreal32  b,
fpreal32  a = 1.0f 
)
void RV_RenderUI::pushLineSmoothing ( bool  smooth_lines)
void RV_RenderUI::pushLineSmoothing ( )
void RV_RenderUI::pushLineStyle ( RE_LineStyle  style)
void RV_RenderUI::pushLineStyle ( )
void RV_RenderUI::pushLineWidth ( fpreal32  width)
void RV_RenderUI::pushLineWidth ( )
void RV_RenderUI::pushPick ( UT_Vector3i  pick_base_id,
UT_Vector3i  pick_component_id,
bool  high_priority = false 
)

Pick state used by Vulkan UI pick pass rendering. If high_priority is true, the pick will be treated as a high priority target

void RV_RenderUI::pushPointSize ( fpreal32  size)
void RV_RenderUI::rect2DS ( int  x1,
int  y1,
int  x2,
int  y2 
)
void RV_RenderUI::rect2DW ( fpreal32  x1,
fpreal32  y1,
fpreal32  x2,
fpreal32  y2 
)

Unfilled rectangles.

void RV_RenderUI::rectf2DS ( int  x1,
int  y1,
int  x2,
int  y2 
)
void RV_RenderUI::rectf2DW ( fpreal32  x1,
fpreal32  y1,
fpreal32  x2,
fpreal32  y2 
)

Filled rectangles.

void RV_RenderUI::resetCurrentZ ( )
protected
void RV_RenderUI::ringfS ( int  x,
int  y,
int  inner_r,
int  outer_r 
)
void RV_RenderUI::ringfW ( float  x,
float  y,
float  inner_r,
float  outer_r 
)
void RV_RenderUI::sectorfW ( float  x,
float  y,
float  inner_r,
float  outer_r,
float  angle_start,
float  angle_end 
)
void RV_RenderUI::sectorW ( float  x,
float  y,
float  inner_r,
float  outer_r,
float  angle_start,
float  angle_end 
)
void RV_RenderUI::setAlpha ( fpreal32  a)
void RV_RenderUI::setColor ( const UT_Color c,
fpreal32  a = 1.0f 
)
void RV_RenderUI::setColor ( fpreal32  r,
fpreal32  g,
fpreal32  b,
fpreal32  a = 1.0f 
)
void RV_RenderUI::setLineSmoothing ( bool  smooth_lines)
void RV_RenderUI::setLineStyle ( RE_LineStyle  style)
void RV_RenderUI::setLineWidth ( fpreal32  width)
void RV_RenderUI::setPickHighPriority ( bool  high_priority)
void RV_RenderUI::setPointSize ( fpreal32  size)
void RV_RenderUI::setViewProjection ( const UT_Matrix4F view,
const UT_Matrix4F proj 
)

Set the view and projection matrices for 3D rendering. These must be set before calling draw() for proper transformation.

virtual void RV_RenderUI::setZStart ( fpreal32  zStart)
virtual

Z value for use as the base for another object.

void RV_RenderUI::v2DI ( const int  vtx[2])
inline

Definition at line 356 of file RV_RenderUI.h.

void RV_RenderUI::v2DW ( const fpreal32  vtx[2])

Create vertices for primitives.

void RV_RenderUI::v3DW ( const float  vtx[3])
void RV_RenderUI::vertex2DI ( int  x,
int  y 
)
inline

Definition at line 346 of file RV_RenderUI.h.

void RV_RenderUI::vertex2DS ( int  x,
int  y 
)
inline

Definition at line 351 of file RV_RenderUI.h.

void RV_RenderUI::vertex2DW ( fpreal32  x,
fpreal32  y 
)
inline

Definition at line 341 of file RV_RenderUI.h.

void RV_RenderUI::vertex3DW ( float  x,
float  y,
float  z 
)
inline

Definition at line 361 of file RV_RenderUI.h.

Member Data Documentation

UT_Array<UT_Vector4F> RV_RenderUI::myColorData
protected

Definition at line 259 of file RV_RenderUI.h.

UT_IntArray RV_RenderUI::myLineDottedElementData
protected

Definition at line 269 of file RV_RenderUI.h.

UT_IntArray RV_RenderUI::myLineElementData
protected

Definition at line 268 of file RV_RenderUI.h.

UT_IntArray RV_RenderUI::myLineSmoothElementData
protected

Definition at line 270 of file RV_RenderUI.h.

UT_Fpreal32Array RV_RenderUI::myLineStyleData
protected

Definition at line 262 of file RV_RenderUI.h.

UT_IntArray RV_RenderUI::myLineWideElementData
protected

Definition at line 271 of file RV_RenderUI.h.

UT_Array<UT_Vector3i> RV_RenderUI::myPickBaseData
protected

Definition at line 263 of file RV_RenderUI.h.

UT_Array<UT_Vector3i> RV_RenderUI::myPickComponentData
protected

Definition at line 264 of file RV_RenderUI.h.

UT_IntArray RV_RenderUI::myPointElementData
protected

Definition at line 273 of file RV_RenderUI.h.

UT_Fpreal32Array RV_RenderUI::myPointSizeData
protected

Definition at line 260 of file RV_RenderUI.h.

UT_Vector3Array RV_RenderUI::myPositionData
protected

Basic vertex properties.

Definition at line 258 of file RV_RenderUI.h.

UT_IntArray RV_RenderUI::myTriangleElementData
protected

Definition at line 266 of file RV_RenderUI.h.

UT_Fpreal32Array RV_RenderUI::myWidthData
protected

Definition at line 261 of file RV_RenderUI.h.

constexpr int RV_RenderUI::PICK_HIGH_PRIORITY_FLAG = 0x80000000
static

Definition at line 112 of file RV_RenderUI.h.


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