WebLVC 1.8 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pDiGuy.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pObject.h>
13 #include <vlpi/articulatedPartCollection.h>
14 #include <vlpi/attachedPartCollection.h>
15 #include <vlpi/entityIdentifier.h>
16 #include <vlpi/patchIdentifier.h>
17 #include <matrix/vlTaitBryan.h>
18 #include <vlutil/vlPrintUtil.h>
19 #include <vlutil/vlString.h>
20 #include <vector>
21 #include <map>
22 
23 namespace MAKVrExchange
24 {
25 
30  {
31  public:
32 
35 
37  typedef std::vector<char> PixelData;
38 
40  typedef std::map<DtU16, PixelData> ShapeDataMap;
41 
43  typedef std::map<DtU16, ShapeDataMap> LinkShapeMap;
44 
46 
47  public:
48 
50  DtPortalDiGuy();
51 
53  DtPortalDiGuy( const DtPortalDiGuy& other );
54 
56  virtual ~DtPortalDiGuy();
57 
59  DtPortalDiGuy& operator = ( const DtPortalDiGuy& other );
60 
63 
64  bool operator == ( const DtPortalDiGuy& other ) const;
65  bool operator != ( const DtPortalDiGuy& other ) const;
66 
68 
71 
75  DtDEC_ATTRIBUTE( DtEntityIdentifier, EntityId, entityId );
76 
80  DtDEC_ATTRIBUTE( DtString, ObjectId, objectId );
81 
83  DtDEC_ATTRIBUTE( DtEntityIdentifier, Parent, parent );
84 
86  DtDEC_ATTRIBUTE( DtString, Action, action );
87 
89  DtDEC_ATTRIBUTE( bool, ActionPaused, actionPaused );
90 
92  DtDEC_ATTRIBUTE( double, ActionSpeed, actionSpeed );
93 
95  DtDEC_ATTRIBUTE( bool, Visible, visible );
96 
98  DtDEC_ATTRIBUTE( DtString, BodyAppearance, bodyAppearance );
99 
101  DtDEC_ATTRIBUTE( DtString, HeadAppearance, headAppearance );
102 
104  DtDEC_ATTRIBUTE( DtString, ItemAppearance, itemAppearance );
105 
107  DtDEC_ATTRIBUTE( DtString, Type, type );
108 
110  DtDEC_ATTRIBUTE( LinkShapeMap, ShapeVariations, shapeVariations );
111 
113  DtDEC_ATTRIBUTE( DtVector, CharacterScale, characterScale );
114 
116  DtDEC_ATTRIBUTE( bool, UseActionPositioningFlag, useActionPositioningFlag);
117 
119  DtDEC_ATTRIBUTE( DtVector, ActionOffset, actionOffset);
120 
122  DtDEC_ATTRIBUTE( double, TransitionSpeed, transitionSpeed);
123 
125  DtDEC_ATTRIBUTE( double, BodyWeight, bodyWeight);
126 
128  DtDEC_ATTRIBUTE( DtPatchIdentifier, Unit, unit);
129 
131  DtDEC_ATTRIBUTE( DtPatchIdentifier, PersonalUnit, personalUnit);
132 
134  DtDEC_ATTRIBUTE( DtPatchIdentifier, Rank, rank);
135 
137  DtDEC_ATTRIBUTE( DtString, Name, name);
138 
140 
141  public:
142 
145 
148  typedef std::vector<DtString> AccessoryAppearanceList;
149 
150  DtU32 accessoryAppearanceCount() const;
151  void setAccessoryAppearanceCount( DtU32 numAccessories );
152  const AccessoryAppearanceList& accessoryAppearances() const;
153  void setAccessoryAppearances( const AccessoryAppearanceList& appearances );
154  DtString accessoryAppearance( int index ) const;
155  void setAccessoryAppearance( int index, const DtString& appearance );
156 
158 
159  public:
160 
162 
163  static DtPortalMessage* create();
164 
165  virtual unsigned int netSize() const;
166  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
167  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
168 
169  virtual std::ostream& printDataToStream( std::ostream& str ) const;
170 
171  protected:
172 
174 
175  };
176 
177 
179  {
180  return new DtPortalDiGuy();
181  }
182 
183 }
184 
186 template<>
187 void DtPrintAttribute( std::ostream& stream, const char* label,
std::map< DtU16, PixelData > ShapeDataMap
Definition: pDiGuy.h:40
std::map< DtU16, ShapeDataMap > LinkShapeMap
Definition: pDiGuy.h:43
#define DT_DLL_LIBPORTAL
Definition: include/portal/dllExport.h:20
std::vector< char > PixelData
Definition: pDiGuy.h:37
#define DtDEC_ATTRIBUTE(T, N, n)
A Macro to define an attribute; as well as make an accessor and mutator for that attribute.
Definition: addAttribute.h:49
DtPortalObject are messages which also serve as state repositories for simulated objects.
Definition: pObject.h:23
The base class for all messages passed through the portal.
Definition: pMessage.h:66
void DtPrintAttribute(std::ostream &stream, const char *label, MAKVrExchange::DtEmitterBeamData::BeamType value)
static DtPortalMessage * create()
Definition: pDiGuy.h:178
AccessoryAppearanceList myAccessoryAppearances
Definition: pDiGuy.h:173
DtPortalMessageKind
A List of message kinds distributed with the Portal.
Definition: pMessageKinds.h:23
Contains the DtPortalObject class declaration.
static const DtPortalMessageKind theKind
Definition: pDiGuy.h:161
Messages which represent DI-Guys with state.
Definition: pDiGuy.h:29
std::vector< DtString > AccessoryAppearanceList
Definition: pDiGuy.h:148

Document ID: Generated on Wed Mar 12 15:05:17 EDT 2025 from SVN revision 274272
Copyright © 2005-2025 MAK Technologies. All Rights Reserved (www.mak.com)