00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 #ifndef _SO_VRMLVERTEX_SHAPE_
00051 #define _SO_VRMLVERTEX_SHAPE_
00052
00053 #include <Inventor/SbBasic.h>
00054
00055 #include <Inventor/fields/SoMFUInt32.h>
00056 #include <Inventor/fields/SoSFNode.h>
00057 #include <Inventor/fields/SoSFBool.h>
00058 #include <Inventor/nodes/SoNode.h>
00059 #include <Inventor/nodes/SoNormalBinding.h>
00060 #include <Inventor/nodes/SoMaterialBinding.h>
00061 #include <Inventor/nodes/SoTextureCoordinateBinding.h>
00062 #include <Inventor/VRMLnodes/SoVRMLGeometry.h>
00063 #include <Inventor/elements/SoShapeStyleElement.h>
00064 #include <Inventor/elements/SoMaterialBindingElement.h>
00065 #include <Inventor/elements/SoNormalBindingElement.h>
00066 #include <Inventor/threads/SbThreadRWMutex.h>
00067
00068
00069 #if defined(OIV_IGNORE_VRML_DEPRECATED)
00070 #include <SoDeprecationRules.h>
00071 #pragma push_macro("SoDEPRECATED_CLASS")
00072 #pragma push_macro("SoDEPRECATED_TYPEDEF")
00073 #undef SoDEPRECATED_CLASS
00074 #undef SoDEPRECATED_TYPEDEF
00075 #define SoDEPRECATED_CLASS(x,y)
00076 #define SoDEPRECATED_TYPEDEF(x,y)
00077 #endif
00078
00080
00081
00082
00083
00084
00085
00086
00087
00089
00090 class SoNormalBundle;
00091 class SoNormalCache;
00092 class SoState;
00093 class SoDEPRECATED SoVRMLVertexShape : public SoVRMLGeometry {
00135
00136 SO_NODE_ABSTRACT_HEADER(SoVRMLVertexShape);
00137
00138 public:
00143 SoSFNode coord;
00148 SoSFNode texCoord;
00154 SoSFNode normal;
00160 SoSFNode color;
00166 SoSFBool colorPerVertex;
00172 SoSFBool normalPerVertex;
00173
00174 private:
00175
00176
00177
00178
00179
00180 virtual SbBool generateDefaultNormals(SoState *state,
00181 SoNormalBundle *nb);
00182
00183 private:
00184 static void initClass();
00185 static void exitClass();
00186 virtual void doAction(SoAction *action);
00187 virtual void GLRender(SoGLRenderAction *action);
00188 virtual void search(SoSearchAction *action);
00189 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00190 virtual void callback(SoCallbackAction *action);
00191 virtual void pick(SoPickAction *action);
00192
00193 virtual SoChildList *getChildren() const;
00194
00195 virtual SbBool validateNewFieldValue(SoField *pField,
00196 void *newValue);
00197
00198
00199 virtual void notify(SoNotList *list);
00200
00201
00202
00203 virtual void copyContents(const SoFieldContainer *fromFC,
00204 SbBool copyConnections);
00205 private:
00206 #if 0
00207 enum Binding {
00208 OVERALL = SoMaterialBindingElement::OVERALL,
00209 PER_PART = SoMaterialBindingElement::PER_PART,
00210 PER_PART_INDEXED = SoMaterialBindingElement::PER_PART_INDEXED,
00211 PER_FACE = SoMaterialBindingElement::PER_FACE,
00212 PER_FACE_INDEXED = SoMaterialBindingElement::PER_FACE_INDEXED,
00213 PER_VERTEX = SoMaterialBindingElement::PER_VERTEX,
00214 PER_VERTEX_INDEXED = SoMaterialBindingElement::PER_VERTEX_INDEXED
00215 };
00216 #endif
00217
00218 SoVRMLVertexShape();
00219
00220 virtual ~SoVRMLVertexShape();
00221
00222
00223
00224
00225 virtual SbBool shouldGLRender(SoGLRenderAction *action,
00226 SbBool isPointsOrLines);
00227
00228
00229
00230 SoVRMLVertexPropertyCache vpCache;
00231
00232
00233
00234 void setNormalCache(SoState *state,
00235 int numNormals, const SbVec3f *normals,
00236 const SoNormalBindingElement::Binding binding
00237 );
00238
00239
00240 SoNormalCache *getNormalCache() const { return normalCache; }
00241
00242
00243
00244 SoChildList *children;
00245 friend class SoPath;
00246
00247
00248 SbThreadRWMutex *vpCacheMutex;
00249
00250 private:
00251 void rebuildChildrenList();
00252
00253 SoNormalCache *normalCache;
00254
00255 private:
00256
00257 SoMFUInt32 orderedrgba;
00258 unsigned char normalBinding;
00259 unsigned char materialBinding;
00260
00261 };
00262
00263
00264
00265 #if defined(OIV_IGNORE_VRML_DEPRECATED)
00266 #pragma pop_macro("SoDEPRECATED_TYPEDEF")
00267 #pragma pop_macro("SoDEPRECATED_CLASS")
00268 #endif
00269
00270 #endif
00271