00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc. 00008 * 477 Richmond Street West, Suite 1001 00009 * Toronto, Ontario 00010 * Canada M5V 3E7 00011 * 416-504-9876 00012 */ 00013 00014 #ifndef __SIM_RenderParms_h__ 00015 #define __SIM_RenderParms_h__ 00016 00017 #include "SIM_API.h" 00018 #include "SIM_OptionsUser.h" 00019 #include "SIM_DataUtils.h" 00020 00021 class SIM_Object; 00022 00023 /// This class holds rendering options much like object rendering parameters. 00024 /// To use this data type, attach it as subdata to a SIM_Geometry that is 00025 /// being rendered. 00026 class SIM_API SIM_RenderParms : public SIM_Data, 00027 public SIM_OptionsUser 00028 { 00029 public: 00030 GET_DATA_FUNC_S(SIM_NAME_MATERIALSHOP, MaterialShopRaw); 00031 GET_DATA_FUNC_I(SIM_NAME_FORDISPLAY, ForDisplayRaw); 00032 GET_DATA_FUNC_I(SIM_NAME_FORRENDER, ForRenderRaw); 00033 00034 /// These methods just pass down to the raw options version 00035 /// SIM_RenderParmsVolatile uses this hook to do a just in time 00036 /// parm evaluation. 00037 virtual void getMaterialShop(const SIM_Object *, UT_String &str) const 00038 { 00039 getMaterialShopRaw(str); 00040 } 00041 virtual bool getForDisplay(const SIM_Object *) const 00042 { 00043 return getForDisplayRaw(); 00044 } 00045 virtual bool getForRender(const SIM_Object *) const 00046 { 00047 return getForRenderRaw(); 00048 } 00049 00050 00051 protected: 00052 explicit SIM_RenderParms(const SIM_DataFactory *factory); 00053 virtual ~SIM_RenderParms(); 00054 00055 private: 00056 static const SIM_DopDescription *getRenderParmsDopDescription(); 00057 00058 DECLARE_STANDARD_GETCASTTOTYPE(); 00059 DECLARE_DATAFACTORY(SIM_RenderParms, 00060 SIM_Data, 00061 "Rendering Parameters", 00062 getRenderParmsDopDescription()); 00063 }; 00064 00065 #endif 00066
1.5.9