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

SoVertexAttributeElement.h
1#ifndef COIN_SOVERTEXATTRIBUTEELEMENT_H
2#define COIN_SOVERTEXATTRIBUTEELEMENT_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/SoAccumulatedElement.h>
28#include <Inventor/elements/SoSubElement.h>
29#include <Inventor/tools/SbPimplPtr.h>
30
31class SoState;
32class SoMField;
33class SoVertexAttributeData;
34class SoVertexAttributeElementP;
35
36class COIN_DLL_API SoVertexAttributeElement : public SoAccumulatedElement {
37 typedef SoAccumulatedElement inherited;
38 SO_ELEMENT_HEADER(SoVertexAttributeElement);
39
40public:
41 static void initClass(void);
42 virtual void init(SoState * state);
43
44 virtual void push(SoState * state);
45 static void add(SoState * const state, SoVertexAttributeData * attribdata);
46
47 static const SoVertexAttributeElement * getInstance(SoState * const state);
48 unsigned int getNumAttributes(void) const;
49
50 typedef const char * Key;
51 typedef SoVertexAttributeData * Type;
52 typedef void AttributeApplyFunc(const Key & key, const Type & obj, void * closure);
53 void applyToAttributes(AttributeApplyFunc * func, void * closure) const;
54
55protected:
56 virtual ~SoVertexAttributeElement();
57
58 virtual void addElt(SoVertexAttributeData * attribdata);
59
60private:
61 // needed by SbPimplPtr
62 SoVertexAttributeElement(const SoVertexAttributeElement & rhs); // N/A
63 SoVertexAttributeElement & operator = (const SoVertexAttributeElement & rhs); // N/A
64
65 SbPimplPtr<SoVertexAttributeElementP> pimpl;
66};
67
68#endif // COIN_SOVERTEXATTRIBUTEELEMENT_H
The SoAccumulatedElement class is an abstract class for storing accumulated state.
Definition SoAccumulatedElement.h:30
virtual void push(SoState *state)
Definition SoAccumulatedElement.cpp:74
virtual void init(SoState *state)
Definition SoAccumulatedElement.cpp:66
The SoMField class is the base class for fields which can contain multiple values.
Definition SoMField.h:32
The SoState class manages the Coin scenegraph traversal state data.
Definition SoState.h:35

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

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.