version 3.3

VRS::Filter Class Reference

The filter controls evaluation of shapes by tags. More...

#include <vrs/filter.h>

Inheritance diagram for VRS::Filter:

VRS::MonoAttribute VRS::Attribute VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Types

enum  TestOperation {
  BIT_AND, BIT_OR, BIT_XOR, BIT_NOT_AND,
  BIT_NOT_OR, BIT_NOT_XOR, BIT_EQUAL, BIT_NOT_EQUAL
}

Public Member Functions

 VRS_SERIALIZABLE_CLASS_ENUM (TestOperation)
 Filter (FilterTag *referenceTag=NULL, TestOperation testOperation=Filter::BIT_EQUAL)
void setTest (TestOperation testOperation)
TestOperation getTest () const
void setReferenceTag (FilterTag *tag)
FilterTaggetReferenceTag () const
bool isOK (Engine *engine) const
 VRS_TYPEINFO (Filter, MonoAttribute)
 VRS_SERIALIZABLE (Filter)

Static Public Member Functions

static bool filterOK (Engine *engine)


Detailed Description

The filter controls evaluation of shapes by tags.

Member Enumeration Documentation

Enumerator:
BIT_AND 
BIT_OR 
BIT_XOR 
BIT_NOT_AND 
BIT_NOT_OR 
BIT_NOT_XOR 
BIT_EQUAL 
BIT_NOT_EQUAL 


Constructor & Destructor Documentation

VRS::Filter::Filter ( FilterTag referenceTag = NULL,
TestOperation  testOperation = Filter::BIT_EQUAL 
)

The filter attribute is used to enable the filtering of shapes by filter tags. If a filter is active, it compares the reference filter tag with the current filter tag by a logical operation. If that operation returns true, the shape is evaluated, otherwise it is ignored. Filters are checked at scene graph level. VRS TechniqueProcessor objects can also internally contain a shape filter.


Member Function Documentation

VRS::Filter::VRS_SERIALIZABLE_CLASS_ENUM ( TestOperation   ) 

void VRS::Filter::setTest ( TestOperation  testOperation  ) 

TestOperation VRS::Filter::getTest (  )  const

The test operation defines how the reference filter tag and a top filter tag of an engine are compared. The test operation represents a logical operation, calculated for the bit fields of both filter tags.

void VRS::Filter::setReferenceTag ( FilterTag tag  ) 

FilterTag* VRS::Filter::getReferenceTag (  )  const

Sets and gets the reference tag used for comparison. If no reference filter tag is specified, the comparison always returns true.

bool VRS::Filter::isOK ( Engine engine  )  const

Performs the test operation between the reference filter tag the current filter tag of an engine. The top filter-tag bits are the result of all pushed filter-tags according to their logical combine operation. If no top filter tag exists, false is returned. If no reference filter tag is specified, true is returned.

static bool VRS::Filter::filterOK ( Engine engine  )  [static]

Checks whether there is a filter object on the engine. If so, if checks whether the filter-tags and the filter match.

VRS::Filter::VRS_TYPEINFO ( Filter  ,
MonoAttribute   
)

VRS::Filter::VRS_SERIALIZABLE ( Filter   ) 


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

Generated on Mon May 21 06:00:17 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact