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

SoTextureCoordinateBundle.h
1#ifndef COIN_SOTEXTURECOORDINATEBUNDLE_H
2#define COIN_SOTEXTURECOORDINATEBUNDLE_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/bundles/SoBundle.h>
28#include <Inventor/SbBasic.h>
29#include <Inventor/system/inttypes.h>
30#include <Inventor/elements/SoGLTextureCoordinateElement.h>
31
32#include <Inventor/SbVec4f.h>
33
37class SoShape;
38
39
40class COIN_DLL_API SoTextureCoordinateBundle : public SoBundle {
41 typedef SoBundle inherited;
42public:
44 const SbBool forRendering,
45 const SbBool setUpDefault = TRUE);
47
48 SbBool needCoordinates(void) const;
49 SbBool isFunction(void) const;
50
51 const SbVec4f &get(const int index);
52 const SbVec4f &get(const SbVec3f &point, const SbVec3f &normal);
53
54 void send(const int index) const {
55 glElt->send(index);
56 }
57 void send(const int index, const SbVec3f &point,
58 const SbVec3f &normal) const {
59 glElt->send(index, point, normal);
60 }
61
62 SbBool needIndices(void) const;
63
64private:
65 const SoTextureCoordinateElement *coordElt;
67 unsigned int flags;
68
69 // misc stuff for default texture coordinate mappping
70 static const SbVec4f & defaultCB(void * userdata,
71 const SbVec3f & point,
72 const SbVec3f & normal);
73 static const SbVec4f & defaultCBMulti(void * userdata,
74 const SbVec3f & point,
75 const SbVec3f & normal);
76 SoShape * shapenode;
77 SbVec3f defaultorigo;
78 SbVec3f defaultsize;
79 SbVec4f dummyInstance;
80 int defaultdim0, defaultdim1;
81 void initDefaultCallback(SoAction * action);
82 void initDefault(SoAction * const action, const SbBool forRendering);
83 void initDefaultMulti(SoAction * action, const int unit);
84};
85
86
87#endif // !COIN_SOTEXTURECOORDINATEBUNDLE_H
The SbVec3f class is a 3 dimensional vector with floating point coordinates.
Definition SbVec3f.h:40
The SbVec4f class is a 4 dimensional vector with floating point coordinates.
Definition SbVec4f.h:40
The SoAction class is the base class for all traversal actions.
Definition SoAction.h:68
The SoBundle class is the superclass for all bundle classes.
Definition SoBundle.h:33
The SoGLTextureCoordinateElement class stores the current gltexture coordinates.
Definition SoGLTextureCoordinateElement.h:31
The SoShape class is the superclass for geometry shapes.
Definition SoShape.h:43
The SoTextureCoordinateBundle class simplifies texture coordinate handling.
Definition SoTextureCoordinateBundle.h:40
void send(const int index, const SbVec3f &point, const SbVec3f &normal) const
Definition SoTextureCoordinateBundle.h:57
void send(const int index) const
Definition SoTextureCoordinateBundle.h:54
Definition SoTextureCoordinateCache.h:34
The SoTextureCoordinateElement class is yet to be documented.
Definition SoTextureCoordinateElement.h:41

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

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