// Copyright 2013 Trimble Navigation Limited. All Rights Reserved. #ifndef SKPTOXML_COMMON_XMLINHERITANCEMANAGER_H #define SKPTOXML_COMMON_XMLINHERITANCEMANAGER_H #include "../../common/xmlgeomutils.h" #include #include #include // CInheritanceManager - A cross-platform class that manages the properties // of geometric elements (faces and edges) that can be inherited from component // instances, groups and images. These properties are transformations to world // space, layers and materials. class CInheritanceManager { public: CInheritanceManager(); CInheritanceManager(bool bMaterialsByLayer); virtual ~CInheritanceManager(); void PushElement(SUGroupRef element); void PushElement(SUImageRef element); void PushElement(SUFaceRef element); void PushElement(SUEdgeRef element); void PopElement(); SULayerRef GetCurrentLayer() const; SUMaterialRef GetCurrentFrontMaterial() const; SUMaterialRef GetCurrentBackMaterial() const; SUColor GetCurrentEdgeColor() const; protected: // Methods void PushMaterial(SUDrawingElementRef drawing_element); void PushLayer(SUDrawingElementRef drawing_element); protected: // Data bool materials_by_layer_; std::vector layers_; std::vector front_materials_; std::vector back_materials_; std::vector edge_colors_; }; #endif // SKPTOXML_COMMON_XMLINHERITANCEMANAGER_H