All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
* PROPRIETARY INFORMATION. This software is proprietary to
* Side Effects Software Inc., and is not to be reproduced,
* transmitted, or disclosed in any way without written permission.
* Produced by:
* Side Effects Software Inc
* 123 Front Street West, Suite 1401
* Toronto, Ontario
* Canada M5J 2M2
* 416-504-9876
* NAME: GR_PrimTetra.h (GR Library, C++)
#ifndef __GR_PrimTetra__
#define __GR_PrimTetra__
namespace HDK_Sample
/// The primitive render hook which creates GR_PrimTetra objects.
class GR_PrimTetraHook : public GUI_PrimitiveHook
virtual ~GR_PrimTetraHook();
/// This is called when a new GR_Primitive is required for a tetra.
/// gt_prim or geo_prim contains the GT or GEO primitive this object is being
/// created for, depending on whether this hook is registered to capture
/// GT or GEO primitives.
/// info and cache_name should be passed down to the GR_Primitive
/// constructor.
/// processed should return GR_PROCESSED or GR_PROCESSED_NON_EXCLUSIVE if
/// a primitive is created. Non-exclusive allows other render hooks or the
/// native Houdini primitives to be created for the same primitive, which is
/// useful for support hooks (drawing decorations, bounding boxes, etc).
const GEO_Primitive *geo_prim,
const GR_RenderInfo *info,
const char *cache_name,
GR_PrimAcceptResult &processed);
/// Primitive object that is created by GR_PrimTetraHook whenever a
/// tetrahedron primitive is found. This object can be persistent between
/// renders, though display flag changes or navigating though SOPs can cause
/// it to be deleted and recreated later.
class GR_PrimTetra : public GR_Primitive
const char *cache_name,
const GEO_Primitive *prim);
virtual ~GR_PrimTetra();
virtual const char *className() const { return "GR_PrimTetra"; }
/// See if the tetra primitive can be consumed by this primitive. Only
/// tetra from the same detail will ever be passed in.
int geo_type,
const GT_PrimitiveHandle &ph,
const GEO_Primitive *prim);
/// Called whenever the parent detail is changed, draw modes are changed,
/// selection is changed, or certain volatile display options are changed
/// (such as level of detail).
virtual void update(RE_Render *r,
const GT_PrimitiveHandle &primh,
const GR_UpdateParms &p);
/// Called whenever the primitive is required to render, which may be more
/// than one time per viewport redraw (beauty, shadow passes, wireframe-over)
/// It also may be called outside of a viewport redraw to do picking of the
/// geometry.
virtual void render(RE_Render *r,
GR_RenderMode render_mode,
virtual void renderDecoration(RE_Render *r,
const GR_DecorationParms &parms);
virtual int renderPick(RE_Render *r,
const GR_DisplayOption *opt,
unsigned int pick_type,
GR_PickStyle pick_style,
bool has_pick_map);
int myID;
RE_Geometry *myGeo;
bool myInstancedFlag;
} // End HDK_Sample namespace.