VTK/Examples/Developers/Macros
From KitwarePublic
< VTK | Examples | Developers
Contents |
Macros
String
char* Filename; vtkSetStringMacro(Filename);
Bool
vtkSetMacro(UseTransform, bool); vtkGetMacro(UseTransform, bool); vtkBooleanMacro(UseTransform, bool);
Normal Variable
vtkGetMacro(ZRange, double); vtkSetMacro(ZRange, double);
Vector Variable
Defined as:
private: float Center[3];
Accessor/mutator:
vtkSetVector3Macro(Center, float); vtkGetVector3Macro(Center, float);
Allows you to call like:
float center[3] = {1.0, 0.0, 0.0}; filter->SetCenter(center);
or
filter->SetCenter(1.0, 0.0, 0.0);
SetClampMacro
- Restrict a parameter to a range - vtkSetClampMacro
NotUsed
When a parameter of a function is not used, "unused paramter" warnings are produced. To fix this, change the function declaration from:
void SimpleView::BorderCallback(vtkObject *caller, unsigned long eventId, void* callData)
to
void SimpleView::BorderCallback(vtkObject *caller, unsigned long vtkNotUsed(eventId), void* callData)