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

#include <GR_InstanceManager.h>

+ Inheritance diagram for GR_InstanceManager:

Classes

class  gr_BBoxRequest
 
class  gr_DrawEntry
 
class  gr_DrawRequest
 

Public Types

enum  gr_DrawRequestResult {
  NO_DRAW, PARTIAL_DRAW, POINTS_ONLY_DRAW, FULL_DRAW,
  ERROR_NO_SUCH_ID, ERROR_NOT_PROCESSED
}
 
enum  {
  BBOX_COLOR_SHADED =0, BBOX_COLOR_WIRE =1, BBOX_SHADED =2, BBOX_WIRE =3,
  NUM_BBOX_SHADING_MODES = 4, NUM_BBOX_COLOR_MODES = 2
}
 

Public Member Functions

bool isActive () const
 
bool canQueueRequests () const
 
void allowBBoxReplacement (bool allow)
 
void setDrawSolidBBoxes (bool draw)
 
void setDrawWireBBoxes (bool draw)
 
void queueUncullableDraw (int num_gl_prims)
 
int newDrawRequestID ()
 Request a new draw ID used to queue requests. Return it when done. More...
 
void returnDrawRequestID (int draw_id)
 
void queueDrawRequest (const RE_RenderContext r, int draw_id, int num_gl_prims, const UT_BoundingBox &box, const UT_Matrix4D &world_mat, GR_RenderMode rmode, GR_RenderFlags rflags, const GR_DrawParms &dp, bool wireframe, int32 prim_id, bool selected, UT_Vector3F *color=nullptr)
 
void queueInstanceDrawRequest (const RE_RenderContext r, int draw_id, int num_gl_prims, const UT_BoundingBox &box, const UT_Matrix4D &obj_transform, const UT_Matrix4DArray &instances, UT_IntArray &result_visible_indices, UT_Vector2i &result_visible_range, GR_RenderMode rmode, GR_RenderFlags rflags, const GR_DrawParms &dp, bool wireframe, const GT_DataArrayHandle &prim_ids, const UT_Array< uint8 > *selected, const UT_Vector3FArray *colors, bool all_selected=false)
 
void queueNestedInstanceDrawRequest (const RE_RenderContext r, int draw_id, int num_gl_prims, const UT_BoundingBox &box, const UT_Matrix4D &obj_transform, const UT_Matrix4DArray &instances, const UT_IntArray &nest_level_counts, UT_IntArray &result_visible_indices, UT_Vector2i &result_visible_range, GR_RenderMode rmode, GR_RenderFlags rflags, const GR_DrawParms &dp, bool wireframe, const GT_DataArrayHandle &prim_ids, const UT_Array< uint8 > *selected, const UT_Vector3FArray *colors, bool all_selected=false)
 
void queuePartialInstanceDrawRequest (const RE_RenderContext r, int draw_id, int num_gl_prims, const UT_BoundingBox &box, const UT_Matrix4D &obj_transform, const UT_Matrix4DArray &instances, const UT_IntArray &visible_indices, UT_IntArray &result_visible_indices, UT_Vector2i &result_visible_range, GR_RenderMode rmode, GR_RenderFlags rflags, const GR_DrawParms &dp, bool wireframe, const GT_DataArrayHandle &prim_ids, const UT_Array< uint8 > *selected, const UT_Vector3FArray *colors, bool all_selected=false)
 
void queuePartialNestedInstanceRequest (const RE_RenderContext r, int draw_id, int num_gl_prims, const UT_BoundingBox &box, const UT_Matrix4D &obj_transform, const UT_Matrix4DArray &instances, const UT_IntArray &visible_indices, const UT_IntArray &nest_level_counts, UT_IntArray &result_visible_indices, UT_Vector2i &result_visible_range, GR_RenderMode rmode, GR_RenderFlags rflags, const GR_DrawParms &dp, bool wireframe, const GT_DataArrayHandle &prim_ids, const UT_Array< uint8 > *selected, const UT_Vector3FArray *colors, bool all_selected=false)
 
int newBBoxRequestID ()
 Request a new draw ID used to queue requests. Return it when done. More...
 
void returnBBoxRequestID (int bbox_id)
 
void queueBBoxDraw (const RE_RenderContext r, int bbox_id, const UT_BoundingBox &box, const UT_Matrix4D &obj_transform, bool wireframe, int32 prim_id, bool selected, UT_Vector3F *color=nullptr)
 
void queueBBoxDraw (const RE_RenderContext r, int bbox_id, const UT_BoundingBox &box, const UT_Matrix4D &obj_transform, const UT_Matrix4DArray &instances, bool wireframe, const GT_DataArrayHandle &prim_ids, const UT_Array< uint8 > *selected, const UT_Vector3FArray *colors, bool all_selected=false)
 
void queuePartialBBoxDraw (const RE_RenderContext r, int bbox_id, const UT_BoundingBox &box, const UT_Matrix4D &obj_transform, const UT_Matrix4DArray &instances, const UT_IntArray &visible_indices, bool wireframe, const GT_DataArrayHandle &prim_ids, const UT_Array< uint8 > *selected, const UT_Vector3FArray *colors, bool all_selected=false)
 
gr_DrawRequestResult getDrawRequestResult (int draw_id, GR_RenderMode &mode, GR_RenderFlags &flags, GR_DrawParms &parms) const
 

Static Public Member Functions

static GR_InstanceManagerget ()
 
static bool initShaders (RV_Instance *inst)
 
static void cleanupShaders ()
 

Friends

class GUI_SceneFeel
 
class DM_VPortAgent
 

Additional Inherited Members

- Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable
 UT_NonCopyable ()=default
 
 ~UT_NonCopyable ()=default
 
 UT_NonCopyable (const UT_NonCopyable &)=delete
 
UT_NonCopyableoperator= (const UT_NonCopyable &)=delete
 

Detailed Description

Definition at line 34 of file GR_InstanceManager.h.

Member Enumeration Documentation

anonymous enum
Enumerator
BBOX_COLOR_SHADED 
BBOX_COLOR_WIRE 
BBOX_SHADED 
BBOX_WIRE 
NUM_BBOX_SHADING_MODES 
NUM_BBOX_COLOR_MODES 

Definition at line 364 of file GR_InstanceManager.h.

Enumerator
NO_DRAW 
PARTIAL_DRAW 
POINTS_ONLY_DRAW 
FULL_DRAW 
ERROR_NO_SUCH_ID 
ERROR_NOT_PROCESSED 

Definition at line 211 of file GR_InstanceManager.h.

Member Function Documentation

void GR_InstanceManager::allowBBoxReplacement ( bool  allow)
inline

Definition at line 53 of file GR_InstanceManager.h.

bool GR_InstanceManager::canQueueRequests ( ) const
inline

Definition at line 50 of file GR_InstanceManager.h.

static void GR_InstanceManager::cleanupShaders ( )
static
static GR_InstanceManager& GR_InstanceManager::get ( )
inlinestatic

Definition at line 37 of file GR_InstanceManager.h.

gr_DrawRequestResult GR_InstanceManager::getDrawRequestResult ( int  draw_id,
GR_RenderMode mode,
GR_RenderFlags flags,
GR_DrawParms parms 
) const
static bool GR_InstanceManager::initShaders ( RV_Instance inst)
static
bool GR_InstanceManager::isActive ( ) const
inline

Definition at line 48 of file GR_InstanceManager.h.

int GR_InstanceManager::newBBoxRequestID ( )

Request a new draw ID used to queue requests. Return it when done.

int GR_InstanceManager::newDrawRequestID ( )

Request a new draw ID used to queue requests. Return it when done.

void GR_InstanceManager::queueBBoxDraw ( const RE_RenderContext  r,
int  bbox_id,
const UT_BoundingBox box,
const UT_Matrix4D obj_transform,
bool  wireframe,
int32  prim_id,
bool  selected,
UT_Vector3F color = nullptr 
)
void GR_InstanceManager::queueBBoxDraw ( const RE_RenderContext  r,
int  bbox_id,
const UT_BoundingBox box,
const UT_Matrix4D obj_transform,
const UT_Matrix4DArray instances,
bool  wireframe,
const GT_DataArrayHandle prim_ids,
const UT_Array< uint8 > *  selected,
const UT_Vector3FArray colors,
bool  all_selected = false 
)
void GR_InstanceManager::queueDrawRequest ( const RE_RenderContext  r,
int  draw_id,
int  num_gl_prims,
const UT_BoundingBox box,
const UT_Matrix4D world_mat,
GR_RenderMode  rmode,
GR_RenderFlags  rflags,
const GR_DrawParms dp,
bool  wireframe,
int32  prim_id,
bool  selected,
UT_Vector3F color = nullptr 
)
void GR_InstanceManager::queueInstanceDrawRequest ( const RE_RenderContext  r,
int  draw_id,
int  num_gl_prims,
const UT_BoundingBox box,
const UT_Matrix4D obj_transform,
const UT_Matrix4DArray instances,
UT_IntArray result_visible_indices,
UT_Vector2i result_visible_range,
GR_RenderMode  rmode,
GR_RenderFlags  rflags,
const GR_DrawParms dp,
bool  wireframe,
const GT_DataArrayHandle prim_ids,
const UT_Array< uint8 > *  selected,
const UT_Vector3FArray colors,
bool  all_selected = false 
)
void GR_InstanceManager::queueNestedInstanceDrawRequest ( const RE_RenderContext  r,
int  draw_id,
int  num_gl_prims,
const UT_BoundingBox box,
const UT_Matrix4D obj_transform,
const UT_Matrix4DArray instances,
const UT_IntArray nest_level_counts,
UT_IntArray result_visible_indices,
UT_Vector2i result_visible_range,
GR_RenderMode  rmode,
GR_RenderFlags  rflags,
const GR_DrawParms dp,
bool  wireframe,
const GT_DataArrayHandle prim_ids,
const UT_Array< uint8 > *  selected,
const UT_Vector3FArray colors,
bool  all_selected = false 
)
void GR_InstanceManager::queuePartialBBoxDraw ( const RE_RenderContext  r,
int  bbox_id,
const UT_BoundingBox box,
const UT_Matrix4D obj_transform,
const UT_Matrix4DArray instances,
const UT_IntArray visible_indices,
bool  wireframe,
const GT_DataArrayHandle prim_ids,
const UT_Array< uint8 > *  selected,
const UT_Vector3FArray colors,
bool  all_selected = false 
)
void GR_InstanceManager::queuePartialInstanceDrawRequest ( const RE_RenderContext  r,
int  draw_id,
int  num_gl_prims,
const UT_BoundingBox box,
const UT_Matrix4D obj_transform,
const UT_Matrix4DArray instances,
const UT_IntArray visible_indices,
UT_IntArray result_visible_indices,
UT_Vector2i result_visible_range,
GR_RenderMode  rmode,
GR_RenderFlags  rflags,
const GR_DrawParms dp,
bool  wireframe,
const GT_DataArrayHandle prim_ids,
const UT_Array< uint8 > *  selected,
const UT_Vector3FArray colors,
bool  all_selected = false 
)
void GR_InstanceManager::queuePartialNestedInstanceRequest ( const RE_RenderContext  r,
int  draw_id,
int  num_gl_prims,
const UT_BoundingBox box,
const UT_Matrix4D obj_transform,
const UT_Matrix4DArray instances,
const UT_IntArray visible_indices,
const UT_IntArray nest_level_counts,
UT_IntArray result_visible_indices,
UT_Vector2i result_visible_range,
GR_RenderMode  rmode,
GR_RenderFlags  rflags,
const GR_DrawParms dp,
bool  wireframe,
const GT_DataArrayHandle prim_ids,
const UT_Array< uint8 > *  selected,
const UT_Vector3FArray colors,
bool  all_selected = false 
)
void GR_InstanceManager::queueUncullableDraw ( int  num_gl_prims)

For primitives that cannot be culled, this at least notifies the manager of the GL primitive count so it can be taken into account.

void GR_InstanceManager::returnBBoxRequestID ( int  bbox_id)
void GR_InstanceManager::returnDrawRequestID ( int  draw_id)
void GR_InstanceManager::setDrawSolidBBoxes ( bool  draw)
inline

Definition at line 55 of file GR_InstanceManager.h.

void GR_InstanceManager::setDrawWireBBoxes ( bool  draw)
inline

Definition at line 57 of file GR_InstanceManager.h.

Friends And Related Function Documentation

friend class DM_VPortAgent
friend

Definition at line 404 of file GR_InstanceManager.h.

friend class GUI_SceneFeel
friend

Definition at line 403 of file GR_InstanceManager.h.


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