OpenSceneGraph 3.6.5
TexGenNode
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSG_TexGenNode
15#define OSG_TexGenNode 1
16
17#include <osg/Group>
18#include <osg/TexGen>
19
20namespace osg {
21
24{
25
26 public:
27
30
32
34
35
41
45
48
50 void setTextureUnit(unsigned int textureUnit) { _textureUnit = textureUnit; }
51
52 unsigned int getTextureUnit() const { return _textureUnit; }
53
55 void setTexGen(TexGen* texgen);
56
58 inline TexGen* getTexGen() { return _texgen.get(); }
59
61 inline const TexGen* getTexGen() const { return _texgen.get(); }
62
64 virtual void setThreadSafeRefUnref(bool threadSafe);
65
66 protected:
67
68 virtual ~TexGenNode();
69
70 unsigned int _textureUnit;
72
74};
75
76}
77
78#endif
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
TexGen encapsulates the OpenGL glTexGen (texture coordinate generation) state.
Definition TexGen:43
unsigned int _textureUnit
Definition TexGenNode:70
const TexGen * getTexGen() const
Get the const TexGen.
Definition TexGenNode:61
virtual void setThreadSafeRefUnref(bool threadSafe)
Set whether to use a mutex to ensure ref() and unref() are thread safe.
TexGen * getTexGen()
Get the TexGen.
Definition TexGenNode:58
osg::ref_ptr< TexGen > _texgen
Definition TexGenNode:71
TexGenNode(TexGen *texgen)
void setTexGen(TexGen *texgen)
Set the TexGen.
unsigned int getTextureUnit() const
Definition TexGenNode:52
virtual ~TexGenNode()
TexGenNode(const TexGenNode &tgb, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
void setTextureUnit(unsigned int textureUnit)
Set the texture unit that this TexGenNode is associated with.
Definition TexGenNode:50
META_Node(osg, TexGenNode)
void setReferenceFrame(ReferenceFrame rf)
Set the TexGenNode's ReferenceFrame, either to be relative to its parent reference frame.
ReferenceFrame getReferenceFrame() const
Get the TexGenNode's ReferenceFrame.
Definition TexGenNode:47
ReferenceFrame
Definition TexGenNode:37
@ RELATIVE_RF
Definition TexGenNode:38
@ ABSOLUTE_RF
Definition TexGenNode:39
ReferenceFrame _referenceFrame
Definition TexGenNode:73
#define OSG_EXPORT
Definition Export:39

osg logo
Generated at Wed Jul 23 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.