12 #ifndef GR_GeoRender_H
13 #define GR_GeoRender_H
49 virtual const char *className()
const = 0;
62 int instance_group = -1,
63 const char *attrib_name = NULL,
71 const char *cache_name,
99 virtual exint getNumGLPrimitives()
const = 0;
102 bool showSelections()
const;
108 bool isRasterizedInView(
118 myBuildPrimInfo = prim_id;
122 {
return myBuildPrimInfo; }
124 {
return myBuildPointInfo; }
127 { mySelectionMask = selection_mask; }
129 {
return mySelectionMask; }
132 { myCurrentSelection =
m; }
134 {
return myCurrentSelection; }
137 { myCurrentPointSelectInstance = i; }
139 {
return myCurrentPointSelectInstance; }
142 { myMaterialOverride = mat_index; }
144 { myMaterialOverride = -1; }
148 if(myHasDetailPrimID)
157 virtual void retireGeometry();
169 void allowGeoOverride(
bool allow_overrides);
209 const char *attrib_name,
221 bool need_prim_vert_info,
227 bool *has_detail_prim_id =
nullptr,
228 int *detail_prim_id =
nullptr,
229 int *num_bone_deform =
nullptr);
267 bool use_vertex_for_point_select,
309 bool need_prim_vert_info,
319 virtual void cleanupSelection(
RE_Render *r,
int key)
const;
328 int num_draw_idx = 1)
const;
331 {
return myCurrentLayer; }
336 #ifdef USE_MATERIAL_MAP
357 unsigned myBuildPointInfo : 1,
359 myHasDetailPrimID : 1,
360 myHasInstancedTransform : 1,
361 myHasIdentityTransform : 1,
364 myAllowGeoOverride : 1;
GR_AttribMask mySelectionMask
virtual void geometryUpdated(RE_Render *)
GLuint const GLchar * name
int getCurrentLayer() const
bool shouldBuildPrimID() const
GLenum GLsizei GLsizei GLsizei GLsizei GLbitfield flags
void setSelectionInstance(int i)
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
int getSelectionInstance() const
GT_API const UT_StringHolder cache_name
GR_AttribMask getSelectionMask() const
A class that manages material assignments to different groups of primitives.
virtual bool canFrustumCull()
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
set of parameters sent to GR_Primitive::update()
GT_API const UT_StringHolder point_id
const GR_RenderInfo * myInfo
vint4 select(const vbool4 &mask, const vint4 &a, const vint4 &b)
virtual bool isConvexed() const
virtual bool hasTransparency() const
returns true if this drawable renders some transparent elements
GLuint GLsizei GLsizei * length
GR_API bool inViewFrustum(const UT_BoundingBoxD &bbox, const UT_Matrix4D &objviewproj, const UT_Vector4D *frustum_area=NULL)
void buildInformation(bool prim_id, bool point_id)
int myCurrentPointSelectInstance
bool getDetailPrimID(int &id) const
GLfloat GLfloat GLfloat GLfloat h
GR_API GR_SelectMode buildSelection(UT_Array< uint8 > &selected, const GR_UpdateParms &p, GT_DataArrayHandle prim_id, GT_DataArrayHandle pnt_id, GT_DataArrayHandle vert_id, bool is_offset, int repeat_count)
void setSelectionDisplayMode(GR_SelectMode m)
The base class for all GT primitive types.
GLdouble GLdouble GLdouble b
GR_SelectMode getSelectionDisplayMode() const
void clearMaterialOverride()
GLdouble GLdouble GLdouble r
UT_Matrix4D myPrimitiveTransform
bool shouldBuildPointID() const
Simple class for a mutli-integer cache tag.
virtual bool supportsInstances() const
By default, no instanced drawing support.
GR_MaterialGroups myMatGroups
void setGeoBounds(const UT_BoundingBox &b)
void setMaterialOverride(int mat_index)
GR_SelectMode myCurrentSelection
RE_Geometry * getGeometry()
void setSelectionMask(GR_AttribMask selection_mask)
const UT_BoundingBoxD & getGeoBounds() const
virtual void viewUpdate(RE_Render *r, const GR_DisplayOption &opts, const char *cache_name, RE_CacheVersion geo_version, RE_CacheVersion select_version)