35 #ifndef IECOREMAYA_SCENESHAPEUI_H
36 #define IECOREMAYA_SCENESHAPEUI_H
38 #include "maya/MPxSurfaceShapeUI.h"
39 #include "maya/MTypes.h"
41 #include "IECore/Object.h"
43 #include "IECoreMaya/SceneShape.h"
44 #include "IECoreMaya/DisplayStyle.h"
48 IE_CORE_FORWARDDECLARE( State );
49 IE_CORE_FORWARDDECLARE( Group );
50 IE_CORE_FORWARDDECLARE( StateComponent );
57 class SceneShapeUI :
public MPxSurfaceShapeUI
63 virtual ~SceneShapeUI();
65 virtual void getDrawRequests(
const MDrawInfo &info,
bool objectAndActiveOnly, MDrawRequestQueue &requests );
66 virtual void draw(
const MDrawRequest &request, M3dView &view )
const;
67 virtual bool select( MSelectInfo &selectInfo, MSelectionList &selectionList, MPointArray &worldSpaceSelectPts )
const;
70 #if MAYA_API_VERSION >= 201300
71 virtual bool snap( MSelectInfo &snapInfo )
const;
74 static void *creator();
78 typedef std::map< IECoreGL::GroupPtr, IECoreGL::StatePtr > StateMap;
80 void hiliteGroups( IECoreGL::GroupPtr group, IECoreGL::StateComponentPtr hilite, IECoreGL::StateComponentPtr base )
const;
81 void unhiliteGroupChildren(
const std::string &name, IECoreGL::GroupPtr group, IECoreGL::StateComponentPtr base )
const;
82 void resetHilites()
const;
85 void selectionRayToWorldSpacePoint(
const MDagPath &camera,
const MSelectInfo &selectInfo,
float depth, MPoint &worldIntersectionPoint )
const;
90 mutable StateMap m_stateMap;
91 mutable DisplayStyle m_displayStyle;
99 static void setWireFrameColors( MDrawRequest &request, M3dView::DisplayStatus status );
101 struct LightingState {
102 unsigned int numMayaLights;
103 unsigned int numGlLights;
104 std::vector<Imath::Color4f> diffuses;
105 std::vector<Imath::Color4f> specs;
106 std::vector<Imath::Color4f> ambients;
109 bool cleanupLights(
const MDrawRequest &request, M3dView &view, LightingState *s )
const;
110 void restoreLights( LightingState *s )
const;
115 #endif // IECOREMAYA_SCENESHAPEUI_H
The namespace within which all CoreGL functionality is defined.
Definition: AlphaTexture.h:41
Definition: SceneInterface.h:69
The IECoreMaya namespace holds all the functionality of libIECoreMaya.
Definition: BoolParameterHandler.h:44