| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef PLANAR_ENTITY_INTERFACE_HEADER
- #define PLANAR_ENTITY_INTERFACE_HEADER
- //CCCoreLib
- #include <CCGeom.h>
- //qCC_gl
- #include <ccGLDrawContext.h>
- //! Interface for a planar entity
- class ccPlanarEntityInterface
- {
- public:
-
- //! Default constructor
- ccPlanarEntityInterface();
- //! Show normal vector
- inline void showNormalVector(bool state) { m_showNormalVector = state; }
- //! Whether normal vector is shown or not
- inline bool normalVectorIsShown() const { return m_showNormalVector; }
- //! Returns the entity normal
- virtual CCVector3 getNormal() const = 0;
- virtual ~ccPlanarEntityInterface() = default;
- protected: //members
- //! Draws a normal vector (OpenGL)
- void glDrawNormal(CC_DRAW_CONTEXT& context, const CCVector3& pos, float scale, const ccColor::Rgb* color = 0);
- //! Whether the facet normal vector should be displayed or not
- bool m_showNormalVector;
- };
- #endif //PLANAR_ENTITY_INTERFACE_HEADER
|