50#include <Inventor/caches/SoCache.h>
52#define PO_KIT_ADD_FIELD(_fieldName,_defValue,_fieldList)\
53 _fieldList.append(&_fieldName) ;\
54 SO_KIT_ADD_FIELD(_fieldName, _defValue) ;
198 {
return m_isObjBuilt ; }
302 static void finish() ;
303 static bool isInitialized();
305 static void initClass() ;
306 static void exitClass() ;
312 virtual void basicObjectChange(
PbBase *basicObj) ;
315 void enableDomainTransform(
SbBool flag)
316 { m_isDomainTrans = flag ; }
331 void setStateValid(
bool isStateValid )
333 m_isStateValid = isStateValid;
346 struct FieldSensorList {
359 virtual void setDefaultOnNonWritingFields() ;
370 virtual void manageBasicObjectChange(
PbBase *basicObj,
PbBase **obj) ;
376 SbBool isAnyFieldsHasChanged()
377 {
return m_someFieldsHasChanged ; }
380 void emptyListFieldsChanged() { m_listFieldsChanged.
truncate(0) ; }
383 void setListFieldsDefault(
const SoFieldList &fieldLst) ;
386 void setDomainTransform(
PbDomain *domain) ;
389 SbBool isDomainTransformEnabled()
const
390 {
return m_isDomainTrans ; }
393 void setDomainUsedForRebuild(
SbBool flag)
394 { m_isDomUseForRebuild = flag ; }
397 SbBool isDomainUsedForRebuild()
const
398 {
return m_isDomUseForRebuild ; }
401 virtual void preRebuild() ;
404 virtual void postRebuild() ;
414 void storeFieldsChanged(
SbBool store)
415 { needToStoreFieldsChanged = store ; }
420 void createFieldSensorList(
int numFields, FieldSensorList *sensorList) ;
421 void deleteFieldSensorList(FieldSensorList *sensorList) ;
422 void attachFieldSensorList(
const FieldSensorList &sensorList,
424 void detachFieldSensorList(
const FieldSensorList &sensorList) ;
425 static void fieldSensorCB(
void *data,
SoSensor *sensor) ;
429 SbBool isStateValid()
const
430 {
return m_isStateValid ; }
435 void addElementCache()
437 if(isStateValid() && !isCacheValid())
438 m_cache->addElement(getState()->
template getConstElement<T>());
444 void rebuildCache(SoCache **cache) ;
449 virtual void addElementsAllCaches() ;
456 void setCacheAlwaysRebuild(
SbBool flag)
457 { m_isCacheAlwaysRebuild = flag ; }
458 SbBool isCacheAlwaysRebuild()
const
459 {
return m_isCacheAlwaysRebuild ; }
463 SbBool isCacheValid()
const
464 {
return m_isCacheValid ; }
468 SbBool needToStoreFieldsChanged ;
476 SbBool m_hasBeenModified ;
479 SbBool m_isDomUseForRebuild ;
480 SbBool m_someFieldsHasChanged ;
481 PbDomain *m_domain, m_defaultDomain ;
490 SbBool m_isCacheAlwaysRebuild ;
499 SoCache *m_domainCache ;
508 void *m_preRebuildData, *m_postRebuildData ;
517 static SbBool m_isVRML2Mode ;
520 static void catchActionCB(
void *,
SoAction *) ;
521 static void catchActionLevel2CB(
void *,
SoAction *) ;
524 static int s_initRefCount;
526 static SbString s_soLdmValuationAction;
#define FALSE
Possible value of SbBool.
void SoCallbackCB(void *userData, SoAction *action)
Callback functions registered with this node should be of this type.
#define SO_KIT_CATALOG_ENTRY_HEADER(partName)
#define SO_KIT_ABSTRACT_HEADER(className)
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for all b...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for data ...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to define a domain...
TransformType
Transform type.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract base class for ...
void setUpdateMethod(UpdateMethodType type)
Sets scene graph update method.
virtual SbBool affectsState() const
See SoNode::affectsState() for explanations.
SbBool isBuilt() const
Indicates if the node kit has been built at least once.
static NodeWriteFormat getNodeWriteFormat()
Gets the node write format.
void addPreRebuildCallback(PoRebuildCB *cb, void *data)
Add a callback function to call when the node kit is rebuilt.
void setDomain(PbDomain *dom)
Sets a reference to a PbDomain object used to define the data limits of the graphics to be generated.
static void setTextType(TextType type)
Sets the type of text used.
void touchKit()
Indicates the node kit is modified.
static void setVRML2Mode(SbBool flag)
Set the VRML2 mode.
UpdateMethodType
Type of update method.
@ UPDATE_METHOD_IMMEDIATE
The kit is rebuilt immediately after each modification.
@ UPDATE_METHOD_ON_ACTION
The kit is rebuilt during a traversal (that is an action).
static void setNodeWriteFormat(NodeWriteFormat format)
Sets the node write format.
void removePreRebuildCallback(PoRebuildCB *cb, void *data=NULL)
Remove a callback function to call when the node kit is rebuilt.
void PoRebuildCB(void *userData, PoBase *base)
const PbDomain * getDomain() const
Gets a reference to a PbDomain object used to define the data limits of the graphics to be generated.
UpdateMethodType getUpdateMethod() const
Gets update method.
virtual SoNode * copy(SbBool copyConnections=FALSE) const
Copy method.
static TextType getTextType()
Gets the type of text used.
SbBool isModified() const
Return TRUE, if the kit has been modified, else otherwise.
void addPostRebuildCallback(PoRebuildCB *cb, void *data)
Add a callback function to call when the node kit is rebuilt.
NodeWriteFormat
Type of write format.
@ UNFOLD_NODE_WRITE_FORMAT
All MeshViz nodekits are written in an unfold format.
@ FOLD_NODE_WRITE_FORMAT
All MeshViz nodekits are written in a fold format.
static SbBool isVRML2Mode()
Gets the VRML2 mode (TRUE = VRML2 mode, FALSE Inventor mode)
void removePostRebuildCallback(PoRebuildCB *cb, void *data)
Remove a callback function to call when the node kit is rebuilt.
virtual void rebuild()
Forces the node kit to be rebuilt immediately.
virtual void truncate(int start)
Removes all pointers after one with given index, inclusive.
Class for smart character strings.
Abstract base class for all actions.
Base class for all node kits.
@ LINES
Draw only outlines (wireframe)
Abstract base class for objects that contain fields.
Base class for all fields.
Maintains a list of pointers to fields.
Sensor class that can be attached to Open Inventor fields.
Renders a scene graph using Open Inventor's Render Engine.
Base class for all group nodes.
Indexed polygonal face shape node.
Indexed polyline shape node.
Indexed triangle strip set shape node.
Node that specifies how multiple materials are bound to shapes.
Surface material definition node.
Abstract base class for all database nodes.
Quadrilateral mesh shape node.
Abstract base class for Open Inventor sensors.
Abstract base class for all shape nodes.
Writes a scene graph to a file.