Commit | Line | Data |
---|---|---|
2166f0fa SK |
1 | // File: OpenGl_AspectFace.hxx |
2 | // Created: 13 July 2011 | |
3 | // Author: Sergey ZERCHANINOV | |
4 | // Copyright: OPEN CASCADE 2011 | |
5 | ||
6 | #ifndef _OpenGl_AspectFace_Header | |
7 | #define _OpenGl_AspectFace_Header | |
8 | ||
9 | #include <InterfaceGraphic_telem.hxx> | |
10 | #include <Aspect_InteriorStyle.hxx> | |
11 | ||
12 | #include <OpenGl_AspectLine.hxx> | |
13 | ||
14 | #define OPENGL_AMBIENT_MASK (1<<0) | |
15 | #define OPENGL_DIFFUSE_MASK (1<<1) | |
16 | #define OPENGL_SPECULAR_MASK (1<<2) | |
17 | #define OPENGL_EMISSIVE_MASK (1<<3) | |
18 | ||
19 | struct OPENGL_SURF_PROP | |
20 | { | |
21 | float amb, diff, spec, emsv; | |
22 | float trans, shine; | |
23 | float env_reflexion; | |
24 | int isphysic; | |
25 | unsigned int color_mask; | |
26 | TEL_COLOUR speccol, difcol, ambcol, emscol, matcol; | |
1c35b92f | 27 | DEFINE_STANDARD_ALLOC |
2166f0fa SK |
28 | }; |
29 | ||
30 | struct TEL_CONTEXT_FACE | |
31 | { | |
32 | Aspect_InteriorStyle InteriorStyle; | |
33 | int Edge; | |
34 | int Hatch; | |
35 | int DistinguishingMode; | |
36 | int CullingMode; | |
37 | OPENGL_SURF_PROP IntFront; | |
38 | OPENGL_SURF_PROP IntBack; | |
39 | int doTextureMap; | |
40 | int TexId; | |
41 | TEL_POFFSET_PARAM PolygonOffset; | |
1c35b92f | 42 | DEFINE_STANDARD_ALLOC |
2166f0fa SK |
43 | }; |
44 | ||
45 | #include <OpenGl_Element.hxx> | |
46 | ||
47 | class OpenGl_AspectFace : public OpenGl_Element | |
48 | { | |
49 | public: | |
50 | ||
51 | OpenGl_AspectFace (); | |
52 | virtual ~OpenGl_AspectFace () {} | |
53 | ||
54 | void SetContext (const CALL_DEF_CONTEXTFILLAREA &AContext); | |
55 | ||
56 | void SetContext (const TEL_CONTEXT_FACE &AContext) { myContext = AContext; } | |
57 | void SetAspectEdge (const OpenGl_AspectLine * AnAspectEdge) { myAspectEdge = *AnAspectEdge; } | |
58 | ||
59 | const TEL_CONTEXT_FACE & Context() const { return myContext; } | |
60 | const OpenGl_AspectLine * AspectEdge() const { return &myAspectEdge; } | |
61 | ||
62 | virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const; | |
63 | ||
64 | protected: | |
65 | ||
66 | TEL_CONTEXT_FACE myContext; | |
67 | OpenGl_AspectLine myAspectEdge; | |
68 | ||
69 | public: | |
1c35b92f | 70 | DEFINE_STANDARD_ALLOC |
2166f0fa SK |
71 | }; |
72 | ||
73 | #endif //_OpenGl_AspectFace_Header |