![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2012 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: absoluteVcPdu.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 #pragma once 00010 00011 #include <vrvVrl/vrvVrl.h> 00012 00013 #include <vector> 00014 #include <map> 00015 #include <list> 00016 #include <iosfwd> 00017 00018 #include <vlutil/vlString.h> 00019 #include <vlutil/vlHashlist.h> 00020 #include <vlutil/vlInetAddr.h> 00021 00022 #include <vl/envPoint.h> 00023 #include <vl/envBndSphere.h> 00024 #include <vl/envRectVol.h> 00025 #include <vl/hostStructs.h> 00026 #include <vl/envEllipsoid.h> 00027 #include <vl/envLine.h> 00028 #include <vl/envProcPub.h> 00029 #include <vl/exerciseConn.h> 00030 #include <vl/hostStructs.h> 00031 #include <vl/pdu.h> 00032 #include <vl/rprFomMap.h> 00033 #include <vl/globalObjDes.h> 00034 #include <vl/packets/pduHeader.h> 00035 00036 #include <vrfExtObjects/3dGraphicalObjectStateRecord.h> 00037 #include <vrfExtObjects/attributeStateRecord.h> 00038 #include <vrfExtObjects/attributeTemplateStateRecord.h> 00039 #include <vrfExtObjects/attributeValueUpdate.h> 00040 #include <vrfExtObjects/envFixedCylinderRecord.h> 00041 #include <vrfExtObjects/envArticulatingCylinderRecord.h> 00042 #include <vrfExtObjects/3dGraphicalObjectLineStateRecord.h> 00043 #include <vrfExtObjects/2dGraphicalObjectStateRecord.h> 00044 #include <vrfExtObjects/2dGraphicalObjectTextStateRecord.h> 00045 00046 #include <matrix/vlVector.h> 00047 #include <matrix/vlTaitBryan.h> 00048 #include <matrix/vlMath.h> 00049 00050 #if DtHLA 00051 #include <vl/rprFomMap.h> 00052 #elif DtDIS 00053 #include <vlutil/vlInetAddr.h> // for DtInetAddr 00054 #endif 00055 00056 #include <vlpi/disEnums.h> 00057 #include <vlpi/NetStructs.h> 00058 00059 typedef struct 00060 { 00061 DtNetU32 ignoreFlags; 00062 DtNetU8 turnDirection; 00063 DtNetU8 moveDirection; 00064 DtNetBoolean reset; 00065 DtNetU8 pad2; 00066 DtNetFloat64 position[3]; 00067 DtNetFloat64 orientation[3]; 00068 } DtNetMoveParams; 00069 typedef DtNetMoveParams DtMoveParams; 00070 00071 typedef struct 00072 { 00073 DtNetU32 ignoreFlags; 00074 DtNetFloat32 radius; 00075 DtNetFloat32 bodyHeading; 00076 DtNetFloat32 pitch; 00077 DtNetFloat32 headingOffset; 00078 DtNetFloat32 pitchOffset; 00079 DtNetFloat32 roll; 00080 DtNetWorldCoordinates pivotPoint; 00081 00082 } DtNetPivotParams; 00083 00084 enum DtSdcVector2DOffset 00085 { 00086 DtSdcX, 00087 DtSdcY 00088 }; 00089 00090 // 00091 // These are the old, original versions of the netstructs. These work with Stealth 6.0 00092 // and earlier. Starting with Stealth 6.0.1, these are cleaned up, renamed, and version 00093 // controlled. See the new layouts below. Note that Stealth 6.0 and newer code WILL detect 00094 // the lack of a valid version number and fall back to these, so it IS backward compatible. 00095 // 00096 typedef struct 00097 { 00098 DtNetU32 myId; 00099 DtNetU32 myType; 00100 DtNetU8 myFlags; 00101 DtNetU8 myUnused[3]; 00102 } DtNetSdcBasicParams; 00103 00104 typedef struct 00105 { 00106 DtNetU32 myId; 00107 DtNetU32 myType; 00108 DtNetU8 myFlags; 00109 DtNetU8 myUnused[3]; 00110 DtNetU32 myLayerId; 00111 DtNetU32 myFree[2]; 00112 } DtNetSdcLayer; 00113 00114 // layer definition 00115 typedef struct 00116 { 00117 DtNetU32 myId; 00118 DtNetU32 myType; 00119 DtNetU8 myFlags; 00120 DtNetU8 myUnused[3]; 00121 DtNetU32 myNameSize; 00122 DtNetU32 myFree[2]; 00123 } DtNetSdcNamedObject; 00124 00125 typedef struct 00126 { 00127 DtNetU32 myId; 00128 DtNetU32 myType; 00129 DtNetU8 myFlags; 00130 DtNetU8 myAttachements; 00131 DtNetU8 myPercentage; 00132 DtNetU8 myUnused; 00133 DtNetU8 myColor[4]; 00134 DtNetGlobalObjectDesignator myEntityId[2]; 00135 DtNetU32 myObjectId[2]; 00136 DtNetWorldCoordinates myPosition[2]; 00137 DtNetWorldCoordinates myOffset; 00138 DtNetU32 myFree[2]; 00139 } DtNetSdcPosObject; 00140 00141 typedef struct 00142 { 00143 DtNetU32 myId; 00144 DtNetU32 myType; 00145 DtNetU8 myFlags; 00146 DtNetU8 myAttachements; 00147 DtNetU8 myPercentage; 00148 DtNetU8 myUnused1; 00149 DtNetU8 myColor[4]; 00150 DtNetGlobalObjectDesignator myEntityId[2]; 00151 DtNetU32 myObjectId[2]; 00152 DtNetWorldCoordinates myPosition[2]; 00153 DtNetWorldCoordinates myOffset; 00154 DtNetU32 myNameSize; 00155 DtNetU32 myFree[2]; 00156 } DtNetSdcPosNamedObject; 00157 00158 00159 typedef struct 00160 { 00161 DtNetU32 myId; 00162 DtNetU32 myType; 00163 DtNetU8 myFlags; 00164 DtNetU8 myAttachements; 00165 DtNetU8 myPercentage; 00166 DtNetU8 myUnused; 00167 DtNetU8 myColor[4]; 00168 DtNetGlobalObjectDesignator myEntityId[2]; 00169 DtNetU32 myObjectId[2]; 00170 DtNetWorldCoordinates myPosition[2]; 00171 DtNetWorldCoordinates myOffset; 00172 DtNetU32 myPattern; 00173 DtNet32Vector myScale; 00174 DtNet32Vector myRotation; 00175 DtNetU32 myFree[2]; 00176 } DtNetSdcGraphicObject; 00177 00178 typedef struct 00179 { 00180 DtNetU32 myId; 00181 DtNetU32 myType; 00182 DtNetU8 myFlags; 00183 DtNetU8 myAttachements; 00184 DtNetU8 myPercentage; 00185 DtNetU8 myUnused; 00186 DtNetU8 myColor[4]; 00187 DtNetGlobalObjectDesignator myEntityId[2]; 00188 DtNetU32 myObjectId[2]; 00189 DtNetWorldCoordinates myPosition[2]; 00190 DtNetWorldCoordinates myOffset; 00191 DtNetU32 myPattern; 00192 DtNet32Vector myScale; 00193 DtNet32Vector myRotation; 00194 DtNetU32 myThickness; 00195 DtNetU32 myFree[2]; 00196 } DtNetSdcGraphicObjectUpdate; 00197 00198 typedef struct 00199 { 00200 DtNetU32 myId; 00201 DtNetU32 myType; 00202 DtNetU8 myFlags; 00203 DtNetU8 myAttachements; 00204 DtNetU8 myPercentage; 00205 DtNetU8 myUnused; 00206 DtNetU8 myColor[4]; 00207 DtNetGlobalObjectDesignator myEntityId[2]; 00208 DtNetU32 myObjectId[2]; 00209 DtNetWorldCoordinates myPosition[2]; 00210 DtNetWorldCoordinates myOffset; 00211 DtNetU32 myPattern; 00212 DtNetU32 myThickness; 00213 DtNetU32 myFree[2]; 00214 } DtNetSdcLine; 00215 00216 typedef struct 00217 { 00218 DtNetU32 myId; 00219 DtNetU32 myType; 00220 DtNetU8 myFlags; 00221 DtNetU8 myAttachements; 00222 DtNetU8 myPercentage; 00223 DtNetU8 myUnused; 00224 DtNetU8 myColor[4]; 00225 DtNetGlobalObjectDesignator myEntityId[2]; 00226 DtNetU32 myObjectId[2]; 00227 DtNetWorldCoordinates myPosition[2]; 00228 DtNetWorldCoordinates myOffset; 00229 DtNetU32 myPattern; 00230 DtNet32Vector myScale; 00231 DtNet32Vector myRotation; 00232 DtNetWorldCoordinates myPoints[3]; 00233 DtNetU32 myFree[2]; 00234 } DtNetSdcTriangle; 00235 00236 00237 typedef struct 00238 { 00239 DtNetU32 myId; 00240 DtNetU32 myType; 00241 DtNetU8 myFlags; 00242 DtNetU8 myAttachements; 00243 DtNetU8 myPercentage; 00244 DtNetU8 myUnused; 00245 DtNetU8 myColor[4]; 00246 DtNetGlobalObjectDesignator myEntityId[2]; 00247 DtNetU32 myObjectId[2]; 00248 DtNetWorldCoordinates myPosition[2]; 00249 DtNetWorldCoordinates myOffset; 00250 DtNetU32 myPattern; 00251 DtNet32Vector myScale; 00252 DtNet32Vector myRotation; 00253 DtNetWorldCoordinates myPoints[16]; 00254 DtNetU32 myFree[2]; 00255 } DtNetSdcArea; 00256 00257 typedef struct 00258 { 00259 DtNetU32 myId; 00260 DtNetU32 myType; 00261 DtNetU8 myFlags; 00262 DtNetU8 myUnused[3]; 00263 DtNetU32 myGroupId; 00264 DtNetFloat64 myXValue; 00265 DtNetFloat64 myYValue; 00266 DtNetU32 myNameSize; 00267 DtNetU32 myFree[2]; 00268 } DtNetSdcAttributeValue; 00269 00270 typedef struct 00271 { 00272 DtNetU32 myId; 00273 DtNetU32 myType; 00274 DtNetU8 myFlags; 00275 DtNetU8 myAttachements; 00276 DtNetU8 myPercentage; 00277 DtNetU8 myUnused1; 00278 DtNetU8 myColor[4]; 00279 DtNetGlobalObjectDesignator myEntityId[2]; 00280 DtNetU32 myObjectId[2]; 00281 DtNetWorldCoordinates myPosition[2]; 00282 DtNetWorldCoordinates myOffset; 00283 DtNetU32 myNameSize; 00284 DtNetU32 myDisplayGroupId; 00285 DtNetFloat64 myMinRange; 00286 DtNetFloat64 myMaxRange; 00287 DtNetU32 myFree[2]; 00288 } DtNetSdcAttribute; 00289 00290 typedef struct 00291 { 00292 DtNetU8 myColor[4]; 00293 DtNetU32 myPattern; 00294 DtNetU32 myThickness; 00295 DtNetU8 myFlags; 00296 DtNetU8 myPercentage; 00297 DtNetU8 myUnused[2]; 00298 } DtNetSdcSegment; 00299 00300 typedef struct 00301 { 00302 DtNetU32 myId; 00303 DtNetU32 myType; 00304 DtNetU8 myFlags; 00305 DtNetU8 myAttachements; 00306 DtNetU8 myPercentage; 00307 DtNetU8 myUnused; 00308 DtNetU8 myColor[4]; 00309 DtNetGlobalObjectDesignator myEntityId[2]; 00310 DtNetU32 myObjectId[2]; 00311 DtNetWorldCoordinates myPosition[2]; 00312 DtNetWorldCoordinates myOffset; 00313 DtNetU32 myNumSegments; 00314 DtNetU32 myFree[2]; 00315 } DtNetSdcSegmentedLine; 00316 00317 00318 // 00319 // These are the NEW versions of the netstructs that are used by default in 00320 // Stealth 6.0.1 and later. Note again that Stealth 6.0.1 and later can 00321 // receive either type of packet, but older Stealth's only support the older 00322 // version. 00323 // 00324 00325 // 00326 // DtNetSdcDrawControlParams 00327 // 00328 // This is the replacement for DtNetSdcBasicParams. It contains the fields 00329 // that are common to ALL the Draw Control PDUs. No PDU is actually sent 00330 // with just this struct - but it is included in all other netstructs. 00331 // 00332 00333 typedef struct 00334 { 00335 DtNetU32 myMagicCookie; // This contains a bit pattern, 0x600DF00D,that 00336 // tells us this is a versioned parameter. If 00337 // the net parameter block does not start with 00338 // this pattern, the OLD netstructs are used. 00339 DtNetU16 myParamVersion; 00340 DtNetU8 myFlags; 00341 DtNetU8 myPadding8_1; 00342 00343 DtNetU32 myId; 00344 DtNetU32 myType; 00345 } DtNetSdcDrawControlParams; // 16 bytes 00346 00347 00348 // 00349 // DtNetSdcLayerParams 00350 // 00351 // This is the replacement for DtSdcNamedObject (no, NOT for DtSdcLayer). 00352 // It is the network representation of the DtSdcLayerPDU's parameters. 00353 // 00354 00355 typedef struct 00356 { 00357 DtNetSdcDrawControlParams myDrawControlParams; 00358 DtNetU32 myLayerNameLength; 00359 // Note that this is followed by a byte-array of characters which are the 00360 // layer name. 00361 } DtNetSdcLayerParams; // variable length (minimum 20 bytes) 00362 00363 // 00364 // DtNetSdcCommandParams 00365 // 00366 // This is the replacement for DtNetSdcLayer(!). It is the network 00367 // representation of the DtSdcCommandPDU's parameters. The parameters 00368 // of the command pdu only include a layer id, which is only used for 00369 // the AddToLayer and RemoveFromLayer commands. The id of the object to 00370 // operate on is specified in the drawControlParams' id field, and the 00371 // the type of command is specified in the drawControlParams' type 00372 // field. 00373 00374 typedef struct 00375 { 00376 DtNetSdcDrawControlParams myDrawControlParams; 00377 DtNetU32 myLayerId; 00378 } DtNetSdcCommandParams; // 20 bytes 00379 00380 // 00381 // DtNetSdcAttributeUpdateParams 00382 // 00383 // This is the replacement for DtNetSdcAttributeUpdateValue. It is the network 00384 // representation of a DtSdcAttributeUpdatePDU's parameters. 00385 00386 typedef struct 00387 { 00388 DtNetSdcDrawControlParams myDrawControlParams; 00389 DtNetFloat64 myXValue; 00390 DtNetFloat64 myYValue; 00391 DtNetU32 myGroupId; 00392 DtNetU32 myTextLength; 00393 // Note that this may be followed by a byte-array of characters which 00394 // represents updated text. 00395 } DtNetSdcAttributeUpdateParams; // 40 bytes 00396 00397 // 00398 // DtNetSdcAttachableParams 00399 // 00400 // This is the replacement for DtNetSdcPosObject. It is the network 00401 // representation of a DtSdcAttachablePDU's parameters. This PDU type is never 00402 // sent on its own. It is a base type shared by Attribute, Text, and 00403 // Graphical Object PDUs. 00404 // 00405 // The myAttachments field is a DtVcObjectAttachment enumeration that specifies 00406 // how the object placed in the scene (2D point, 2 2D points, attached to an 00407 // entity, etc.). 00408 // 00409 00410 typedef struct 00411 { 00412 DtNetSdcDrawControlParams myDrawControlParams; 00413 DtNetU8 myAttachments; // A DtVcObjectAttachment 00414 DtNetU8 myPadding8_1; // specifies a relative location 00415 // Used for attachment to lines 00416 // and cylinders 00417 DtNetU8 myPercentage[2];// specifies a relative location 00418 // Used for attachment to lines 00419 // and cylinders 00420 DtNetU8 myColor[4]; // rgba 00421 DtNetGlobalObjectDesignator myEntityId[2]; // 64 bytes each in HLA; 6 bytes 00422 // each in DIS. Second is used 00423 // to attach lines / cylinders 00424 // between 2 objects 00425 DtNetU32 myObjectId[2]; // id(s) of other draw control 00426 // objects (created by the same 00427 // sender) 00428 #if DtDIS 00429 DtNetU32 myPadding32_1; // For DIS, put world coords 00430 #endif // on 8-byte boundary 00431 00432 DtNetWorldCoordinates myPosition[2]; // Position (and optional 00433 // endpoint) for attaching to 00434 // world coordinates 00435 DtNetWorldCoordinates myOffset; // a 3D offset 00436 } DtNetSdcAttachableParams; // 232 bytes in HLA; 120 bytes in DIS 00437 00438 // 00439 // DtNetSdcTextParams 00440 // 00441 // This is the replacement for DtNetSdcPosNamedObject. It is the network 00442 // representation of a DtSdcTextPDU's parameters. 00443 // 00444 00445 typedef struct 00446 { 00447 DtNetSdcAttachableParams myAttachableParams; 00448 DtNetU32 myTextLength; 00449 // Note that this will be followed by a byte-array of characters which 00450 // represents the text to display. 00451 } DtNetSdcTextParams; // variable length; minimum 236 bytes in HLA, 00452 // 124 bytes in DIS 00453 00454 // 00455 // DtNetSdcAttributeParams 00456 // 00457 // This is the replacement for DtNetSdcAttribute. It is the network 00458 // representation of a DtSdcAttributePDU's parameters. 00459 // 00460 // Text can be the name of an attribute group or attribute group 00461 // template. 00462 // 00463 00464 typedef struct 00465 { 00466 DtNetSdcAttachableParams myAttachableParams; 00467 DtNetFloat64 myMinRange; 00468 DtNetFloat64 myMaxRange; 00469 DtNetU32 myAttributeGroupId; 00470 DtNetU32 myNameLength; 00471 // Note that this may be followed by a byte-array of characters which 00472 // represents the name of an attribute or attribute group template. 00473 } DtNetSdcAttributeParams; // variable length; minimum 256 bytes in HLA, 00474 // 144 bytes in DIS 00475 00476 // 00477 // DtNetSdcLineParams 00478 // 00479 // This is the replacement for DtNetSdcLine and DtNetSdcSegmentedLine. 00480 // It is the network representation of a DtSdcLinePDU's parameters. 00481 // An SdcLine is just a SdcSegmentedLine with one segment, simplifying 00482 // the network structures and class hierarchy, which previously treated 00483 // lines and segmented lines seperately. 00484 00485 typedef struct 00486 { 00487 DtNetSdcAttachableParams myAttachableParams; 00488 DtNetU32 myNumSegments; 00489 DtNetU8 myCheckLos; 00490 DtNetU8 myProjected; 00491 DtNetU16 myPadding16_1; 00492 // This is followed by myNumSegments DtNetSdcLineSegments (define below) 00493 } DtNetSdcLineParams; // variable length; minimum 240 bytes HLA, 128 bytes 00494 // in DIS + segments 00495 00496 // 00497 // DtNetSdcLineSegment 00498 // 00499 // This is the replacement for DtNetSdcSegment. It is the network 00500 // representation of one segment of a (possibly segmented) line. 00501 00502 typedef struct 00503 { 00504 DtNetU8 myColor[4]; 00505 DtNetU32 myPattern; 00506 DtNetU32 myThickness; 00507 DtNetU8 myFlags; 00508 DtNetU8 myPercentage; 00509 DtNetU16 myPadding16_1; 00510 } DtNetSdcLineSegment; // 16 bytes 00511 00512 00513 // 00514 // DtNetSdcPolyObjectParams 00515 // 00516 // This is the replacement for DtNetSdcGraphicObject. It is the network 00517 // representation of a DtSdcPolyObjectPDU's parameters. 00518 00519 typedef struct 00520 { 00521 DtNetSdcAttachableParams myAttachableParams; 00522 DtNetU32 myPattern; 00523 DtNet32Vector myScale; 00524 DtNet32Vector myRotation; 00525 } DtNetSdcPolyObjectParams; // 256 bytes in HLA; 148 bytes in DIS 00526 00527 00528 // 00529 // DtNetSdcTriangleParams 00530 // 00531 // This is the replacement for DtNetSdcTriangle. It is the network 00532 // representation of a DtSdcTrianglePDU's parameters. It adds a 00533 // field to represent the points of the triangle. 00534 00535 typedef struct 00536 { 00537 DtNetSdcPolyObjectParams myPolyObjectParams; 00538 DtNetU32 myPadding32_1; 00539 DtNetWorldCoordinates myPoints[3]; 00540 00541 } DtNetSdcTriangleParams; // 230 bytes in HLA; 192 bytes in DIS 00542 00543 00544 // We are imposing a 16-vertex limit on 00545 // this object so that it doesn't become too large 00546 00547 #define DT_MAX_SDC_AREA_VERTS 16 00548 00549 typedef struct 00550 { 00551 DtNetSdcPolyObjectParams myPolyObjectParams; 00552 DtNetWorldCoordinates myPoints[DT_MAX_SDC_AREA_VERTS]; 00553 char myTextureFilename[256]; 00554 char myTextureDirectory[256]; 00555 DtNetU8 myNumVerts; 00556 DtNetU8 myNumTextureTiles; 00557 DtNetU8 myProjected; 00558 char padding1; 00559 00560 } DtNetSdcAreaParams; // 1156 bytes in HLA; 1048 bytes in DIS 00561 00562 /* ---------------------- View Control ------------------- */ 00563 #ifndef _VIEWCONTROLP_H_GATEWAY_PROTECTION 00564 #define _VIEWCONTROLP_H_GATEWAY_PROTECTION 00565 00566 #define DtNetViewerCommand DtNetU16 00567 00568 typedef struct 00569 { 00570 DtNetU32 ignoreFlags; 00571 DtNetU32 padding; 00572 DtNetWorldCoordinates world; 00573 DtNetEulerAngles orientation; 00574 } DtNetAbsoluteParams; 00575 typedef DtNetAbsoluteParams DtAbsoluteParams; 00576 00577 typedef struct 00578 { 00579 DtNetU32 ignoreFlags; 00580 DtNetTopoUpCoord offset; 00581 DtNetEulerAngles orientation; 00582 DtNetGlobalObjectDesignator attachId; 00583 char markingText[64]; 00584 } DtNetTetherParams; 00585 typedef DtNetTetherParams DtTetherParams; 00586 00587 typedef struct 00588 { 00589 DtNetU32 ignoreFlags; 00590 DtNetFloat32 radius; 00591 DtNetFloat32 bodyHeading; 00592 DtNetFloat32 pitch; 00593 DtNetFloat32 headingOffset; 00594 DtNetFloat32 pitchOffset; 00595 DtNetFloat32 roll; 00596 DtNetGlobalObjectDesignator attachId; 00597 char markingText[64]; 00598 } DtNetCompassParams; 00599 typedef DtNetCompassParams DtCompassParams; 00600 00601 typedef struct 00602 { 00603 DtNetU32 ignoreFlags; 00604 DtNetEntityCoordinates offset; 00605 DtNetEulerAngles bodyOrientation; 00606 DtNetGlobalObjectDesignator attachId; 00607 char markingText[64]; 00608 } DtNetMimicParams; 00609 typedef DtNetMimicParams DtMimicParams; 00610 00611 typedef struct 00612 { 00613 DtNetU32 ignoreFlags; 00614 DtNetFloat32 radius; 00615 DtNetFloat32 azimuthRate; 00616 DtNetFloat32 heading; 00617 DtNetFloat32 pitch; 00618 DtNetFloat32 headingOffset; 00619 DtNetFloat32 pitchOffset; 00620 DtNetFloat32 roll; 00621 DtNetGlobalObjectDesignator attachId; 00622 char markingText[64]; 00623 } DtNetOrbitParams; 00624 typedef DtNetOrbitParams DtOrbitParams; 00625 00626 typedef struct 00627 { 00628 DtNetU32 ignoreFlags; 00629 DtNetU32 padding; 00630 DtNetWorldCoordinates world; 00631 DtNetGlobalObjectDesignator trackId; 00632 char markingText[64]; 00633 } DtNetTrackParams; 00634 typedef DtNetTrackParams DtTrackParams; 00635 00636 typedef struct 00637 { 00638 DtNetU32 ignoreFlags; 00639 DtNetEntityCoordinates offset; 00640 DtNetGlobalObjectDesignator attachId; 00641 DtNetGlobalObjectDesignator trackId; 00642 char attachMarkingText[64]; 00643 char trackMarkingText[64]; 00644 } DtNetTetherTrackParams; 00645 typedef DtNetTetherTrackParams DtTetherTrackParams; 00646 00647 typedef struct 00648 { 00649 DtNetU32 ignoreFlags; 00650 DtNetEntityCoordinates offset; 00651 DtNetGlobalObjectDesignator attachId; 00652 DtNetGlobalObjectDesignator trackId; 00653 char attachMarkingText[64]; 00654 char trackMarkingText[64]; 00655 } DtNetMimicTrackParams; 00656 typedef DtNetMimicTrackParams DtMimicTrackParams; 00657 00658 #define MAX_EIG_ENTITIES 100 00659 00660 typedef struct DtNetEntitiesInGroup 00661 { 00662 DtNetInt32 numToRemove; /* -1 means remove all */ 00663 DtNetInt32 numToAdd; 00664 DtNetGlobalObjectDesignator groupId[MAX_EIG_ENTITIES]; 00665 } DtNetEntitiesInGroup; 00666 typedef DtNetEntitiesInGroup DtEntitiesInGroup; 00667 00668 #define DtCMD_GROUP (0) 00669 #define DtCMD_WIDE_GROUP (1) 00670 00671 typedef struct 00672 { 00673 DtNetU32 ignoreFlags; 00674 DtNetFloat32 radialOffset; 00675 DtNetFloat32 heading; 00676 DtNetFloat32 pitch; 00677 DtNetFloat32 headingOffset; 00678 DtNetFloat32 pitchOffset; 00679 DtNetU32 groupCmd; 00680 DtNetEntitiesInGroup groupIds; 00681 } DtNetGroupParams; 00682 typedef DtNetGroupParams DtGroupParams; 00683 00684 typedef struct 00685 { 00686 DtNetU32 ignoreFlags; 00687 DtNetGlobalObjectDesignator primaryId; 00688 DtNetGlobalObjectDesignator secondaryId; 00689 DtNetEntitiesInGroup groupIds; 00690 } DtNetModelessParams; 00691 typedef DtNetModelessParams DtModelessParams; 00692 00693 typedef struct 00694 { 00695 DtNetU8 optionsBitField[8]; 00696 DtNetFloat64 locatorRange; 00697 DtNetFloat64 smoothingPeriod; 00698 DtNetFloat64 clampRange; 00699 DtNetFloat64 floor; 00700 DtNetFloat64 timeOfDay; 00701 DtNetFloat64 nearClip; 00702 DtNetFloat64 farClip; 00703 DtNetFloat64 fov; 00704 DtNetFloat64 nearFog; 00705 DtNetFloat64 farFog; 00706 00707 DtNetU32 overlayOption; 00708 DtNetU32 smoothing; 00709 DtNetU32 aggregateLevel; 00710 DtNetBoolean nextmodelset; 00711 DtNetBoolean prevmodelset; 00712 DtNetBoolean xr; 00713 DtNetBoolean hatlabels; 00714 00715 DtNetBoolean sound; 00716 DtNetBoolean entityLabels; 00717 DtNetBoolean trailingEffects; 00718 DtNetBoolean trajectoryHistory; 00719 00720 DtNetBoolean recording; 00721 DtNetBoolean aggregateHighestOnly; 00722 DtNetBoolean aggregatesAltitudeControlled; 00723 DtNetBoolean nestedAggregates; 00724 00725 DtNetBoolean nestedEntities; 00726 DtNetBoolean groundClamping; 00727 DtNetBoolean followGround; 00728 DtNetBoolean constrainWithFloor; 00729 00730 DtNetBoolean fog; 00731 DtNetBoolean texture; 00732 DtNetBoolean nexttextureset; 00733 DtNetBoolean prevtextureset; 00734 00735 char databaseToLoad[256]; 00736 char date[64]; 00737 DtNetFloat32 turnrate; 00738 DtNetFloat32 stepsize; 00739 char modelsetname[32]; 00740 char texturesetname[32]; 00741 DtNetFloat32 terrainscale; 00742 DtNetFloat32 objectscale; 00743 DtNetBoolean skydome; 00744 DtNetBoolean clouds; 00745 00746 // Mirroring stuff here 00747 DtNetBoolean mirroring; 00748 DtNetBoolean mirrorMessageEveryFrame; 00749 // 4-byte boundary 00750 DtNetBoolean broadcasting; 00751 DtNetBoolean clusteringLabels; 00752 DtNetBoolean tacticalGraphicsLabels; 00753 DtNetBoolean tacticalGraphics; 00754 00755 DtNetBoolean showAggregates; 00756 DtNetBoolean showEmitters; 00757 00758 // Video capture stuff here 00759 DtNetU8 videoCaptureCommand; // record, pause, unpause, or stop 00760 DtNetBoolean videoCaptureRecordInsets; 00761 00762 DtNetU16 videoCaptureFramesPerSecond; 00763 DtNetU16 padding_1; 00764 00765 char videoCaptureFilename[256]; 00766 char videoCaptureDirectory[256]; 00767 char videoCaptureFilenameBase[64]; 00768 00769 DtNetFloat64 blockedDistance; 00770 DtNetBoolean constrainedToAll; 00771 DtNetBoolean useNearClipForBlockedDistance; 00772 // lets add another 64 option flags - that should hold us a little longer 00773 DtNetU8 optionsBitField2[8]; 00774 00775 // and some more data 00776 char featureFilename[256]; 00777 DtNetU8 featureCommand; // load or clear 00778 00779 } DtNetOptionsParams; 00780 00781 typedef DtNetOptionsParams DtOptionsParams; 00782 00783 #ifdef DT_CANT_HAVE_NET_UNIONS 00784 // NOTE: 00785 // Since we cant get a union of all the types we need to 00786 // make DtNetViewControlParams the size of the largest 00787 // component in the DtNetViewControlParams union below. 00788 // If you dont do this the PDU/Interactions will be to big 00789 #if DtHLA 00790 // In HLA DtNetModelessParams = 6540 bytes 00791 // In DIS = 635 00792 typedef DtNetModelessParams DtNetViewControlParams; 00793 #else 00794 // In HLA DtNetGroupParams = 6436 00795 // in DIS = 635 00796 typedef DtNetGroupParams DtNetViewControlParams; 00797 #endif 00798 typedef DtNetViewControlParams DtViewControlParams; 00799 00800 typedef DtNetAbsoluteParams DtNetabsoluteParams; 00801 typedef DtNetTetherParams DtNettetherParams; 00802 typedef DtNetCompassParams DtNetcompassParams; 00803 typedef DtNetMimicParams DtNetmimicParams; 00804 typedef DtNetOrbitParams DtNetorbitParams; 00805 typedef DtNetTrackParams DtNettrackParams; 00806 typedef DtNetTetherTrackParams DtNettetherTrackParams; 00807 typedef DtNetMimicTrackParams DtNetmimicTrackParams; 00808 typedef DtNetGroupParams DtNetgroupParams; 00809 typedef DtNetModelessParams DtNetmodelessParams; 00810 typedef DtNetOptionsParams DtNetoptionsParams; 00811 00812 #define DtVCPDU_PARAMS(pdu, type) (*((DtNet##type##Params *) &pdu->params)) 00813 #define DtVIEW_PARAMS(params, type) (*((DtNet##type##Params *) ¶ms)) 00814 00815 #else 00816 00817 #define DtVCPDU_PARAMS(pdu, type) (pdu->params.type) 00818 #define DtVIEW_PARAMS(params, type) (params.type) 00819 00820 typedef union 00821 { 00822 DtNetAbsoluteParams absolute; 00823 DtNetTetherParams tether; 00824 DtNetCompassParams compass; 00825 DtNetMimicParams mimic; 00826 DtNetOrbitParams orbit; 00827 DtNetTrackParams track; 00828 DtNetTetherTrackParams tetherTrack; 00829 DtNetMimicTrackParams mimicTrack; 00830 DtNetGroupParams group; 00831 DtNetModelessParams modeless; 00832 DtNetOptionsParams options; 00833 } DtNetViewControlParams; 00834 typedef DtNetViewControlParams DtViewControlParams; 00835 00836 #endif 00837 #endif /*GATEWAY_PROTECTION */ 00838 00839 typedef struct DtNetViewControlPdu 00840 { 00841 DtNetPduHeader header; 00842 DtNetGlobalObjectDesignator viewerId; /* The ID of the stealth */ 00843 DtNetGlobalObjectDesignator senderId; 00844 #if DtHLA 00845 DtNetU32 pad; 00846 #endif 00847 DtNetU16 unused0; 00848 DtNetViewerCommand command; /* attach, teleport, etc. */ 00849 DtNetU32 unused; 00850 DtNetViewControlParams params; 00851 } DtNetViewControlPdu; 00852 00853 // \brief DtSdcVector2Ds represent vectors in 2-d space, X, Y 00854 // 00855 // A DtSdcVector2D is the 2D equivalent of the 3D DtSdcVector2D 00856 class DL_DLL_IGCONVRLINK DtSdcVector2D 00857 { 00858 public: 00859 00860 DtSdcVector2D(); 00861 00862 // Construct from two doubles. 00863 DtSdcVector2D( const double& x, const double& y ); 00864 00865 // destructor 00866 ~DtSdcVector2D(); 00867 00868 // copy constructor 00869 DtSdcVector2D(const DtSdcVector2D& vec); 00870 00871 // assignment operator 00872 DtSdcVector2D& operator=(const DtSdcVector2D& vec); 00873 00874 // set Vector to all zeros 00875 void setToZero(); 00876 00877 // @{ 00878 // gets/sets the x component of a Vector 00879 const double& x() const; 00880 void setX(const double& x); 00881 // @} 00882 00883 // @{ 00884 // gets/sets the y component of a Vector 00885 const double& y() const; 00886 void setY(const double& y); 00887 // @} 00888 00889 // adds other to this vector 00890 DtSdcVector2D &operator+=(const DtSdcVector2D &other); 00891 00892 // subtracts other from this vector (this - other) 00893 DtSdcVector2D &operator-=(const DtSdcVector2D &other); 00894 00895 // subtraction 00896 DtSdcVector2D operator-(const DtSdcVector2D &other) const; 00897 00898 // addition 00899 DtSdcVector2D operator+(const DtSdcVector2D &other) const; 00900 00901 // multiplies this vector by scalar 00902 DtSdcVector2D operator*(float scale) const; 00903 00904 // multiplies this vector by scalar 00905 DtSdcVector2D& operator*=(float scale); 00906 00907 // Get the value for the specified subscript. (int version) 00908 double& operator[](int ind); 00909 00910 // A const version to get the value for the specified subscript 00911 double operator[](int ind) const; 00912 00913 // Get the value for the specified subscript. (enum version) 00914 double& operator[](DtSdcVector2DOffset ind); 00915 00916 // a const version to get the value for the specified subscript. (enum version) 00917 double operator[](DtSdcVector2DOffset ind) const; 00918 00919 // Get whether another vector equals this vector. Warning: This 00920 // operation compares floats of exact equality. 00921 int operator==(const DtSdcVector2D& vec) const; 00922 00923 // Get whether another vector does not equal this vector. Warning: 00924 // this operation calles operator== which tests floats for exact equality 00925 int operator!=(const DtSdcVector2D& vec) const; 00926 00927 // Get a string representation of the vector. 00928 DtString string() const; 00929 00930 // Create a DtVector (with z==0) from a DtSdcVector2D 00931 DtVector vector3D() const; 00932 00933 // Get the magnitude of the vector squared, 00934 // i.e. x^2 + y^2 00935 double magnitudeSquared() const; 00936 00937 // Normalize the vector; i.e., magnitude = 1. 00938 void normalize(); 00939 00940 // Returns true of the vector is Normalized 00941 bool isNormalized() const; 00942 00943 // Compute dot product with another vector 00944 double dotProduct(const DtSdcVector2D& v) const; 00945 00946 // check if the vector is zero-ed out withing the tolerace passed 00947 bool approxEq(const DtSdcVector2D& v, const double& tolerance) const; 00948 00949 // check if the magnitide of this vector is zero 00950 bool magnitudeIsZero() const; 00951 00952 // check if the magnitide of this vector is zero, within the tolerance passed. 00953 // \Note This tolerance is comparied against each component of the vector, 00954 // not the magnitude. 00955 bool magnitudeIsZero(double tolerance) const; 00956 00957 // prints out a formated string to the stream 00958 std::ostream &printDataToStream(std::ostream &str) const; 00959 00960 public: 00961 00962 // @name These functions reveal the internal representation of DtVector 00963 // and should not be used. They are provided for backwards compatability 00964 // @{ 00965 operator double* (); 00966 operator const double* () const; 00967 // @} 00968 00969 public: 00970 00971 00972 // Get a zero'ed vector. 00973 static const DtSdcVector2D& zero(); 00974 00975 // Get a (1,0) vector. 00976 static const DtSdcVector2D& i(); 00977 00978 // Get a (0,1) vector. 00979 static const DtSdcVector2D& j(); 00980 00981 // Get a vector set to all ones. 00982 static const DtSdcVector2D& ones(); 00983 00984 00985 protected: 00986 00987 double myRep[2]; 00988 00989 00990 }; 00991 00992 typedef const DtSdcVector2D &DtSdcConstVector2D; 00993 typedef DtSdcVector2D &DtSdcVector2DRef; 00994 00995 00996 const DtViewerCommand DtViewerPivot = DtViewerCommand(12); 00997 const DtViewerCommand DtViewerMove = DtViewerCommand(13); 00998 const DtViewerCommand DtViewerRequestState = DtViewerCommand(14); 00999 const DtViewerCommand DtViewerOrthoPivot = DtViewerCommand(15); 01000 01001 #define DtStealthViewModeStatusStart 500 01002 #define DtStealthViewModeStatusEnd 600 01003 01004 #define DtNewViewModeStatusCommand(Mode) \ 01005 const DtViewerCommand DtViewerStatus##Mode = (DtViewerCommand) \ 01006 ((int) DtStealthViewModeStatusStart + DtViewer##Mode); 01007 01008 DtNewViewModeStatusCommand(Absolute); 01009 DtNewViewModeStatusCommand(Tether); 01010 DtNewViewModeStatusCommand(Compass); 01011 DtNewViewModeStatusCommand(Mimic); 01012 DtNewViewModeStatusCommand(Turret); 01013 DtNewViewModeStatusCommand(Orbit); 01014 DtNewViewModeStatusCommand(Track); 01015 DtNewViewModeStatusCommand(TetherTrack); 01016 DtNewViewModeStatusCommand(MimicTrack); 01017 DtNewViewModeStatusCommand(Group); 01018 DtNewViewModeStatusCommand(Modeless); 01019 DtNewViewModeStatusCommand(Pivot); 01020 DtNewViewModeStatusCommand(OrthoPivot); 01021 01022 #define DtStealthRemoteDrawControlStart 2500 01023 #define DtStealthRemoteDrawControlEnd 2600 01024 01025 #define DtNewViewerCommand(newType, value) \ 01026 const DtViewerCommand newType = (DtViewerCommand) \ 01027 ((int)DtStealthRemoteDrawControlStart + value); 01028 01029 #define EVCSTR(id) #id 01030 #define CASE_EVCSTRING(af) case af: return (EVCSTR(af) + 2) 01031 01038 01039 const int DtCURRENT_DRAW_CONTROL_VERSION = 1; 01040 01041 DtNewViewerCommand(DtSdcUndefined, -DtViewerOptions) 01042 01043 DtNewViewerCommand(DtSdcObjectPdu, 0) 01044 01045 // DtSdcCommand is for internal use only; it indicates the 01046 // view command used to convey the actual draw commands below. 01047 // The draw command itself is put into the view control PDU's 01048 // params.type field 01049 DtNewViewerCommand(DtSdcCommand, 10) 01050 01051 // Use these to send draw commands 01052 DtNewViewerCommand(DtSdcCommandRemove, 11) 01053 DtNewViewerCommand(DtSdcCommandHide, 12) 01054 DtNewViewerCommand(DtSdcCommandShow, 13) 01055 DtNewViewerCommand(DtSdcCommandAddToLayer, 14) 01056 DtNewViewerCommand(DtSdcCommandRemoveFromLayer, 15) 01057 DtNewViewerCommand(DtSdcCommandShowAttribute, 16) 01058 DtNewViewerCommand(DtSdcCommandShowTemplateAttribute, 17) 01059 DtNewViewerCommand(DtSdcCommandHideAttribute, 18) 01060 DtNewViewerCommand(DtSdcCommandHideTemplateAttribute, 19) 01061 01063 // DtSdcLine is for internal use only; it indicates the 01064 // view command used to convey the actual line commands below. 01065 // The draw command itself is put into the view control PDU's 01066 // params.type field 01067 DtNewViewerCommand(DtSdcLine, 20) 01068 01069 // Use these commands for 2D and 3D lines 01070 DtNewViewerCommand(DtSdc2DLine, 21) 01071 DtNewViewerCommand(DtSdc3DLine, 22) 01072 01073 // DtSdcSegmentedLine is for internal use and backwards compatibilty only; 01074 // it indicates the view command used to convey the actual segmented line 01075 // commands below in version 0 (in the current version, there is no segmented 01076 // line command - just use the line command, which can have 1 or more segments. 01077 // The draw command itself is put into the view control PDU's 01078 // params.type field 01079 DtNewViewerCommand(DtSdcSegmentedLine, 30) 01080 DtNewViewerCommand(DtSdc2DSegmentedLine, 31) 01081 DtNewViewerCommand(DtSdc3DSegmentedLine, 32) 01082 01083 // DtSdcPolyObject is for internal use only; it indicates the 01084 // view command used to convey the actual poly object commands below. 01085 // The draw command itself is put into the view control PDU's 01086 // params.type field 01087 DtNewViewerCommand(DtSdcPolyObject, 40) 01088 01089 // Use these commands for poly objects 01090 DtNewViewerCommand(DtSdcCircle, 41) 01091 DtNewViewerCommand(DtSdcSphere, 42) 01092 DtNewViewerCommand(DtSdcSquare, 43) 01093 DtNewViewerCommand(DtSdcCube, 44) 01094 DtNewViewerCommand(DtSdcCylinder, 45) 01095 01096 // DtSdcTriangle is for internal use only; it indicates the 01097 // view command used to convey the actual triangle object commands below. 01098 // The draw command itself is put into the view control PDU's 01099 // params.type field 01100 DtNewViewerCommand(DtSdcTriangle, 50) 01101 01102 // Use these commands for triangles 01103 DtNewViewerCommand(DtSdc2DTriangle, 51) 01104 DtNewViewerCommand(DtSdc3DTriangle, 52) 01105 01106 // Areas 01107 DtNewViewerCommand(DtSdcArea, 53) 01108 DtNewViewerCommand(DtSdc2DArea, 54) 01109 DtNewViewerCommand(DtSdc3DArea, 55) 01110 01112 // DtSdcText is for internal use only; it indicates the 01113 // view command used to convey the actual text commands below. 01114 // The draw command itself is put into the view control PDU's 01115 // params.type field 01116 DtNewViewerCommand(DtSdcText, 60) 01117 01118 // Use these commmands for text 01119 DtNewViewerCommand(DtSdc2DText, 61) 01120 DtNewViewerCommand(DtSdc3DText, 62) 01121 01123 // DtSdcAttribute is for internal use only; it indicates the 01124 // view command used to convey the actual attribute commands below. 01125 // The draw command itself is put into the view control PDU's 01126 // params.type field 01127 DtNewViewerCommand(DtSdcAttribute, 70) 01128 01129 // Use these commands for creating attribute groups and attirbute group templates 01130 DtNewViewerCommand(DtSdcAttributeGroupTemplate, 71) 01131 DtNewViewerCommand(DtSdcAttributeGroup, 72) 01132 DtNewViewerCommand(DtSdcAttributeNoValue, 73) 01133 DtNewViewerCommand(DtSdcAttributeSingleValue, 74) 01134 DtNewViewerCommand(DtSdcAttributeGraphicSingleValue, 75) 01135 DtNewViewerCommand(DtSdcAttributeGraphicListValue, 76) 01136 DtNewViewerCommand(DtSdcAttributeBitmap, 77) 01137 01138 // DtSdcAttributeUpdate is for internal use only; it indicates the 01139 // view command used to convey the actual attribute update commands below. 01140 // The draw command itself is put into the view control PDU's 01141 // params.type field 01142 DtNewViewerCommand(DtSdcAttributeUpdate, 80) 01143 01144 // Use these commands for updating attribute values 01145 DtNewViewerCommand(DtSdcAttributeValueSet, 81) 01146 DtNewViewerCommand(DtSdcAttributeValueReset, 82) 01147 DtNewViewerCommand(DtSdcAttributeValueSetText, 83) 01148 01150 // DtSdcLayer indicates the view command used and the (create) 01151 // layer command itself. 01152 // The command is also put into the view control PDU's 01153 // params.type field 01154 DtNewViewerCommand(DtSdcLayer, 90) 01155 01157 class DtStealthControlPdu; 01158 #ifndef DtViewControlPdu 01159 typedef DtStealthControlPdu DtViewControlPdu; 01160 #if DtDIS 01161 typedef DtStealthControlPdu DtViewControlInteraction; 01162 #endif 01163 #endif 01164 01165 #if DtDIS 01166 class DtExerciseConn; 01167 class DtStealthControlPdu; 01168 typedef DtStealthControlPdu DtStealthControlInteraction; 01169 typedef void (*DtStealthControlInteractionCb) 01170 (DtStealthControlInteraction *inter, void *usr); 01171 #include <vl/interaction.h> 01172 #endif //! DtDIS 01173 01174 #define netViewControlPdu ((DtNetViewControlPdu *) netPdu) 01175 #define DtViewControlStaticSize \ 01176 sizeof(DtNetViewControlPdu) - sizeof(DtNetViewControlParams) 01177 01178 #if DtHLA 01179 class DL_DLL_IGCONVRLINK DtStealthControlPdu : public DtPdu 01180 #else 01181 class DL_DLL_IGCONVRLINK DtStealthControlPdu : public DtInteraction 01182 #endif 01183 { 01184 public: 01185 01186 // This form is used by the enclosing interaction's Copy Constructor, 01187 // assignment operator, and by setVcPdu (which makes a copy of the pdu. 01188 static DtPdu *create(const DtNetPacket *initial, 01189 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 01190 01191 // This create is used to create a pdu from a net packet. It's slightly 01192 // different, in that it creates a current version PDU even when an 01193 // older version packet is received (the current always knows how to 01194 // handle any version packet). In this way, receivers can use a 01195 // single PDU interface regardless of the version PDU actually sent 01196 // (it always looks like the current version to the receiver 01197 static DtPdu *createFromNet( const DtNetPacket *initial, 01198 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 01199 01200 static DtU32 drawControlParamVersion( const DtNetViewControlPdu* vc ); 01201 01202 #if DtDIS 01203 01204 static void addCallback(DtExerciseConn *conn, 01205 DtStealthControlInteractionCb cb, void *usr); 01206 static void removeCallback(DtExerciseConn *conn, 01207 DtStealthControlInteractionCb cb, void *usr); 01208 01209 #endif 01210 01211 /****************** INSPECTOR FUNCTIONS *******************/ 01212 01213 const DtGlobalObjectDesignator& viewerId() const; 01214 const DtGlobalObjectDesignator& senderId() const; 01215 DtViewerCommand viewerCommand() const; 01216 unsigned long ignoreFlags() const; 01217 bool statusCommand() const; 01218 01219 /****************** MUTATOR FUNCTIONS *******************/ 01220 01221 void setViewerId(const DtGlobalObjectDesignator& id); 01222 void setSenderId(const DtGlobalObjectDesignator& id); 01223 void setIgnoreFlags(unsigned long flags); 01224 void setStatusCommand(bool b); 01225 01226 virtual void setFromString(const char *) {} 01227 virtual const char *string() const {return "";} 01228 01229 void printData() const; 01230 01231 protected: 01232 bool isNumber(const char* str); 01233 DtPduKind internalGetPduKind() const {return DtViewControlPduKind;} 01234 DtGlobalObjectDesignator retId; 01235 void setViewerCommand(DtViewerCommand com); 01236 DtStealthControlPdu(); 01237 01238 protected: 01239 static DtStealthControlPdu* createViewControl( 01240 DtNetViewControlPdu *vc, DtBufferPtr buffer); 01241 01242 static DtStealthControlPdu* createDrawControl(DtNetViewControlPdu *vc, 01243 DtBufferPtr buffer); 01244 01245 static DtStealthControlPdu* createDrawControlV0(DtNetViewControlPdu *vc, 01246 DtBufferPtr buffer); 01247 static DtStealthControlPdu* createDrawControlCurrent(DtNetViewControlPdu *vc, 01248 DtBufferPtr buffer); 01249 01250 protected: 01251 char vcStr[400]; 01252 }; 01253 01254 DL_DLL_IGCONVRLINK DtStealthControlPdu *DtNewStealthControlPdu(DtViewerCommand command); 01255 DL_DLL_IGCONVRLINK DtStealthControlPdu *DtNewViewControlPdu(DtViewerCommand command); 01256 DL_DLL_IGCONVRLINK DtStealthControlPdu *DtNewDrawControlPdu(DtViewerCommand command); 01257 DL_DLL_IGCONVRLINK DtStealthControlPdu *DtNewDrawControlPduV0(DtViewerCommand command); 01258 01259 #define DtIGNORE_EAST (1<<0) 01260 #define DtIGNORE_NORTH (1<<1) 01261 #define DtIGNORE_HEIGHT (1<<2) 01262 #define DtIGNORE_HEADING (1<<3) 01263 #define DtIGNORE_PITCH (1<<4) 01264 #define DtIGNORE_ROLL (1<<5) 01265 #define DtIGNORE_EAST_OFFSET (1<<6) 01266 #define DtIGNORE_NORTH_OFFSET (1<<7) 01267 #define DtIGNORE_HEIGHT_OFFSET (1<<8) 01268 #define DtIGNORE_RADIUS (1<<9) 01269 #define DtIGNORE_BODY_HEADING (1<<10) 01270 #define DtIGNORE_HEADING_OFFSET (1<<11) 01271 #define DtIGNORE_PITCH_OFFSET (1<<12) 01272 #define DtIGNORE_FORWARD (1<<13) 01273 #define DtIGNORE_RIGHT (1<<14) 01274 #define DtIGNORE_UP (1<<15) 01275 #define DtIGNORE_BODY_PITCH (1<<16) 01276 #define DtIGNORE_BODY_ROLL (1<<17) 01277 #define DtIGNORE_AZIMUTH_RATE (1<<18) 01278 #define DtIGNORE_RADIAL_OFFSET (1<<19) 01279 #define DtIGNORE_PRIMARY_ID (1<<20) 01280 #define DtIGNORE_SECONDARY_ID (1<<21) 01281 #define DtIGNORE_GROUP_IDS (1<<22) 01282 #define DtIGNORE_TURN_CMD (1<<23) 01283 #define DtIGNORE_STEP_CMD (1<<24) 01284 01285 class DtExerciseConn; 01286 DL_DLL_IGCONVRLINK void DtStealthControlRegister(DtExerciseConn*); 01287 01288 #define STEALTH_CONTROL_VERSION_STRING "1.2" 01289 #define STEALTH_CONTROL_MAJOR_VERSION 1 01290 #define STEALTH_CONTROL_MINOR_VERSION 2 01291 #define STEALTH_CONTROL_REVISION 0 01292 01293 #include <vl/hostStructs.h> 01294 #if (VR_LINK_MINOR_VERSION == 9) 01295 #include <vlutil/vlMachineTypes.h> 01296 #endif 01297 #include <matrix/vlMath.h> 01298 #include <vl/globalObjDes.h> 01299 01300 #define netStealthDrawControlPdu ((DtNetViewControlPdu *) netPdu) 01301 #define DtStealthDrawControlStaticSize (sizeof(DtNetViewControlPdu) - sizeof(DtNetViewControlParams)) 01302 01303 // 01304 // Vector routines. 01305 // 01306 01307 #define DtSetVec2D(v, x, y) v[DtSdcX]=x;v[DtSdcY]=y; 01308 01309 DL_DLL_IGCONVRLINK void DtVecScale(const DtSdcVector2D& v, double scale_factor, DtSdcVector2D& result); 01310 DL_DLL_IGCONVRLINK void DtVecNeg(const DtSdcVector2D& v1, DtSdcVector2D& result); // result = -vec 01311 01312 // cos of angle between v1 and V2 01313 DL_DLL_IGCONVRLINK double DtVecCosProd(const DtSdcVector2D& v1, const DtSdcVector2D& v2); 01314 01315 DL_DLL_IGCONVRLINK double DtVecInfNorm(const DtSdcVector2D& v1); 01316 DL_DLL_IGCONVRLINK void DtVecInit(DtSdcVector2D& v); // Initialize to all zeros. 01317 01318 /* ||p1-p2||_{2} */ 01319 DL_DLL_IGCONVRLINK double DtDistance(const DtSdcVector2D& p1, const DtSdcVector2D& p2); 01320 01321 DL_DLL_IGCONVRLINK double DtDistSqr(const DtSdcVector2D& p1, const DtSdcVector2D& p2); 01322 01323 01324 std::ostream & operator << (std::ostream &str, const DtSdcVector2D &vec); 01325 01326 inline void DtSdcVector2D::setToZero() 01327 { 01328 myRep[DtSdcX] = 0.0; 01329 myRep[DtSdcY] = 0.0; 01330 } 01331 01332 inline const double& DtSdcVector2D::x() const 01333 { 01334 return myRep[DtSdcX]; 01335 } 01336 01337 inline void DtSdcVector2D::setX(const double& x) 01338 { 01339 myRep[DtSdcX] = x; 01340 } 01341 01342 inline const double& DtSdcVector2D::y() const 01343 { 01344 return myRep[DtSdcY]; 01345 } 01346 01347 inline void DtSdcVector2D::setY(const double& y) 01348 { 01349 myRep[DtSdcY] = y; 01350 } 01351 01352 // Inline DtSdcVector2D functions 01353 01354 inline double& DtSdcVector2D::operator[](DtSdcVector2DOffset ind) 01355 { 01356 return myRep[ind]; 01357 } 01358 01359 inline double DtSdcVector2D::operator[](DtSdcVector2DOffset ind) const 01360 { 01361 return myRep[ind]; 01362 } 01363 01364 inline double& DtSdcVector2D::operator[](int ind) 01365 { 01366 return myRep[ind]; 01367 } 01368 01369 inline double DtSdcVector2D::operator[](int ind) const 01370 { 01371 return myRep[ind]; 01372 } 01373 01374 inline DtSdcVector2D::DtSdcVector2D( 01375 const double& x, 01376 const double& y) 01377 { 01378 myRep[DtSdcX] = x; 01379 myRep[DtSdcY] = y; 01380 } 01381 01382 inline DtSdcVector2D::DtSdcVector2D() 01383 { 01384 myRep[DtSdcX] = 0; 01385 myRep[DtSdcY] = 0; 01386 } 01387 01388 inline DtSdcVector2D::DtSdcVector2D(const DtSdcVector2D& other) 01389 { 01390 myRep[DtSdcX] = other[DtSdcX]; 01391 myRep[DtSdcY] = other[DtSdcY]; 01392 } 01393 01394 inline DtSdcVector2D& DtSdcVector2D::operator=(const DtSdcVector2D& other) 01395 { 01396 if (&other != this) 01397 { 01398 myRep[DtSdcX] = other[DtSdcX]; 01399 myRep[DtSdcY] = other[DtSdcY]; 01400 } 01401 return *this; 01402 } 01403 01404 inline DtSdcVector2D::~DtSdcVector2D() 01405 { 01406 } 01407 01408 //lint -save -e777 01409 inline int DtSdcVector2D::operator==(const DtSdcVector2D& vec) const 01410 { 01411 return 01412 ( 01413 myRep[DtSdcX] == vec[DtSdcX] && 01414 myRep[DtSdcY] == vec[DtSdcY] 01415 ); 01416 } 01417 //lint -restore 01418 01419 inline int DtSdcVector2D::operator!=(const DtSdcVector2D& vec) const 01420 { 01421 return !operator==(vec); 01422 } 01423 01424 inline DtSdcVector2D::operator double* () 01425 { 01426 return myRep; 01427 } 01428 01429 inline DtSdcVector2D::operator const double* () const 01430 { 01431 return myRep; 01432 } 01433 01434 01441 class DL_DLL_IGCONVRLINK DtSdcColor 01442 { 01443 public: 01444 01446 DtSdcColor(); 01447 01460 DtSdcColor( unsigned r, unsigned g, unsigned b, unsigned a = 255 ); 01461 01463 DtSdcColor( const DtSdcColor& orig ); 01464 01466 DtSdcColor operator=( const DtSdcColor& orig ); 01467 01475 const unsigned& operator[]( int index ) const; 01476 01484 unsigned& operator[]( int index ); 01485 01486 01488 bool operator==(const DtSdcColor& rhs) const; 01489 01491 bool operator!=(const DtSdcColor& rhs) const; 01492 01504 void setHSV( unsigned hue, double saturation, double value, 01505 unsigned alpha = 255 ); 01506 01512 unsigned red() const; 01513 01519 void setRed( unsigned red ); 01520 01526 unsigned green() const; 01527 01533 void setGreen( unsigned green ); 01534 01540 unsigned blue() const; 01541 01547 void setBlue( unsigned blue ); 01548 01554 unsigned hue() const; 01555 01561 void setHue( unsigned hue ); 01562 01568 double saturation() const; 01569 01575 void setSaturation( double saturation ); 01576 01582 double value() const; 01583 01589 void setValue( double value ); 01590 01596 unsigned alpha() const; 01597 01603 void setAlpha( unsigned alpha ); 01604 01606 static const DtSdcColor DtSdcWhite; 01608 static const DtSdcColor DtSdcBlack; 01610 static const DtSdcColor DtSdcRed; 01612 static const DtSdcColor DtSdcGreen; 01614 static const DtSdcColor DtSdcBlue; 01616 static const DtSdcColor DtSdcYellow; 01618 static const DtSdcColor DtSdcPurple; 01620 static const DtSdcColor DtSdcOrange; 01621 01622 protected: 01623 void toHSV(); 01624 void fromHSV(); 01625 01626 protected: 01627 unsigned myRed; 01628 unsigned myGreen; 01629 unsigned myBlue; 01630 unsigned myAlpha; 01631 01632 unsigned myHue; 01633 double mySaturation; 01634 double myValue; 01635 }; 01636 01637 01638 class DL_DLL_IGCONVRLINK DtStealthDrawControlPdu : public DtStealthControlPdu 01639 { 01640 public: 01641 01642 virtual const DtNetU32 objectId() const; 01643 virtual void setObjectId(DtNetU32 lid); 01644 01645 virtual void setType(DtNetU32 type); 01646 virtual DtNetU32 type() const; 01647 01648 virtual DtU32 paramVersion() const; 01649 01650 virtual void printData() const; 01651 static const char *typeString(int param); 01652 01653 protected: 01654 01655 virtual int setInternalText(DtString str, size_t structSize); 01656 virtual const DtString internalText(int size, size_t structSize) const; 01657 01658 // This needs to be called after initPdu when creating Pdus to send. 01659 // All the existing top level draw control Pdus (that aren't constructed 01660 // from a net buffer) call this. It should never be called for a Pdu 01661 // created from a network buffer (as the version is there in the network 01662 // buffer already, and changing it to something else will probably result 01663 // in a fatal error). 01664 // 01665 virtual void setParamVersion( DtU32 paramVersion ); 01666 01667 protected: 01668 01669 DtString myTemporalText; 01670 }; 01671 01672 class DtList; 01673 class DtExerciseConn; 01674 class DtStealthRemoteController; 01675 class DtGlobalObjectDesignatorList; 01676 class DtCustomRemoteControlSender; 01677 01678 class DtInetSocket; 01679 01680 typedef void (*RemoteViewChangedCb)( 01681 const DtStealthControlPdu& pdu, void* usr); 01682 01683 01684 #if DtHLA 01685 01686 #include <vl/hIntWEncDec.h> 01687 #include <vl/pdu.h> 01688 01689 class DtStealthControlInteraction; 01690 class DtStealthControlPdu; 01691 class DtExerciseConn; 01692 01694 typedef DtStealthControlInteraction DtViewControlInteraction; 01695 01697 typedef void (*DtStealthControlInteractionCb) 01698 (DtStealthControlInteraction* inter, void* usr); 01699 01704 01705 class DL_DLL_IGCONVRLINK DtStealthControlInteraction : public DtInteractionWithEncDec 01706 { 01707 public: 01708 01710 DtStealthControlInteraction(); 01711 01713 virtual ~DtStealthControlInteraction(); 01714 01716 DtStealthControlInteraction(const DtStealthControlInteraction& orig); 01717 01719 DtStealthControlInteraction& operator=(const DtStealthControlInteraction& orig); 01720 01722 virtual void printData() const; 01723 01725 virtual const char* name() const; 01726 01728 virtual const DtStealthControlPdu* vcPdu() const; 01729 virtual void setVcPdu(const DtStealthControlPdu& pdu); 01730 virtual void setFromNetPacket(const DtNetPacket* pack); 01731 01732 01733 public: 01734 01737 static DtInteraction* create(); 01738 01741 static void addCallback(DtExerciseConn* conn, 01742 DtStealthControlInteractionCb cb, void* usr); 01743 static void removeCallback(DtExerciseConn* conn, 01744 DtStealthControlInteractionCb cb, void* usr); 01745 01746 protected: 01747 01748 virtual char* interactionClassToUse(DtExerciseConn* exConn) const; 01749 virtual DtInteractionDecoder* createDecoder(DtExerciseConn* exConn) const; 01750 virtual DtInteractionEncoder* createEncoder(DtExerciseConn* exConn) const; 01751 01752 protected: 01753 01754 DtStealthControlPdu* myVcPdu; 01755 }; 01756 01757 inline const DtStealthControlPdu* DtStealthControlInteraction::vcPdu() const 01758 { 01759 return myVcPdu; 01760 } 01761 01762 inline const char* DtStealthControlInteraction::name() const 01763 { 01764 return "DtStealthControlInteraction"; 01765 } 01766 01767 #endif 01768 01769 01770 class DL_DLL_IGCONVRLINK DtStealthRemoteController 01771 { 01772 public: 01773 01778 DtStealthRemoteController(DtCustomRemoteControlSender* sender, 01779 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL); 01780 01783 DtStealthRemoteController(DtExerciseConn* c, 01784 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL); 01785 01786 #if DtHLA 01787 01789 DtStealthRemoteController(const char* execName, const char* federateType, 01790 DtFomMapper* mapper = DtRprFomMapper::create(NULL), 01791 const char* fedFileName = NULL, 01792 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL); 01793 01794 DtStealthRemoteController(const char* execName, const char* federateType, 01795 const char* dsoName, const char* fedFileName = NULL, 01796 void* fomMapInitData = NULL, 01797 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL); 01798 01799 #else 01800 01802 DtStealthRemoteController(int port, int exercise_id, 01803 int site_id, int application_num, 01804 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL); 01805 01806 DtStealthRemoteController(int port, const DtInetAddr& destAddr, 01807 int exercise_id, int site_id, int application_num, 01808 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL); 01809 01810 DtStealthRemoteController(DtInetSocket *skt, int exercise_id, 01811 int site_id, int application_num, 01812 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL); 01813 01814 01815 #endif 01816 01817 virtual ~DtStealthRemoteController(); 01818 01821 virtual void setTargetStealthId(const DtGlobalObjectDesignator& id); 01822 virtual const DtGlobalObjectDesignator& targetStealthId() const; 01823 01825 virtual void setControllerId(const DtGlobalObjectDesignator& id); 01826 virtual const DtGlobalObjectDesignator& controllerId() const; 01827 01831 01834 virtual void addViewModeChangeCallback( 01835 RemoteViewChangedCb fn, void* usr, 01836 const DtGlobalObjectDesignator& stealthid = SEND_TO_ALL); 01837 01838 virtual void removeViewModeChangeCallback( 01839 RemoteViewChangedCb fn, void* usr, 01840 const DtGlobalObjectDesignator& stealthid = SEND_TO_ALL); 01841 01843 virtual void requestCurrentViewMode( 01844 const DtGlobalObjectDesignator& id = SEND_TO_ALL) const; 01845 01847 virtual void setPrimary(const DtGlobalObjectDesignator& id) const; 01848 virtual void setSecondary(const DtGlobalObjectDesignator& id) const; 01849 virtual void setPrimarySecondary( 01850 const DtGlobalObjectDesignator& primary, 01851 const DtGlobalObjectDesignator& secondary) const; 01852 virtual void setGroup(const DtGlobalObjectDesignatorList& list) const; 01853 virtual void addToGroup(const DtGlobalObjectDesignatorList& list) const; 01854 virtual void removeFromGroup(const DtGlobalObjectDesignatorList& list) const; 01855 01857 virtual void reset() const; 01858 01860 enum Direction { Left, Right, Up, Down, Forward, Backward }; 01861 virtual void moveEyepoint(Direction d) const; 01862 virtual void turnEyepoint(Direction d) const; 01863 01867 virtual void setStepsize(float stepsize) const; 01868 virtual void setTurnrate(float turnrate) const; 01869 01872 virtual void increaseStepsize() const; 01873 virtual void increaseTurnrate() const; 01874 virtual void decreaseStepsize() const; 01875 virtual void decreaseTurnrate() const; 01876 01880 virtual void set( 01881 const DtVector* geoc = NULL, 01882 const DtTaitBryan* ori = NULL) const; 01883 01887 virtual void setMode(DtViewerCommand m, 01888 const DtVector* geocPos = NULL, 01889 const DtTaitBryan* geocOri = NULL) const; 01890 01897 virtual void setAbsoluteMode( 01898 const DtVector* geoc = NULL, 01899 const DtTaitBryan* ori = NULL) const; 01900 01909 virtual void setCompassMode( 01910 const DtGlobalObjectDesignator* primary = NULL, 01911 const float* radius = NULL, 01912 const float* azimuth = NULL, 01913 const float* elevation = NULL) const; 01914 01921 virtual void setMimicMode( 01922 const DtGlobalObjectDesignator* primary = NULL, 01923 const DtVector* offset = NULL) const; 01924 01931 virtual void setTurretMode( 01932 const DtGlobalObjectDesignator* primary, 01933 const DtVector* offset) const; 01934 01944 virtual void setOrbitMode( 01945 const DtGlobalObjectDesignator* primary = NULL, 01946 const float* radius = NULL, 01947 const float* azimuth = NULL, 01948 const float* elevation = NULL, 01949 const float* azimuthRate = NULL) const; 01950 01959 virtual void setPivotMode( 01960 const DtVector* pivotPt = NULL, 01961 const float* radius = NULL, 01962 const float* azimuth = NULL, 01963 const float* elevation = NULL) const; 01964 01972 virtual void setTetherMode( 01973 const DtGlobalObjectDesignator* primary = NULL, 01974 const DtVector* offset = NULL, 01975 const DtTaitBryan* ori = NULL) const; 01976 01983 virtual void setTrackMode( 01984 const DtGlobalObjectDesignator* primary = NULL, 01985 const DtVector* geoc = NULL) const; 01986 01994 virtual void setMimicTrackMode( 01995 const DtGlobalObjectDesignator* attach = NULL, 01996 const DtGlobalObjectDesignator* track = NULL, 01997 const DtVector* offset = NULL) const; 01998 02006 virtual void setTetherTrackMode( 02007 const DtGlobalObjectDesignator* attach = NULL, 02008 const DtGlobalObjectDesignator* track = NULL, 02009 const DtVector* offset = NULL) const; 02010 02019 virtual void setGroupMode( 02020 const DtGlobalObjectDesignatorList* grp = NULL, 02021 const float* radius = NULL, 02022 const float* azimuth = NULL, 02023 const float* elevation = NULL) const; 02024 02032 virtual void setWideGroupMode( 02033 const DtGlobalObjectDesignatorList* grp = NULL, 02034 const float* radius = NULL, 02035 const float* azimuth = NULL, 02036 const float* elevation = NULL) const; 02037 02041 02043 virtual void setOverlayEnabled(bool b) const; 02044 02046 virtual void setSmoothing(DtSmoothingOption option) const; 02047 02049 virtual void setSmoothingPeriod(double period) const; 02050 02052 virtual void setSoundEnabled(bool onOff) const; 02053 02055 virtual void setEntityLabelsEnabled(bool onOff) const; 02056 02058 virtual void setTrailingEffectsEnabled(bool onOff) const; 02059 02061 virtual void setTrajectoryHistoriesEnabled(bool onOff) const; 02062 02064 virtual void setAggregateLevel(int level) const; 02065 02067 virtual void setAggregateHighestOnly(bool onOff) const; 02068 02070 virtual void setGroundClampingEnabled(bool onOff) const; 02071 02073 virtual void setGroundClampRange(double range) const; 02074 02076 virtual void setTimeOfDay(double time) const; 02077 02079 virtual void setNearClippingPlane(double clip) const; 02080 02082 virtual void setFarClippingPlane(double clip) const; 02083 02085 virtual void setVerticalFieldOfView(double fov) const; 02086 02088 virtual void setFogEnabled(bool onOff) const; 02089 02091 virtual void setDatabaseToLoad(const DtString& db) const; 02092 02095 virtual void setDate(const DtString& str) const; 02096 02098 virtual void exit(); 02099 02101 virtual void setClouds(bool b); 02102 02104 virtual void setSkyDome(bool b); 02105 02107 virtual void setMirrorMessageEveryFrame(bool b); 02108 02110 virtual void setMirroring(bool b); 02111 02113 virtual void setBroadcasting(bool b); 02114 02116 virtual void setClusteringLabels(bool b); 02117 02119 virtual void setTacticalGraphicsLabels(bool b); 02120 02122 virtual void setShowAggregates(bool b); 02123 02125 virtual void setShowEmitters(bool b); 02126 02128 virtual void setXr(bool b); 02129 02131 virtual void setHatLabels(bool b); 02132 02134 virtual void setCurrentModelSet(const DtString& str); 02135 02137 virtual void setNextModelSet(); 02138 02140 virtual void setPrevModelSet(); 02141 02143 virtual void setCurrentTextureSet(const DtString& str); 02144 02146 virtual void setNextTextureSet(); 02147 02149 virtual void setPrevTextureSet(); 02150 02152 virtual void setTerrainScale(double s); 02153 02155 virtual void setObjectScale(double s); 02156 02159 virtual void startVideoRecording(); 02160 02162 virtual void startVideoRecording( const DtString& filename ); 02163 02165 virtual void stopVideoRecording(); 02166 02168 virtual void pauseVideoRecording(); 02169 02171 virtual void unpauseVideoRecording(); 02172 02175 virtual void setVideoCaptureRecordInsets(bool videoCaptureRecordInsets); 02176 02178 virtual void setVideoCaptureFramesPerSecond(int videoCaptureFramesPerSecond); 02179 02182 virtual void setVideoCaptureFilenameBase( 02183 const DtString& videoCaptureFilenameBase); 02184 02186 virtual void setVideoCaptureDirectory( 02187 const DtString& videoCaptureDirectory); 02188 02190 virtual void setConstrainWithFloor( bool b ); 02191 02193 virtual void setFloor( double h ); 02194 02196 virtual void setConstrainViewToAll( bool b ); 02197 02199 virtual void setBlockedDistance( double d ); 02200 02202 virtual void setUseNearClipForBlockedDistance( bool b ); 02203 02205 virtual void loadFeatures( const DtString& filename ); 02206 02208 virtual void clearFeatures(); 02209 02212 virtual void setIgnoreCommandsSentFromUs(bool); 02213 02214 public: 02215 02217 virtual void send(const DtStealthControlPdu& pdu) const; 02218 02219 public: 02220 02222 static const DtGlobalObjectDesignator SEND_TO_ALL; 02223 02224 protected: 02225 02226 static void processStealthControlCb( 02227 DtStealthControlInteraction* inter, void* usr); 02228 02229 virtual void processStealthControl( 02230 DtStealthControlInteraction* inter) const; 02231 02232 virtual void sendGroupPdu( 02233 const DtGlobalObjectDesignatorList* grp, 02234 const float* radius, const float* azimuth, 02235 const float* elevation, int grpCmd) const; 02236 02237 protected: 02238 02239 DtGlobalObjectDesignator myId; 02240 DtGlobalObjectDesignator myTargetId; 02241 DtList* myViewChangedCbList; 02242 DtExerciseConn* myExConn; 02243 DtCustomRemoteControlSender* mySender; 02244 bool myCreatedExConn; 02245 bool myIgnoreCommandsSentFromUs; 02246 }; 02247 02248 02249 class DtStealthDrawControlPdu; 02250 02266 class DL_DLL_IGCONVRLINK DtSdcObject 02267 { 02268 public: 02273 DtSdcObject(DtExerciseConn* exConn, unsigned id, const DtString& objName); 02274 02276 virtual ~DtSdcObject(); 02277 02278 private: 02283 DtSdcObject(); 02284 02287 DtSdcObject(const DtSdcObject& orig); 02288 02291 DtSdcObject& operator=(const DtSdcObject& rhs); 02292 02293 02294 public: 02298 virtual unsigned id() const; 02299 02306 virtual void setId( unsigned id ); 02307 02308 virtual const DtGlobalObjectDesignator& globalId() const; 02309 02310 virtual void setVisible(bool yesNo); 02311 02312 virtual bool visible() const; 02313 02314 virtual bool flashing() const; 02315 02316 virtual void setFlashing(bool yesNo); 02317 02318 virtual const DtSdcColor& color() const; 02319 02320 virtual void setColor(const DtSdcColor& color); 02321 02322 virtual void setRemoteGraphicSet(const std::string& setName); 02323 02328 virtual void update() = 0; 02329 02330 protected: 02331 unsigned myId; 02332 DtEnvironmentProcessPublisher myPublisher; 02333 bool myVisible; 02334 DtSdcColor myEmptyColor; 02335 }; 02336 02337 class DL_DLL_IGCONVRLINK DtTetherTrackVCPdu : public DtStealthControlPdu 02338 { 02339 public: 02340 02341 DtTetherTrackVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02342 DtTetherTrackVCPdu(const DtNetViewControlPdu *initial, 02343 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02344 02345 02346 DtConstVector offset() const; 02347 void setOffset(DtConstVector loc); 02348 02349 const DtGlobalObjectDesignator& attachId() const; 02350 void setAttachId(const DtGlobalObjectDesignator& id); 02351 02352 const DtGlobalObjectDesignator& trackId() const; 02353 void setTrackId(const DtGlobalObjectDesignator& id); 02354 02355 const DtString& trackMarkingText() const; 02356 void setTrackMarkingText(const DtString& markingText); 02357 02358 const DtString& attachMarkingText() const; 02359 void setAttachMarkingText(const DtString& markingText); 02360 02361 02362 void setFromString(const char *str); 02363 const char *string() const; 02364 void printData() const; 02365 02366 protected: 02367 DtVector theVec; 02368 DtGlobalObjectDesignator theId; 02369 DtString myAttachMarkingText; 02370 DtString myTrackMarkingText; 02371 }; 02372 02373 class DL_DLL_IGCONVRLINK DtTetherVCPdu : public DtStealthControlPdu 02374 { 02375 public: 02376 02377 /******************* STANDARD CONSTRUCTORS ****************/ 02378 02379 DtTetherVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02380 DtTetherVCPdu(const DtNetViewControlPdu *initial, 02381 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02382 02383 /****************** INSPECTOR FUNCTIONS *******************/ 02384 02385 DtConstVector topoUpOffset() const; 02386 const DtTaitBryan &orientation() const; 02387 const DtGlobalObjectDesignator& attachId() const; 02388 const DtString& markingText() const; 02389 02390 /****************** MUTATOR FUNCTIONS *******************/ 02391 02392 void setTopoUpOffset(DtConstVector offset); 02393 void setOrientation(const DtTaitBryan &ori); 02394 void setAttachId(const DtGlobalObjectDesignator& id); 02395 void setMarkingText(const DtString& markingText); 02396 02397 02398 void setFromString(const char *str); 02399 const char *string() const; 02400 void printData() const; 02401 02402 protected: 02403 DtVector theVec; 02404 DtTaitBryan theAngles; 02405 DtGlobalObjectDesignator theId; 02406 DtString myMarkingText; 02407 02408 }; 02409 02410 class DL_DLL_IGCONVRLINK DtTrackVCPdu : public DtStealthControlPdu 02411 { 02412 public: 02413 02414 02415 DtTrackVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02416 DtTrackVCPdu(const DtNetViewControlPdu *initial, 02417 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02418 02419 02420 DtConstVector worldLocation() const; 02421 const DtGlobalObjectDesignator& trackId() const; 02422 02423 void setWorldLocation(DtConstVector loc); 02424 void setTrackId(const DtGlobalObjectDesignator& id); 02425 02426 const DtString& markingText() const; 02427 void setMarkingText(const DtString& markingText); 02428 02429 02430 void setFromString(const char *str); 02431 const char *string() const; 02432 void printData() const; 02433 02434 protected: 02435 02436 DtVector theVec; 02437 DtGlobalObjectDesignator theId; 02438 DtString myMarkingText; 02439 02440 }; 02441 02442 class DL_DLL_IGCONVRLINK DtUnknownStealthControlPdu : public DtStealthControlPdu 02443 { 02444 public: 02445 02446 DtUnknownStealthControlPdu(const DtNetViewControlPdu *initial, 02447 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER) 02448 { 02449 initPdu(initial, buffer); 02450 } 02451 }; 02452 02453 class DL_DLL_IGCONVRLINK DtAbsoluteVCPdu : public DtStealthControlPdu 02454 { 02455 public: 02456 02457 /******************* STANDARD CONSTRUCTORS ****************/ 02458 02459 DtAbsoluteVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02460 02461 DtAbsoluteVCPdu(const DtNetViewControlPdu *initial, 02462 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02463 02464 /****************** INSPECTOR FUNCTIONS *******************/ 02465 02466 DtConstVector worldLocation() const; 02467 const DtTaitBryan &orientation() const; 02468 02469 /****************** MUTATOR FUNCTIONS *******************/ 02470 02471 void setWorldLocation(DtConstVector loc); 02472 void setOrientation(const DtTaitBryan &ori); 02473 02474 void setFromString(const char *str); 02475 const char *string() const; 02476 void printData() const; 02477 02478 protected: 02479 DtVector theVec; 02480 DtTaitBryan theAngles; 02481 }; 02482 02483 class DL_DLL_IGCONVRLINK DtCompassVCPdu : public DtStealthControlPdu 02484 { 02485 public: 02486 02487 02488 DtCompassVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02489 DtCompassVCPdu(const DtNetViewControlPdu *initial, 02490 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02491 02492 float radius() const; 02493 void setRadius(float r); 02494 02495 float bodyHeading() const; 02496 void setBodyHeading(float h); 02497 02498 float pitch() const; 02499 void setPitch(float p); 02500 02501 float headingOffset() const; 02502 void setHeadingOffset(float o); 02503 02504 float pitchOffset() const; 02505 void setPitchOffset(float p); 02506 02507 float roll() const; 02508 void setRoll(float r); 02509 02510 const DtGlobalObjectDesignator& attachId() const; 02511 void setAttachId(const DtGlobalObjectDesignator& id); 02512 02513 const DtString& markingText() const; 02514 void setMarkingText(const DtString& markingText); 02515 02516 void setFromString(const char *str); 02517 const char *string() const; 02518 void printData() const; 02519 02520 protected: 02521 DtGlobalObjectDesignator theId; 02522 DtString myMarkingText; 02523 }; 02524 02525 class DtCustomRemoteControlSender 02526 { 02527 public: 02528 DtCustomRemoteControlSender() {} 02529 virtual ~DtCustomRemoteControlSender() {} 02530 virtual void send(const char* packet, int size) = 0; 02531 }; 02532 02533 class DL_DLL_IGCONVRLINK DtGroupVCPdu : public DtStealthControlPdu 02534 { 02535 public: 02536 02537 /******************* STANDARD CONSTRUCTORS ****************/ 02538 02539 DtGroupVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02540 DtGroupVCPdu(const DtNetViewControlPdu *initial, 02541 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02542 02543 /****************** INSPECTOR FUNCTIONS *******************/ 02544 02545 float radialOffset() const; 02546 float heading() const; 02547 float pitch() const; 02548 float headingOffset() const; 02549 float pitchOffset() const; 02550 int groupCmd() const; 02551 int numEntitiesToRemove() const; 02552 int numEntitiesToAdd() const; 02553 const DtGlobalObjectDesignator& entityToRemove(int n) const; 02554 const DtGlobalObjectDesignator& entityToAdd(int n) const; 02555 02556 /****************** MUTATOR FUNCTIONS *******************/ 02557 02558 void setRadialOffset(float o); 02559 void setHeading(float h); 02560 void setPitch(float p); 02561 void setHeadingOffset(float o); 02562 void setPitchOffset(float o); 02563 void setGroupCmd(int c); 02564 void setNumEntitiesToRemove(int n); 02565 void setNumEntitiesToAdd(int n); 02566 void setEntityToRemove(int n, const DtGlobalObjectDesignator& id); 02567 void setEntityToAdd(int n, const DtGlobalObjectDesignator& id); 02568 02569 void setFromString(const char *str); 02570 const char *string() const; 02571 void printData() const; 02572 02573 protected: 02574 DtGlobalObjectDesignator theId; 02575 }; 02576 02577 #if DtHLA 02578 02579 #include <vl/interDecoder.h> 02580 02581 class DtStealthControlInteraction; 02582 class DtStealthControlDecoder; 02583 typedef DtStealthControlDecoder DtViewControlDecoder; 02584 02587 02588 #define DtDECLARE_VIEW_CONTROL_PARAM_DECODER(paramName) \ 02589 DtDECLARE_PARAM_DECODER(DtStealthControlInteraction, paramName) 02590 02595 02596 class DL_DLL_IGCONVRLINK DtStealthControlDecoder : public DtInteractionDecoder 02597 { 02598 public: 02599 02601 DtStealthControlDecoder(DtExerciseConn* exConn, 02602 DtInterClassDesc* classDesc); 02603 02605 virtual ~DtStealthControlDecoder(); 02606 02608 DtStealthControlDecoder(const DtStealthControlDecoder& orig); 02609 02611 DtStealthControlDecoder& operator=(const DtStealthControlDecoder& orig); 02612 02613 protected: 02614 02616 02617 DtDECLARE_VIEW_CONTROL_PARAM_DECODER(ViewControlPdu); 02618 }; 02619 #endif 02620 02621 #if DtHLA 02622 02623 #include <vl/interEncoder.h> 02624 02625 class DtStealthControlInteraction; 02626 class DtStealthControlEncoder; 02627 typedef DtStealthControlEncoder DtViewControlEncoder; 02628 02629 #define DtDECLARE_VIEW_CONTROL_PARAM_ENCODER(paramName) \ 02630 DtDECLARE_PARAM_ENCODER(DtStealthControlInteraction, paramName) 02631 02632 #define DtDEFINE_SIMPLE_VIEW_CONTROL_PARAM_ENCODER(paramName, netType, inspector) \ 02633 DtDEFINE_SIMPLE_PARAM_ENCODER(DtStealthControlEncoder, DtStealthControlInteraction, \ 02634 paramName, netType, \ 02635 inspector) 02636 02641 class DL_DLL_IGCONVRLINK DtStealthControlEncoder : public DtInteractionEncoder 02642 { 02643 public: 02644 02645 DtStealthControlEncoder(DtExerciseConn* exConn, 02646 DtInterClassDesc* classDesc); 02647 02649 virtual ~DtStealthControlEncoder(); 02650 02652 DtStealthControlEncoder(const DtStealthControlEncoder& orig); 02653 02655 DtStealthControlEncoder& operator=(const DtStealthControlEncoder& orig); 02656 02657 protected: 02658 02660 02661 DtDECLARE_VIEW_CONTROL_PARAM_ENCODER(ViewControlPdu); 02662 }; 02663 02664 #endif 02665 02666 02667 class DL_DLL_IGCONVRLINK DtMimicTrackVCPdu : public DtStealthControlPdu 02668 { 02669 public: 02670 02671 02672 DtMimicTrackVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02673 DtMimicTrackVCPdu(const DtNetViewControlPdu *initial, 02674 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02675 02676 02677 DtConstVector offset() const; 02678 void setOffset(DtConstVector loc); 02679 02680 const DtGlobalObjectDesignator& attachId() const; 02681 void setAttachId(const DtGlobalObjectDesignator& id); 02682 02683 void setTrackId(const DtGlobalObjectDesignator& id); 02684 const DtGlobalObjectDesignator& trackId() const; 02685 02686 const DtString& trackMarkingText() const; 02687 void setTrackMarkingText(const DtString& markingText); 02688 02689 const DtString& attachMarkingText() const; 02690 void setAttachMarkingText(const DtString& markingText); 02691 02692 02693 void setFromString(const char *str); 02694 const char *string() const; 02695 void printData() const; 02696 02697 protected: 02698 DtVector theVec; 02699 DtGlobalObjectDesignator theId; 02700 DtString myAttachMarkingText; 02701 DtString myTrackMarkingText; 02702 02703 }; 02704 02705 class DL_DLL_IGCONVRLINK DtMimicVCPdu : public DtStealthControlPdu 02706 { 02707 public: 02708 02709 02710 DtMimicVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02711 DtMimicVCPdu(const DtNetViewControlPdu *initial, 02712 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02713 02714 02715 DtConstVector offset() const; 02716 void setOffset(DtConstVector offset); 02717 02718 const DtTaitBryan &bodyOrientation() const; 02719 void setBodyOrientation(const DtTaitBryan &ori); 02720 02721 const DtGlobalObjectDesignator& attachId() const; 02722 void setAttachId(const DtGlobalObjectDesignator& id); 02723 02724 const DtString& markingText() const; 02725 void setMarkingText(const DtString& markingText); 02726 02727 void setFromString(const char *str); 02728 const char *string() const; 02729 void printData() const; 02730 02731 protected: 02732 DtGlobalObjectDesignator theId; 02733 DtVector theVec; 02734 DtTaitBryan theAngles; 02735 DtString myMarkingText; 02736 02737 }; 02738 02739 class DL_DLL_IGCONVRLINK DtOffsetMimicVCPdu : public DtMimicVCPdu 02740 { 02741 public: 02742 DtOffsetMimicVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02743 DtOffsetMimicVCPdu(const DtNetViewControlPdu *initial, 02744 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02745 02746 }; 02747 02748 class DL_DLL_IGCONVRLINK DtModelessVCPdu : public DtStealthControlPdu 02749 { 02750 public: 02751 DtModelessVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02752 DtModelessVCPdu(const DtNetViewControlPdu *initial, 02753 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02754 02755 const DtGlobalObjectDesignator& primary() const; 02756 void setPrimary(const DtGlobalObjectDesignator& id); 02757 02758 const DtGlobalObjectDesignator& secondary() const; 02759 void setSecondary(const DtGlobalObjectDesignator& id); 02760 02761 int numEntitiesToRemove() const; 02762 void setNumEntitiesToRemove(int n); 02763 02764 int numEntitiesToAdd() const; 02765 void setNumEntitiesToAdd(int n); 02766 02767 const DtGlobalObjectDesignator& entityToRemove(int n) const; 02768 void setEntityToRemove(int n, const DtGlobalObjectDesignator& id); 02769 02770 const DtGlobalObjectDesignator& entityToAdd(int n) const; 02771 void setEntityToAdd(int n, const DtGlobalObjectDesignator& id); 02772 02773 void printData() const; 02774 02775 protected: 02776 DtGlobalObjectDesignator theId; 02777 }; 02778 02779 class DL_DLL_IGCONVRLINK DtMoveVCPdu : public DtStealthControlPdu 02780 { 02781 public: 02782 02783 enum Direction { Left, Right, Up, Down, Forward, Backward }; 02784 02785 public: 02786 02787 DtMoveVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02788 DtMoveVCPdu(const DtNetViewControlPdu *initial, 02789 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02790 02791 virtual ~DtMoveVCPdu() {} 02792 02793 bool reset() const; 02794 void setReset(bool b); 02795 02796 Direction turn() const; 02797 void setTurn(Direction d); 02798 02799 Direction move() const; 02800 void setMove(Direction d); 02801 02802 void setPosition(const DtVector& v); 02803 DtVector position() const; 02804 02805 void setOrientation(const DtTaitBryan& o); 02806 DtTaitBryan orientation() const; 02807 02808 virtual void setFromString(const char *str); 02809 virtual const char *string() const; 02810 virtual void printData() const; 02811 }; 02812 02814 class DtOptionsPdu; 02815 typedef DtOptionsPdu DtOptionsVCPdu; 02816 02817 class DL_DLL_IGCONVRLINK DtOptionsPdu : public DtStealthControlPdu 02818 { 02819 public: 02820 02821 static const DtStealthOption DtStealthStepsize; 02822 static const DtStealthOption DtStealthTurnrate; 02823 static const DtStealthOption DtStealthIncStepsize; 02824 static const DtStealthOption DtStealthIncTurnrate; 02825 static const DtStealthOption DtStealthDecStepsize; 02826 static const DtStealthOption DtStealthDecTurnrate; 02827 static const DtStealthOption DtStealthDate; 02828 static const DtStealthOption DtStealthXREnabled; 02829 static const DtStealthOption DtStealthHATenabled; 02830 static const DtStealthOption DtStealthNextModelSet; 02831 static const DtStealthOption DtStealthPrevModelSet; 02832 static const DtStealthOption DtStealthSetCurrentModelSet; 02833 static const DtStealthOption DtStealthNextTextureSet; 02834 static const DtStealthOption DtStealthPrevTextureSet; 02835 static const DtStealthOption DtStealthSetCurrentTextureSet; 02836 static const DtStealthOption DtStealthTerrainScale; 02837 static const DtStealthOption DtStealthObjectScale; 02838 static const DtStealthOption DtStealthClouds; 02839 static const DtStealthOption DtStealthSkyDome; 02840 static const DtStealthOption DtStealthExit; 02841 static const DtStealthOption DtStealthMirroring; 02842 static const DtStealthOption DtStealthMirrorMessageEveryFrame; 02843 static const DtStealthOption DtStealthBroadcasting; 02844 static const DtStealthOption DtStealthClusteringLabels; 02845 static const DtStealthOption DtStealthTacticalGraphicsLabels; 02846 static const DtStealthOption DtStealthTacticalGraphics; 02847 static const DtStealthOption DtStealthShowAggregates; 02848 static const DtStealthOption DtStealthShowEmitters; 02849 static const DtStealthOption DtStealthVideoCaptureCommand; 02850 static const DtStealthOption DtStealthVideoCaptureFilename; 02851 static const DtStealthOption DtStealthVideoCaptureDirectory; 02852 static const DtStealthOption DtStealthVideoCaptureFilenameBase; 02853 static const DtStealthOption DtStealthVideoCaptureRecordInsets; 02854 static const DtStealthOption DtStealthVideoCaptureFramesPerSecond; 02855 static const DtStealthOption DtStealthConstrainToAll; 02856 static const DtStealthOption DtStealthBlockedDistance; 02857 static const DtStealthOption DtStealthUseNearClipForBlockedDistance; 02858 static const DtStealthOption DtStealthFeatureFilename; 02859 static const DtStealthOption DtStealthFeatureCommand; 02860 02861 public: 02862 02863 typedef enum 02864 { 02865 Stop = 0, 02866 Pause = 1, 02867 Unpause = 2, 02868 Record = 3 02869 02870 } DtStealthControlVideoCaptureCommand; 02871 02872 typedef enum 02873 { 02874 FeatureLoad = 0, 02875 FeatureClear = 1 02876 02877 } DtStealthControlFeatureCommand; 02878 02879 public: 02880 02881 /******************* STANDARD CONSTRUCTORS ****************/ 02882 02883 DtOptionsPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02884 DtOptionsPdu(const DtNetViewControlPdu *initial, 02885 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 02886 02887 /****************** MUTATOR FUNCTIONS *******************/ 02888 02889 void setOverlayOption(DtOverlayOption option); 02890 void setLocatorRange(double range); 02891 void setSmoothing(DtSmoothingOption option); 02892 void setSmoothingPeriod(double period); 02893 void setSound(bool onOff); 02894 void setEntityLabels(bool onOff); 02895 void setTrailingEffects(bool onOff); 02896 void setTrajectoryHistory(bool onOff); 02897 void setRecording(bool onOff); 02898 void setAggregateLevel(int level); 02899 void setAggregateHighestOnly(bool onOff); 02900 void setAggregatesAltitudeControlled(bool onOff); 02901 void setNestedAggregates(bool onOff); 02902 void setNestedEntities(bool onOff); 02903 void setGroundClamping(bool onOff); 02904 void setClampRange(double range); 02905 void setFollowGround(bool onOff); 02906 void setConstrainWithFloor(bool onOff); 02907 void setFloor(double height); 02908 void setTimeOfDay(double time); 02909 void setNearClip(double clip); 02910 void setFarClip(double clip); 02911 void setFov(double fov); 02912 void setFog(bool onOff); 02913 void setNearFog(double fog); 02914 void setFarFog(double fog); 02915 void setTexture(bool onOff); 02916 void setDatabaseToLoad(const DtString& db); 02917 void setStepsize(float step); 02918 void setTurnrate(float step); 02919 void setDate(const DtString& date); 02920 void setIncrementStepsize(bool b); 02921 void setIncrementTurnrate(bool b); 02922 void setDecrementStepsize(bool b); 02923 void setDecrementTurnrate(bool b); 02924 void setXr(bool onOff); 02925 void setHatLabels(bool onOff); 02926 void setCurrentModelSet(const DtString& setname); 02927 void setShowNextModelSet(bool b); 02928 void setShowPrevModelSet(bool b); 02929 void setCurrentTextureSet(const DtString& setname); 02930 void setShowNextTextureSet(bool b); 02931 void setShowPrevTextureSet(bool b); 02932 void setTerrainScale(double s); 02933 void setObjectScale(double s); 02934 void setExit(bool b); 02935 void setSkyDome(bool b); 02936 void setClouds(bool b); 02937 void setMirroring(bool b); 02938 void setMirrorMessageEveryFrame(bool b); 02939 void setBroadcasting(bool b); 02940 void setClusteringLabels(bool b); 02941 void setTacticalGraphicsLabels(bool b); 02942 void setTacticalGraphics(bool b); 02943 void setShowAggregates(bool b); 02944 void setShowEmitters(bool b); 02945 void setVideoCaptureCommand( 02946 DtStealthControlVideoCaptureCommand videoCaptureCommand); 02947 void setVideoCaptureRecordInsets(bool videoCaptureRecordInsets); 02948 void setVideoCaptureFramesPerSecond(int videoCaptureFramesPerSecond); 02949 void setVideoCaptureFilename(const DtString& videoCaptureFilename); 02950 void setVideoCaptureFilenameBase(const DtString& videoCaptureFilenameBase); 02951 void setVideoCaptureDirectory(const DtString& videoCaptureDirectory); 02952 void setConstrainToAll( bool b ); 02953 void setUseNearClipForBlockedDistance( bool b ); 02954 void setBlockedDistance( double distance ); 02955 void setFeatureFilename( const DtString& featureFilename ); 02956 void setFeatureCommand( DtStealthControlFeatureCommand featureCommand ); 02957 02958 02959 /****************** INSPECTOR FUNCTIONS *******************/ 02960 02967 bool optionPresent(DtStealthOption option) const; 02968 02969 DtOverlayOption overlayOption() const; 02970 double locatorRange() const; 02971 DtSmoothingOption smoothing() const; 02972 double smoothingPeriod() const; 02973 bool sound() const; 02974 bool entityLabels() const; 02975 bool trailingEffects() const; 02976 bool trajectoryHistory() const; 02977 bool recording() const; 02978 int aggregateLevel() const; 02979 bool aggregateHighestOnly() const; 02980 bool aggregatesAltitudeControlled() const; 02981 bool nestedAggregates() const; 02982 bool nestedEntities() const; 02983 bool groundClamping() const; 02984 double clampRange() const; 02985 bool followGround() const; 02986 bool constrainWithFloor() const; 02987 double floor() const; 02988 double timeOfDay() const; 02989 double nearClip() const; 02990 double farClip() const; 02991 double fov() const; 02992 bool fog() const; 02993 double nearFog() const; 02994 double farFog() const; 02995 bool texture() const; 02996 const DtString databaseToLoad() const; 02997 float stepsize() const; 02998 float turnrate() const; 02999 bool incrementStepsize() const; 03000 bool incrementTurnrate() const; 03001 bool decrementStepsize() const; 03002 bool decrementTurnrate() const; 03003 const DtString date() const; 03004 bool xr() const; 03005 bool hatLabels() const; 03006 const DtString currentModelSet() const; 03007 bool showNextModelSet() const; 03008 bool showPrevModelSet() const; 03009 const DtString currentTextureSet() const; 03010 bool showNextTextureSet() const; 03011 bool showPrevTextureSet() const; 03012 double terrainScale() const; 03013 double objectScale() const; 03014 bool exit() const; 03015 bool skyDome() const; 03016 bool clouds() const; 03017 bool mirroring() const; 03018 bool mirrorMessageEveryFrame() const; 03019 bool broadcasting() const; 03020 bool clusteringLabels() const; 03021 bool tacticalGraphicsLabels() const; 03022 bool tacticalGraphics() const; 03023 bool showAggregates() const; 03024 bool showEmitters() const; 03025 DtStealthControlVideoCaptureCommand videoCaptureCommand() const; 03026 bool videoCaptureRecordInsets() const; 03027 int videoCaptureFramesPerSecond() const; 03028 const DtString videoCaptureFilename() const; 03029 const DtString videoCaptureFilenameBase() const; 03030 const DtString videoCaptureDirectory() const; 03031 bool useNearClipForBlockedDistance() const; 03032 bool constrainedToAll() const; 03033 double blockedDistance() const; 03034 DtStealthControlFeatureCommand featureCommand() const; 03035 const DtString featureFilename() const; 03036 03037 void printData() const; 03038 03041 void setFromString(const char *str); 03042 const char* string() const; 03043 03044 protected: 03045 03048 void setOptionPresent(DtStealthOption option); 03049 void clearOptionPresent(DtStealthOption option); 03050 03051 protected: 03052 03054 DtString myStr; 03055 }; 03056 03057 class DL_DLL_IGCONVRLINK DtOrbitVCPdu : public DtStealthControlPdu 03058 { 03059 public: 03060 03061 03062 DtOrbitVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 03063 DtOrbitVCPdu(const DtNetViewControlPdu *initial, 03064 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 03065 03066 float radius() const; 03067 void setRadius(float r); 03068 03069 float azimuthRate() const; 03070 void setAzimuthRate(float a); 03071 03072 float heading() const; 03073 void setHeading(float h); 03074 03075 float pitch() const; 03076 void setPitch(float p); 03077 03078 float headingOffset() const; 03079 void setHeadingOffset(float o); 03080 03081 float pitchOffset() const; 03082 void setPitchOffset(float p); 03083 03084 float roll() const; 03085 void setRoll(float r); 03086 03087 const DtString& markingText() const; 03088 void setMarkingText(const DtString& markingText); 03089 03090 03091 const DtGlobalObjectDesignator& attachId() const; 03092 void setAttachId(const DtGlobalObjectDesignator& id); 03093 03094 void setFromString(const char *str); 03095 const char *string() const; 03096 void printData() const; 03097 03098 protected: 03099 DtGlobalObjectDesignator theId; 03100 DtString myMarkingText; 03101 03102 }; 03103 03104 class DL_DLL_IGCONVRLINK DtPivotVCPdu : public DtStealthControlPdu 03105 { 03106 03107 public: 03108 03109 03110 DtPivotVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 03111 DtPivotVCPdu(const DtNetViewControlPdu *initial, 03112 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 03113 03114 virtual ~DtPivotVCPdu() {} 03115 03116 virtual float radius() const; 03117 virtual void setRadius(float r); 03118 03119 virtual float bodyHeading() const; 03120 virtual void setBodyHeading(float h); 03121 03122 virtual float pitch() const; 03123 virtual void setPitch(float p); 03124 03125 virtual float headingOffset() const; 03126 virtual void setHeadingOffset(float o); 03127 03128 virtual float pitchOffset() const; 03129 virtual void setPitchOffset(float p); 03130 03131 virtual float roll() const; 03132 virtual void setRoll(float r); 03133 03135 virtual const DtVector& pivotPoint() const; 03136 virtual void setPivotPoint(const DtVector& v); 03137 03138 virtual void setFromString(const char *str); 03139 virtual const char *string() const; 03140 virtual void printData() const; 03141 03142 protected: 03143 03144 mutable DtVector myPivotPoint; 03145 }; 03146 03147 class DL_DLL_IGCONVRLINK DtRequestStateVCPdu : public DtStealthControlPdu 03148 { 03149 public: 03150 03151 DtRequestStateVCPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER) 03152 { 03153 initPdu(DtViewControlStaticSize, buffer); 03154 setViewerCommand(DtViewerRequestState); 03155 } 03156 03157 DtRequestStateVCPdu(const DtNetViewControlPdu *initial, 03158 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER) 03159 { 03160 initPdu(initial, buffer); 03161 } 03162 }; 03163 03164 class DL_DLL_IGCONVRLINK DtSdc2DPositionedObject : public DtSdcObject 03165 { 03166 public: 03167 DtSdc2DPositionedObject(DtExerciseConn* exConn, unsigned id, 03168 const DtString& objName); 03169 03170 // \brief Virtual destructor 03171 virtual ~DtSdc2DPositionedObject(); 03172 03173 private: 03178 DtSdc2DPositionedObject(); 03179 03183 DtSdc2DPositionedObject(const DtSdc2DPositionedObject& orig); 03184 03188 DtSdc2DPositionedObject& operator=(const DtSdc2DPositionedObject& rhs); 03189 03190 public: 03196 virtual DtSdcVector2D position() const = 0; 03197 03203 virtual void setPosition( const DtSdcVector2D& position ) = 0; 03204 }; 03205 03215 03216 class DL_DLL_IGCONVRLINK DtSdc3DAttachPoint 03217 { 03218 public: 03219 typedef enum 03220 { 03221 attachmentTypeUndefined = 0, 03222 attachmentTypeScene = 1, 03223 attachmentTypeEntity = 2, 03224 attachmentTypeDrawObject = 3 03225 } DtSdc3DAttachmentType; 03226 03227 public: 03232 DtSdc3DAttachPoint( const DtVector& location ); 03233 03238 DtSdc3DAttachPoint( const DtGlobalObjectDesignator& entityId ); 03239 03250 DtSdc3DAttachPoint( const DtGlobalObjectDesignator& drawObjectId, double relativePosition); 03251 03253 DtSdc3DAttachPoint( const DtSdc3DAttachPoint& orig ); 03254 03256 DtSdc3DAttachPoint& operator=( const DtSdc3DAttachPoint& rhs ); 03257 03259 virtual ~DtSdc3DAttachPoint(); 03260 03262 DtSdc3DAttachPoint(); 03263 03264 public: 03265 03271 virtual DtSdc3DAttachmentType attachmentType() const; 03272 03279 virtual DtVector location() const; 03280 virtual DtVector& location(); 03281 03289 virtual void setLocation( DtVector location ); 03290 03297 virtual const DtGlobalObjectDesignator& drawObjectId() const; 03298 03306 virtual void setDrawObjectId( const DtGlobalObjectDesignator& drawObjectId ); 03307 03312 virtual double relativePosition() const; 03313 03318 virtual void setRelativePosition( double relativePosition ); 03319 03327 virtual DtGlobalObjectDesignator entityId() const; 03328 03336 virtual void setEntityId( const DtGlobalObjectDesignator& entityId ); 03337 03338 virtual bool isAttached() const; 03339 03340 virtual const DtGlobalObjectDesignator& attachedId() const; 03341 03342 protected: 03343 03344 DtVector myLocation; 03345 DtGlobalObjectDesignator myAttachedId; 03346 double myRelativePosition; 03347 03348 DtSdc3DAttachmentType myAttachmentType; 03349 }; 03350 03351 class DL_DLL_IGCONVRLINK DtSdc3DPositionedObject : public DtSdcObject 03352 { 03353 public: 03354 DtSdc3DPositionedObject(DtExerciseConn* exConn, unsigned id, 03355 const DtString& objName); 03356 03357 // \brief Virtual destructor 03358 virtual ~DtSdc3DPositionedObject(); 03359 03360 private: 03365 DtSdc3DPositionedObject(); 03366 03370 DtSdc3DPositionedObject(const DtSdc3DPositionedObject& orig); 03371 03375 DtSdc3DPositionedObject& operator=(const DtSdc3DPositionedObject& rhs); 03376 03377 public: 03384 virtual const DtSdc3DAttachPoint& attachment() const = 0; 03385 03390 virtual void setAttachment(const DtSdc3DAttachPoint& attachment) = 0; 03391 }; 03392 03393 class DL_DLL_IGCONVRLINK DtSdc3DTwoPositionedObject : public DtSdcObject 03394 { 03395 public: 03396 DtSdc3DTwoPositionedObject(DtExerciseConn* exConn, unsigned id, 03397 const DtString& objName); 03398 03399 // \brief Virtual destructor 03400 virtual ~DtSdc3DTwoPositionedObject(); 03401 03402 private: 03407 DtSdc3DTwoPositionedObject(); 03408 03412 DtSdc3DTwoPositionedObject(const DtSdc3DTwoPositionedObject& orig); 03413 03417 DtSdc3DTwoPositionedObject& operator=(const DtSdc3DTwoPositionedObject& rhs); 03418 03419 public: 03426 virtual const DtSdc3DAttachPoint& startAttachment() const = 0; 03427 03432 virtual void setStartAttachment(const DtSdc3DAttachPoint& attachment) = 0; 03433 03440 virtual const DtSdc3DAttachPoint& endAttachment() const = 0; 03441 03446 virtual void setEndAttachment(const DtSdc3DAttachPoint& attachment) = 0; 03447 }; 03448 03455 03466 03467 class DL_DLL_IGCONVRLINK DtSdcArea3DObject : public DtSdcObject 03468 { 03469 public: 03480 DtSdcArea3DObject(DtExerciseConn* exConn, unsigned id, std::vector<DtVector> vertices, 03481 DtVector offset = DtVector::zero(), 03482 DtSdcColor color = DtSdcColor::DtSdcWhite, 03483 const DtString& textureDirectory = "", 03484 const DtString& textureFilename = DtString::nullString(), 03485 int numTextureTiles = 0, bool flashing = false); 03486 03487 // \brief Virtual destructor 03488 virtual ~DtSdcArea3DObject(); 03489 03490 private: 03495 DtSdcArea3DObject(); 03496 03500 DtSdcArea3DObject(const DtSdcArea3DObject& orig); 03501 03505 DtSdcArea3DObject& operator=(const DtSdcArea3DObject& rhs); 03506 03507 public: 03514 virtual const DtVector& offset() const; 03515 03521 virtual void setOffset(const DtVector& off); 03522 03530 virtual const DtSdcColor& color() const; 03531 03539 virtual void setColor (const DtSdcColor& color); 03540 03546 virtual bool flashing() const; 03547 03553 virtual void setFlashing(bool flashing); 03554 03560 virtual const DtString& textureDirectory() const; 03561 03567 virtual void setTextureDirectory(const DtString& str); 03568 03574 virtual const DtString& textureFilename() const; 03575 03581 virtual void setTextureFilename(const DtString& str); 03582 03583 03589 virtual int numTextureTiles() const; 03590 03596 virtual void setNumTextureTiles(int numTextureTiles); 03597 03606 virtual void update(); 03607 03616 virtual const DtVector& vertex(int index) const; 03617 //virtual DtVector& vertex(); 03618 03626 virtual void setVertex(int index, const DtVector& vertex); 03627 03628 virtual void setRemoteGraphicSet(const std::string& setName); 03629 03630 protected: 03631 virtual void calculateBoundingSphere(); 03632 virtual void setStateRecordUserData(); 03633 void initRecords(); 03634 03635 protected: 03636 DtVector myOffset; 03637 DtSdcColor myColor; 03638 bool myFlashing; 03639 int myNumVertices; 03640 std::vector<DtVector> myVertices; 03641 03642 DtString myTextureFilename; 03643 DtString myTextureDirectory; 03644 int myNumTextureTiles; 03645 03646 std::vector<DtEnvironmentalPointRecord> myPointRecords; 03647 DtEnvironmentalBoundingSphereRecord myBoundingSphereRecord; 03648 Dt3DGraphicalObjectStateRecord myStateRecord; 03649 03650 DtVector myEmptyVertex; 03651 }; 03652 03653 /* 03654 DtSdc3DArea 03655 */ 03656 03657 class DtSdcAttachablePduV0; 03658 03659 class DL_DLL_IGCONVRLINK DtSdcAttachablePdu : public DtStealthDrawControlPdu 03660 { 03661 public: 03662 03663 typedef enum 03664 { 03665 DtVcObjectNoAttach = 0, 03666 DtVcObjectNoAttachNoAttach = 1, 03667 DtVcObjectAttachedToEntity = 2, 03668 DtVcObjectAttachedToObject = 3, 03669 DtVcObjectAttachedToEntityNoAttach = 4, 03670 DtVcObjectAttachedToObjectNoAttach = 5, 03671 DtVcObjectAttachedToNoAttachEntity = 6, 03672 DtVcObjectAttachedToNoAttachObject = 7, 03673 DtVcObjectAttachedToEntityObject = 8, 03674 DtVcObjectAttachedToObjectEntity = 9, 03675 DtVcObjectAttachedToEntityEntity = 10, 03676 DtVcObjectAttachedToObjectObject = 11 03677 } DtVcObjectAttachment; 03678 03679 typedef enum 03680 { 03681 DtVcStyleNoFlashing =0x00, 03682 DtVcStyleFlashing =0x04, 03683 DtVcDrawingStyleEntry =0x04 03684 } DtVcDrawingStyle; 03685 03687 // 2 (line, cylinder) elements 03688 virtual const DtVcObjectAttachment attachmentType() const; 03689 03691 // -100, -100 (lower left) to 100, 100 (upper right) 03692 virtual void attachTo(const DtNetInt8 pos[2]); 03693 03695 virtual void attachTo(const DtNetInt8 pos1[2], const DtNetInt8 pos2[2]); 03696 03698 virtual void attachTo(const DtVector &pos); 03699 virtual void attachTo(const DtNetU32 id); 03700 virtual void attachTo(const DtGlobalObjectDesignator& id); 03701 03703 virtual void attachTo(const DtNetU32 id1, const DtNetU32 id2); 03704 virtual void attachTo(const DtGlobalObjectDesignator& id1, const DtGlobalObjectDesignator& id2); 03705 virtual void attachTo(const DtVector &pos1, const DtVector &pos2); 03706 virtual void attachTo(const DtGlobalObjectDesignator& id1, const DtNetU32 id2); 03707 virtual void attachTo(const DtNetU32 id1, const DtGlobalObjectDesignator& id2); 03708 virtual void attachTo(const DtGlobalObjectDesignator& id, const DtVector &pos); 03709 virtual void attachTo(const DtVector &pos, const DtGlobalObjectDesignator& id); 03710 virtual void attachTo(const DtNetU32 id, const DtVector &pos); 03711 virtual void attachTo(const DtVector &pos, const DtNetU32 id); 03712 03723 virtual void setRelativeLocation(DtNetU8 percentage, int index=0); 03724 virtual const DtNetU8 relativeLocation(int index=0) const; 03725 03727 virtual void setOffset(const DtVector &offsetVector); 03728 virtual DtVector offset() const; 03729 03730 virtual const DtGlobalObjectDesignator attachEntityId(int index) const; 03731 virtual const DtNetU32 attachObjectId(int index) const; 03732 virtual DtVector position(int index) const; 03733 03734 virtual void setColor(DtNetU8 color[4]); 03735 virtual const DtNetU8 *color() const; 03736 03737 virtual void setFlashing(bool onOff); 03738 virtual const bool flashing() const; 03739 03740 virtual void setFromString(const char *); 03741 virtual const char *string() const; 03742 03743 virtual void printData() const; 03744 static const char *typeString(DtVcObjectAttachment param); 03745 03746 protected: 03747 03748 03749 // For internal use only. AttachmentType is normally set autmatically 03750 // based on the form of attachTo() used. 03751 virtual void setAttachmentType( DtVcObjectAttachment attachmentType ); 03752 }; 03760 class DL_DLL_IGCONVRLINK DtSdcAttributeValue 03761 { 03762 public: 03764 DtSdcAttributeValue(); 03765 03767 ~DtSdcAttributeValue(); 03768 03770 DtSdcAttributeValue& operator=( const DtSdcAttributeValue& rhs ); 03771 03773 DtSdcAttributeValue( const DtSdcAttributeValue& orig ); 03774 03777 const DtString& textValue() const; 03778 void setTextValue( const DtString& textValue ); 03780 03784 double xValue() const; 03785 void setXValue( double x ); 03786 03789 double yValue() const; 03790 void setYValue( double y ); 03792 03797 bool dirty() const; 03798 void setDirty( bool dirty ) ; 03800 03802 DtAttributeValueUpdate& attributeValueUpdate(); 03803 const DtAttributeValueUpdate& attributeValueUpdate() const; 03804 03805 protected: 03806 DtString myTextValue; 03807 double myXValue; 03808 double myYValue; 03809 bool myDirty; 03810 DtAttributeValueUpdate myAttributeValueUpdate; 03811 }; 03812 03813 03814 typedef std::map<DtString, DtSdcAttributeValue*> DtSdcAttributeValueMap; 03815 class DtSdcAttributeGroupTemplateObject; 03816 03823 class DL_DLL_IGCONVRLINK DtSdcAttributeGroupObject : public DtSdcObject 03824 { 03825 public: 03843 DtSdcAttributeGroupObject(DtExerciseConn* exConn, unsigned id, 03844 DtSdcAttributeGroupTemplateObject* pTemplate, 03845 const DtSdc3DAttachPoint& attachment, 03846 const DtVector& enuOffset = DtVector::zero(), 03847 DtSdcColor color = DtSdcColor::DtSdcWhite, bool flashing = false); 03848 03849 // \brief Virtual destructor 03850 virtual ~DtSdcAttributeGroupObject(); 03851 03852 private: 03857 DtSdcAttributeGroupObject(); 03858 03862 DtSdcAttributeGroupObject(const DtSdcAttributeGroupObject& orig); 03863 03867 DtSdcAttributeGroupObject& operator=(const DtSdcAttributeGroupObject& rhs); 03868 03869 03870 public: 03876 virtual DtSdcAttributeGroupTemplateObject* attributeGroupTemplate() const; 03877 03884 virtual const DtSdc3DAttachPoint& attachment() const; 03885 03890 virtual void setAttachment(const DtSdc3DAttachPoint& attachment); 03891 03897 virtual const DtVector& offset() const; 03898 03903 virtual void setOffset(const DtVector& enuOffset); 03904 03910 virtual const DtSdcColor& color() const; 03911 03917 virtual void setColor (const DtSdcColor& color); 03918 03925 virtual bool flashing() const; 03926 03933 virtual void setFlashing(bool flashing); 03934 03942 virtual DtString bmpAttributeValue(const DtString& attName) const; 03943 03953 virtual void setBmpAttributeValue(const DtString& attName, const DtString& filename); 03954 03963 virtual double numericAttributeValue(const DtString& attName) const; 03964 03974 virtual void setNumericAttributeValue(const DtString& attName, double xVal); 03975 03986 virtual double valueBarAttributeValue(const DtString& attName) const; 03987 04000 virtual void setValueBarAttributeValue(const DtString& attName, double xVal); 04001 04012 virtual double graphAttributeValueX(const DtString& attName) const; 04013 04025 virtual void setGraphAttributeValueX(const DtString& attName, double xVal); 04026 04035 virtual double graphAttributeValueY(const DtString& attName) const; 04036 04046 virtual void setGraphAttributeValueY(const DtString& attName, double yVal); 04047 04057 virtual DtSdcAttributeValueMap& attributeValueMap(); 04058 04059 virtual void setRemoteGraphicSet(const std::string& setName); 04060 04069 virtual void update(); 04070 04071 protected: 04072 virtual void createAttributes(); 04073 virtual void destroyAttributes(); 04074 virtual void copyAttributes(const DtSdcAttributeValueMap& valueMap); 04075 04076 protected: 04077 DtEnvironmentalPointRecord myPointRecord; 04078 Dt3DGraphicalObjectStateRecord myGraphicObjectStateRecord; 04079 DtAttributeStateRecord myAttributeStateRecord; 04080 04081 DtSdc3DAttachPoint myAttachment; 04082 DtVector myEnuOffset; 04083 DtSdcColor myColor; 04084 bool myFlashing; 04085 DtSdcAttributeGroupTemplateObject* myAttributeGroupTemplate; 04086 DtSdcAttributeValueMap myValueMap; 04087 }; 04088 04089 04096 class DL_DLL_IGCONVRLINK DtSdcAttributeTemplateObject 04097 { 04098 public: 04099 04100 typedef enum 04101 { 04102 DtSdcAttributeTypeNoValue = 0, 04103 DtSdcAttributeValueNumeric = 1, 04104 DtSdcAttributeTypeValueBar = 2, 04105 DtSdcAttributeTypeValueGraph = 3, 04106 DtSdcAttributeTypeBitmap = 4, 04107 } DtSdcAttributeType; 04108 04109 public: 04110 04124 DtSdcAttributeTemplateObject(const DtGlobalObjectDesignator& templateId, 04125 const DtString& name, DtSdcAttributeType attributeType ); 04126 04127 // \brief Virtual destructor 04128 virtual ~DtSdcAttributeTemplateObject(); 04129 04131 DtSdcAttributeTemplateObject( 04132 const DtSdcAttributeTemplateObject& orig ); 04133 04135 DtSdcAttributeTemplateObject& operator=( 04136 const DtSdcAttributeTemplateObject& rhs ); 04137 04138 private: 04143 DtSdcAttributeTemplateObject(); 04144 04145 public: 04151 virtual const DtString& name() const; 04152 04158 virtual const DtGlobalObjectDesignator& templateId() const; 04159 04165 virtual DtSdcAttributeType attributeType() const; 04166 04167 virtual const DtAttributeTemplateStateRecord& attributeTemplateRecord() const; 04168 04169 protected: 04170 DtGlobalObjectDesignator myTemplateId; 04171 DtString myName; 04172 DtSdcAttributeType myAttributeType; 04173 DtAttributeTemplateStateRecord myAttributeTemplateRecord; 04174 }; 04175 04177 typedef std::list<DtSdcAttributeTemplateObject*> DtSdcAttributeTemplateList; 04178 04181 typedef std::map<DtString, DtSdcAttributeTemplateObject*> 04182 DtSdcAttributeTemplateMap; 04183 04190 class DL_DLL_IGCONVRLINK DtSdcAttributeGroupTemplateObject : public DtSdcObject 04191 { 04192 public: 04200 DtSdcAttributeGroupTemplateObject(DtExerciseConn* exConn, unsigned id, 04201 const DtString& name); 04202 04203 // \brief Virtual destructor 04204 virtual ~DtSdcAttributeGroupTemplateObject(); 04205 04206 private: 04211 DtSdcAttributeGroupTemplateObject(); 04212 04216 DtSdcAttributeGroupTemplateObject( 04217 const DtSdcAttributeGroupTemplateObject& orig); 04218 04222 DtSdcAttributeGroupTemplateObject& operator=( 04223 const DtSdcAttributeGroupTemplateObject& rhs); 04224 04225 public: 04231 virtual const DtString& name() const; 04232 04244 virtual DtSdcAttributeTemplateObject* createAttributeTemplate(const DtString& name, 04245 DtSdcAttributeTemplateObject::DtSdcAttributeType attType); 04246 04258 virtual DtSdcAttributeTemplateObject* createAttributeTemplate(const DtString& name, 04259 double minRange, double maxRange); 04260 04266 virtual DtSdcAttributeTemplateList& attributeTemplates(); 04267 04274 virtual DtSdcAttributeTemplateObject* attributeTemplate( 04275 const DtString& name); 04276 04281 virtual void update(); 04282 04283 protected: 04284 DtString myName; 04285 DtSdcAttributeTemplateMap myAttributeTemplateMap; 04286 DtSdcAttributeTemplateList myAttributeTemplateList; 04287 }; 04288 04289 /* 04290 This Pdu creates an attribute, associated with an attribute group 04291 DtSdcAttributeGroup 04292 DtSdcAttributeNoValue 04293 DtSdcAttributeSingleValue 04294 DtSdcAttributeGraphicSingleValue 04295 DtSdcAttributeListValue 04296 DtSdcAttributeGraphicListValue 04297 DtSdcAttributeBitmap 04298 DtSdcAttributeGroupTemplate 04299 */ 04300 04301 class DL_DLL_IGCONVRLINK DtSdcAttributePduBase : public DtSdcAttachablePdu 04302 { 04303 public: 04304 virtual void setName( DtString name ); 04305 virtual const DtString name() const; 04306 04307 virtual const DtNetU32 attributeGroupId() const; 04308 virtual void setAttributeGroupId( DtNetU32 lid ); 04309 04310 virtual const bool hasRange() const; 04311 virtual const double rangeMin() const; 04312 virtual const double rangeMax() const; 04313 virtual void setRange( double min, double max ); 04314 04315 virtual void setFromString( const char*str ); 04316 virtual const char* string() const; 04317 04318 virtual void printData() const; 04319 }; 04320 04321 class DL_DLL_IGCONVRLINK DtSdcAttributePdu : public DtSdcAttributePduBase 04322 { 04323 public: 04324 DtSdcAttributePdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 04325 DtSdcAttributePdu( const DtNetViewControlPdu* initial, 04326 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 04327 }; 04328 04329 class DL_DLL_IGCONVRLINK DtSdcAttributePduV0 : public DtSdcAttributePduBase 04330 { 04331 public: 04332 DtSdcAttributePduV0( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 04333 DtSdcAttributePduV0( const DtNetViewControlPdu* initial, 04334 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 04335 }; 04336 04337 /* 04338 This Pdu sets a value for an Attribute 04339 DtSdcAttributeValueSet 04340 DtSdcAttributeValueReset 04341 DtSdcAttributeValueSetText 04342 */ 04343 04344 class DL_DLL_IGCONVRLINK DtSdcAttributeUpdatePduBase : 04345 public DtStealthDrawControlPdu 04346 { 04347 public: 04348 virtual void setText(DtString name); 04349 virtual const DtString text() const; 04350 04351 virtual const DtNetU32 groupId() const; 04352 virtual void setGroupId(DtNetU32 lid); 04353 04354 virtual const double valueX() const; 04355 virtual const double valueY() const; 04356 virtual void setValueX(double val); 04357 virtual void setValueY(double val); 04358 04359 virtual void setFromString(const char *str); 04360 virtual const char* string() const; 04361 04362 virtual void printData() const; 04363 }; 04364 04365 class DL_DLL_IGCONVRLINK DtSdcAttributeUpdatePdu : 04366 public DtSdcAttributeUpdatePduBase 04367 { 04368 public: 04369 04370 DtSdcAttributeUpdatePdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 04371 DtSdcAttributeUpdatePdu(const DtNetViewControlPdu *initial, 04372 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 04373 }; 04374 04375 class DL_DLL_IGCONVRLINK DtSdcAttributeUpdatePduV0 : 04376 public DtSdcAttributeUpdatePduBase 04377 { 04378 public: 04379 04380 DtSdcAttributeUpdatePduV0(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 04381 DtSdcAttributeUpdatePduV0(const DtNetViewControlPdu *initial, 04382 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 04383 }; 04384 04391 class DL_DLL_IGCONVRLINK DtSdcBarAttributeTemplateObject : 04392 public DtSdcAttributeTemplateObject 04393 { 04394 public: 04406 DtSdcBarAttributeTemplateObject( 04407 const DtGlobalObjectDesignator& templateId, 04408 const DtString& name, double minRange, double maxRange); 04409 04410 // \brief Virtual destructor 04411 virtual ~DtSdcBarAttributeTemplateObject(); 04412 04414 DtSdcBarAttributeTemplateObject( 04415 const DtSdcBarAttributeTemplateObject& orig ); 04416 04418 DtSdcBarAttributeTemplateObject& operator=( 04419 const DtSdcBarAttributeTemplateObject& rhs ); 04420 04421 private: 04426 DtSdcBarAttributeTemplateObject(); 04427 04428 public: 04429 04435 virtual double minRange() const; 04436 04437 04443 virtual double maxRange() const; 04444 04445 protected: 04446 double myMinRange; 04447 double myMaxRange; 04448 04449 }; 04450 04451 /* 04452 Use this pdu to send commands to other objects: 04453 The command are: 04454 04455 DtVcRemove remove the object with id objectId() 04456 DtVcHide Hide an object and any object in it. i.e. If the receiver is a 04457 layer, all objects in the layer will be affected. 04458 DtVcShow Show an object and any object in it. i.e. If the receiver is a 04459 layer, all objects in the layer will be affected. 04460 DtVcAddToLayer Add the object to layer with id layerId() 04461 DtVcRemoveFromLayer Remove the object from layer with id layerId() 04462 04463 Use setType to specify the command you want to send. 04464 */ 04465 04466 class DL_DLL_IGCONVRLINK DtSdcCommandPduBase : public DtStealthDrawControlPdu 04467 { 04468 public: 04469 virtual const DtNetU32 layerId() const; 04470 virtual void setLayerId( DtNetU32 lid ); 04471 04472 virtual void setFromString( const char *str ); 04473 virtual const char* string() const; 04474 04475 virtual void printData() const; 04476 }; 04477 04478 04479 class DL_DLL_IGCONVRLINK DtSdcCommandPdu : public DtSdcCommandPduBase 04480 { 04481 public: 04482 DtSdcCommandPdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 04483 DtSdcCommandPdu( const DtNetViewControlPdu* initial, 04484 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 04485 }; 04486 04487 class DL_DLL_IGCONVRLINK DtSdcCommandPduV0 : public DtSdcCommandPduBase 04488 { 04489 public: 04490 DtSdcCommandPduV0( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 04491 DtSdcCommandPduV0( const DtNetViewControlPdu* initial, 04492 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 04493 }; 04494 04505 class DL_DLL_IGCONVRLINK DtSdcEllipsoidCuboidBase : public DtSdc3DPositionedObject 04506 { 04507 protected: 04530 DtSdcEllipsoidCuboidBase(DtExerciseConn* exConn, unsigned id, const DtString& objName, 04531 const DtSdc3DAttachPoint& attachment,const DtVector& dimensions, 04532 const DtVector& enuOffset = DtVector::zero(), 04533 const DtTaitBryan& rotation = zeros, 04534 DtSdcColor color = DtSdcColor::DtSdcWhite, bool flashing = false); 04535 04536 // \brief Virtual destructor 04537 virtual ~DtSdcEllipsoidCuboidBase(); 04538 04539 private: 04544 DtSdcEllipsoidCuboidBase(); 04545 04549 DtSdcEllipsoidCuboidBase(const DtSdcEllipsoidCuboidBase& orig); 04550 04554 DtSdcEllipsoidCuboidBase& operator=(const DtSdcEllipsoidCuboidBase& rhs); 04555 04556 public: 04557 04564 virtual const DtSdc3DAttachPoint& attachment() const; 04565 04570 virtual void setAttachment(const DtSdc3DAttachPoint& attachment); 04571 04578 virtual const DtVector& offset() const; 04579 04584 virtual void setOffset(const DtVector& off); 04590 virtual const DtTaitBryan& rotation() const; 04591 04597 virtual void setRotation(const DtTaitBryan& rotation); 04598 04604 virtual const DtSdcColor& color() const; 04605 04611 virtual void setColor (const DtSdcColor& color); 04612 04618 virtual bool flashing() const; 04619 04625 virtual void setFlashing(bool flashing); 04626 04627 virtual void setRemoteGraphicSet(const std::string& setName); 04628 04629 04630 private: 04631 void initRecords(); 04632 // Initializer for DtTaitBryan 04633 static DtTaitBryan zeros; 04634 04635 protected: 04636 DtSdc3DAttachPoint myAttachment; 04637 DtVector myDimensions; 04638 DtVector myOffset; 04639 DtSdcColor myColor; 04640 DtTaitBryan myRotation; 04641 bool myFlashing; 04642 Dt3DGraphicalObjectStateRecord myStateRecord; 04643 }; 04644 04645 04646 04653 class DL_DLL_IGCONVRLINK DtSdcCuboidObject : public DtSdcEllipsoidCuboidBase 04654 { 04655 public: 04680 DtSdcCuboidObject(DtExerciseConn* exConn, unsigned id, const DtSdc3DAttachPoint& attachment, 04681 double length, double width, double height, 04682 const DtVector& enuOffset = DtVector::zero(), 04683 const DtTaitBryan& rotation = zeros, 04684 DtSdcColor color = DtSdcColor::DtSdcWhite, bool flashing = false); 04685 04686 // \brief Virtual destructor 04687 virtual ~DtSdcCuboidObject(); 04688 04694 virtual double length() const; 04695 04701 virtual void setLength(double length); 04702 04708 virtual double width() const; 04709 04715 virtual void setWidth(double width); 04716 04722 virtual double height() const; 04723 04729 virtual void setHeight(double height); 04730 04731 virtual void setAttachment(const DtSdc3DAttachPoint& attachment); 04732 virtual void setRotation(const DtTaitBryan& rotation); 04733 04734 virtual void update(); 04735 04736 private: 04741 DtSdcCuboidObject(); 04742 04746 DtSdcCuboidObject(const DtSdcCuboidObject& orig); 04747 04751 DtSdcCuboidObject& operator=(const DtSdcCuboidObject& rhs); 04752 04753 void initCuboidRecords(); 04754 04755 protected: 04756 DtEnvironmentalRectangularVolumeRecord myCuboidRecord; 04757 04758 private: 04759 // Initializer for DtTaitBryan 04760 static DtTaitBryan zeros; 04761 04762 }; 04763 04773 class DL_DLL_IGCONVRLINK DtSdcCylinderObject : public DtSdc3DTwoPositionedObject 04774 { 04775 public: 04799 04800 04801 DtSdcCylinderObject(DtExerciseConn* exConn, unsigned id, 04802 const DtSdc3DAttachPoint& attachment, double length, 04803 const DtSdcVector2D& diameters, const DtVector& offset = DtVector::zero(), 04804 const DtTaitBryan& rotation = zeros, 04805 DtSdcColor color = DtSdcColor::DtSdcWhite, bool flashing = false); 04806 04828 DtSdcCylinderObject(DtExerciseConn* exConn, unsigned id, 04829 const DtSdc3DAttachPoint& startAttachment, 04830 const DtSdc3DAttachPoint& endAttachment, 04831 const DtSdcVector2D& diameters, 04832 const DtVector& offset = DtVector::zero(), 04833 DtSdcColor color = DtSdcColor::DtSdcWhite, bool flashing = false ); 04834 04835 // \brief Virtual destructor 04836 virtual ~DtSdcCylinderObject(); 04837 04838 private: 04843 DtSdcCylinderObject(); 04844 04848 DtSdcCylinderObject(const DtSdcCylinderObject& orig); 04849 04853 DtSdcCylinderObject& operator=(const DtSdcCylinderObject& rhs); 04854 04855 public: 04862 virtual const DtSdc3DAttachPoint& attachment() const; 04863 04868 virtual void setAttachment(const DtSdc3DAttachPoint& attachment); 04869 04876 virtual const DtSdc3DAttachPoint& startAttachment() const; 04877 04882 virtual void setStartAttachment(const DtSdc3DAttachPoint& startAttachment); 04883 04890 virtual const DtSdc3DAttachPoint& endAttachment() const; 04891 04896 virtual void setEndAttachment(const DtSdc3DAttachPoint& endAttachment); 04897 04904 virtual const DtVector& offset() const; 04905 04911 virtual void setOffset(const DtVector& off); 04912 04918 virtual double length() const; 04919 04925 virtual void setLength(double length); 04926 04933 virtual const DtSdcVector2D& diameters() const; 04934 04940 virtual void setDiameters(const DtSdcVector2D& diameters); 04941 04948 virtual const DtTaitBryan& rotation() const; 04949 04956 virtual void setRotation(const DtTaitBryan& rotation); 04957 04963 virtual const DtSdcColor& color() const; 04964 04970 virtual void setColor (const DtSdcColor& color); 04971 04977 virtual bool flashing() const; 04978 04984 virtual void setFlashing(bool flashing); 04985 04986 virtual void setRemoteGraphicSet(const std::string& setName); 04987 04996 virtual void update(); 04997 04998 protected: 04999 void initRecords(); 05000 05001 private: 05002 // Initializer for DtTaitBryan 05003 static DtTaitBryan zeros; 05004 05005 protected: 05006 DtSdc3DAttachPoint myStartAttachment; // also single attachment 05007 DtSdc3DAttachPoint myEndAttachment; 05008 double myLength; 05009 DtSdcVector2D myDiameters; 05010 DtVector myOffset; 05011 DtSdcColor myColor; 05012 DtTaitBryan myRotation; 05013 bool myFlashing; 05014 05015 Dt3DGraphicalObjectStateRecord myStateRecord; 05016 DtEnvironmentalFixedCylinderRecord myFixedCylinderRecord; 05017 DtEnvironmentalArticulatingCylinderRecord myArticulatingCylinderRecord; 05018 }; 05019 05031 class DL_DLL_IGCONVRLINK DtSdcEllRectBase : public DtSdc2DPositionedObject 05032 { 05033 protected: 05058 DtSdcEllRectBase(DtExerciseConn* exConn, unsigned id, const DtString& objName, 05059 const DtSdcVector2D& position, const DtSdcVector2D& size, 05060 double rotation = 0.0, double scale = 1.0, 05061 DtSdcColor color = DtSdcColor::DtSdcWhite, bool fill = false, 05062 unsigned pattern = 0xffffffff, bool flashing = false); 05063 /* 05068 DtSdcEllRectBase( const DtSdcEllRectBase& orig ); 05069 05071 DtSdcEllRectBase& operator=( const DtSdcEllRectBase& rhs ); 05072 */ 05073 // \brief Virtual destructor 05074 virtual ~DtSdcEllRectBase(); 05075 05076 private: 05081 DtSdcEllRectBase(); 05082 05083 public: 05089 virtual DtSdcVector2D position() const; 05090 05096 virtual void setPosition( const DtSdcVector2D& position ); 05097 05103 virtual DtSdcVector2D size() const; 05104 05110 virtual void setSize( const DtSdcVector2D& size ); 05111 05117 virtual double rotation() const; 05118 05124 virtual void setRotation( double rotation ); 05125 05131 virtual const DtSdcColor& color() const; 05132 05138 virtual void setColor (const DtSdcColor& color ); 05139 05146 virtual bool fill() const; 05147 05154 virtual void setFill( bool fill ); 05155 05161 virtual unsigned pattern() const; 05162 05170 virtual void setPattern( unsigned pattern ); 05171 05177 virtual bool flashing() const; 05178 05184 virtual void setFlashing( bool flashing ); 05185 05191 virtual double scale() const; 05192 05198 virtual void setScale( double scale ); 05199 05200 virtual void setRemoteGraphicSet(const std::string& setName); 05201 05210 virtual void update(); 05211 05212 protected: 05213 DtSdcVector2D myPosition; 05214 DtSdcVector2D mySize; 05215 DtSdcColor myColor; 05216 unsigned myPattern; 05217 bool myFill; 05218 double myRotation; 05219 bool myFlashing; 05220 double myScale; 05221 05222 Dt2DGraphicalObjectStateRecord* myStateRecord; 05223 }; 05224 05225 05232 class DL_DLL_IGCONVRLINK DtSdcEllipseObject : public DtSdcEllRectBase 05233 { 05234 public: 05258 DtSdcEllipseObject(DtExerciseConn* exConn, unsigned id, const DtSdcVector2D& position, 05259 const DtSdcVector2D& size, double rotation = 0.0, double scale = 1.0, 05260 DtSdcColor color = DtSdcColor::DtSdcWhite, bool fill = false, 05261 unsigned pattern = 0xffffffff, bool flashing = false ); 05262 /* 05267 DtSdcEllipseObject( const DtSdcEllipseObject& orig ); 05268 05270 DtSdcEllipseObject& operator=( const DtSdcEllipseObject& rhs ); 05271 */ 05272 05273 // \brief Virtual destructor 05274 virtual ~DtSdcEllipseObject(); 05275 05276 private: 05281 DtSdcEllipseObject(); 05282 05283 }; 05284 05292 class DL_DLL_IGCONVRLINK DtSdcEllipsoidObject : public 05293 DtSdcEllipsoidCuboidBase 05294 { 05295 public: 05316 DtSdcEllipsoidObject(DtExerciseConn* exConn, unsigned id, const DtSdc3DAttachPoint& attachment, 05317 const DtVector& diameters, const DtVector& enuOffset = DtVector::zero(), 05318 const DtTaitBryan& rotation = zeros, 05319 DtSdcColor color = DtSdcColor::DtSdcWhite, bool flashing = false); 05320 05321 // \brief Virtual destructor 05322 virtual ~DtSdcEllipsoidObject(); 05323 05324 05330 virtual const DtVector& diameters() const; 05331 05337 virtual void setDiameters(const DtVector& diameters); 05338 05339 virtual void setAttachment(const DtSdc3DAttachPoint& attachment); 05340 virtual void setRotation(const DtTaitBryan& rotation); 05341 05342 virtual void update(); 05343 05344 protected: 05345 DtEnvironmentalEllipsoidRecord myEllipsoidRecord; 05346 05347 05348 private: 05353 DtSdcEllipsoidObject(); 05354 05358 DtSdcEllipsoidObject(const DtSdcEllipsoidObject& orig); 05359 05363 DtSdcEllipsoidObject& operator=(const DtSdcEllipsoidObject& rhs); 05364 05365 void initEllipsoidRecords(); 05366 05367 private: 05368 // Initializer for DtTaitBryan 05369 static DtTaitBryan zeros; 05370 05371 }; 05372 05373 /* 05374 This Pdu creates a new layer with name name() and id objectId(). 05375 If the object already exists, it replaces the old one and if the object 05376 is a layer, it clean up the layer (remove all objects from the layer) 05377 */ 05378 class DL_DLL_IGCONVRLINK DtSdcLayerPduBase : public DtStealthDrawControlPdu 05379 { 05380 public: 05381 virtual void setName(DtString name); 05382 virtual const DtString name() const; 05383 05384 virtual void setFromString(const char *str); 05385 virtual const char *string() const; 05386 05387 virtual void printData() const; 05388 }; 05389 05390 class DL_DLL_IGCONVRLINK DtSdcLayerPdu : public DtSdcLayerPduBase 05391 { 05392 public: 05393 DtSdcLayerPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 05394 DtSdcLayerPdu(const DtNetViewControlPdu *initial, 05395 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 05396 }; 05397 class DL_DLL_IGCONVRLINK DtSdcLayerPduV0 : public DtSdcLayerPduBase 05398 { 05399 public: 05400 05401 DtSdcLayerPduV0(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 05402 DtSdcLayerPduV0(const DtNetViewControlPdu *initial, 05403 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 05404 05405 }; 05406 05414 class DL_DLL_IGCONVRLINK DtSdcLineSegment 05415 { 05416 public: 05421 typedef enum 05422 { 05424 DtSdcSegmentStyleStraight, 05426 DtSdcSegmentStyleLightning 05427 } DtSdcSegmentStyle; 05428 05433 typedef enum 05434 { 05436 DtSdcSegmentArrowStyleNoArrow, 05438 DtSdcSegmentArrowStyleArrowEnd, 05440 DtSdcSegmentArrowStyleArrowStart, 05442 DtSdcSegmentArrowStyleArrowDouble 05443 } DtSdcSegmentArrowStyle; 05444 05445 public: 05446 DtSdcLineSegment(double percentage, DtSdcColor color, unsigned pattern, 05447 unsigned thickness, DtSdcSegmentStyle style, 05448 DtSdcSegmentArrowStyle arrowStyle); 05449 05450 DtSdcLineSegment(); 05451 05452 DtSdcLineSegment( const DtSdcLineSegment& orig ); 05453 05454 DtSdcLineSegment operator=( const DtSdcLineSegment& orig ); 05455 05456 const DtSdcColor& color() const; 05457 void setColor( const DtSdcColor& color ); 05458 05459 unsigned pattern() const; 05460 void setPattern( unsigned pattern ); 05461 05462 unsigned thickness() const; 05463 void setThickness( unsigned thickness ); 05464 05465 double percentage() const; 05466 void setPercentage ( double percentage ); 05467 05468 DtSdcSegmentStyle style() const; 05469 void setStyle( DtSdcSegmentStyle style ); 05470 05471 DtSdcSegmentArrowStyle arrowStyle() const; 05472 void setArrowStyle( DtSdcSegmentArrowStyle arrowStyle ); 05473 05474 protected: 05475 DtSdcColor myColor; 05476 unsigned myPattern; 05477 unsigned myThickness; 05478 double myPercentage; 05479 DtSdcSegmentStyle myStyle; 05480 DtSdcSegmentArrowStyle myArrowStyle; 05481 }; 05482 05490 class DL_DLL_IGCONVRLINK DtSdcLineObjectInterface 05491 { 05492 public: 05498 virtual int numSegments() const = 0; 05499 05505 virtual void setNumSegments(int numSegments) = 0; 05506 05514 virtual DtSdcLineSegment::DtSdcSegmentStyle lineStyle(int segment=0) const = 0; 05515 05523 virtual void setLineStyle(DtSdcLineSegment::DtSdcSegmentStyle lineStyle, 05524 int segment=0) = 0; 05525 05534 virtual DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle(int segment=0) 05535 const = 0; 05536 05544 virtual void setArrowStyle(DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle, 05545 int segment=0) = 0; 05546 05554 virtual unsigned pattern(int segment=0) const = 0; 05555 05563 virtual void setPattern(unsigned pattern, int segment=0) = 0; 05564 05572 virtual unsigned thickness(int segment=0) const = 0; 05573 05583 virtual void setThickness(unsigned thickness, int segment=0) = 0; 05584 05592 virtual double percentage(int segment) const = 0; 05593 05603 virtual void setPercentage(double percentage, int segment) = 0; 05604 }; 05605 05606 05614 class DL_DLL_IGCONVRLINK DtSdcLine2DObject : public DtSdcObject, public DtSdcLineObjectInterface 05615 { 05616 public: 05651 DtSdcLine2DObject( DtExerciseConn* exConn, unsigned id, const DtSdcVector2D& startPosition, 05652 const DtSdcVector2D& endPosition, int numSegments=1, 05653 DtSdcColor color = DtSdcColor::DtSdcWhite, 05654 DtSdcLineSegment::DtSdcSegmentStyle lineStyle = 05655 DtSdcLineSegment::DtSdcSegmentStyleStraight, 05656 DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle = 05657 DtSdcLineSegment::DtSdcSegmentArrowStyleNoArrow, 05658 unsigned thickness=1, unsigned pattern=0xffffff, bool flashing = false ); 05659 05660 // \brief Virtual destructor 05661 virtual ~DtSdcLine2DObject(); 05662 05663 private: 05668 DtSdcLine2DObject(); 05669 05670 public: 05676 virtual DtSdcVector2D startPosition() const; 05677 05683 virtual void setStartPosition( const DtSdcVector2D& startPosition ); 05684 05690 virtual DtSdcVector2D endPosition() const; 05691 05697 virtual void setEndPosition( const DtSdcVector2D& endPosition ); 05698 05704 virtual int numSegments() const; 05705 05711 virtual void setNumSegments( int numSegments ); 05712 05720 virtual const DtSdcColor& color( int segment ) const; 05721 virtual const DtSdcColor& color() const; 05722 05730 virtual void setColor ( const DtSdcColor& color, int segment ); 05731 virtual void setColor ( const DtSdcColor& color); 05732 05740 virtual DtSdcLineSegment::DtSdcSegmentStyle lineStyle( int segment=0 ) const; 05741 05749 virtual void setLineStyle( DtSdcLineSegment::DtSdcSegmentStyle lineStyle, 05750 int segment=0 ); 05751 05760 virtual DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle( int segment=0 ) 05761 const; 05762 05770 virtual void setArrowStyle( DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle, 05771 int segment=0 ); 05772 05780 virtual unsigned pattern( int segment=0 ) const; 05781 05789 virtual void setPattern( unsigned pattern, int segment=0 ); 05790 05798 virtual unsigned thickness( int segment=0 ) const; 05799 05809 virtual void setThickness( unsigned thickness, int segment=0 ); 05810 05818 virtual double percentage( int segment ) const; 05819 05829 virtual void setPercentage( double percentage, int segment ); 05830 05836 virtual bool flashing() const; 05837 05843 virtual void setFlashing( bool flashing ); 05844 05845 virtual void setRemoteGraphicSet(const std::string& setName); 05846 05847 05849 virtual void update(); 05850 05851 protected: 05852 virtual void initRecords(); 05853 05854 DtSdcVector2D myStartPosition; 05855 DtSdcVector2D myEndPosition; 05856 bool myFlashing; 05857 std::vector<DtSdcLineSegment> myLineSegments; 05858 05859 DtEnvironmentalLineRecord myLineRecord; 05860 Dt3DGraphicalObjectLineStateRecord myLineStateRecord; 05861 }; 05862 05870 class DL_DLL_IGCONVRLINK DtSdcLine3DObject : public DtSdc3DTwoPositionedObject, 05871 public DtSdcLineObjectInterface 05872 { 05873 public: 05917 DtSdcLine3DObject(DtExerciseConn* exConn, unsigned id, const DtSdc3DAttachPoint& startAttachment, 05918 const DtSdc3DAttachPoint& endAttachment, int numSegments=1, 05919 const DtVector& offset = DtVector::zero(), 05920 DtSdcColor color = DtSdcColor::DtSdcWhite, 05921 DtSdcLineSegment::DtSdcSegmentStyle lineStyle = 05922 DtSdcLineSegment::DtSdcSegmentStyleStraight, 05923 DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle = 05924 DtSdcLineSegment::DtSdcSegmentArrowStyleNoArrow, 05925 unsigned thickness=1, unsigned pattern=0xffffff, bool flashing = false, 05926 bool checkLos = false, bool projected = false); 05927 05928 05929 virtual ~DtSdcLine3DObject(); 05930 05931 private: 05936 DtSdcLine3DObject(); 05937 05941 DtSdcLine3DObject(const DtSdcLine3DObject& orig); 05942 05946 DtSdcLine3DObject& operator=(const DtSdcLine3DObject& rhs); 05947 05948 05949 public: 05955 virtual const DtSdc3DAttachPoint& startAttachment() const; 05956 05962 virtual void setStartAttachment(const DtSdc3DAttachPoint& startAttachment); 05963 05969 virtual const DtSdc3DAttachPoint& endAttachment() const; 05970 05976 virtual void setEndAttachment(const DtSdc3DAttachPoint& endAttachment); 05977 05984 virtual const DtVector& offset() const; 05985 05991 virtual void setOffset(const DtVector& off); 05992 05998 virtual int numSegments() const; 05999 06005 virtual void setNumSegments(int numSegments); 06006 06014 virtual const DtSdcColor& color(int segment) const; 06015 virtual const DtSdcColor& color() const; 06016 06024 virtual void setColor (const DtSdcColor& color, int segment); 06025 virtual void setColor (const DtSdcColor& color); 06026 06034 virtual DtSdcLineSegment::DtSdcSegmentStyle lineStyle(int segment=0) const; 06035 06043 virtual void setLineStyle(DtSdcLineSegment::DtSdcSegmentStyle lineStyle, 06044 int segment=0); 06045 06054 virtual DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle(int segment=0) 06055 const; 06056 06064 virtual void setArrowStyle(DtSdcLineSegment::DtSdcSegmentArrowStyle arrowStyle, 06065 int segment=0); 06066 06074 virtual unsigned pattern(int segment=0) const; 06075 06083 virtual void setPattern(unsigned pattern, int segment=0); 06084 06092 virtual unsigned thickness(int segment=0) const; 06093 06103 virtual void setThickness(unsigned thickness, int segment=0); 06104 06112 virtual double percentage(int segment) const; 06113 06123 virtual void setPercentage(double percentage, int segment); 06124 06130 virtual bool flashing() const; 06131 06137 virtual void setFlashing(bool flashing); 06138 06145 virtual bool checkLos() const; 06146 06153 virtual void setCheckLos(bool checkLos); 06154 06161 virtual bool projected() const; 06162 06169 virtual void setProjected (bool projected ); 06170 06171 virtual void setRemoteGraphicSet(const std::string& setName); 06172 06181 virtual void update(); 06182 06183 protected: 06184 void initRecords(); 06185 06186 protected: 06187 DtSdc3DAttachPoint myStartAttachment; 06188 DtSdc3DAttachPoint myEndAttachment; 06189 DtVector myOffset; 06190 bool myFlashing; 06191 bool myCheckLos; 06192 bool myProjected; 06193 std::vector<DtSdcLineSegment> myLineSegments; 06194 06195 DtEnvironmentalLineRecord myLineRecord; 06196 Dt3DGraphicalObjectLineStateRecord myLineStateRecord; 06197 }; 06198 06199 06200 /* 06201 2DLine 06202 3DLine 06203 2DSegmentedLine (for back compatibility) 06204 3DSegmentedLine (for back compatibility) 06205 */ 06206 class DL_DLL_IGCONVRLINK DtSdcLinePdu : public DtSdcAttachablePdu 06207 { 06208 public: 06209 using DtSdcAttachablePdu::typeString; 06210 06211 public: 06212 typedef enum 06213 { 06214 DtSdcStyleNoArrow =0x00, 06215 DtSdcStyleArrowEnd =0x01, 06216 DtSdcStyleArrowStart =0x02, 06217 DtSdcStyleArrowDouble =0x03, 06218 DtSdcLineArrowStyleEntry =0x03 06219 } DtSdcLineArrowStyle; 06220 06221 typedef enum 06222 { 06223 DtSdcLineAppearanceStraight =0x00, 06224 DtSdcLineAppearanceLightning =0x08, 06225 DtSdcLineAppearanceEntry =0x08 06226 } DtSdcLineAppearance; 06227 06228 public: 06229 06230 DtSdcLinePdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06231 DtSdcLinePdu( const DtNetViewControlPdu* initial, 06232 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06233 06234 // Trick to prevent default constructor being called; used 06235 // by DtSdcLinePduV0 and DtSdcSegmentedLinePduV0 06236 DtSdcLinePdu( double doNothing ); 06237 06238 virtual void setNumSegments( DtNetU8 segments ); 06239 virtual const DtNetU8 numSegments() const; 06240 06241 virtual void setArrowStyle( DtSdcLineArrowStyle style ); 06242 virtual void setArrowStyle( unsigned int segment, DtSdcLineArrowStyle style ); 06243 virtual const DtSdcLineArrowStyle arrowStyle( unsigned int segment=0 ) const; 06244 06245 virtual void setAppearance( DtSdcLineAppearance app ); 06246 virtual void setAppearance( unsigned int segment, DtSdcLineAppearance app ); 06247 virtual const DtSdcLineAppearance appearance( unsigned int segment=0 ) const; 06248 06249 virtual void setThickness( DtNetU8 thickness ); 06250 virtual void setThickness( unsigned int segment, DtNetU8 thickness ); 06251 virtual const DtNetU8 thickness( unsigned int segment=0 ) const; 06252 06253 virtual void setPattern( DtNetU32 patt ); 06254 virtual void setPattern( unsigned int segment, DtNetU32 patt ); 06255 virtual const DtNetU32 pattern( unsigned int segment=0 ) const; 06256 06257 virtual void setColor( DtNetU8 color[4] ); 06258 virtual void setColor( unsigned int segment, DtNetU8 color[4] ); 06259 06260 virtual const DtNetU8* color() const; 06261 virtual const DtNetU8* color( unsigned int segment ) const; 06262 06263 virtual void setPercentage( unsigned int segment, DtNetU8 percent ); 06264 virtual const DtNetU8 percentage( unsigned int segment=0 ) const; 06265 06267 virtual void setCheckLos( bool checkLos ); 06268 virtual bool checkLos() const; 06269 06273 virtual void setProjected( bool projected ); 06274 virtual bool projected() const; 06275 06276 virtual void printData() const; 06277 06278 protected: 06279 virtual const char* typeString( DtSdcLinePdu::DtSdcLineArrowStyle param ) const; 06280 virtual const char* typeString( DtSdcLinePdu::DtSdcLineAppearance param ) const; 06281 }; 06282 06283 class DL_DLL_IGCONVRLINK DtSdcLinePduV0 : public DtSdcLinePdu 06284 { 06285 public: 06286 06287 DtSdcLinePduV0( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06288 DtSdcLinePduV0( const DtNetViewControlPdu* initial, 06289 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06290 }; 06291 06292 class DL_DLL_IGCONVRLINK DtSdcSegmentedLinePduV0 : public DtSdcLinePdu 06293 { 06294 public: 06295 06296 DtSdcSegmentedLinePduV0( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06297 DtSdcSegmentedLinePduV0( const DtNetViewControlPdu* initial, 06298 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06299 }; 06300 06301 /* 06302 DtSdcCircle 06303 DtSdcSphere 06304 DtSdcSquare 06305 DtSdcCube 06306 DtSdcCylinder 06307 */ 06308 06309 class DL_DLL_IGCONVRLINK DtSdcPolyObjectPduBase : public DtSdcAttachablePdu 06310 { 06311 public: 06312 06313 typedef enum 06314 { 06315 DtSdcFillAreaOff =0x00, 06316 DtSdcFillAreaOn =0x40, 06317 DtSdcFillAreaEntry =0x40 06318 } DtSdcFillArea; 06319 06320 public: 06321 virtual void setFill( bool onOff ) const; 06322 virtual bool fill() const; 06323 06324 virtual void setPattern( DtNetU32 patt ); 06325 virtual const DtNetU32 pattern() const; 06326 06327 virtual void setScale( const DtVector &pos ); 06328 virtual DtVector scale() const; 06329 06330 virtual void setRotation( const DtTaitBryan &tait ); 06331 virtual DtTaitBryan rotation() const; 06332 06333 virtual void setFromString( const char* str ); 06334 virtual const char* string() const; 06335 06336 virtual void printData() const; 06337 06338 }; 06339 06340 class DL_DLL_IGCONVRLINK DtSdcPolyObjectPdu : public DtSdcPolyObjectPduBase 06341 { 06342 public: 06343 DtSdcPolyObjectPdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06344 DtSdcPolyObjectPdu( const DtNetViewControlPdu* initial, 06345 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06346 }; 06347 06348 class DL_DLL_IGCONVRLINK DtSdcPolyObjectPduV0 : public DtSdcPolyObjectPduBase 06349 { 06350 public: 06351 DtSdcPolyObjectPduV0( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06352 DtSdcPolyObjectPduV0( const DtNetViewControlPdu* initial, 06353 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 06354 }; 06355 06362 class DL_DLL_IGCONVRLINK DtSdcRectangleObject : public DtSdcEllRectBase 06363 { 06364 public: 06388 DtSdcRectangleObject(DtExerciseConn* exConn, unsigned id, const DtSdcVector2D& position, 06389 const DtSdcVector2D& size, double rotation = 0.0, double scale = 1.0, 06390 DtSdcColor color = DtSdcColor::DtSdcWhite, bool fill = false, 06391 unsigned pattern = 0xffffffff, bool flashing = false ); 06392 06393 // \brief Virtual destructor 06394 virtual ~DtSdcRectangleObject(); 06395 06396 private: 06401 DtSdcRectangleObject(); 06402 06403 }; 06404 06405 class DtExerciseConn; 06406 class DtStealthDrawControlPdu; 06407 class DtCustomRemoteControlSender; 06408 06409 typedef std::map<unsigned, DtSdcObject*> DtSdcObjectList; 06410 06411 #if DtDIS 06412 class DtInetSocket; 06413 #endif 06414 06425 class DL_DLL_IGCONVRLINK DtStealthRemoteDrawer 06426 { 06427 public: 06439 DtStealthRemoteDrawer(DtExerciseConn* exConn, 06440 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL, 06441 unsigned nextId = 0); 06442 06460 DtStealthRemoteDrawer(DtCustomRemoteControlSender* sender, 06461 const DtGlobalObjectDesignator& senderId, 06462 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL, 06463 unsigned nextId = 0); 06464 06465 #if DtHLA 06466 06467 06468 06469 06470 06471 06472 06473 06474 06475 06476 06477 06478 06479 06480 06481 06482 06483 06484 06485 06486 06487 06488 06489 DtStealthRemoteDrawer(const char* execName, const char* federateType, 06490 DtFomMapper* mapper = DtRprFomMapper::create(NULL), 06491 const char* fedFileName = NULL, 06492 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL, 06493 unsigned nextId = 0); 06494 06517 DtStealthRemoteDrawer(const char* execName, const char* federateType, 06518 const char* dsoName, const char* fedFileName = NULL, 06519 void* fomMapInitData = NULL, 06520 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL, 06521 unsigned nextId = 0); 06522 #endif 06523 06524 #if DtDIS 06525 06526 06527 06528 06529 06530 06531 06532 06533 06534 06535 06536 06537 06538 06539 06540 06541 06542 06543 DtStealthRemoteDrawer(int port, int exerciseId, 06544 int siteId, int applicationNum, 06545 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL, 06546 unsigned nextId = 0); 06547 06570 DtStealthRemoteDrawer(int port, const DtInetAddr& destAddr, int exerciseId, 06571 int siteId, int applicationNum, 06572 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL, 06573 unsigned nextId = 0); 06574 06594 DtStealthRemoteDrawer(DtInetSocket *skt, int exerciseId, 06595 int siteId, int applicationNum, 06596 const DtGlobalObjectDesignator& targetStealthId = SEND_TO_ALL, 06597 unsigned nextId = 0); 06598 #endif 06599 06600 private: 06605 DtStealthRemoteDrawer(); 06606 06610 DtStealthRemoteDrawer(const DtStealthRemoteDrawer&); 06611 06616 DtStealthRemoteDrawer& operator=(const DtStealthRemoteDrawer&); 06617 06618 public: 06624 virtual ~DtStealthRemoteDrawer(); 06625 06626 public: 06627 06632 virtual unsigned nextId(); 06633 06648 virtual void add(DtSdcObject* object); 06649 06660 virtual void addToLayer(unsigned id, unsigned layerId); 06661 06662 06669 virtual DtSdcObject* remove(unsigned id); 06670 06681 virtual void removeFromLayer(unsigned id, unsigned layerId ); 06682 06691 virtual DtSdcObject* lookup(unsigned id); 06692 06702 virtual void update(unsigned id); 06703 06710 virtual void show(unsigned id); 06711 06724 virtual void showAttribute(unsigned groupId, unsigned attributeId); 06725 06732 virtual void hide(unsigned id); 06733 06746 virtual void hideAttribute(unsigned groupId, unsigned attributeId); 06747 06748 public: 06750 static const DtGlobalObjectDesignator SEND_TO_ALL; 06751 06752 protected: 06753 virtual void update(DtSdcObject* object); 06754 06755 06756 protected: 06757 DtExerciseConn* myExConn; 06758 DtCustomRemoteControlSender* myCustomSender; 06759 06760 unsigned myNextId; 06761 DtSdcObjectList myObjectList; 06762 bool myCreatedExConn; 06763 DtGlobalObjectDesignator myTargetId; 06764 DtGlobalObjectDesignator mySenderId; 06765 06766 #if DtHLA 06767 DtStealthControlInteraction mySendInter; 06768 #endif 06769 06770 }; 06771 06777 class DL_DLL_IGCONVRLINK DtSdcText2DObject : public DtSdcObject 06778 { 06779 public: 06794 DtSdcText2DObject(DtExerciseConn* exConn, unsigned id, const DtString& text, 06795 const DtSdcVector2D& position, DtSdcColor color = DtSdcColor::DtSdcWhite, 06796 bool flashing = false ); 06797 06798 // \brief Virtual destructor 06799 virtual ~DtSdcText2DObject(); 06800 06801 private: 06806 DtSdcText2DObject(); 06807 06808 public: 06814 virtual DtString text() const; 06815 06821 virtual void setText( const DtString& text ); 06822 06828 virtual DtSdcVector2D position() const; 06829 06835 virtual void setPosition( const DtSdcVector2D& position ); 06836 06842 virtual const DtSdcColor& color() const; 06843 06849 virtual void setColor (const DtSdcColor& color ); 06850 06856 virtual bool flashing() const; 06857 06863 virtual void setFlashing( bool flashing ); 06864 06868 virtual void setFont(const char* fontFile, float size); 06869 06870 virtual void setRemoteGraphicSet(const std::string& setName); 06871 06880 virtual void update(); 06881 06882 protected: 06883 DtSdcVector2D myPosition; 06884 DtSdcColor myColor; 06885 bool myFlashing; 06886 DtString myText; 06887 06888 Dt2DGraphicalObjectTextStateRecord* myStateRecord; 06889 }; 06890 06896 class DL_DLL_IGCONVRLINK DtSdcText3DObject : public DtSdc3DPositionedObject 06897 { 06898 public: 06916 DtSdcText3DObject(DtExerciseConn* exConn, unsigned id, const DtString& text, 06917 const DtSdc3DAttachPoint& attachment, 06918 const DtVector& enuOffset = DtVector::zero(), 06919 DtSdcColor color = DtSdcColor::DtSdcWhite, bool flashing = false); 06920 06921 // \brief Virtual destructor 06922 virtual ~DtSdcText3DObject(); 06923 06924 private: 06929 DtSdcText3DObject(); 06930 06934 DtSdcText3DObject(const DtSdcText3DObject& orig); 06935 06939 DtSdcText3DObject& operator=(const DtSdcText3DObject& rhs); 06940 06941 public: 06947 virtual const DtString& text() const; 06948 06954 virtual void setText(const DtString& text); 06955 06962 virtual const DtSdc3DAttachPoint& attachment() const; 06963 06968 virtual void setAttachment(const DtSdc3DAttachPoint& attachment); 06969 06976 virtual const DtVector& offset() const; 06977 06983 virtual void setOffset(const DtVector& off); 06984 06990 virtual const DtSdcColor& color() const; 06991 06997 virtual void setColor (const DtSdcColor& color); 06998 07004 virtual bool flashing() const; 07005 07011 virtual void setFlashing(bool flashing); 07012 07013 virtual void setRemoteGraphicSet(const std::string& setName); 07014 07023 virtual void update(); 07024 07025 protected: 07026 void initRecords(); 07027 07028 protected: 07029 DtSdc3DAttachPoint myAttachment; 07030 DtVector myOffset; 07031 DtSdcColor myColor; 07032 bool myFlashing; 07033 DtString myText; 07034 07035 DtEnvironmentalPointRecord myPointRecord; 07036 Dt3DGraphicalObjectStateRecord myStateRecord; 07037 }; 07038 07039 /* 07040 Use this pdu to send 2DText and 3DText: 07041 type: 07042 07043 DtSdc2DText place the text on the overlay. 07044 DtSdc3DText place the text on the scene. 07045 Use setType to specify the command you want to send. 07046 */ 07047 class DL_DLL_IGCONVRLINK DtSdcTextPduBase : public DtSdcAttachablePdu 07048 { 07049 public: 07050 virtual void setText( DtString s ); 07051 virtual const DtString text() const; 07052 07053 virtual void setFromString( const char* ); 07054 virtual const char* string() const; 07055 07056 virtual void printData() const; 07057 }; 07058 07059 07060 class DL_DLL_IGCONVRLINK DtSdcTextPdu : public DtSdcTextPduBase 07061 { 07062 public: 07063 DtSdcTextPdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07064 DtSdcTextPdu( const DtNetViewControlPdu* initial, 07065 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07066 }; 07067 07068 class DL_DLL_IGCONVRLINK DtSdcTextPduV0 : public DtSdcTextPduBase 07069 { 07070 public: 07071 DtSdcTextPduV0( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07072 DtSdcTextPduV0( const DtNetViewControlPdu* initial, 07073 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07074 }; 07075 07081 class DL_DLL_IGCONVRLINK DtSdcTriangle2DObject : public DtSdcObject 07082 { 07083 public: 07118 DtSdcTriangle2DObject(DtExerciseConn* exConn, unsigned id, const DtSdcVector2D& vertex1, 07119 const DtSdcVector2D& vertex2, const DtSdcVector2D& vertex3, 07120 const DtSdcVector2D& offset = DtSdcVector2D::zero(), 07121 const DtSdcVector2D& scale= DtSdcVector2D::ones(), 07122 double rotation = 0.0, DtSdcColor color = DtSdcColor::DtSdcWhite, 07123 bool fill = false, unsigned pattern = 0xffffffff, bool flashing = false ); 07124 07129 DtSdcTriangle2DObject( const DtSdcTriangle2DObject& orig ); 07130 07132 DtSdcTriangle2DObject& operator=( const DtSdcTriangle2DObject& rhs ); 07133 07134 // \brief Virtual destructor 07135 virtual ~DtSdcTriangle2DObject(); 07136 07137 private: 07142 DtSdcTriangle2DObject(); 07143 07144 public: 07150 virtual DtSdcVector2D vertex1() const; 07151 07157 virtual void setVertex1( const DtSdcVector2D& vertex ); 07158 07164 virtual DtSdcVector2D vertex2() const; 07165 07171 virtual void setVertex2( const DtSdcVector2D& vertex ); 07172 07178 virtual DtSdcVector2D vertex3() const; 07179 07185 virtual void setVertex3( const DtSdcVector2D& vertex ); 07186 07192 virtual DtSdcVector2D offset() const; 07193 07199 virtual void setOffset( const DtSdcVector2D& offset ); 07200 07206 virtual DtSdcVector2D scale() const; 07207 07213 virtual void setScale( const DtSdcVector2D& scale ); 07214 07220 virtual double rotation() const; 07221 07227 virtual void setRotation( double rotation ); 07228 07234 virtual const DtSdcColor& color() const; 07235 07241 virtual void setColor (const DtSdcColor& color ); 07242 07249 virtual bool fill() const; 07250 07257 virtual void setFill( bool fill ); 07258 07264 virtual unsigned pattern() const; 07265 07273 virtual void setPattern( unsigned pattern ); 07274 07280 virtual bool flashing() const; 07281 07287 virtual void setFlashing( bool flashing ); 07288 07289 virtual void setRemoteGraphicSet(const std::string& setName); 07290 07299 virtual void update(); 07300 07301 protected: 07302 07303 virtual DtSdcVector2D transformVertex(const DtSdcVector2D& v, const DtSdcVector2D& center) const; 07304 virtual void transformVertices(); 07305 07306 DtSdcVector2D myVertex1; 07307 DtSdcVector2D myVertex2; 07308 DtSdcVector2D myVertex3; 07309 DtSdcVector2D myOffset; 07310 DtSdcVector2D myScale; 07311 07312 DtSdcColor myColor; 07313 unsigned myPattern; 07314 bool myFill; 07315 double myRotation; 07316 bool myFlashing; 07317 07318 Dt2DGraphicalObjectStateRecord* myStateRecord; 07319 }; 07320 07326 class DL_DLL_IGCONVRLINK DtSdcTriangle3DObject : public DtSdcArea3DObject 07327 { 07328 public: 07344 DtSdcTriangle3DObject(DtExerciseConn* exConn, unsigned id, const DtVector& vertex1, 07345 const DtVector& vertex2, const DtVector& vertex3, 07346 DtVector offset = DtVector::zero(), 07347 DtSdcColor color = DtSdcColor::DtSdcWhite, 07348 const DtString& textureDirectory = "", 07349 const DtString& textureFilename = DtString::nullString(), 07350 int numTextureTiles = 0, bool flashing = false); 07351 07352 07353 // \brief Virtual destructor 07354 virtual ~DtSdcTriangle3DObject(); 07355 07356 private: 07361 DtSdcTriangle3DObject(); 07362 07366 DtSdcTriangle3DObject(const DtSdcTriangle3DObject& orig); 07367 07371 DtSdcTriangle3DObject& operator=(const DtSdcTriangle3DObject& rhs); 07372 07373 public: 07379 virtual const DtVector& vertex1() const; 07380 07386 virtual void setVertex1(const DtVector& vertex1); 07387 07393 virtual const DtVector& vertex2() const; 07394 07400 virtual void setVertex2(const DtVector& vertex2); 07401 07407 virtual const DtVector& vertex3() const; 07408 07414 virtual void setVertex3(const DtVector& vertex3); 07415 }; 07416 07417 /* 07418 DtSdc2DTriangle 07419 DtSdc3DTriangle 07420 */ 07421 class DL_DLL_IGCONVRLINK DtSdcTrianglePduBase : public DtSdcPolyObjectPduBase 07422 { 07423 public: 07424 virtual void setPoint( int index, const DtVector &pos ); 07425 virtual const DtVector point( int index ) const; 07426 07427 virtual void setFromString(const char* str); 07428 virtual const char* string() const; 07429 07430 virtual void printData() const; 07431 }; 07432 07433 07434 class DL_DLL_IGCONVRLINK DtSdcTrianglePdu : public DtSdcTrianglePduBase 07435 { 07436 public: 07437 07438 DtSdcTrianglePdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07439 DtSdcTrianglePdu(const DtNetViewControlPdu* initial, 07440 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07441 }; 07442 07443 class DL_DLL_IGCONVRLINK DtSdcTrianglePduV0 : public DtSdcTrianglePduBase 07444 { 07445 public: 07446 07447 DtSdcTrianglePduV0( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07448 DtSdcTrianglePduV0(const DtNetViewControlPdu* initial, 07449 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07450 }; 07451 07452 class DL_DLL_IGCONVRLINK DtSdcAreaPduBase : public DtSdcPolyObjectPduBase 07453 { 07454 public: 07455 07456 virtual void setNumPoints( int nPoints ); 07457 virtual const int numPoints() const; 07458 07459 virtual void setPoint( int index, const DtVector &pos ); 07460 virtual const DtVector point( int index ) const; 07461 07462 virtual void setTextureDirectory(const DtString& str); 07463 virtual const DtString textureDirectory() const; 07464 07465 virtual void setTextureFilename(const DtString& str); 07466 virtual const DtString textureFilename() const; 07467 07468 virtual void setNumTextureTiles( int numTextureTiles ); 07469 virtual const int numTextureTiles() const; 07470 07471 virtual void setFromString(const char* str); 07472 virtual const char* string() const; 07473 07474 virtual void printData() const; 07475 07476 }; 07477 07478 07479 class DL_DLL_IGCONVRLINK DtSdcAreaPdu : public DtSdcAreaPduBase 07480 { 07481 public: 07482 07483 DtSdcAreaPdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07484 DtSdcAreaPdu(const DtNetViewControlPdu* initial, 07485 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07486 }; 07487 07488 class DL_DLL_IGCONVRLINK DtSdcAreaPduV0 : public DtSdcAreaPduBase 07489 { 07490 public: 07491 07492 DtSdcAreaPduV0( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07493 DtSdcAreaPduV0(const DtNetViewControlPdu* initial, 07494 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER ); 07495 }; 07496 07497 #include <vrvVrl/legacyStealthControl.inl>