VR-Exchange 2.7 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pDiGuy.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
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 <matrix/vlTaitBryan.h>
17 #include <vlutil/vlPrintUtil.h>
18 #include <vlutil/vlString.h>
19 #include <vector>
20 #include <map>
21 
22 namespace MAKVrExchange
23 {
24 
29  {
30  public:
31 
34 
36  typedef std::vector<char> PixelData;
37 
39  typedef std::map<DtU16, PixelData> ShapeDataMap;
40 
42  typedef std::map<DtU16, ShapeDataMap> LinkShapeMap;
43 
45 
46  public:
47 
49  DtPortalDiGuy();
50 
52  DtPortalDiGuy( const DtPortalDiGuy& other );
53 
55  virtual ~DtPortalDiGuy();
56 
58  DtPortalDiGuy& operator = ( const DtPortalDiGuy& other );
59 
62 
63  bool operator == ( const DtPortalDiGuy& other ) const;
64  bool operator != ( const DtPortalDiGuy& other ) const;
65 
67 
70 
74  DtDEC_ATTRIBUTE( DtEntityIdentifier, EntityId, entityId );
75 
79  DtDEC_ATTRIBUTE( DtString, ObjectId, objectId );
80 
82  DtDEC_ATTRIBUTE( DtEntityIdentifier, Parent, parent );
83 
85  DtDEC_ATTRIBUTE( DtString, Action, action );
86 
88  DtDEC_ATTRIBUTE( bool, ActionPaused, actionPaused );
89 
91  DtDEC_ATTRIBUTE( double, ActionSpeed, actionSpeed );
92 
94  DtDEC_ATTRIBUTE( bool, Visible, visible );
95 
97  DtDEC_ATTRIBUTE( DtString, BodyAppearance, bodyAppearance );
98 
100  DtDEC_ATTRIBUTE( DtString, HeadAppearance, headAppearance );
101 
103  DtDEC_ATTRIBUTE( DtString, ItemAppearance, itemAppearance );
104 
106  DtDEC_ATTRIBUTE( DtString, Type, type );
107 
109  DtDEC_ATTRIBUTE( LinkShapeMap, ShapeVariations, shapeVariations );
110 
112  DtDEC_ATTRIBUTE( DtVector, CharacterScale, characterScale );
113 
115 
116  public:
117 
120 
123  typedef std::vector<DtString> AccessoryAppearanceList;
124 
125  DtU32 accessoryAppearanceCount() const;
126  void setAccessoryAppearanceCount( DtU32 numAccessories );
127  const AccessoryAppearanceList& accessoryAppearances() const;
128  void setAccessoryAppearances( const AccessoryAppearanceList& appearances );
129  DtString accessoryAppearance( int index ) const;
130  void setAccessoryAppearance( int index, const DtString& appearance );
131 
133 
134  public:
135 
137 
138  static DtPortalMessage* create();
139 
140  virtual unsigned int netSize() const;
141  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
142  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
143 
144  virtual std::ostream& printDataToStream( std::ostream& str ) const;
145 
146  protected:
147 
149 
150  };
151 
152 
154  {
155  return new DtPortalDiGuy();
156  }
157 
158 }
159 
161 template<>
162 void DtPrintAttribute( std::ostream& stream, const char* label,
std::map< DtU16, PixelData > ShapeDataMap
Definition: pDiGuy.h:39
std::map< DtU16, ShapeDataMap > LinkShapeMap
Definition: pDiGuy.h:42
#define DT_DLL_LIBPORTAL
Definition: include/portal/dllExport.h:20
std::vector< char > PixelData
Definition: pDiGuy.h:36
#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:65
void DtPrintAttribute(std::ostream &stream, const char *label, MAKVrExchange::DtEmitterBeamData::BeamType value)
static DtPortalMessage * create()
Definition: pDiGuy.h:153
AccessoryAppearanceList myAccessoryAppearances
Definition: pDiGuy.h:148
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:136
Messages which represent DI-Guys with state.
Definition: pDiGuy.h:28
std::vector< DtString > AccessoryAppearanceList
Definition: pDiGuy.h:123

Document ID: Generated on Mon Apr 19 15:55:22 EDT 2021 from SVN revision 227909
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)