API Documentation
Loading...
Searching...
No Matches
ModelIterator Class Reference

A base class for easily transversing a model heirarchy, applying an overritten function at each level or for each object. More...

#include <ModelIterator.h>

Inheritance diagram for ModelIterator:
[legend]
Collaboration diagram for ModelIterator:
[legend]

Public Types

enum  ParseResult { e_continue_parsing , e_do_not_parse_children , e_finish_parsing }
 

Public Member Functions

Model currentModel () const
 
 ModelIterator ()
 
 ModelIterator (Buffer< Model > models)
 
 ModelIterator (const Model &model)
 
void parseAll ()
 
void parseAll (const Buffer< Model > &models)
 
void parseAll (const Model &model)
 
ParseResult parseNext ()
 

Public Attributes

bool depth_first = true
 
std::function< bool(const Model &, const Geometry &)> geo_filter
 
bool is_recursive = true
 
std::function< bool(const Model &, const Material &)> material_filter
 
PrimitiveProperty material_property = PrimitiveProperty::Solid
 
std::function< bool(const Model &)> model_filter
 
bool post_process_model = false
 
bool process_geometry = true
 
bool process_material = false
 
bool process_model = true
 
bool use_unit = false
 

Protected Member Functions

virtual void parseAllModels ()
 
Model popNextModel ()
 
virtual ParseResult postProcess (Model &model)
 
virtual ParseResult process (Model &model)
 
virtual ParseResult process (Model &model, Geometry &geo)
 
virtual ParseResult process (Model &model, Material &mat)
 
void removeFromPostProcessStack ()
 

Protected Attributes

Buffer< uint04m_model_parent_child_count
 
Buffer< Modelm_model_parent_stack
 
Buffer< Modelm_model_stack
 

Detailed Description

A base class for easily transversing a model heirarchy, applying an overritten function at each level or for each object.


Member Enumeration Documentation

◆ ParseResult

Enumerator
e_continue_parsing 
e_do_not_parse_children 
e_finish_parsing 

Constructor & Destructor Documentation

◆ ModelIterator() [1/3]

◆ ModelIterator() [2/3]

ModelIterator ( const Model & model)
explicit

◆ ModelIterator() [3/3]

ModelIterator ( Buffer< Model > models)
explicit

Member Function Documentation

◆ currentModel()

Model currentModel ( ) const

◆ parseAll() [1/3]

void parseAll ( )

◆ parseAll() [2/3]

void parseAll ( const Buffer< Model > & models)

◆ parseAll() [3/3]

void parseAll ( const Model & model)

◆ parseAllModels()

virtual void parseAllModels ( )
protectedvirtual

◆ parseNext()

ParseResult parseNext ( )

◆ popNextModel()

Model popNextModel ( )
protected

◆ postProcess()

virtual ParseResult postProcess ( Model & model)
protectedvirtual

Reimplemented in DXFBlockWriter, and SelectionInfo.

◆ process() [1/3]

◆ process() [2/3]

virtual ParseResult process ( Model & model,
Geometry & geo )
protectedvirtual

◆ process() [3/3]

virtual ParseResult process ( Model & model,
Material & mat )
protectedvirtual

◆ removeFromPostProcessStack()

void removeFromPostProcessStack ( )
protected

Member Data Documentation

◆ depth_first

bool depth_first = true

◆ geo_filter

std::function<bool(const Model&, const Geometry&)> geo_filter

◆ is_recursive

bool is_recursive = true

◆ m_model_parent_child_count

Buffer<uint04> m_model_parent_child_count
protected

◆ m_model_parent_stack

Buffer<Model> m_model_parent_stack
protected

◆ m_model_stack

Buffer<Model> m_model_stack
protected

◆ material_filter

std::function<bool(const Model&, const Material&)> material_filter

◆ material_property

◆ model_filter

std::function<bool(const Model&)> model_filter

◆ post_process_model

bool post_process_model = false

◆ process_geometry

bool process_geometry = true

◆ process_material

bool process_material = false

◆ process_model

bool process_model = true

◆ use_unit

bool use_unit = false

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