SoShapeStyleElement.h Source File

| http://www.sim.no/ http://www.coin3d.org/

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

SoShapeStyleElement.h
1 #ifndef COIN_SOSHAPESTYLEELEMENT_H
2 #define COIN_SOSHAPESTYLEELEMENT_H
3
4 /**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25 \**************************************************************************/
26
27 #include <Inventor/elements/SoSubElement.h>
28
29 class COIN_DLL_API SoShapeStyleElement : public SoElement {
30 typedef SoElement inherited;
31
32 SO_ELEMENT_HEADER(SoShapeStyleElement);
33 public:
34 static void initClass(void);
35 protected:
36 virtual ~SoShapeStyleElement();
37
38 public:
39
40 // flags used for optimized testing of features
41 enum Flags {
42 LIGHTING = 0x00000100,
43 TEXENABLED = 0x00000200,
44 TEXFUNC = 0x00000400,
45 BBOXCMPLX = 0x00000800,
46 INVISIBLE = 0x00001000,
47 ABORTCB = 0x00002000,
48 OVERRIDE = 0x00004000,
49 TEX3ENABLED = 0x00008000,
50 BIGIMAGE = 0x00010000,
51 BUMPMAP = 0x00020000,
52 VERTEXARRAY = 0x00040000,
53 TRANSP_TEXTURE = 0x00080000,
54 TRANSP_MATERIAL = 0x00100000,
55 TRANSP_SORTED_TRIANGLES = 0x00200000,
56 SHADOWMAP = 0x00400000,
57 SHADOWS = 0x00800000
58 };
59
60 virtual void init(SoState * state);
61
62 virtual void push(SoState * state);
63 virtual void pop(SoState * state, const SoElement * prevTopElement);
64
65 virtual SbBool matches(const SoElement * element) const;
66 virtual SoElement * copyMatchInfo(void) const;
67
68 static const SoShapeStyleElement * get(SoState * const state);
69
70 unsigned int getFlags(void) const;
71 SbBool mightNotRender(void) const;
72 SbBool needNormals(void) const;
73 SbBool needTexCoords(void) const;
74 int getRenderCaseMask(void) const;
75
76 static void setDrawStyle(SoState * const state, const int32_t value);
77 static void setComplexityType(SoState * const state,
78 const int32_t value);
79 static void setTransparencyType(SoState * const state,
80 const int32_t value);
81 static void setTextureEnabled(SoState * const state, const SbBool value);
82 static void setTexture3Enabled(SoState * const state, const SbBool value);
83 static void setTextureFunction(SoState * const state,
84 const SbBool value);
85 static void setLightModel(SoState * const state, const int32_t value);
86 static void setOverrides(SoState * const state, const SbBool value);
87
88 static SbBool isScreenDoor(SoState * const state);
89 static int getTransparencyType(SoState * const state);
90 SbBool isTextureFunction(void) const;
91
92 static void setBumpmapEnabled(SoState * state, const SbBool value);
93 static void setBigImageEnabled(SoState * state, const SbBool value);
94 static void setVertexArrayRendering(SoState * state, const SbBool value);
95
96 static void setTransparentMaterial(SoState * state, const SbBool value);
97 static void setTransparentTexture(SoState * state, const SbBool value);
98
99 static void setShadowMapRendering(SoState * state, const SbBool value);
100 static void setShadowsRendering(SoState * state, const SbBool value);
101
102 private:
103
104 static SoShapeStyleElement * getElement(SoState * const state);
105 static const SoShapeStyleElement * getConstElement(SoState * const state);
106
107 unsigned int flags;
108 };
109
110 #endif // !COIN_SOSHAPESTYLEELEMENT_H
SoShapeStyleElement
The SoShapeStyleElement class is yet to be documented.FIXME: write doc.
Definition: SoShapeStyleElement.h:29
SoElement::getConstElement
static const SoElement * getConstElement(SoState *const state, const int stackIndex)
Definition: SoElement.h:114
SoElement::initClass
static void initClass(void)
Definition: SoElement.cpp:507
SoElement::matches
virtual SbBool matches(const SoElement *element) const =0
Definition: SoElement.cpp:609
SoElement::push
virtual void push(SoState *state)
Definition: SoElement.cpp:570
SoElement::getElement
static SoElement * getElement(SoState *const state, const int stackIndex)
Definition: SoElement.h:101
SoElement
SoElement is the abstract base class for all elements.
Definition: SoElement.h:34
SoState
The SoState class manages the Coin scenegraph traversal state data.The SoState class is used by actio...
Definition: SoState.h:35
SoElement::init
virtual void init(SoState *state)
Definition: SoElement.cpp:553
SoElement::copyMatchInfo
virtual SoElement * copyMatchInfo(void) const =0
SoElement::pop
virtual void pop(SoState *state, const SoElement *prevTopElement)
Definition: SoElement.cpp:585

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.