2004-06-15 03:11:04 +08:00
|
|
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2003 Robert Osfield
|
|
|
|
*
|
|
|
|
* This library is open source and may be redistributed and/or modified under
|
|
|
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
|
|
|
* (at your option) any later version. The full license is in LICENSE file
|
|
|
|
* included with this distribution, and on the openscenegraph.org website.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* OpenSceneGraph Public License for more details.
|
|
|
|
*/
|
|
|
|
#include <osg/TexGenNode>
|
|
|
|
|
|
|
|
using namespace osg;
|
|
|
|
|
|
|
|
TexGenNode::TexGenNode()
|
|
|
|
{
|
2004-06-17 22:02:15 +08:00
|
|
|
_textureUnit = 0;
|
2004-06-15 03:11:04 +08:00
|
|
|
_value = StateAttribute::ON;
|
|
|
|
_stateset = new StateSet;
|
|
|
|
_texgen = new TexGen;
|
|
|
|
}
|
|
|
|
|
|
|
|
TexGenNode::TexGenNode(const TexGenNode& cn, const CopyOp& copyop):
|
|
|
|
Group(cn,copyop),
|
2004-06-17 22:02:15 +08:00
|
|
|
_textureUnit(cn._textureUnit),
|
2004-06-15 03:11:04 +08:00
|
|
|
_value(cn._value),
|
|
|
|
_texgen(static_cast<TexGen*>(copyop(cn._texgen.get())))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-09-06 22:30:25 +08:00
|
|
|
TexGenNode::TexGenNode(TexGen *texgen)
|
|
|
|
{
|
|
|
|
_textureUnit = 0;
|
|
|
|
_value = StateAttribute::ON;
|
|
|
|
_stateset = new StateSet;
|
|
|
|
_texgen = texgen;
|
|
|
|
}
|
|
|
|
|
2004-06-15 03:11:04 +08:00
|
|
|
TexGenNode::~TexGenNode()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void TexGenNode::setTexGen(TexGen* texgen)
|
|
|
|
{
|
|
|
|
_texgen = texgen;
|
|
|
|
}
|