VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
diGuyCharacterData.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vlutil/vlString.h>
12 #include <vector>
13 #include <map>
14 #include "vrfutil/vrfutilDefines.h"
16 #include "vrfutil/diGuyAnimation.h"
17 
18 class DtDiGuyAnimation;
21 
24 typedef std::pair<DtString,DtString> AlternateNamesPair;
25 
26 typedef std::vector<AlternateNamesPair> AlternateNamesList;
27 typedef AlternateNamesList::iterator AlternateNamesListIterator;
28 typedef AlternateNamesList::const_iterator const_AlternateNamesListIterator;
29 
30 typedef DtDiGuyIntrinsicAnimationMap* (*DtDiGuyIntrinsicAnimationMapCreatorFcn)();
31 
32 typedef std::vector<DtString> HeadList;
33 typedef std::map<DtString, HeadList> HeadAppearanceMap;
34 typedef HeadAppearanceMap::iterator HeadAppearanceMapIterator;
35 
36 static const int numDiGuyTypeMapFields = 9;
37 
41 {
42 public:
46 
47  void addFieldValue(const DtString &value);
48 
49  std::vector<DtString> FieldVect;
50 };
51 
52 typedef std::map<DtString, DiGuyTypeMapFieldStruct> AppearanceToTypeFieldsMap;
53 
58 {
59 public:
60 
61  typedef std::map<DtString, DtDiGuyAnimationSharedPtr> TaskAnimationMap;
62  typedef TaskAnimationMap::iterator TaskAnimationMapIterator;
63  typedef TaskAnimationMap::const_iterator const_TaskAnimationMapIterator;
64  typedef std::list<DtDiGuyAnimationSharedPtr> UnprocessedAnimationList;
65  typedef UnprocessedAnimationList::iterator UnprocessedAnimationListIterator;
66  typedef UnprocessedAnimationList::const_iterator const_UnprocessedAnimationListIterator;
67 
69 
70  DtDiGuyCharacterData(const DtString& name);
71 
73 
74  virtual ~DtDiGuyCharacterData();
75 
76  DtDiGuyCharacterData& operator=(const DtDiGuyCharacterData& orig);
77 
78  virtual void init();
79 
81 
82  virtual void setCharacterTypeName(const DtString& name);
83  virtual const DtString & characterTypeName() const;
85 
86  virtual void setDeadAnimation(DtDiGuyAnimationSharedPtr deadAnimation);
87  virtual DtDiGuyAnimation * deadAnimation();
88 
90  virtual DtDiGuyAnimation * lookupTaskAnimationByName(const DtString & name);
91 
93  virtual const std::vector<DtString>& appearances() const;
94 
96  virtual void addAppearance(const DtString & app);
97  virtual bool containsAppearance(const DtString & app);
98 
100  virtual void addGesture(const DtString & app);
101  virtual bool containsGesture(const DtString & app);
102  virtual const std::vector<DtString>& gestures() const;
103 
105  virtual const std::vector<DtString>& handItems() const;
106 
108  virtual void addHandItem(const DtString & app);
109 
111  virtual const std::vector<DtString>& heads(const DtString &bodyAppearance) const;
112 
114  virtual void addHead(const DtString &bodyAppearance, const DtString & headAppearance);
115 
117  virtual void addTypeMapField(const DtString &appearanceName, const DtString & fieldValue);
119  virtual const DtString &getTypeMapFieldName(int index);
121  virtual int getTypeMapFieldIndex(const DtString &name);
122 
124  virtual AlternateNamesList * animationNames();
125 
128  void addAnimation(DtDiGuyAnimationSharedPtr animation);
129 
131 
132 
133  virtual TaskAnimationMap * taskableAnimations();
135  virtual AlternateNamesList taskableAnimationNames();
136  virtual void addTaskAnimation(const DtString & name, DtDiGuyAnimationSharedPtr animation);
138 
140 
141  virtual DtDiGuyIntrinsicAnimationMap * intrinsicAnimations();
142  virtual void addIntrinsicAnimation(const DtString & name, DtDiGuyAnimationSharedPtr animation);
144 
145  virtual DtDiGuyAnimation * lookupIntrinsicAnimationByName(const DtString & name);
146 
148  virtual DtDiGuyCharacterData* clone() const;
149 
150  void setAnimationTable(DtDiGuyCharacterAnimationsTable *table);
154  DtDiGuyAnimationSharedPtr readInAnimationDataFromTable(const char *actionName, bool isFirstAction);
155 
157  void setPrintInfo(bool set_print);
158  void debugPrint(const char *fmt, ...);
159 
160 public:
167  static void setCreatorFcn(const DtDiGuyIntrinsicAnimationMapCreatorFcn& fcn);
168 
169 protected:
170 
173  virtual void readInAnimationDataFromDiGuyScenario();
174 
175  void setUpTypeFieldToIntMap();
176 
177  static std::map<DtString, int> myTypeFieldNameToIntMap;
178  static std::vector<DtString> myTypeFieldNameVect;
179 
181  std::vector<DtString> myCharacterAppearances;
182  std::map<DtString, DtString> myCharacterAppearancesMap;
183  std::vector<DtString> myCharacterHandItems;
184  std::vector<DtString> myCharacterGestures;
185  std::map<DtString, DtString> myCharacterGesturesMap;
201 
206 
209 
211 
213 };

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)