First cut at class interfaces and stubs for implementations for the new osgShadow NodeKit
This commit is contained in:
21
src/osgShadow/GNUmakefile
Normal file
21
src/osgShadow/GNUmakefile
Normal file
@@ -0,0 +1,21 @@
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/Make/makedefs
|
||||
|
||||
|
||||
CXXFILES = \
|
||||
ShadowedScene.cpp\
|
||||
ShadowTechnique.cpp\
|
||||
ShadowMap.cpp\
|
||||
ShadowTexture.cpp\
|
||||
ShadowVolume.cpp\
|
||||
ParallelSplitShadowMap.cpp\
|
||||
Version.cpp\
|
||||
|
||||
DEF += -DOSGTEXT_LIBRARY
|
||||
|
||||
LIBS += -losgDB -losg $(GL_LIBS) $(OTHER_LIBS)
|
||||
|
||||
TARGET_BASENAME = osgText
|
||||
LIB = $(LIB_PREFIX)$(TARGET_BASENAME).$(LIB_EXT)
|
||||
|
||||
include $(TOPDIR)/Make/makerules
|
||||
27
src/osgShadow/ParallelSplitShadowMap.cpp
Normal file
27
src/osgShadow/ParallelSplitShadowMap.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 <osgShadow/ParallelSplitShadowMap>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osgShadow;
|
||||
|
||||
ParallelSplitShadowMap::ParallelSplitShadowMap()
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning: osgShadow::ParallelSplitShadowMap technique not implemented yet."<<std::endl;
|
||||
}
|
||||
|
||||
ParallelSplitShadowMap::ParallelSplitShadowMap(const ParallelSplitShadowMap& copy, const osg::CopyOp& copyop):
|
||||
ShadowTechnique(copy,copyop)
|
||||
{
|
||||
}
|
||||
27
src/osgShadow/ShadowMap.cpp
Normal file
27
src/osgShadow/ShadowMap.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 <osgShadow/ShadowMap>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osgShadow;
|
||||
|
||||
ShadowMap::ShadowMap()
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning: osgShadow::ShadowMap technique not implemented yet."<<std::endl;
|
||||
}
|
||||
|
||||
ShadowMap::ShadowMap(const ShadowMap& copy, const osg::CopyOp& copyop):
|
||||
ShadowTechnique(copy,copyop)
|
||||
{
|
||||
}
|
||||
25
src/osgShadow/ShadowTechnique.cpp
Normal file
25
src/osgShadow/ShadowTechnique.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 <osgShadow/ShadowTechnique>
|
||||
|
||||
using namespace osgShadow;
|
||||
|
||||
ShadowTechnique::ShadowTechnique()
|
||||
{
|
||||
}
|
||||
|
||||
ShadowTechnique::ShadowTechnique(const ShadowTechnique& copy, const osg::CopyOp& copyop):
|
||||
osg::Object(copy,copyop)
|
||||
{
|
||||
}
|
||||
27
src/osgShadow/ShadowTexture.cpp
Normal file
27
src/osgShadow/ShadowTexture.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 <osgShadow/ShadowTexture>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osgShadow;
|
||||
|
||||
ShadowTexture::ShadowTexture()
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning: osgShadow::ShadowTexture technique not implemented yet."<<std::endl;
|
||||
}
|
||||
|
||||
ShadowTexture::ShadowTexture(const ShadowTexture& copy, const osg::CopyOp& copyop):
|
||||
ShadowTechnique(copy,copyop)
|
||||
{
|
||||
}
|
||||
27
src/osgShadow/ShadowVolume.cpp
Normal file
27
src/osgShadow/ShadowVolume.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 <osgShadow/ShadowVolume>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osgShadow;
|
||||
|
||||
ShadowVolume::ShadowVolume()
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning: osgShadow::ShadowVolume technique not implemented yet."<<std::endl;
|
||||
}
|
||||
|
||||
ShadowVolume::ShadowVolume(const ShadowVolume& copy, const osg::CopyOp& copyop):
|
||||
ShadowTechnique(copy,copyop)
|
||||
{
|
||||
}
|
||||
58
src/osgShadow/ShadowedScene.cpp
Normal file
58
src/osgShadow/ShadowedScene.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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/Texture2D>
|
||||
#include <osg/CoordinateSystemNode>
|
||||
#include <osg/TexEnv>
|
||||
#include <osg/io_utils>
|
||||
|
||||
#include <osgUtil/CullVisitor>
|
||||
#include <osgShadow/ShadowedScene>
|
||||
|
||||
using namespace osgShadow;
|
||||
using namespace osg;
|
||||
|
||||
ShadowedScene::ShadowedScene()
|
||||
{
|
||||
setNumChildrenRequiringUpdateTraversal(1);
|
||||
}
|
||||
|
||||
ShadowedScene::ShadowedScene(const ShadowedScene& copy, const osg::CopyOp& copyop):
|
||||
osg::Group(copy,copyop)
|
||||
{
|
||||
setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()+1);
|
||||
}
|
||||
|
||||
void ShadowedScene::traverse(osg::NodeVisitor& nv)
|
||||
{
|
||||
if (nv.getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR)
|
||||
{
|
||||
Group::traverse(nv);
|
||||
return;
|
||||
}
|
||||
|
||||
if (nv.getVisitorType() != osg::NodeVisitor::CULL_VISITOR)
|
||||
{
|
||||
Group::traverse(nv);
|
||||
return;
|
||||
}
|
||||
|
||||
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(&nv);
|
||||
if (!cv)
|
||||
{
|
||||
Group::traverse(nv);
|
||||
return;
|
||||
}
|
||||
|
||||
Group::traverse(nv);
|
||||
}
|
||||
12
src/osgShadow/Version.cpp
Normal file
12
src/osgShadow/Version.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <osgShadow/Version>
|
||||
|
||||
const char* osgShadowGetVersion()
|
||||
{
|
||||
return "1.2";
|
||||
}
|
||||
|
||||
|
||||
const char* osgShaodowGetLibraryName()
|
||||
{
|
||||
return "OpenSceneGraph Shadow Library";
|
||||
}
|
||||
35
src/osgWrappers/osgShadow/ParallelSplitShadowMap.cpp
Normal file
35
src/osgWrappers/osgShadow/ParallelSplitShadowMap.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// ***************************************************************************
|
||||
//
|
||||
// Generated automatically by genwrapper.
|
||||
// Please DO NOT EDIT this file!
|
||||
//
|
||||
// ***************************************************************************
|
||||
|
||||
#include <osgIntrospection/ReflectionMacros>
|
||||
#include <osgIntrospection/TypedMethodInfo>
|
||||
#include <osgIntrospection/StaticMethodInfo>
|
||||
#include <osgIntrospection/Attributes>
|
||||
|
||||
#include <osg/CopyOp>
|
||||
#include <osg/Object>
|
||||
#include <osgShadow/ParallelSplitShadowMap>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
#ifdef OUT
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osgShadow::ParallelSplitShadowMap)
|
||||
I_BaseType(osgShadow::ShadowTechnique);
|
||||
I_Constructor0();
|
||||
I_ConstructorWithDefaults2(IN, const osgShadow::ParallelSplitShadowMap &, es, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY);
|
||||
I_Method0(osg::Object *, cloneType);
|
||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop);
|
||||
I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj);
|
||||
I_Method0(const char *, libraryName);
|
||||
I_Method0(const char *, className);
|
||||
END_REFLECTOR
|
||||
|
||||
35
src/osgWrappers/osgShadow/ShadowTechnique.cpp
Normal file
35
src/osgWrappers/osgShadow/ShadowTechnique.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// ***************************************************************************
|
||||
//
|
||||
// Generated automatically by genwrapper.
|
||||
// Please DO NOT EDIT this file!
|
||||
//
|
||||
// ***************************************************************************
|
||||
|
||||
#include <osgIntrospection/ReflectionMacros>
|
||||
#include <osgIntrospection/TypedMethodInfo>
|
||||
#include <osgIntrospection/StaticMethodInfo>
|
||||
#include <osgIntrospection/Attributes>
|
||||
|
||||
#include <osg/CopyOp>
|
||||
#include <osg/Object>
|
||||
#include <osgShadow/ShadowTechnique>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
#ifdef OUT
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osgShadow::ShadowTechnique)
|
||||
I_BaseType(osg::Object);
|
||||
I_Constructor0();
|
||||
I_ConstructorWithDefaults2(IN, const osgShadow::ShadowTechnique &, es, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY);
|
||||
I_Method0(osg::Object *, cloneType);
|
||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop);
|
||||
I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj);
|
||||
I_Method0(const char *, libraryName);
|
||||
I_Method0(const char *, className);
|
||||
END_REFLECTOR
|
||||
|
||||
35
src/osgWrappers/osgShadow/ShadowVolume.cpp
Normal file
35
src/osgWrappers/osgShadow/ShadowVolume.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// ***************************************************************************
|
||||
//
|
||||
// Generated automatically by genwrapper.
|
||||
// Please DO NOT EDIT this file!
|
||||
//
|
||||
// ***************************************************************************
|
||||
|
||||
#include <osgIntrospection/ReflectionMacros>
|
||||
#include <osgIntrospection/TypedMethodInfo>
|
||||
#include <osgIntrospection/StaticMethodInfo>
|
||||
#include <osgIntrospection/Attributes>
|
||||
|
||||
#include <osg/CopyOp>
|
||||
#include <osg/Object>
|
||||
#include <osgShadow/ShadowVolume>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
#ifdef OUT
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osgShadow::ShadowVolume)
|
||||
I_BaseType(osgShadow::ShadowTechnique);
|
||||
I_Constructor0();
|
||||
I_ConstructorWithDefaults2(IN, const osgShadow::ShadowVolume &, es, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY);
|
||||
I_Method0(osg::Object *, cloneType);
|
||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop);
|
||||
I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj);
|
||||
I_Method0(const char *, libraryName);
|
||||
I_Method0(const char *, className);
|
||||
END_REFLECTOR
|
||||
|
||||
49
src/osgWrappers/osgShadow/ShadowedScene.cpp
Normal file
49
src/osgWrappers/osgShadow/ShadowedScene.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
// ***************************************************************************
|
||||
//
|
||||
// Generated automatically by genwrapper.
|
||||
// Please DO NOT EDIT this file!
|
||||
//
|
||||
// ***************************************************************************
|
||||
|
||||
#include <osgIntrospection/ReflectionMacros>
|
||||
#include <osgIntrospection/TypedMethodInfo>
|
||||
#include <osgIntrospection/StaticMethodInfo>
|
||||
#include <osgIntrospection/Attributes>
|
||||
|
||||
#include <osg/CopyOp>
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Object>
|
||||
#include <osgShadow/ShadowTechnique>
|
||||
#include <osgShadow/ShadowedScene>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
#ifdef OUT
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osgShadow::ShadowedScene)
|
||||
I_BaseType(osg::Group);
|
||||
I_Constructor0();
|
||||
I_ConstructorWithDefaults2(IN, const osgShadow::ShadowedScene &, es, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY);
|
||||
I_Method0(osg::Object *, cloneType);
|
||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop);
|
||||
I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj);
|
||||
I_Method0(const char *, className);
|
||||
I_Method0(const char *, libraryName);
|
||||
I_Method1(void, accept, IN, osg::NodeVisitor &, nv);
|
||||
I_Method1(void, traverse, IN, osg::NodeVisitor &, nv);
|
||||
I_Method1(void, setRecievesShadowTraversalMask, IN, unsigned int, mask);
|
||||
I_Method0(unsigned int, getRecievesShadowTraversalMask);
|
||||
I_Method1(void, setCastsShadowTraversalMask, IN, unsigned int, mask);
|
||||
I_Method0(unsigned int, getCastsShadowTraversalMask);
|
||||
I_Method1(void, setShadowTechnique, IN, osgShadow::ShadowTechnique *, technique);
|
||||
I_Method0(osgShadow::ShadowTechnique *, getShadowTechnique);
|
||||
I_Method0(const osgShadow::ShadowTechnique *, getShadowTechnique);
|
||||
I_Property(unsigned int, CastsShadowTraversalMask);
|
||||
I_Property(unsigned int, RecievesShadowTraversalMask);
|
||||
I_Property(osgShadow::ShadowTechnique *, ShadowTechnique);
|
||||
END_REFLECTOR
|
||||
|
||||
Reference in New Issue
Block a user