VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtScribeBoxModelInstance.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtScribeBoxModelInstance.h,v $ $Revision: 1.10 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 
00015 #include <vrvOsg/vrvOsg.h>
00016 #include <vrvOsg/DtOsgModelInstance.h>
00017 
00018 #include <osg/Group>
00019 #include <osg/Geode>
00020 
00021 namespace makVrv
00022 {
00023    class DtDe;
00024    class DtSceneObject;
00025 
00028    class DT_DLL_VRVOSG DtScribeBoxModelInstance : public DtOsgModelInstance
00029    {
00030    public:
00032       DtScribeBoxModelInstance(DtDe& de, const std::string& uniqueName);
00033 
00035       ~DtScribeBoxModelInstance();
00036 
00039       virtual void  addToConnector( DtOsgSceneConnector* connector );
00040       
00043       virtual bool removeFromConnector( DtOsgSceneConnector* connector );
00044 
00046       virtual void drawBox();
00047       
00048       virtual void setColor( const osg::Vec4& color );
00049       virtual void setLineWidth( double lineWidth ); 
00050       
00051       virtual void setParentSceneObject( const DtUniqueID& sceneObj );
00052 
00054       virtual void setVisible(bool isVisible) {}
00055       
00057       virtual void setOccluded(bool);
00058 
00060       virtual void setLineSmoothing(bool);
00061 
00062    protected:
00063       void setNodeCullAndBin(osg::Node* n, bool isTransparent);   
00064       void updateScribeBoxSize();
00065       void updateLineSmoothing();
00066       void updateScribeBoxLineWidth();
00067       void updateScribeBoxColor();
00068       DtSceneObject* parentSceneObject();
00069       osg::Geometry* scribeBox( const osg::Vec3& center, float lengthX,
00070          float lengthY, float lengthZ );
00071 
00072       
00073    protected:
00074    
00075       osg::ref_ptr<osg::Group> myGroup;
00076       osg::ref_ptr<osg::Geode> myShapeGeode;
00077       osg::Vec4 myColor;
00078       double myLineWidth;
00079       std::string myUniqueName;
00080       DtUniqueID myParentSceneObject;
00081       bool myOccluded;
00082       bool myLineSmoothing;
00083 
00085       virtual void resetGeode();
00086    };
00087 }

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)