Torque3D Documentation / _generateds / afxProjectile.h

afxProjectile.h

Engine/source/afx/ce/afxProjectile.h

More...

Classes:

Public Typedefs

afxProjectile_LaunchDirType 

Detailed Description

Public Typedefs

typedef afxProjectileData::LaunchDirType afxProjectile_LaunchDirType 

Public Functions

DefineEnumType(afxProjectile_LaunchDirType )

  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_PROJECTILE_H_
 28#define _AFX_PROJECTILE_H_
 29
 30#include "lighting/lightInfo.h"
 31#include "T3D/projectile.h"
 32
 33#include "afx/afxEffectDefs.h"
 34#include "afx/afxConstraint.h"
 35
 36//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
 37// afxProjectileData
 38
 39class afxProjectileData : public ProjectileData, public afxEffectDefs
 40{
 41  typedef ProjectileData Parent;
 42
 43public:
 44  enum LaunchDirType {
 45    TowardPos2Constraint,
 46    OrientConstraint,
 47    LaunchDirField
 48  };
 49
 50public:
 51  U8                networking;
 52  StringTableEntry  launch_pos_spec;
 53  afxConstraintDef  launch_pos_def;
 54  Point3F           launch_dir_bias;
 55  bool              ignore_src_timeout;
 56  U32               dynamicCollisionMask;
 57  U32               staticCollisionMask;
 58  bool              override_collision_masks;
 59  U32               launch_dir_method;
 60
 61  virtual void      gather_cons_defs(Vector<afxConstraintDef>& defs);
 62
 63public:
 64  /*C*/             afxProjectileData();
 65  /*C*/             afxProjectileData(const afxProjectileData&, bool = false);
 66
 67  virtual bool      onAdd();
 68  void              packData(BitStream* stream);
 69  void              unpackData(BitStream* stream);
 70
 71  virtual bool      allowSubstitutions() const { return true; }
 72
 73  static void       initPersistFields();
 74
 75  DECLARE_CONOBJECT(afxProjectileData);
 76  DECLARE_CATEGORY("AFX");
 77};
 78
 79typedef afxProjectileData::LaunchDirType afxProjectile_LaunchDirType;
 80DefineEnumType( afxProjectile_LaunchDirType );
 81
 82//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
 83// afxProjectile
 84
 85class afxProjectile : public Projectile, public afxEffectDefs
 86{
 87  typedef Projectile Parent;
 88
 89private:
 90  U32                 chor_id;
 91  bool                hookup_with_chor;
 92  StringTableEntry    ghost_cons_name;
 93  bool                client_only;
 94
 95public:
 96  /*C*/               afxProjectile();
 97  /*C*/               afxProjectile(U32 networking, U32 chor_id, StringTableEntry cons_name);
 98  /*D*/               ~afxProjectile();
 99
100  void                init(Point3F& pos, Point3F& vel, ShapeBase* src_obj);
101
102  virtual bool        onNewDataBlock(GameBaseData* dptr, bool reload);
103  virtual void        processTick(const Move *move);
104  virtual void        interpolateTick(F32 delta);
105  virtual void        advanceTime(F32 dt);
106  virtual bool        onAdd();
107  virtual void        onRemove();
108  virtual U32         packUpdate(NetConnection*, U32, BitStream*);
109  virtual void        unpackUpdate(NetConnection*, BitStream*);
110  virtual void        explode(const Point3F& p, const Point3F& n, const U32 collideType);
111
112  DECLARE_CONOBJECT(afxProjectile);
113  DECLARE_CATEGORY("AFX");
114};
115
116//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
117
118#endif // _AFX_PROJECTILE_H_
119