VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtLightManagerGroup.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtLightManagerGroup_H_
11 #define DtLightManagerGroup_H_
12 
15 #include <osg/Group>
16 
17 namespace makVrv
18 {
23  class DT_DLL_VRVOSG DtLightManagerGroup : public osg::Group
24  {
25  public:
26 
29 
32  const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY) :
33  Group(lmg, copyOp), myDe(lmg.myDe),
34  myLightManagerStateAttribute(dynamic_cast<DtLightManagerStateAttribute *>
35  (copyOp(lmg.myLightManagerStateAttribute.get())))
36  {
37  }
38 
39  // OSG required overrides:
40  virtual osg::Object* cloneType() const
41  {
42  return new DtLightManagerGroup (myDe);
43  }
44 
45  virtual osg::Object* clone(const osg::CopyOp& copyop) const
46  {
47  return new DtLightManagerGroup (*this,copyop);
48  }
49 
50  virtual bool isSameKindAs(const osg::Object* obj) const
51  {
52  return dynamic_cast<const DtLightManagerGroup *>(obj)!=NULL;
53  }
54 
55  virtual const char* className() const
56  {
57  return "DtLightManagerGroup";
58  }
59 
60  virtual const char* libraryName() const
61  {
62  return "vrvOsg";
63  }
64 
65  virtual void accept(osg::NodeVisitor& nv)
66  {
67  if (nv.validNodeMask(*this))
68  {
69  nv.pushOntoNodePath(this);
70  nv.apply(*this);
71  nv.popFromNodePath();
72  }
73  }
74 
76  virtual ~DtLightManagerGroup();
77 
79  void setStateSetModes(osg::StateSet&,
80  osg::StateAttribute::GLModeValue) const;
81 
83  void setLocalStateSetModes(osg::StateAttribute::GLModeValue =
84  osg::StateAttribute::ON);
85 
86  virtual void setThreadSafeRefUnref(bool threadSafe);
87 
88  virtual osg::BoundingSphere computeBound() const;
89 
90  void enableLighting(osg::ref_ptr<osg::Camera> camera, bool enable);
91 
92  protected:
93  osg::ref_ptr<DtLightManagerStateAttribute> myLightManagerStateAttribute;
95  };
96 
97 }
98 
99 #endif
100 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)