Torque3D Documentation / _generateds / afxZodiacPlane.h

afxZodiacPlane.h

Engine/source/afx/ce/afxZodiacPlane.h

More...

Classes:

Public Typedefs

afxZodiacPlane_BlendType 
afxZodiacPlane_FacingType 

Detailed Description

Public Typedefs

typedef afxZodiacPlaneData::BlendType afxZodiacPlane_BlendType 
typedef afxZodiacPlaneData::FacingType afxZodiacPlane_FacingType 

Public Functions

DefineEnumType(afxZodiacPlane_BlendType )

DefineEnumType(afxZodiacPlane_FacingType )

  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_PLANE_H_
 28#define _AFX_ZODIAC_PLANE_H_
 29
 30#include "afx/ce/afxZodiacDefs.h"
 31
 32class afxZodiacPlaneData : public GameBaseData, public afxZodiacDefs
 33{
 34  typedef GameBaseData  Parent;
 35
 36public:
 37  enum BlendType
 38  {
 39    BLEND_NORMAL      = 0x0,
 40    BLEND_ADDITIVE    = 0x1,
 41    BLEND_SUBTRACTIVE = 0x2,
 42    BLEND_RESERVED    = 0x3,
 43    BLEND_MASK        = 0x3
 44  };
 45  enum FacingType
 46  {
 47    FACES_UP = 0,
 48    FACES_DOWN,
 49    FACES_FORWARD,
 50    FACES_BACK,
 51    FACES_RIGHT,
 52    FACES_LEFT,
 53    FACES_BITS = 3
 54  };
 55
 56public:
 57  StringTableEntry  txr_name;
 58  GFXTexHandle      txr;
 59  F32               radius_xy;
 60  F32               start_ang;
 61  F32               ang_per_sec;
 62  F32               grow_in_time;
 63  F32               shrink_out_time;
 64  F32               growth_rate;
 65  LinearColorF            color;
 66  U32               blend_flags;
 67  bool              respect_ori_cons;
 68  bool              use_full_xfm;
 69  U32               zflags;
 70  U32               face_dir;
 71
 72  bool              double_sided;
 73
 74  void              expand_zflags();
 75  void              merge_zflags();
 76
 77public:
 78  /*C*/         afxZodiacPlaneData();
 79  /*C*/         afxZodiacPlaneData(const afxZodiacPlaneData&, bool = false);
 80
 81  virtual void  packData(BitStream*);
 82  virtual void  unpackData(BitStream*);
 83
 84  bool          preload(bool server, String &errorStr);
 85
 86  virtual bool  allowSubstitutions() const { return true; }
 87
 88  F32           calcRotationAngle(F32 elapsed, F32 rate_factor=1.0f);
 89
 90  static void   initPersistFields();
 91
 92  DECLARE_CONOBJECT(afxZodiacPlaneData);
 93  DECLARE_CATEGORY("AFX");
 94};
 95
 96typedef afxZodiacPlaneData::BlendType afxZodiacPlane_BlendType;
 97DefineEnumType( afxZodiacPlane_BlendType );
 98
 99typedef afxZodiacPlaneData::FacingType afxZodiacPlane_FacingType;
100DefineEnumType( afxZodiacPlane_FacingType );
101
102//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
103// afxZodiacPlane
104
105class afxZodiacPlane : public GameBase, public afxZodiacDefs
106{
107  typedef GameBase Parent;
108
109private:
110  afxZodiacPlaneData*   mDataBlock;
111  LinearColorF                color;
112  F32                   radius;
113  bool                  is_visible;
114
115  void                  preDraw();
116  void                  draw();
117  void                  postDraw();
118
119  GFXStateBlockRef      normal_sb;
120  GFXStateBlockRef      reflected_sb;
121
122public:
123  /*C*/                 afxZodiacPlane();
124  /*D*/                 ~afxZodiacPlane();
125
126  virtual bool          onNewDataBlock(GameBaseData* dptr, bool reload);
127  virtual bool          onAdd();
128  virtual void          onRemove();
129
130  void                  setRadius(F32 rad) { radius = rad; }
131  void                  setColor(const LinearColorF& clr) { color = clr; }
132  void                  setVisibility(bool flag) { is_visible = flag; }
133
134  virtual void          prepRenderImage(SceneRenderState*);
135                                        
136  void                  _renderZodiacPlane(ObjectRenderInst*, SceneRenderState*, BaseMatInstance*);
137
138  DECLARE_CONOBJECT(afxZodiacPlane);
139  DECLARE_CATEGORY("AFX");
140};
141
142//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
143
144#endif // _AFX_ZODIAC_PLANE_H_
145