File: ccPlanarEntityInterface.h

package info (click to toggle)
cloudcompare 2.11.3-7.1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 58,224 kB
  • sloc: cpp: 229,982; ansic: 30,723; makefile: 84; sh: 20
file content (36 lines) | stat: -rw-r--r-- 871 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef PLANAR_ENTITY_INTERFACE_HEADER
#define PLANAR_ENTITY_INTERFACE_HEADER

//CCLib
#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;

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