VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtAnimationModelInstance.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtAnimationModelInstance.h,v $ $Revision: 1.24 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 #include <vrvOsg/vrvOsg.h>
00015 #include <vrvOsg/DtOsgModelInstance.h>
00016 #include <vrvOsg/DtParticleEffect.h>
00017 #include <vrvOsg/DtOsgRibbon.h>
00018 #include <matrix/vlVector.h>
00019 
00020 #include <osg/ref_ptr>
00021 #include <osg/BoundingBox>
00022 
00023 namespace osg
00024 {
00025    class Geode;
00026    class Group;
00027 }
00028 
00029 namespace makVrv
00030 {
00031    class DtParticleEffect;
00032 
00035    class DT_DLL_VRVOSG DtAnimationModelInstance : public DtOsgModelInstance
00036    {
00037    public:
00038 
00039       friend class DtAnimationModelInstanceCreator;
00040 
00042       virtual ~DtAnimationModelInstance();
00043 
00045       virtual void setIntensity(float intensity);
00046 
00048       virtual void setScale(float scale);
00049 
00051       virtual void setDuration(double seconds);
00052 
00054       virtual void setWind(const DtVector& windVector);
00055 
00058       virtual void setPosition( const DtVector& position);
00059       
00062       virtual bool realize(DtModelDefinition& definition);
00063 
00065       virtual void  addToConnector( DtOsgSceneConnector* connector );
00066 
00068       virtual bool removeFromConnector( DtOsgSceneConnector* connector );
00069 
00071       virtual void stop();
00072 
00074       virtual void start();
00075 
00077       virtual void pause();
00078 
00080       virtual void resume();
00081 
00083       virtual void setLoopMode(bool loopOn);
00084 
00086       virtual void setReverseAnimation(bool reverse);
00087 
00089       virtual void setVisible(bool isVisible) {}
00090 
00091    protected:
00092 
00093       DtAnimationModelInstance(DtDe& de);
00094 
00095       osg::BoundingBox calculateParentExtents(osg::Node* parent);
00096 
00098       osg::Node* findFromCache(DtModelDefinition& definition);
00099 
00101       osg::Node* loadNode(const std::string& filenameParam,
00102          const std::string& resourcePathList );
00103 
00104    protected:    
00105       osg::ref_ptr<DtParticleEffect> myEffect;
00106    };
00107 
00110    class DT_DLL_VRVOSG DtAnimationModelInstanceCreator : public DtModelInstanceCreator
00111    {
00112    public:
00113 
00115       static void registerCreator(DtDe& de);
00116 
00118       virtual ~DtAnimationModelInstanceCreator ();
00119 
00121       virtual DtModelInstance* create(DtDe& de);
00122 
00123    protected:
00124 
00125       DtAnimationModelInstanceCreator ();
00126    };
00127 }

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)