HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_RenderParms.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
7 
8 #ifndef __SIM_RenderParms_h__
9 #define __SIM_RenderParms_h__
10 
11 #include "SIM_API.h"
12 #include "SIM_OptionsUser.h"
13 #include "SIM_DataUtils.h"
14 
15 class SIM_Object;
16 
17 /// This class holds rendering options much like object rendering parameters.
18 /// To use this data type, attach it as subdata to a SIM_Geometry that is
19 /// being rendered.
21  public SIM_OptionsUser
22 {
23 public:
24  GET_DATA_FUNC_S(SIM_NAME_MATERIALSHOP, MaterialShopRaw);
25  GET_DATA_FUNC_I(SIM_NAME_FORDISPLAY, ForDisplayRaw);
26  GET_DATA_FUNC_I(SIM_NAME_FORRENDER, ForRenderRaw);
27 
28  /// These methods just pass down to the raw options version
29  /// SIM_RenderParmsVolatile uses this hook to do a just in time
30  /// parm evaluation.
31  virtual void getMaterialShop(const SIM_Object *, UT_String &str) const
32  {
33  getMaterialShopRaw(str);
34  }
35  virtual bool getForDisplay(const SIM_Object *) const
36  {
37  return getForDisplayRaw();
38  }
39  virtual bool getForRender(const SIM_Object *) const
40  {
41  return getForRenderRaw();
42  }
43 
44 
45 protected:
46  explicit SIM_RenderParms(const SIM_DataFactory *factory);
47  ~SIM_RenderParms() override;
48 
49 private:
50  static const SIM_DopDescription *getRenderParmsDopDescription();
51 
54  SIM_Data,
55  "Rendering Parameters",
56  getRenderParmsDopDescription());
57 };
58 
59 #endif
60 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
virtual bool getForRender(const SIM_Object *) const
#define GET_DATA_FUNC_I(DataName, FuncName)
#define SIM_NAME_MATERIALSHOP
Definition: SIM_Names.h:194
virtual void getMaterialShop(const SIM_Object *, UT_String &str) const
virtual bool getForDisplay(const SIM_Object *) const
#define SIM_API
Definition: SIM_API.h:12
#define SIM_NAME_FORRENDER
Definition: SIM_Names.h:129
#define GET_DATA_FUNC_S(DataName, FuncName)
#define SIM_NAME_FORDISPLAY
Definition: SIM_Names.h:128