VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtRibbonModelInstance.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 #include <vrvOsg/DtOsgRibbon.h>
00016 
00017 #include <matrix/vlVector.h>
00018 
00019 #include <osg/ref_ptr>
00020 
00021 namespace osg
00022 {
00023    class Geode;
00024    class Group;
00025 }
00026 
00027 namespace makVrv
00028 {
00029 
00030    class DtOsgRibbon;
00031    class DtSceneObject;
00032 
00036    class DT_DLL_VRVOSG DtRibbonModelInstance : public DtOsgModelInstance
00037    {
00038    public:
00039 
00041       virtual ~DtRibbonModelInstance();
00042 
00045       virtual bool realize( DtModelDefinition& definition );
00046 
00048       virtual void addToConnector( DtOsgSceneConnector* connector );
00049 
00050       virtual void updateRibbonWidth();
00051 
00053       virtual bool removeFromConnector( DtOsgSceneConnector* connector );
00054 
00056       virtual void setParentSceneObject( const DtUniqueID& sceneObjID );
00057 
00060       virtual DtSceneObject* parentSceneObject();
00061 
00064       virtual void setOcclusionEnabled( bool enabled );
00065 
00067       virtual void setRibbonSpacing( float spacing );
00068 
00073       virtual void setRibbonLength( int maxSamples );
00074 
00076       virtual void setColor( const osg::Vec4& color );
00077 
00079       virtual void setVisible( bool isVisible ) {}
00080 
00082       virtual void update();
00083 
00084    protected:
00085 
00086       friend class DtRibbonModelInstanceCreator;
00087 
00089       DtRibbonModelInstance( DtDe& de );
00090 
00092       virtual osg::Node* findFromCache( DtModelDefinition& definition );
00093 
00094    protected:
00095 
00096       osg::ref_ptr<DtOsgRibbon> myRibbon;
00097       DtUniqueID myParentId;
00098       bool myOcclusionEnabled;
00099       float myRibbonSpacing;
00100       int myRibbonLength;
00101       bool myColorSet;
00102       osg::Vec4 myColor;
00103 
00104    };
00105 
00106 
00109    class DT_DLL_VRVOSG DtRibbonModelInstanceCreator
00110       : public DtModelInstanceCreator
00111    {
00112    public:
00113 
00115       static void registerCreator( DtDe& de );
00116 
00118       virtual ~DtRibbonModelInstanceCreator();
00119 
00121       virtual DtModelInstance* create( DtDe& de );
00122 
00123    protected:
00124 
00126       DtRibbonModelInstanceCreator();
00127 
00128    };
00129 
00130 }

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)