afxZodiac.h
Engine/source/afx/ce/afxZodiac.h
Classes:
class
Public Typedefs
afxZodiac_BlendType
Public Functions
GFX_DeclareTextureProfile(AFX_GFXZodiacTextureProfile )
Detailed Description
Public Typedefs
typedef afxZodiacData::BlendType afxZodiac_BlendType
Public Functions
DefineEnumType(afxZodiac_BlendType )
GFX_DeclareTextureProfile(AFX_GFXZodiacTextureProfile )
1 2 3//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 4// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames 5// Copyright (C) 2015 Faust Logic, Inc. 6// 7// Permission is hereby granted, free of charge, to any person obtaining a copy 8// of this software and associated documentation files (the "Software"), to 9// deal in the Software without restriction, including without limitation the 10// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11// sell copies of the Software, and to permit persons to whom the Software is 12// furnished to do so, subject to the following conditions: 13// 14// The above copyright notice and this permission notice shall be included in 15// all copies or substantial portions of the Software. 16// 17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 23// IN THE SOFTWARE. 24// 25//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 26 27#ifndef _AFX_ZODIAC_H_ 28#define _AFX_ZODIAC_H_ 29 30#ifndef _ARCANE_FX_H_ 31#include "afx/arcaneFX.h" 32#endif 33#ifndef _AFX_ZODIAC_DEFS_H_ 34#include "afx/ce/afxZodiacDefs.h" 35#endif 36 37#include "console/typeValidators.h" 38 39//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 40// afxZodiacData 41 42class afxZodiacData : public GameBaseData, public afxZodiacDefs 43{ 44 typedef GameBaseData Parent; 45 46public: 47 enum BlendType 48 { 49 BLEND_NORMAL = 0x0, 50 BLEND_ADDITIVE = 0x1, 51 BLEND_SUBTRACTIVE = 0x2, 52 BLEND_RESERVED = 0x3, 53 BLEND_MASK = 0x3 54 }; 55 56 static void convertGradientRangeFromDegrees(Point2F& gradrange, const Point2F& gradrange_deg); 57 58public: 59 StringTableEntry txr_name; 60 GFXTexHandle txr; 61 F32 radius_xy; 62 Point2F vert_range; 63 F32 start_ang; 64 F32 ang_per_sec; 65 F32 grow_in_time; 66 F32 shrink_out_time; 67 F32 growth_rate; 68 LinearColorF color; 69 U32 blend_flags; 70 bool terrain_ok; 71 bool interiors_ok; 72 bool reflected_ok; 73 bool non_reflected_ok; 74 bool respect_ori_cons; 75 bool scale_vert_range; 76 bool interior_h_only; 77 bool interior_v_ignore; 78 bool interior_back_ignore; 79 bool interior_opaque_ignore; 80 bool interior_transp_ignore; 81 U32 zflags; 82 83 F32 altitude_max; 84 F32 altitude_falloff; 85 bool altitude_shrinks; 86 bool altitude_fades; 87 88 F32 distance_max; 89 F32 distance_falloff; 90 91 bool use_grade_range; 92 bool prefer_dest_grade; 93 Point2F grade_range_user; 94 Point2F grade_range; 95 bool inv_grade_range; 96 97 static StringTableEntry GradientRangeSlot; 98 static bool sPreferDestinationGradients; 99 100 void expand_zflags(); 101 void merge_zflags(); 102 103public: 104 /*C*/ afxZodiacData(); 105 /*C*/ afxZodiacData(const afxZodiacData&, bool = false); 106 107 virtual bool onAdd(); 108 virtual void packData(BitStream*); 109 virtual void unpackData(BitStream*); 110 111 bool preload(bool server, String &errorStr); 112 113 virtual void onStaticModified(const char* slotName, const char* newValue = NULL); 114 115 virtual void onPerformSubstitutions(); 116 virtual bool allowSubstitutions() const { return true; } 117 118 F32 calcRotationAngle(F32 elapsed, F32 rate_factor=1.0f); 119 120 static void initPersistFields(); 121 122 DECLARE_CONOBJECT(afxZodiacData); 123 DECLARE_CATEGORY("AFX"); 124}; 125 126typedef afxZodiacData::BlendType afxZodiac_BlendType; 127DefineEnumType( afxZodiac_BlendType ); 128 129GFX_DeclareTextureProfile(AFX_GFXZodiacTextureProfile); 130 131//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 132 133#endif // _AFX_ZODIAC_H_ 134