![]() |
http://www.sim.no/ http://www.coin3d.org/ |
00001 #ifndef COIN_SOSHAPEHINTSELEMENT_H 00002 #define COIN_SOSHAPEHINTSELEMENT_H 00003 00004 /**************************************************************************\ 00005 * 00006 * This file is part of the Coin 3D visualization library. 00007 * Copyright (C) by Kongsberg Oil & Gas Technologies. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * ("GPL") version 2 as published by the Free Software Foundation. 00012 * See the file LICENSE.GPL at the root directory of this source 00013 * distribution for additional information about the GNU GPL. 00014 * 00015 * For using Coin with software that can not be combined with the GNU 00016 * GPL, and for taking advantage of the additional benefits of our 00017 * support services, please contact Kongsberg Oil & Gas Technologies 00018 * about acquiring a Coin Professional Edition License. 00019 * 00020 * See http://www.coin3d.org/ for more information. 00021 * 00022 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY. 00023 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00024 * 00025 \**************************************************************************/ 00026 00027 #include <Inventor/elements/SoSubElement.h> 00028 00029 class COIN_DLL_API SoShapeHintsElement : public SoElement { 00030 typedef SoElement inherited; 00031 00032 SO_ELEMENT_HEADER(SoShapeHintsElement); 00033 public: 00034 static void initClass(void); 00035 protected: 00036 virtual ~SoShapeHintsElement(); 00037 00038 public: 00039 enum VertexOrdering { 00040 UNKNOWN_ORDERING, 00041 CLOCKWISE, 00042 COUNTERCLOCKWISE, 00043 ORDERING_AS_IS 00044 }; 00045 00046 enum ShapeType { 00047 UNKNOWN_SHAPE_TYPE, 00048 SOLID, 00049 SHAPE_TYPE_AS_IS 00050 }; 00051 00052 enum FaceType { 00053 UNKNOWN_FACE_TYPE, 00054 CONVEX, 00055 FACE_TYPE_AS_IS 00056 }; 00057 00058 virtual void init(SoState * state); 00059 virtual void push(SoState * state); 00060 virtual void pop(SoState * state, const SoElement * prevtopelement); 00061 00062 virtual SbBool matches(const SoElement * element) const; 00063 virtual SoElement *copyMatchInfo(void) const; 00064 00065 static void set(SoState * const state, SoNode * const node, 00066 const VertexOrdering vertexOrdering, 00067 const ShapeType shapeType, const FaceType faceType); 00068 static void set(SoState * const state, 00069 const VertexOrdering vertexOrdering, 00070 const ShapeType shapeType, const FaceType faceType); 00071 static void get(SoState * const state, VertexOrdering & vertexOrdering, 00072 ShapeType & shapeType, FaceType & faceType); 00073 00074 static VertexOrdering getVertexOrdering(SoState * const state); 00075 static ShapeType getShapeType(SoState * const state); 00076 static FaceType getFaceType(SoState * const state); 00077 00078 static VertexOrdering getDefaultVertexOrdering(); 00079 static ShapeType getDefaultShapeType(); 00080 static FaceType getDefaultFaceType(); 00081 00082 virtual void print(FILE * file) const; 00083 00084 protected: 00085 void updateLazyElement(SoState * state); 00086 virtual void setElt(VertexOrdering vertexOrdering, 00087 ShapeType shapeType, FaceType faceType); 00088 00089 VertexOrdering vertexOrdering; 00090 ShapeType shapeType; 00091 FaceType faceType; 00092 00093 }; 00094 00095 #endif // !COIN_SOSHAPEHINTSELEMENT_H
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated on Thu Apr 28 2011 03:43:07 for Coin by Doxygen 1.7.4.