HDK
|
#include <GR_PrimAgentShape.h>
Public Member Functions | |
GR_PrimAgentShape (const GR_RenderInfo *info, const char *cache_name, const GT_PrimitiveHandle &pack_prim, const GT_PrimitiveHandle &shape_prim) | |
~GR_PrimAgentShape () override | |
const char * | className () const override |
Return a string version of this class's name. More... | |
GR_BasePrimType | getBasePrimType () const override |
The base primitive type is usually NORMAL unless this is a packed type. More... | |
GR_PrimAcceptResult | acceptPrimitive (GT_PrimitiveType t, int geo_type, const GT_PrimitiveHandle &ph, const GEO_Primitive *prim) override |
GR_DispOptChange | displayOptionChange (const GR_DisplayOption &opt, bool first_init) override |
void | update (RE_RenderContext r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p) override |
void | render (RE_RenderContext r, GR_RenderMode render_mode, GR_RenderFlags flags, GR_DrawParms dp) override |
int | renderPick (RE_RenderContext r, const GR_DisplayOption *opt, unsigned int pick_type, GR_PickStyle pick_style, bool has_pick_map) override |
bool | updateOnViewChange (const GR_DisplayOption &opt) const override |
If this primitive requires an update when the view changes, return true. More... | |
void | viewUpdate (RE_RenderContext r, const GR_ViewUpdateParms &parms) override |
bool | inViewFrustum (const UT_Matrix4D &objviewprojj, const UT_BoundingBoxD *bbox=nullptr) override |
bool | requiresAlphaPass () const override |
Return true if this primitive requires an alpha pass. More... | |
bool | getSingleTransform (UT_Matrix4D &mat) const override |
Public Member Functions inherited from GR_PrimPacked | |
GR_PrimPacked (const GR_RenderInfo *info, const char *cache_name, const GT_PrimitiveHandle &packed_prim, const GT_PrimitiveHandle &instanced_prim, const GU_ConstDetailHandle &instanced_gdp, int prim_index=-1) | |
~GR_PrimPacked () override | |
const char * | className () const override |
Return a string version of this class's name. More... | |
GR_BasePrimType | getBasePrimType () const override |
The base primitive type is usually NORMAL unless this is a packed type. More... | |
GT_PrimitiveHandle | getInstancePrim () const override |
const GT_PrimitiveHandle & | instancePrim () const |
const GT_PrimitiveHandle & | packedPrim () const |
void | setPackedPrim (const GT_PrimitiveHandle &packed_prim) |
void | setInstancedPrim (const GT_PrimitiveHandle &instance, const GU_ConstDetailHandle &inst_gdp) |
void | setPrimIndex (int pindex) |
GR_PrimAcceptResult | acceptPrimitive (GT_PrimitiveType t, int geo_type, const GT_PrimitiveHandle &ph, const GEO_Primitive *prim) override |
void | update (RE_RenderContext r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p) override |
void | checkForDeferredDraw (const RE_RenderContext r, GR_RenderMode mode, GR_RenderFlags flags, const GR_DrawParms &dp, const UT_Matrix4D &proj_view, const UT_Matrix4D &object, const UT_Vector2F &min_proj_size, bool &visible, bool &defer) override |
void | render (RE_RenderContext r, GR_RenderMode render_mode, GR_RenderFlags flags, GR_DrawParms dp) override |
void | renderDecoration (RE_RenderContext r, GR_Decoration decor, const GR_DecorationParms &parms) override |
int | renderPick (RE_RenderContext r, const GR_DisplayOption *opt, unsigned int pick_type, GR_PickStyle pick_style, bool has_pick_map) override |
bool | checkForTransformChange () |
GR_DispOptChange | displayOptionChange (const GR_DisplayOption &opts, bool first_init) override |
bool | updateOnViewChange (const GR_DisplayOption &) const override |
If this primitive requires an update when the view changes, return true. More... | |
void | viewUpdate (RE_RenderContext r, const GR_ViewUpdateParms &parms) override |
bool | needsGLStateCheck (const GR_DisplayOption &opts) const override |
bool | checkGLState (RE_RenderContext r, const GR_DisplayOption &opt) override |
bool | setup (const GR_DisplayOption *) override |
void | cleanup (RE_RenderContext r) override |
bool | requiresAlphaPass () const override |
Return true if this primitive requires an alpha pass. More... | |
const GA_Primitive * | getGAPrimitive (const GU_Detail *gdp, exint primitive_id) const override |
exint | getGAVertex (const GU_Detail *gdp, exint vertex_id) const override |
RE_Geometry * | getDecorationGeometry () override |
bool | renderInAlphaPass (GR_AlphaPass a) override |
Return true if this primitive renders in the specified alpha pass. More... | |
bool | inViewFrustum (const UT_Matrix4D &objviewproj, const UT_BoundingBoxD *bbox=nullptr) override |
bool | isRasterizedInView (const UT_Matrix4F &objviewproj, const UT_Vector2F &min_proj_size, const UT_BoundingBoxF *bbox) override |
bool | getBoundingBox (UT_BoundingBoxD &bbox) const override |
Returns the bounding box of this primitive if it can be determined. More... | |
exint | getNumGLPrimitives (const GR_DisplayOption *) override |
void | retirePrimitive () override |
Called when a node is no longer actively displayed, but still cached. More... | |
GR_SelectMode | getSelectionMode (const GU_Detail &gdp, GU_SelectionHandle &selection) const |
void | setPickID (GA_Index prim_id, GA_Index point_id) |
void | setInstanceHookPrim (GR_Primitive *prim) |
bool | isPrimVisible () const override |
void | setPrimVisible (bool v) |
bool | supportsParallelDraw () const override |
Public Member Functions inherited from GR_Primitive | |
bool | setCacheName (const char *cache_name) |
virtual void | resetPrimitives () |
bool | typeMask (GEO_PrimTypeCompat::TypeMask mask) const |
returns true if this primitive's type mask is part of "mask". More... | |
GR_DispOptChange | checkDisplayOptionChange (const GR_DisplayOption &opts) |
void | updatePrim (RE_RenderContext r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &parms) |
called every time the metacount version is bumped on the GU_Detail. More... | |
virtual void | updateInstanceGroupGL (const RE_VertexArray *array, int instance_group=-1, const char *attrib_name=NULL, RE_GenericAttribID id=RE_GENATTRIB_NONE) |
virtual void | updateInstanceGroup (const GR_InstanceBuffer *buffer, int instance_group=-1) |
void | draw (RE_RenderContext r, GR_RenderMode render_mode, GR_RenderFlags render_flags, GR_DrawParms parms) |
int | drawPick (RE_RenderContext r, const GR_DisplayOption *opt, unsigned int pick_type, GR_PickStyle pick_style, bool has_pick_map) |
virtual void | setupDrawDecorations (RE_RenderContext r) |
Called just before drawing our first decoration. More... | |
void | drawDecoration (RE_RenderContext r, GR_Decoration decor, const GR_DecorationParms &parms) |
int64 | supportedDecorations () |
virtual bool | supportsRenderUV () |
Return true if this primitive supports drawing into a UV viewport. More... | |
bool | drawInAlphaPass (GR_AlphaPass alpha) const |
Return true if this should be drawn in the given alpha pass. More... | |
void | setAlphaPassMask (int mask) |
int | getAlphaPassMask () const |
GR_RenderVersion | getRenderVersion () const |
The GL render version to use for this primitive. More... | |
bool | showSelections () const |
whether to display component selections or not. More... | |
bool | canDoInstancing () const |
Instancing matrix list and version (for the vertex array) More... | |
bool | isObjectSelection () const |
Returns true if the full object is selected at the scene level. More... | |
bool | supportsDynamicCulling () const |
void | supportsDynamicCulling (bool dc) |
int32 | getDisplayOptionVersion () const |
int32 | bumpDisplayOptionVersion () |
virtual bool | isHighlighted () const |
Only for the Scene Graph view: highlighted prims. More... | |
void | setPrimUsed (bool used) |
bool | isPrimUsed () const |
void | setParentPrimType (GR_BasePrimType type) |
set for those primitives that are within packed primitives More... | |
GR_BasePrimType | getParentPrimType () const |
const GR_RenderInfo * | getRenderInfo () const |
virtual void | getGeoRenders (UT_Array< GR_GeoRender * > &renders) |
void | addUpdateMessage (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder()) |
void | addUpdateWarning (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder()) |
void | addUpdateError (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder()) |
void | addUpdateFatal (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder()) |
void | addRedrawMessage (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder()) |
void | addRedrawWarning (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder()) |
void | addRedrawError (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder()) |
void | addRedrawFatal (GR_ErrorManager::Source err_source, GR_ErrorCode gr_code, UT_StringHolder extra_text=UT_StringHolder(), UT_StringHolder src_name=UT_StringHolder()) |
const char * | getCacheName () const |
The base GL cache name assigned to this primitive. More... | |
void | incref () |
void | decref () |
GT_PrimitiveHandle | getCachedGTPrimitive () |
void | cacheGTPrimitive (const GT_PrimitiveHandle &prim) |
Definition at line 41 of file GR_PrimAgentShape.h.
GR_PrimAgentShape::GR_PrimAgentShape | ( | const GR_RenderInfo * | info, |
const char * | cache_name, | ||
const GT_PrimitiveHandle & | pack_prim, | ||
const GT_PrimitiveHandle & | shape_prim | ||
) |
|
override |
|
overridevirtual |
returns true if the given GT primitive can be rendered by this primitive if t==GT_GEO_PRIMITIVE, geo_type will be the geo type id and prim will be non-NULL. If t is any other type, ph will be a valid GT primitive. The primitives themselves can be used for more sophisticated matching.
Implements GR_Primitive.
|
inlineoverridevirtual |
Return a string version of this class's name.
Implements GR_Primitive.
Definition at line 50 of file GR_PrimAgentShape.h.
|
overridevirtual |
Called when the geometry-related display options change, to determine if an update is required. By default, no update is required. If the options did change, return either DISPLAY_CHANGED, which will call update() without bumping the display option version, or DISPLAY_VERSION_CHANGED, which will bump the version. If 'first_init' is true, this is being called to initialize any cached display options. The return value will be ignored. This will happen just after the primitive is created.
Reimplemented from GR_Primitive.
|
inlineoverridevirtual |
The base primitive type is usually NORMAL unless this is a packed type.
Reimplemented from GR_Primitive.
Definition at line 52 of file GR_PrimAgentShape.h.
|
inlineoverridevirtual |
Reimplemented from GR_PrimPacked.
Definition at line 90 of file GR_PrimAgentShape.h.
|
inlineoverridevirtual |
return true if the primitive is in or overlaps the view frustum. always returning true will effectively disable frustum culling. bbox is an option bounding box which can be used for frustum testing.
Reimplemented from GR_Primitive.
Definition at line 84 of file GR_PrimAgentShape.h.
|
overridevirtual |
|
overridevirtual |
Render this primitive for picking, where pick_type is defined as one of the pickable bits in GU_SelectType.h (like GR_PICK_GEOPOINT) return the number of picks
Implements GR_Primitive.
|
inlineoverridevirtual |
Return true if this primitive requires an alpha pass.
Reimplemented from GR_Primitive.
Definition at line 89 of file GR_PrimAgentShape.h.
|
overridevirtual |
Main update method, called when conditions change which may require the geometry to be updated. These include geometry changes, selections, volatile display options (level of detail), instancing updates, and some GL state changes (if needsGLStateCheck returns true)
Implements GR_Primitive.
|
inlineoverridevirtual |
If this primitive requires an update when the view changes, return true.
Reimplemented from GR_Primitive.
Definition at line 78 of file GR_PrimAgentShape.h.
|
overridevirtual |
If updateOnViewChange() returns true, this is called when the view changes.
Reimplemented from GR_Primitive.