Katana Plug-in APIs 0.1

FnGLCoiHandle.h

00001 // Copyright (c) 2018 The Foundry Visionmongers Ltd. All Rights Reserved.
00002 
00003 #ifndef GLCOIHANDLE_H_
00004 #define GLCOIHANDLE_H_
00005 
00006 #include <string>
00007 #include <vector>
00008 
00009 #include "FnGLTransformManipulator.h"
00010 
00011 #include <FnViewer/plugin/FnManipulatorHandle.h>
00012 #include <FnViewer/plugin/FnMathTypes.h>
00013 #include <FnViewer/utils/FnDrawable.h>
00014 
00018 class GLCoiHandle :
00019     public Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle
00020 {
00021 public:
00023     GLCoiHandle();
00024 
00026     virtual ~GLCoiHandle();
00027 
00029     static Foundry::Katana::ViewerAPI::ManipulatorHandle* create()
00030     {
00031         return new GLCoiHandle();
00032     }
00033 
00035     static void flush(){}
00036 
00040     void draw();
00041 
00045     void applyXformToLocation(const std::string& locationPath,
00046                               const IMATH_NAMESPACE::M44d& xform,
00047                               bool isFinal)
00048     {
00049     }
00050 
00051 protected:
00055     virtual std::string getComponentName() { return std::string(); }
00056 
00057 private:
00062     void drawCross(const IMATH_NAMESPACE::V3d& cameraPosition,
00063                    const IMATH_NAMESPACE::V3d& cameraUpDirection,
00064                    const IMATH_NAMESPACE::V3d& centerOfInterest);
00065 
00066     std::vector<Vec3f> m_linesVertices;
00067     Foundry::Katana::ViewerUtils::Drawable m_linesMesh;
00068     std::vector<IMATH_NAMESPACE::V3d> m_centerOfInterests;
00069     Foundry::Katana::ViewerUtils::Drawable m_crossMesh;
00070 };
00071 
00072 #endif  // GLTranslateManipulator_H_
 All Classes Functions Variables Typedefs Enumerations Enumerator