MeVisLab Toolbox Reference
SoShadowMatrixElement.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 /*
4  *
5  _______________________________________________________________________
6  ____________ W W W . A W A K E I D E A S . C O M ______________
7  |
8  |
9  | Description:
10  | ...
11  |
12  | Author(s) : Felix Ritter
13  |
14  ____________ W W W . A W A K E I D E A S . C O M ______________
15  _______________________________________________________________________
16  */
17 
18 #ifndef _SoShadowMatrixElement_H
19 #define _SoShadowMatrixElement_H
20 
21 #include "SoShadowSystem.h"
22 
24 
25 class SOSHADOW_CLASS_SPEC SoShadowMatrixElement : public SoReplacedElement
26 {
27 
28  SO_ELEMENT_HEADER(SoShadowMatrixElement);
29 
30  public:
31 
32  // Override standard matches to invalidate on cull-test
33  SbBool matches(const SoElement *elt) const override;
34 
35  // Copy method, takes care copying the data.
36  SoElement *copyMatchInfo() const override;
37 
38  // Sets the shadow matrix to the given matrix
39  static void set(SoState *state, SoNode *node,
40  const SbMatrix &matrix);
41 
42  // Returns current shadow matrix from the state
43  static void get(SoState *state, SbMatrix &matrix);
44  static const SbMatrix &get(SoState *state);
45  static const SbMatrix &get(SoState *state, SbBool &isValid);
46 
47  // Initializes the SoShadowMatrixElement class
48  static void initClass();
49 
50  protected:
51 
52  // Sets the matrix in an instance to given matrix
53  virtual void setElt(const SbMatrix &matrix);
54 
56 
57  private:
58  SbMatrix _shadowMatrix;
59 };
60 
62 
63 #endif // _SoShadowMatrixElement_H
#define __MEVIS_IV_END_NAMESPACE
Definition: OIVConfig.h:40
#define __MEVIS_IV_BEGIN_NAMESPACE
Definition: OIVConfig.h:39
#define SOSHADOW_CLASS_SPEC
Define a class export specifier needed to make the class exportable in dll's.
SbBool matches(const SoElement *elt) const override
static void initClass()
static void get(SoState *state, SbMatrix &matrix)
static const SbMatrix & get(SoState *state, SbBool &isValid)
static const SbMatrix & get(SoState *state)
static void set(SoState *state, SoNode *node, const SbMatrix &matrix)
virtual void setElt(const SbMatrix &matrix)
virtual ~SoShadowMatrixElement()
SoElement * copyMatchInfo() const override