afxStaticShape.h
Engine/source/afx/ce/afxStaticShape.h
Classes:
class
class
Detailed Description
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_STATIC_SHAPE_H_ 28#define _AFX_STATIC_SHAPE_H_ 29 30#include "T3D/staticShape.h" 31 32//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 33// afxStaticShapeData 34 35class afxStaticShapeData : public StaticShapeData 36{ 37 typedef StaticShapeData Parent; 38 39public: 40 StringTableEntry sequence; 41 bool ignore_scene_amb; 42 bool use_custom_scene_amb; 43 LinearColorF custom_scene_amb; 44 bool do_spawn; 45 46public: 47 /*C*/ afxStaticShapeData(); 48 /*C*/ afxStaticShapeData(const afxStaticShapeData&, bool = false); 49 50 void packData(BitStream* stream); 51 void unpackData(BitStream* stream); 52 53 virtual bool allowSubstitutions() const { return true; } 54 55 static void initPersistFields(); 56 57 DECLARE_CONOBJECT(afxStaticShapeData); 58 DECLARE_CATEGORY("AFX"); 59}; 60 61//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 62// afxStaticShape 63 64class afxStaticShape : public StaticShape 65{ 66 typedef StaticShape Parent; 67 68private: 69 StaticShapeData* mDataBlock; 70 afxStaticShapeData* mAFX_data; 71 bool mIs_visible; 72 U32 mChor_id; 73 bool mHookup_with_chor; 74 StringTableEntry mGhost_cons_name; 75 76protected: 77 virtual void prepRenderImage(SceneRenderState*); 78 79public: 80 /*C*/ afxStaticShape(); 81 /*D*/ ~afxStaticShape(); 82 83 void init(U32 chor_id, StringTableEntry cons_name); 84 85 virtual bool onNewDataBlock(GameBaseData* dptr, bool reload); 86 virtual void advanceTime(F32 dt); 87 virtual U32 packUpdate(NetConnection*, U32, BitStream*); 88 virtual void unpackUpdate(NetConnection*, BitStream*); 89 90 const char* getShapeFileName() const { return mDataBlock->mShapeName; } 91 void setVisibility(bool flag) { mIs_visible = flag; } 92 93 DECLARE_CONOBJECT(afxStaticShape); 94 DECLARE_CATEGORY("AFX"); 95}; 96 97//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 98 99#endif // _AFX_STATIC_SHAPE_H_ 100