VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtDecalModelInstance.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (c) 2012 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <vrvOsg/vrvOsg.h>
00013 
00014 #include <vrvOsg/DtOsgModelInstance.h>
00015 
00016 #include <osg/ref_ptr>
00017 
00018 namespace osg
00019 {
00020    class Geode;
00021    class Group;
00022 }
00023 
00024 namespace makVrv
00025 {
00026 
00027    class DtOsgRibbon;
00028    class DtSceneObject;
00029 
00033    class DT_DLL_VRVOSG DtDecalModelInstance : public DtOsgModelInstance
00034    {
00035    public:
00036 
00038       virtual ~DtDecalModelInstance();
00039 
00042       virtual bool realize( DtModelDefinition& definition );
00043 
00045       virtual void addToConnector( DtOsgSceneConnector* connector );
00046 
00048       virtual bool removeFromConnector( DtOsgSceneConnector* connector );
00049 
00051       virtual void setParentSceneObject( const DtUniqueID& sceneObjID );
00052 
00055       virtual DtSceneObject* parentSceneObject();
00056 
00060       virtual void setOcclusionEnabled( bool enabled );
00061 
00063       virtual void setColor( const osg::Vec4& color );
00064 
00066       virtual void setVisible( bool isVisible ) {}
00067 
00069       virtual void update();
00070 
00071    protected:
00072 
00073       friend class DtDecalModelInstanceCreator;
00074 
00076       DtDecalModelInstance( DtDe& de );
00077 
00079       virtual DtOsgRibbon* createRibbonEffect( const osg::Vec3& pointA,
00080          const osg::Vec3& pointB );
00081 
00083       virtual osg::Node* findFromCache( DtModelDefinition& definition );
00084 
00085    protected:
00086 
00087       osg::ref_ptr<DtOsgRibbon> myRibbon;
00088       DtUniqueID myParentId;
00089       bool myOcclusionEnabled;
00090       bool myColorSet;
00091       osg::Vec4 myColor;
00092 
00093    };
00094 
00095 
00098    class DT_DLL_VRVOSG DtDecalModelInstanceCreator
00099       : public DtModelInstanceCreator
00100    {
00101    public:
00102 
00104       static void registerCreator( DtDe& de );
00105 
00107       virtual ~DtDecalModelInstanceCreator();
00108 
00110       virtual DtModelInstance* create( DtDe& de );
00111 
00112    protected:
00113 
00114       DtDecalModelInstanceCreator();
00115 
00116    };
00117 
00118 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)