//Type of Glyph 1-Arrow 2-Line
//size of glyph Done
- if(bbGetInputIn() == NULL){
+ if(bbGetInputIn() == NULL)
+ {
printf("Warnning! GlyphPolyDataNormals::Process: Missing input PolyData\n");
bbSetOutputOut( NULL );
- }
- else if(bbGetInputRenderer() == NULL){
+
+ if(bbGetInputRenderer() != NULL)
+ {
+ if( (actorAdded==true) && (bbGetInputActive()==true) )
+ {
+ bbGetInputRenderer()->RemoveActor(normalsActor);
+ actorAdded = false;
+ }
+ } // if Renderer
+
+ } else if(bbGetInputRenderer() == NULL) {
printf("Warnning! GlyphPolyDataNormals::Process: Missing Renderer\n");
bbSetOutputOut( NULL );
- }
- else{
+ } else {
//Arrow Source
- arrow->SetTipResolution(16);
+ arrow->SetTipResolution(4);
arrow->SetTipLength(0.5);
arrow->SetTipRadius(0.2 * bbGetInputGlyphType());
arrow->Update();
bbGetInputColor()[1],
bbGetInputColor()[2]);
- if(bbGetInputRenderer() != NULL){
- if(actorAdded && !bbGetInputActive()){
+ if(bbGetInputRenderer() != NULL)
+ {
+ if( (actorAdded==true) && !(bbGetInputActive()==true) )
+ {
bbGetInputRenderer()->RemoveActor(normalsActor);
actorAdded = false;
- }
- else if(bbGetInputActive() && !actorAdded){
+ } else if(bbGetInputActive() && !actorAdded) {
bbGetInputRenderer()->AddActor(normalsActor);
actorAdded = true;
}
- }
+ } // if Renderer
bbSetOutputOut( normalsActor );
- }
+ } // if InputIn
}
//=====
// Here we initialize the input 'In' to 0
bbSetInputIn(NULL);
bbSetInputOpacity(1);
- bbSetInputActive(false);
+ bbSetInputActive(true);
bbSetInputMaskRatio(10);
std::vector<double> color;
color.push_back(0.0);
color.push_back(0.0);
color.push_back(0.5);
bbSetInputColor(color);
- bbSetInputSize(10);
+ bbSetInputSize(5);
bbSetInputGlyphType(1);
bbSetInputRenderer(NULL);
bbSetOutputOut(NULL);