VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtOsgSceneConnector.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (c) 2011 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 /*****************************************************************************
00006  * $RCSfile: DtOsgSceneConnector.h,v $ $Revision: 1.18 $ $State: Exp $
00007  *****************************************************************************/
00008 
00012 
00013 #pragma once
00014 
00015 #include <vrvOsg/vrvOsg.h>
00016 #include <vrvCore/DtUniqueID.h>
00017 
00018 #include <osg/ref_ptr>
00019 #include <osg/Switch>
00020 #include <osg/MatrixTransform>
00021 #include <vrvOsg/DtFastGroup.h>
00022 #include <vrvOsg/DtOsgRenderer.h>
00023 
00024 class DtVector;
00025 class DtTaitBryan;
00026 
00027 namespace makVrv
00028 {
00029 
00030    class DtDe;
00031    class DtOsgModelInstance;
00032 
00037    class DT_DLL_VRVOSG DtOsgSceneConnector
00038    {
00039    public:
00040 
00042       DtOsgSceneConnector( DtDe& );
00043 
00045       ~DtOsgSceneConnector();
00046 
00048       void addToScene( DtOsgModelInstance* osgModelInstance,
00049          const DtUniqueID& sceneObjectId, int modelSet, int visualizerType );
00050          
00052       void addToSceneAsProp( DtOsgModelInstance* osgModelInstance,
00053          const DtUniqueID& sceneObjectId );
00054 
00056       void removeFromScene( DtOsgModelInstance* osgModelInstance );
00057       
00059       void setPosition( const DtVector& position );
00060 
00062       void setOrientation( const DtTaitBryan& orientation );
00063 
00065       void setVisible( bool isVisible );
00066 
00068       void setSwitchedOff(bool switched);
00069 
00071       bool switchedOff() const;
00072 
00074       bool isVisible() const;
00075 
00077       void setModelScalingEnabled( bool b );
00078 
00080       bool modelScalingEnabled() const;
00081 
00084       void setLocalModelScalingEnabled( bool enabled );
00085 
00087       bool localModelScalingEnabled() const;
00088 
00090       void setLocalModelScalingAmount( float localScl );
00091 
00093       double localModelScalingAmount() const;
00094 
00096       DtOsgRenderer::SceneRoot findSceneParent();
00097 
00099       osg::Group* groupRoot();
00100 
00102       osg::MatrixTransform* transformRoot();
00103 
00107       void setSolidFlags(bool solid);
00108 
00109    protected:
00110 
00112       void setTransformModelScalingState();
00113 
00114    protected:
00115 
00116       osg::ref_ptr<DtFastMatrixTransform> myTransformNode;
00117       osg::ref_ptr<DtFastGroup> myGroupNode;
00118       osg::ref_ptr<DtFastGroup> myHiddenRoot;
00119       osg::ref_ptr<osg::Switch> mySwitch;
00120 
00121       int myModelSet;
00122       int myVisualizerType;
00123 
00124       bool myIsProp;
00125       bool myModelScalingEnabled;
00126       bool myLocalModelScalingEnabled;
00127 
00128       float myLocalModelScalingAmount;
00129       float myCurrentLocalModelScaling;
00130 
00131       DtDe& myDe;
00132 
00133    };
00134 
00135 }

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)