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

SoVertexAttribute.h
1 #ifndef COIN_SOVERTEXATTRIBUTE_H
2 #define COIN_SOVERTEXATTRIBUTE_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/nodes/SoNode.h>
28 #include <Inventor/nodes/SoSubNode.h>
29 #include <Inventor/elements/SoVertexAttributeElement.h>
30 #include <Inventor/fields/SoSFName.h>
31 #include <Inventor/fields/SoMField.h>
32 #include <Inventor/fields/SoSFEnum.h>
33 #include <Inventor/tools/SbPimplPtr.h>
34 
35 class SoMField;
36 class SoVertexAttributeP;
37 
38 class COIN_DLL_API SoVertexAttribute : public SoNode {
39  typedef SoNode inherited;
40 
41 public:
42  SoVertexAttribute(void);
43  static void initClass(void);
44 
45  static SoType getClassTypeId(void);
46  virtual SoType getTypeId(void) const;
47 
48  SoSFName name;
49  SoSFName typeName;
50 
51  SoMField * getValuesField(void) const;
52 
53  virtual void doAction(SoAction * action);
54  virtual void GLRender(SoGLRenderAction * action);
55  virtual void write(SoWriteAction * action);
56  virtual void copyContents(const SoFieldContainer * from,
57  SbBool copyconnections);
58  virtual void notify(SoNotList * l);
59 
60 protected:
61  virtual ~SoVertexAttribute(void);
62 
63  virtual SbBool readInstance(SoInput * in, unsigned short flags);
64 
65 private:
66  static SoType classTypeId;
67  static void * createInstance(void);
68  virtual const SoFieldData * getFieldData(void) const;
69 
70  void initFieldData(void);
71 
72  SoVertexAttribute(const SoVertexAttribute & rhs); // N/A
73  SoVertexAttribute & operator = (const SoVertexAttribute & rhs); // N/A
74 
75  SbPimplPtr<SoVertexAttributeP> pimpl;
76 
77 }; // SoVertexAttribute
78 
79 // *************************************************************************
80 
81 template <int Type>
82 class SoAnyVertexAttribute : public SoVertexAttribute {
83 public:
84 
85 private:
86  SoAnyVertexAttribute(void) { }
87 
88 }; // SoAnyVertexAttribute
89 
90 // *************************************************************************
91 
92 #endif // !COIN_SOVERTEXATTRIBUTE_H
The SoAction class is the base class for all traversal actions.
Definition: SoAction.h:68
The SoBase class is the top-level superclass for a number of class-hierarchies.
Definition: SoBase.h:36
virtual SoType getTypeId(void) const =0
The SoFieldContainer class is a base class for all classes that contain fields.
Definition: SoFieldContainer.h:34
virtual const SoFieldData * getFieldData(void) const
Definition: SoFieldContainer.cpp:738
The SoFieldData class is a container for a prototype set of fields.
Definition: SoFieldData.h:39
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition: SoGLRenderAction.h:41
The SoInput class is an abstraction of file import functionality.
Definition: SoInput.h:52
The SoMField class is the base class for fields which can contain multiple values.
Definition: SoMField.h:32
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:47
virtual void notify(SoNotList *l)
Definition: SoNode.cpp:439
virtual void doAction(SoAction *action)
Definition: SoNode.cpp:785
virtual SbBool readInstance(SoInput *in, unsigned short flags)
Definition: SoNode.cpp:1466
virtual void copyContents(const SoFieldContainer *from, SbBool copyconnections)
Definition: SoNode.cpp:1410
virtual void write(SoWriteAction *action)
Definition: SoNode.cpp:1217
virtual void GLRender(SoGLRenderAction *action)
Definition: SoNode.cpp:930
The SoNotList class is a list of SoNotRec notification records.
Definition: SoNotification.h:34
The SoSFName class is a container for an SbName.
Definition: SoSFName.h:31
The SoType class is the basis for the run-time type system in Coin.
Definition: SoType.h:50
A generic node for providing GL vertex attributes of various types.
Definition: SoVertexAttribute.h:38
The SoWriteAction class writes a scene graph to file.
Definition: SoWriteAction.h:33

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

Generated on Mon Jan 25 2021 for Coin by Doxygen 1.9.1.