35 #ifndef IECOREMAYA_PROCEDURALHOLDERUI_H
36 #define IECOREMAYA_PROCEDURALHOLDERUI_H
40 #include "OpenEXR/ImathColor.h"
42 #include "maya/MPxSurfaceShapeUI.h"
44 #include "IECore/Object.h"
46 #include "IECoreMaya/ProceduralHolder.h"
47 #include "IECoreMaya/DisplayStyle.h"
51 IE_CORE_FORWARDDECLARE( State );
52 IE_CORE_FORWARDDECLARE( Group );
53 IE_CORE_FORWARDDECLARE( StateComponent );
59 class ProceduralHolderUI :
public MPxSurfaceShapeUI
65 virtual ~ProceduralHolderUI();
67 virtual void getDrawRequests(
const MDrawInfo &info,
bool objectAndActiveOnly, MDrawRequestQueue &requests );
68 virtual void draw(
const MDrawRequest &request, M3dView &view )
const;
69 virtual bool select( MSelectInfo &selectInfo, MSelectionList &selectionList, MPointArray &worldSpaceSelectPts )
const;
71 static void *creator();
81 static void setWireFrameColors( MDrawRequest &request, M3dView::DisplayStatus status );
83 typedef std::map< IECoreGL::GroupPtr, IECoreGL::StatePtr > StateMap;
85 void hiliteGroups(
const ProceduralHolder::ComponentToGroupMap::mapped_type &groups, IECoreGL::StateComponentPtr hilite, IECoreGL::StateComponentPtr base )
const;
86 void unhiliteGroupChildren(
const std::string &name, IECoreGL::GroupPtr group, IECoreGL::StateComponentPtr base )
const;
87 void resetHilites()
const;
89 mutable StateMap m_stateMap;
90 mutable DisplayStyle m_displayStyle;
92 struct LightingState {
93 unsigned int numMayaLights;
94 unsigned int numGlLights;
95 std::vector<Imath::Color4f> diffuses;
96 std::vector<Imath::Color4f> specs;
97 std::vector<Imath::Color4f> ambients;
100 bool cleanupLights(
const MDrawRequest &request, M3dView &view, LightingState *s )
const;
101 void restoreLights( LightingState *s )
const;
107 #endif // IECOREMAYA_PROCEDURALHOLDERUI_H
The namespace within which all CoreGL functionality is defined.
Definition: AlphaTexture.h:41
The IECoreMaya namespace holds all the functionality of libIECoreMaya.
Definition: BoolParameterHandler.h:44