VR-Forces 4.1.1 Class Documentation
DtDiGuyOsgGraphicsLink.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtDiGuyOsgGraphicsLink.h,v $ $Revision: 1.13 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtDiGuyOsgGraphicsLink_H_
14 #define DtDiGuyOsgGraphicsLink_H_
15 
16 #include <vrvDiGuy/vrvDiGuy.h>
17 #include <diguyGraphicsLink.h>
18 #include <osg/ref_ptr>
19 #include <osg/MatrixTransform>
20 #include <osg/Switch>
21 
22 namespace makVrv
23 {
24  class DtSceneObject;
25  class DtDe;
26 
30  {
31  public:
32 
33  static diguyGraphicsLink* create(void* internal_data);
34 
35  //DTOR
36  virtual ~DtDiGuyOsgGraphicsLink();
37 
38  virtual void build();
39  virtual void unbuild();
40  virtual void attach_to_scene();
41  virtual void detach_from_scene();
42  virtual void attach_to_link(diguyGraphicsLink* link);
43  virtual void detach_from_link();
44  virtual void update();
45 
47  void useExternalNode(osg::MatrixTransform*);
48  void setExternalObject(DtSceneObject* object);
49 
50  void useInternalNodes();
51 
53  osg::MatrixTransform* get_dof_node();
54 
55  //Get the model root, this will be NULL if the link is not a base link.
56  osg::Group* modelRoot();
57 
58  void setVisible(bool visible);
59 
60  protected:
61 
62  //CTOR
63  DtDiGuyOsgGraphicsLink(DtDe& de,void* internal_data);
64 
65  void createModelRoot();
66  void releaseModelRoot();
67  protected:
68 
69  const std::string myNameRoot;
71  osg::ref_ptr<osg::MatrixTransform> myLinkOffsetNode;
72  osg::ref_ptr<osg::MatrixTransform> myLinkOrientationNode;
73  osg::ref_ptr<osg::MatrixTransform> myObjectTransformNode;
74  osg::ref_ptr<osg::MatrixTransform> myModelRoot;
75 
79  };
80 }
81 
82 #endif
83 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)