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,
222 bool need_prim_vert_info,
228 bool *has_detail_prim_id =
nullptr,
229 int *detail_prim_id =
nullptr,
230 int *num_bone_deform =
nullptr);
268 bool use_vertex_for_point_select,
311 bool need_prim_vert_info,
319 bool supports_outline =
false)
const;
322 virtual void cleanupSelection(
RE_Render *r,
int key)
const;
331 int num_draw_idx = 1)
const;
334 {
return myCurrentLayer; }
339 #ifdef USE_MATERIAL_MAP
360 unsigned myBuildPointInfo : 1,
362 myHasDetailPrimID : 1,
363 myHasInstancedTransform : 1,
364 myHasIdentityTransform : 1,
367 myAllowGeoOverride : 1;
GR_AttribMask mySelectionMask
virtual void geometryUpdated(RE_Render *)
GLboolean GLboolean GLboolean b
int getCurrentLayer() const
bool shouldBuildPrimID() const
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
GLuint const GLchar * name
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
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
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.
GLuint GLsizei GLsizei * length
GLfloat GLfloat GLfloat GLfloat h
GR_SelectMode getSelectionDisplayMode() const
void clearMaterialOverride()
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)