24 #ifndef PXVP20_UTILS_H
25 #define PXVP20_UTILS_H
30 #include "px_vp20/api.h"
32 #include "pxr/base/gf/matrix4d.h"
33 #include "pxr/base/gf/matrix4f.h"
34 #include "pxr/base/gf/vec4f.h"
35 #include "pxr/imaging/glf/simpleLightingContext.h"
37 #include <maya/M3dView.h>
38 #include <maya/MBoundingBox.h>
39 #include <maya/MDrawContext.h>
40 #include <maya/MHWGeometryUtilities.h>
41 #include <maya/MMatrix.h>
42 #include <maya/MSelectionContext.h>
47 PXR_NAMESPACE_OPEN_SCOPE
55 static bool setupLightingGL(
const MHWRender::MDrawContext& context);
57 static void unsetLightingGL(
const MHWRender::MDrawContext& context);
61 static GlfSimpleLightingContextRefPtr GetLightingContextFromDrawContext(
62 const MHWRender::MDrawContext& context);
71 static bool GetViewFromDrawContext(
72 const MHWRender::MDrawContext& context,
77 static bool RenderBoundingBox(
78 const MBoundingBox& bounds,
80 const MMatrix& worldViewMat,
81 const MMatrix& projectionMat);
88 static bool RenderWireCubes(
89 const std::vector<GfMatrix4f>& cubeXforms,
97 static bool GetSelectionMatrices(
98 const MHWRender::MSelectionInfo& selectionInfo,
99 const MHWRender::MDrawContext& context,
109 static void OutputDisplayStyleToStream(
110 const unsigned int displayStyle,
111 std::ostream& stream);
116 static void OutputDisplayStatusToStream(
117 const MHWRender::DisplayStatus displayStatus,
118 std::ostream& stream);
121 px_vp20Utils() =
delete;
122 ~px_vp20Utils() =
delete;
126 PXR_NAMESPACE_CLOSE_SCOPE
Stores a 4x4 matrix of double elements.
Basic type for a vector of 4 float components.