All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VIS_Visualizer Class Referenceabstract

#include <VIS_Visualizer.h>

+ Inheritance diagram for VIS_Visualizer:

Public Member Functions

 VIS_Visualizer ()
virtual ~VIS_Visualizer ()
PRM_ParmListgetParmList ()
virtual bool updateParmsFlags ()
virtual PRM_TemplategetTemplateList () const =0
bool enableParm (const char *pn, int state, int v=-1)
 Helper methods to enable/disable or set visibility of parameters. More...
bool setVisibleState (const char *pn, bool state, int v=-1)
bool save (std::ostream &os)
bool load (UT_IStream &is)
int getTypeId () const
VIS_ParmsMicroNodegetParmsMicroNode ()
void requestRefinement ()
void requestUpdate ()
void requestAttribute (const char *attr, GA_AttributeOwner owner=GA_ATTRIB_INVALID)
VIS_MountgetMount () const
uint32 getFlags (uint32 mask) const
 Get or set one or more of the visualizer flags. More...
void setFlags (uint32 mask, bool onoff)
void updateRampFromMultiParm (fpreal t, const PRM_Parm &m, UT_Ramp &ramp, bool *time_dep=NULL)
int getSerialNum ()
void bumpSerialNum ()
virtual void copyParmValues (const VIS_Visualizer *other_vis)
 Set the values of common parameters to those of other_vis. More...
virtual VISF_VisualizercastToVISF ()

Static Public Member Functions

static void buildGroups (void *data, PRM_Name *menuEntries, int thelistsize, const PRM_SpareData *spare, const PRM_Parm *parm)
static void buildAttributes (void *data, PRM_Name *menuEntries, int thelistsize, const PRM_SpareData *spare, const PRM_Parm *parm)

Protected Member Functions

 VIS_Visualizer (const VIS_Visualizer &src)
 Copy constructore. More...
virtual void cookMyVisualizer ()=0
int cookVersion () const

Protected Attributes



class VIS_Type
class VIS_Table
class VIS_Mount
class VIS_Manager
class VISF_Dispatcher
class VISF_Setup

Detailed Description

Definition at line 57 of file VIS_Visualizer.h.

Constructor & Destructor Documentation

VIS_Visualizer::VIS_Visualizer ( )
virtual VIS_Visualizer::~VIS_Visualizer ( )
VIS_Visualizer::VIS_Visualizer ( const VIS_Visualizer src)

Copy constructore.

Member Function Documentation

static void VIS_Visualizer::buildAttributes ( void data,
PRM_Name menuEntries,
int  thelistsize,
const PRM_SpareData spare,
const PRM_Parm parm 
static void VIS_Visualizer::buildGroups ( void data,
PRM_Name menuEntries,
int  thelistsize,
const PRM_SpareData spare,
const PRM_Parm parm 
void VIS_Visualizer::bumpSerialNum ( )

We may need to bump the serial number manually. One example is when the visualizer is moved from one table to another, particularly from one node's table to another.

virtual VISF_Visualizer* VIS_Visualizer::castToVISF ( )
virtual void VIS_Visualizer::cookMyVisualizer ( )
protectedpure virtual

cookMyVisualizer is called during prior to a viewport render if since the last "cook" the visualizer parameters have changed. The purpose of cookMyVisualizer method is to:

  1. read the parameters and cache their values,
  2. determine whether any of the changes in parameters warrant requesting for an update or refinement and submit the request,
  3. set visualizer flags according to its current state,
  4. possibly anything else that involves changing the member variables of the visualizer particularly since essentially all other virtual methods on a visualizer, most importatly createPrimitive and filterPrimitive are const due to fact that at the state of the visualizer should not change by or depend on its processing of any particular primitive.
int VIS_Visualizer::cookVersion ( ) const

Definition at line 171 of file VIS_Visualizer.h.

virtual void VIS_Visualizer::copyParmValues ( const VIS_Visualizer other_vis)

Set the values of common parameters to those of other_vis.

bool VIS_Visualizer::enableParm ( const char *  pn,
int  state,
int  v = -1 

Helper methods to enable/disable or set visibility of parameters.

uint32 VIS_Visualizer::getFlags ( uint32  mask) const

Get or set one or more of the visualizer flags.

VIS_Mount* VIS_Visualizer::getMount ( ) const

Definition at line 110 of file VIS_Visualizer.h.

PRM_ParmList* VIS_Visualizer::getParmList ( )
VIS_ParmsMicroNode* VIS_Visualizer::getParmsMicroNode ( )

Definition at line 84 of file VIS_Visualizer.h.

int VIS_Visualizer::getSerialNum ( )

Returns the visualizer's construction serial number. This is copied from a global counter which is incremented each time a visualizer (of any type) is created. It is used, e.g., in VISF_Primitive to ensure that visualizer being referenced by the primitive is the same as the one which has created it.

Definition at line 139 of file VIS_Visualizer.h.

virtual PRM_Template* VIS_Visualizer::getTemplateList ( ) const
pure virtual
int VIS_Visualizer::getTypeId ( ) const

Definition at line 82 of file VIS_Visualizer.h.

bool VIS_Visualizer::load ( UT_IStream is)
void VIS_Visualizer::requestAttribute ( const char *  attr,
GA_AttributeOwner  owner = GA_ATTRIB_INVALID 

Request the named attribute be "filled" during the update of any GR_Primitive in a detail on which this visualizer acts. This is used, e.g., for preparing decoration rendering based on a particualr attribute.

void VIS_Visualizer::requestRefinement ( )

Request for an update or refinement due to changes in visualizer parameters. These are to be used only from the visualizers cook method (cookMyVisualizer). They take effect if the visualizer is active in some context or else when the visualizer becomes first active in some context. Note that the flags NeedsRefine and NeedsUpdate ensure that a refinement or update is triggered for the visualizer if it has "missed" the latest occurrence of these events due to being inactive. However, the visualizer must explicitly request for updates or refinements after cooking its parameters or else its parameter list version is not bumped. This is to prevent automatic updates and refinements due to parameter change and to only trigger them for changes to parameters that truly affect the existing or created geometry.

void VIS_Visualizer::requestUpdate ( )
bool VIS_Visualizer::save ( std::ostream &  os)

Save and load method: these only write or read the visualizers parameters to or from the given stream.

void VIS_Visualizer::setFlags ( uint32  mask,
bool  onoff 
bool VIS_Visualizer::setVisibleState ( const char *  pn,
bool  state,
int  v = -1 
virtual bool VIS_Visualizer::updateParmsFlags ( )

This virtual is called when a visualizer parameter is changed to allow changing the visibility or enabled state of related parameters.

Definition at line 68 of file VIS_Visualizer.h.

void VIS_Visualizer::updateRampFromMultiParm ( fpreal  t,
const PRM_Parm m,
UT_Ramp ramp,
bool *  time_dep = NULL 

Friends And Related Function Documentation

friend class VIS_Manager

Definition at line 180 of file VIS_Visualizer.h.

friend class VIS_Mount

Definition at line 179 of file VIS_Visualizer.h.

friend class VIS_Table

Definition at line 178 of file VIS_Visualizer.h.

friend class VIS_Type

Definition at line 177 of file VIS_Visualizer.h.

friend class VISF_Dispatcher

Definition at line 181 of file VIS_Visualizer.h.

friend class VISF_Setup

Definition at line 182 of file VIS_Visualizer.h.

Member Data Documentation

PRM_ParmList* VIS_Visualizer::myParmList

Definition at line 173 of file VIS_Visualizer.h.

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