/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ // Original file Copyright Crytek GMBH or its affiliates, used under license. #ifndef CRYINCLUDE_EDITOR_OBJECTS_WATERSHAPEOBJECT_H #define CRYINCLUDE_EDITOR_OBJECTS_WATERSHAPEOBJECT_H #pragma once #include "ShapeObject.h" //Forward Declaration namespace Water { class WaterVolumeConverter; } struct IWaterVolumeRenderNode; class CWaterShapeObject : public CShapeObject { friend class Water::WaterVolumeConverter; //For legacy conversion Q_OBJECT public: CWaterShapeObject(); static const GUID& GetClassID() { // {3CC1CF42-917A-4c4d-80D2-2A81E6A32BDB} static const GUID guid = { 0x3cc1cf42, 0x917a, 0x4c4d, { 0x80, 0xd2, 0x2a, 0x81, 0xe6, 0xa3, 0x2b, 0xdb } }; return guid; } ////////////////////////////////////////////////////////////////////////// // Overrides from CBaseObject. ////////////////////////////////////////////////////////////////////////// virtual void SetName(const QString& name); virtual void SetMaterial(CMaterial* mtl); virtual void Serialize(CObjectArchive& ar); virtual XmlNodeRef Export(const QString& levelPath, XmlNodeRef& xmlNode); virtual void SetMinSpec(uint32 nSpec, bool bSetChildren = true); virtual void SetMaterialLayersMask(uint32 nLayersMask); //void Display( DisplayContext& dc ); virtual void Validate(IErrorReport* report) { CBaseObject::Validate(report); } using CBaseObject::SetHidden; virtual void SetHidden(bool bHidden, uint64 hiddenId = CBaseObject::s_invalidHiddenID, bool bAnimated = false); virtual void UpdateVisibility(bool visible); virtual IRenderNode* GetEngineNode() const { return m_pWVRN; } float GetWaterVolumeDepth() const { return mv_waterVolumeDepth; } protected: virtual bool Init(IEditor* ie, CBaseObject* prev, const QString& file); virtual void InitVariables(); virtual bool CreateGameObject(); virtual void Done(); virtual void UpdateGameArea(bool remove = false); virtual void OnParamChange(IVariable* var); virtual void OnWaterParamChange(IVariable* var); virtual void OnWaterPhysicsParamChange(IVariable* var); Vec3 GetPremulFogColor() const; void Physicalize(); protected: CVariable mv_waterVolumeDepth; CVariable mv_waterStreamSpeed; CVariable mv_waterFogDensity; CVariable mv_waterFogColor; CVariable mv_waterFogColorMultiplier; CVariable mv_waterFogColorAffectedBySun; CVariable mv_waterFogShadowing; CVariable mv_waterSurfaceUScale; CVariable mv_waterSurfaceVScale; CVariable mv_waterCapFogAtVolumeDepth; CVariable mv_viewDistanceMultiplier; CVariable mv_waterCaustics; CVariable mv_waterCausticIntensity; CVariable mv_waterCausticTiling; CVariable mv_waterCausticHeight; CSmartVariableArray mv_GroupAdv; CVariable mv_waterVolume; CVariable mv_accVolume; CVariable mv_borderPad; CVariable mv_convexBorder; CVariable mv_objVolThresh; CVariable mv_waterCell; CVariable mv_waveSpeed; CVariable mv_waveDamping; CVariable mv_waveTimestep; CVariable mv_simAreaGrowth; CVariable mv_minVel; CVariable mv_simDepth; CVariable mv_velResistance; CVariable mv_hlimit; IWaterVolumeRenderNode* m_pWVRN; uint64 m_waterVolumeID; Plane m_fogPlane; }; #endif // CRYINCLUDE_EDITOR_OBJECTS_WATERSHAPEOBJECT_H