VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtDepthOnlyRenderMarker.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <map>
15 #include <osg/StateAttribute>
16 #include <osg/Texture2D>
17 
18 namespace osg
19 {
20  class State;
21 }
22 
23 namespace makVrv
24 {
25 
26  class DT_DLL_VRVOSG DtDepthOnlyRenderMarker : public osg::Texture2D
27  {
28  public:
29  static const osg::StateAttribute::Type DEPTH_ONLY_MARKER_TYPE;
30 
31  static const unsigned int DEPTH_ONLY_MARKER_TEXTURE_UNIT;
32 
34 
35  DtDepthOnlyRenderMarker(const DtDepthOnlyRenderMarker& copy, const osg::CopyOp& copyOp =
36  osg::CopyOp::SHALLOW_COPY);
37 
38  virtual ~DtDepthOnlyRenderMarker();
39 
40  virtual void apply(osg::State& state) const;
41 
42  virtual int compare(const StateAttribute& sa) const;
43 
44  void setIndex(unsigned int index) { myIndex = index; }
45 
46  unsigned int index() const { return myIndex; }
47 
48  virtual osg::Object* cloneType() const { return new DtDepthOnlyRenderMarker(); }
49 
50  virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new DtDepthOnlyRenderMarker (*this,copyop); }
51 
52  virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const DtDepthOnlyRenderMarker *>(obj)!=NULL; }
53 
54  virtual const char* libraryName() const { return "makVrv"; }
55 
56  virtual const char* className() const { return "DtDepthOnlyRenderMarker"; }
57 
58  virtual Type getType() const { return DEPTH_ONLY_MARKER_TYPE; }
59 
60  private:
61  unsigned int myIndex;
62  };
63 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)