OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TexGenNode.h
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 
20 namespace osg {
21 
23 class OSG_EXPORT TexGenNode : public Group
24 {
25 
26  public:
27 
28  TexGenNode();
29  TexGenNode(TexGen* texgen);
30 
31  TexGenNode(const TexGenNode& tgb, const CopyOp& copyop=CopyOp::SHALLOW_COPY);
32 
34 
35 
37  {
39  ABSOLUTE_RF
40  };
41 
44  void setReferenceFrame(ReferenceFrame rf);
45 
47  ReferenceFrame getReferenceFrame() const { return _referenceFrame; }
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
#define OSG_EXPORT
Definition: Export.h:43
#define META_Node(library, name)
Definition: Node.h:59
void setTextureUnit(unsigned int textureUnit)
Definition: TexGenNode.h:50
const TexGen * getTexGen() const
Definition: TexGenNode.h:61
unsigned int _textureUnit
Definition: TexGenNode.h:70
Definition: AlphaFunc.h:19
unsigned int getTextureUnit() const
Definition: TexGenNode.h:52
ReferenceFrame getReferenceFrame() const
Definition: TexGenNode.h:47
TexGen * getTexGen()
Definition: TexGenNode.h:58
ReferenceFrame _referenceFrame
Definition: TexGenNode.h:73
osg::ref_ptr< TexGen > _texgen
Definition: TexGenNode.h:71