Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoShapeHintsElement.h
1 #ifndef COIN_SOSHAPEHINTSELEMENT_H
2 #define COIN_SOSHAPEHINTSELEMENT_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 SoShapeHintsElement : public SoElement {
30  typedef SoElement inherited;
31 
32  SO_ELEMENT_HEADER(SoShapeHintsElement);
33 public:
34  static void initClass(void);
35 protected:
36  virtual ~SoShapeHintsElement();
37 
38 public:
39  enum VertexOrdering {
40  UNKNOWN_ORDERING,
41  CLOCKWISE,
42  COUNTERCLOCKWISE,
43  ORDERING_AS_IS
44  };
45 
46  enum ShapeType {
47  UNKNOWN_SHAPE_TYPE,
48  SOLID,
49  SHAPE_TYPE_AS_IS
50  };
51 
52  enum FaceType {
53  UNKNOWN_FACE_TYPE,
54  CONVEX,
55  FACE_TYPE_AS_IS
56  };
57 
58  virtual void init(SoState * state);
59  virtual void push(SoState * state);
60  virtual void pop(SoState * state, const SoElement * prevtopelement);
61 
62  virtual SbBool matches(const SoElement * element) const;
63  virtual SoElement *copyMatchInfo(void) const;
64 
65  static void set(SoState * const state, SoNode * const node,
66  const VertexOrdering vertexOrdering,
67  const ShapeType shapeType, const FaceType faceType);
68  static void set(SoState * const state,
69  const VertexOrdering vertexOrdering,
70  const ShapeType shapeType, const FaceType faceType);
71  static void get(SoState * const state, VertexOrdering & vertexOrdering,
72  ShapeType & shapeType, FaceType & faceType);
73 
74  static VertexOrdering getVertexOrdering(SoState * const state);
75  static ShapeType getShapeType(SoState * const state);
76  static FaceType getFaceType(SoState * const state);
77 
78  static VertexOrdering getDefaultVertexOrdering();
79  static ShapeType getDefaultShapeType();
80  static FaceType getDefaultFaceType();
81 
82  virtual void print(FILE * file) const;
83 
84 protected:
85  void updateLazyElement(SoState * state);
86  virtual void setElt(VertexOrdering vertexOrdering,
87  ShapeType shapeType, FaceType faceType);
88 
89  VertexOrdering vertexOrdering;
90  ShapeType shapeType;
91  FaceType faceType;
92 
93 };
94 
95 #endif // !COIN_SOSHAPEHINTSELEMENT_H
static void initClass(void)
Definition: SoElement.cpp:507
virtual SbBool matches(const SoElement *element) const =0
Definition: SoElement.cpp:609
virtual void push(SoState *state)
Definition: SoElement.cpp:570
virtual void print(FILE *file=stdout) const
Definition: SoElement.cpp:595
The SoNode class is the base class for nodes used in scene graphs.Coin is a retained mode 3D visualiz...
Definition: SoNode.h:47
SoElement is the abstract base class for all elements.
Definition: SoElement.h:34
The SoState class manages the Coin scenegraph traversal state data.The SoState class is used by actio...
Definition: SoState.h:35
virtual void init(SoState *state)
Definition: SoElement.cpp:553
virtual SoElement * copyMatchInfo(void) const =0
virtual void pop(SoState *state, const SoElement *prevTopElement)
Definition: SoElement.cpp:585

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

Generated on Fri Sep 9 2016 for Coin by Doxygen 1.8.5.