VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLightManagerStateAttribute.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <osg/StateAttribute>
15 
16 namespace makVrv
17 {
18  class DtDe;
19  class DtOsgLightManager;
20 
25  class DtLightManagerStateAttribute : public osg::StateAttribute
26  {
27  public:
28 
30  DtLightManagerStateAttribute(DtDe& de, bool enabled);
31 
34  const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
35 
38 
39  private:
44 
45  public:
47  // OSG-required overrides:
48 
50  virtual void apply(osg::State& state) const override;
51 
52  // OSG-required overrides:
53  virtual osg::Object* cloneType() const override;
54 
55  virtual osg::Object* clone(const osg::CopyOp& copyop) const override;
56 
57  virtual bool isSameKindAs(const osg::Object* obj) const override;
58 
59  virtual const char *libraryName() const override;
60 
61  virtual const char *className() const override;
62 
63  virtual Type getType() const override;
64 
65  virtual bool getModeUsage(osg::StateAttribute::ModeUsage& usage) const override;
66 
67  virtual int compare(const StateAttribute& sa) const override;
69 
70  public:
74  static Type theStateAttributeType();
75 
76  protected:
78  bool myEnabled;
79 
81  };
82 
83 }
84 
virtual bool getModeUsage(osg::StateAttribute::ModeUsage &usage) const override
Apply the GLLights in the DtOsgLightManager.
virtual void apply(osg::State &state) const override
Apply the GLLights in the DtOsgLightManager.
virtual osg::Object * cloneType() const override
Apply the GLLights in the DtOsgLightManager.
virtual ~DtLightManagerStateAttribute()
DTOR.
virtual osg::Object * clone(const osg::CopyOp &copyop) const override
Apply the GLLights in the DtOsgLightManager.
DtOsgLightManager & myOsgLightManager
Definition: DtLightManagerStateAttribute.h:80
DtLightManagerStateAttribute()=delete
not allowed
virtual int compare(const StateAttribute &sa) const override
Apply the GLLights in the DtOsgLightManager.
DtDe & myDe
Definition: DtLightManagerStateAttribute.h:77
virtual const char * className() const override
Apply the GLLights in the DtOsgLightManager.
DtOsgLightManager receives LightSource nodes from the DtOsgCullVisitor, and collects them all here wh...
Definition: DtOsgLightManager.h:55
bool myEnabled
Definition: DtLightManagerStateAttribute.h:78
virtual bool isSameKindAs(const osg::Object *obj) const override
Apply the GLLights in the DtOsgLightManager.
DtLightManagerStateAttribute & operator=(const DtLightManagerStateAttribute &rhs)=delete
not allowed
Contains DLL export macros.
virtual const char * libraryName() const override
Apply the GLLights in the DtOsgLightManager.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
virtual Type getType() const override
Apply the GLLights in the DtOsgLightManager.
static Type theStateAttributeType()
static accessor for the type of this state attribute this state attribute type is used by the type() ...
A group node which applies lights maintained in the DtOsgLightManager at the top of the render graph...
Definition: DtLightManagerStateAttribute.h:25

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)