diff options
| author | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
|---|---|---|
| committer | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
| commit | bd0027e737c6512397f841c22786274ed74b927f (patch) | |
| tree | f7ffbdb8f3741bb7f24635616cc189cba5cb865c /vrayPlug/plugin/shaveVrayInstance.h | |
| download | shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.tar.xz shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.zip | |
Adding Shave-and-a-Haircut 9.6
Diffstat (limited to 'vrayPlug/plugin/shaveVrayInstance.h')
| -rw-r--r-- | vrayPlug/plugin/shaveVrayInstance.h | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/vrayPlug/plugin/shaveVrayInstance.h b/vrayPlug/plugin/shaveVrayInstance.h new file mode 100644 index 0000000..33288f5 --- /dev/null +++ b/vrayPlug/plugin/shaveVrayInstance.h @@ -0,0 +1,147 @@ +#ifndef _HAIR_VRAY_INSTANCE_H_ +#define _HAIR_VRAY_INSTANCE_H_ + +// Shave and a Haircut +// (c) 2019 Epic Games +// US Patent 6720962 + +/********************************************************************** + *< + FILE: shaveVrayInstance.h + + DESCRIPTION: VRay instance for regular hair + + CREATED BY: Vladimir Dubovoy <[email protected]> + + HISTORY: created 30-03-2010 + + *> + **********************************************************************/ + +// V-Ray headers +#include "vraybase.h" +#include "vraymayageom.h" +#include "vrayplugins.h" +#include "geometryclasses.h" +//own headers +#include "hairAPIvrayutil.h" +#include "shaveVrayPlugin.h" +#include "shaveVrayVoxelPrim.h" +#include "shaveVrayInstanceBase.h" +#include "shaveVrayShadeData.h" + +#if 0 +class shaveVrayInstance : public shaveVrayInstanceBase { +public: + + shaveVrayInstance(shaveVrayPlugin *plugin, + VR::MaterialInterface *mtl, VR::BSDFInterface *bsdf, int renderID, + VR::VolumetricInterface *volume, VR::LightList *lightList, const VR::TraceTransform &baseTM, int objectID, + const tchar *userAttributes, int primaryVisibility); + + void compileGeometry(VR::VRayRenderer *vray, VR::TraceTransform *tm, double *times, int tmCount); + void clearGeometry(VR::VRayRenderer *vray); + + +}; +#endif + + +class shaveVrayInstance : +#if defined VRAY30 + public VR::BaseMeshInstance, +#elif defined(VRAY40) + public VR::BaseInstance, +#endif + public shaveVrayInstanceBase{ +public: + //shaveVrayPlugin *plugin; //goes to base + + + shaveVrayInstance(shaveVrayPlugin *plugin, + VR::MaterialInterface *mtl, VR::BSDFInterface *bsdf, int renderID, + VR::VolumetricInterface *volume, VR::LightList *lightList, +#if defined(VRAY30) + const VR::TraceTransform &baseTM, +#elif defined(VRAY40) + const VR::Transform &baseTM, +#endif + int objectID, + const tchar *userAttributes, int primaryVisibility); + + ~shaveVrayInstance(); + +#if defined(VRAY30) + void compileGeometry(VR::VRayRenderer *vray, VR::TraceTransform *tm, double *times, int tmCount); +#elif defined(VRAY40) + void compileGeometry(VR::VRayRenderer *vray, const VR::Transform *tm, double *times, int tmCount) VRAY_OVERRIDE; +#endif + void clearGeometry(VR::VRayRenderer *vray) VRAY_OVERRIDE; + + //void freeMem(); + inline bool GetSquirrel() const {return squirrel();} + inline bool GetUseOwnBSDF() const { return ownbsdf();} + inline const VR::Color& GetSpecTint() const {return spectint();} + inline const VR::Color& GetSpecTint2() const {return spectint2();} + inline bool GetCameraVisibility() const {return cameraVisibility();} + inline bool GetReflVisibility() const {return reflVisibility();} + inline bool GetRefrlVisibility() const {return refrVisibility();} + inline bool GetLightVisibility() const {return lightVisibility();} + inline bool GetGiVisibility() const {return giVisibility();} + inline float GetSelfShadow() const {return selfshadow();} + inline float GetRecvShadow() const {return recvshadow();} + + inline shaveVrayShadeData* GetShData() const { return shdata();} + +protected: + ////const member access + inline bool tipfade() const {return m_tipfade;} + inline bool squirrel() const {return m_squirrel;} + inline bool ownbsdf() const {return m_ownbsdf;} + inline const VR::Color& spectint() const {return m_spectint;} + inline const VR::Color& spectint2() const {return m_spectint2;} + inline bool cameraVisibility() const {return m_cameraVisibility;} + inline bool lightVisibility() const {return m_lightVisibility;} + inline bool reflVisibility() const {return m_reflVisibility;} + inline bool refrVisibility() const {return m_refrVisibility;} + inline bool giVisibility() const {return m_giVisibility;} + inline float selfshadow() const {return m_selfshadow;} + inline bool recvshadow() const {return m_recvshadow;} + inline shaveVrayShadeData* shdata() const {return m_shdata;} + + ////member access + inline bool& _tipfade() {return m_tipfade;} + inline bool& _squirrel() {return m_squirrel;} + inline bool& _ownbsdf() {return m_ownbsdf;} + inline VR::Color& _spectint() {return m_spectint;} + inline VR::Color& _spectint2() {return m_spectint2;} + inline bool& _cameraVisibility(){return m_cameraVisibility;} + inline bool& _reflVisibility() {return m_reflVisibility;} + inline bool& _refrVisibility() {return m_refrVisibility;} + + inline bool& _lightVisibility() {return m_lightVisibility;} + inline bool& _giVisibility() {return m_giVisibility;} + inline float& _selfshadow() {return m_selfshadow;} + inline bool& _recvshadow() {return m_recvshadow;} + inline shaveVrayShadeData*& _shdata() {return m_shdata;} + + +private: + bool m_tipfade; + bool m_squirrel; + bool m_ownbsdf; + VR::Color m_spectint; + VR::Color m_spectint2; + bool m_cameraVisibility; + bool m_reflVisibility; + bool m_refrVisibility; + bool m_lightVisibility; + bool m_giVisibility; + float m_selfshadow; + bool m_recvshadow; + + shaveVrayShadeData* m_shdata; +}; + + +#endif |