#include <CigiBaseViewCtrl.h>
Inheritance diagram for CigiBaseViewCtrl:
Public Member Functions | |
CigiBaseViewCtrl () | |
virtual | ~CigiBaseViewCtrl () |
virtual int | Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const =0 |
virtual int | Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec)=0 |
virtual int | GetCnvt (CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) |
int | SetEntityID (const Cigi_uint16 EntityIDIn, bool bndchk=true) |
Cigi_uint16 | GetEntityID (void) const |
int | SetXOff (const float XOffIn, bool bndchk=true) |
float | GetXOff (void) const |
int | SetYOff (const float YOffIn, bool bndchk=true) |
float | GetYOff (void) const |
int | SetZOff (const float ZOffIn, bool bndchk=true) |
float | GetZOff (void) const |
int | SetRoll (const float RollIn, bool bndchk=true) |
float | GetRoll (void) const |
int | SetPitch (const float PitchIn, bool bndchk=true) |
float | GetPitch (void) const |
int | SetYaw (const float YawIn, bool bndchk=true) |
float | GetYaw (void) const |
Protected Attributes | |
Cigi_uint16 | EntityID |
Cigi_uint16 | ViewID |
Cigi_uint8 | GroupID |
bool | XOffEn |
bool | YOffEn |
bool | ZOffEn |
bool | RollEn |
bool | PitchEn |
bool | YawEn |
float | XOff |
float | YOff |
float | ZOff |
float | Roll |
float | Pitch |
float | Yaw |
Friends | |
class | CigiViewCtrlV1 |
class | CigiViewCtrlV2 |
class | CigiViewCtrlV3 |
Definition at line 79 of file CigiBaseViewCtrl.h.
CigiBaseViewCtrl::CigiBaseViewCtrl | ( | ) |
CigiBaseViewCtrl::~CigiBaseViewCtrl | ( | ) | [virtual] |
int CigiBaseViewCtrl::GetCnvt | ( | CigiVersionID & | CnvtVersion, | |
CigiCnvtInfoType::Type & | CnvtInfo | |||
) | [virtual] |
A virtual Conversion Information function. This function provides conversion information for this packet.
CnvtVersion | - The CIGI version to which this packet is being converted. | |
CnvtInfo | - The information needed for conversion |
Reimplemented from CigiBasePacket.
Definition at line 84 of file CigiBaseViewCtrl.cpp.
References CIGI_SUCCESS, CIGI_VIEW_CTRL_PACKET_ID_V2, CIGI_VIEW_CTRL_PACKET_ID_V3, CigiVersionID::CigiMajorVersion, CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiCnvtInfoType::CigiCnvtInfoStruct::ProcID, and CigiProcessType::ProcStd.
00086 { 00087 CnvtInfo.ProcID = CigiProcessType::ProcStd; 00088 00089 // V1 & V2 have the same packet id number 00090 if(CnvtVersion.CigiMajorVersion < 3) 00091 CnvtInfo.CnvtPacketID = CIGI_VIEW_CTRL_PACKET_ID_V2; 00092 else 00093 CnvtInfo.CnvtPacketID = CIGI_VIEW_CTRL_PACKET_ID_V3; 00094 00095 return(CIGI_SUCCESS); 00096 }
Cigi_uint16 CigiBaseViewCtrl::GetEntityID | ( | void | ) | const [inline] |
Gets the EntityID value.
Definition at line 166 of file CigiBaseViewCtrl.h.
References EntityID.
00166 { return(EntityID); }
float CigiBaseViewCtrl::GetPitch | ( | void | ) | const [inline] |
Gets the Pitch value.
Definition at line 268 of file CigiBaseViewCtrl.h.
References Pitch.
00268 { return(Pitch); }
float CigiBaseViewCtrl::GetRoll | ( | void | ) | const [inline] |
Gets the Roll value.
Definition at line 250 of file CigiBaseViewCtrl.h.
References Roll.
00250 { return(Roll); }
float CigiBaseViewCtrl::GetXOff | ( | void | ) | const [inline] |
Gets the XOff value.
Definition at line 188 of file CigiBaseViewCtrl.h.
References XOff.
00188 { return(XOff); }
float CigiBaseViewCtrl::GetYaw | ( | void | ) | const [inline] |
Gets the Yaw value.
Definition at line 286 of file CigiBaseViewCtrl.h.
References Yaw.
00286 { return(Yaw); }
float CigiBaseViewCtrl::GetYOff | ( | void | ) | const [inline] |
Gets the YOff value.
Definition at line 210 of file CigiBaseViewCtrl.h.
References YOff.
00210 { return(YOff); }
float CigiBaseViewCtrl::GetZOff | ( | void | ) | const [inline] |
Gets the ZOff value.
Definition at line 232 of file CigiBaseViewCtrl.h.
References ZOff.
00232 { return(ZOff); }
virtual int CigiBaseViewCtrl::Pack | ( | CigiBasePacket * | Base, | |
Cigi_uint8 * | Buff, | |||
void * | Spec | |||
) | const [pure virtual] |
A pure virtual Pack function. This function is not implemented in this class.
Base | - A pointer to the instance of the packet to be packed. (Downcast to CigiBasePacket) | |
Buff | - A pointer to the current pack point. | |
Spec | - A pointer to special data. |
Implements CigiBasePacket.
Implemented in CigiViewCtrlV1, CigiViewCtrlV2, and CigiViewCtrlV3.
int CigiBaseViewCtrl::SetEntityID | ( | const Cigi_uint16 | EntityIDIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the EntityID with bound checking control
EntityIDIn | - Identifies the entity which the view or view group should be attached. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 157 of file CigiBaseViewCtrl.h.
References CIGI_SUCCESS, and EntityID.
00158 { 00159 EntityID = EntityIDIn; 00160 return(CIGI_SUCCESS); 00161 }
int CigiBaseViewCtrl::SetPitch | ( | const float | PitchIn, | |
bool | bndchk = true | |||
) |
Sets the Pitch with bound checking control
PitchIn | - The pitch about the specified entity's body coordinate system. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 129 of file CigiBaseViewCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Pitch.
00130 { 00131 00132 #ifndef CIGI_NO_BND_CHK 00133 if(bndchk && ((PitchIn < -90.0)||(PitchIn > 90.0))) 00134 { 00135 #ifndef CIGI_NO_EXCEPT 00136 throw CigiValueOutOfRangeException("Pitch",(float)PitchIn,-90.0,90.0); 00137 #endif 00138 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00139 } 00140 #endif 00141 00142 Pitch = PitchIn; 00143 return(CIGI_SUCCESS); 00144 00145 }
int CigiBaseViewCtrl::SetRoll | ( | const float | RollIn, | |
bool | bndchk = true | |||
) |
Sets the Roll with bound checking control
RollIn | - The roll about the specified entity's body coordinate system. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 107 of file CigiBaseViewCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Roll.
00108 { 00109 00110 #ifndef CIGI_NO_BND_CHK 00111 if(bndchk && ((RollIn < -180.0)||(RollIn > 180.0))) 00112 { 00113 #ifndef CIGI_NO_EXCEPT 00114 throw CigiValueOutOfRangeException("Roll",(float)RollIn,-180.0,180.0); 00115 #endif 00116 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00117 } 00118 #endif 00119 00120 Roll = RollIn; 00121 return(CIGI_SUCCESS); 00122 00123 }
int CigiBaseViewCtrl::SetXOff | ( | const float | XOffIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the XOff with bound checking control
XOffIn | - The Offset from the specified entity's origin along the entity's X axis. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 179 of file CigiBaseViewCtrl.h.
References CIGI_SUCCESS, and XOff.
00180 { 00181 XOff = XOffIn; 00182 return(CIGI_SUCCESS); 00183 }
int CigiBaseViewCtrl::SetYaw | ( | const float | YawIn, | |
bool | bndchk = true | |||
) |
Sets the Yaw with bound checking control
YawIn | - The yaw about the specified entity's body coordinate system. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 151 of file CigiBaseViewCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Yaw.
00152 { 00153 00154 #ifndef CIGI_NO_BND_CHK 00155 if(bndchk && ((YawIn < 0.0)||(YawIn > 360.0))) 00156 { 00157 #ifndef CIGI_NO_EXCEPT 00158 throw CigiValueOutOfRangeException("Yaw",(float)YawIn,0.0,360.0); 00159 #endif 00160 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00161 } 00162 #endif 00163 00164 Yaw = YawIn; 00165 return(CIGI_SUCCESS); 00166 00167 }
int CigiBaseViewCtrl::SetYOff | ( | const float | YOffIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the YOff with bound checking control
YOffIn | - The Offset from the specified entity's origin along the entity's Y axis. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 201 of file CigiBaseViewCtrl.h.
References CIGI_SUCCESS, and YOff.
00202 { 00203 YOff = YOffIn; 00204 return(CIGI_SUCCESS); 00205 }
int CigiBaseViewCtrl::SetZOff | ( | const float | ZOffIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the ZOff with bound checking control
ZOffIn | - The Offset from the specified entity's origin along the entity's Z axis. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 223 of file CigiBaseViewCtrl.h.
References CIGI_SUCCESS, and ZOff.
00224 { 00225 ZOff = ZOffIn; 00226 return(CIGI_SUCCESS); 00227 }
virtual int CigiBaseViewCtrl::Unpack | ( | Cigi_uint8 * | Buff, | |
bool | Swap, | |||
void * | Spec | |||
) | [pure virtual] |
A pure virtual Unpack function. This function is not implemented in this class.
Buff | - A pointer to the current pack point. | |
Swap | - N/A for V1 & V2 | |
Spec | - A pointer to special data. |
Implements CigiBasePacket.
Implemented in CigiViewCtrlV1, CigiViewCtrlV2, and CigiViewCtrlV3.
friend class CigiViewCtrlV1 [friend] |
Definition at line 82 of file CigiBaseViewCtrl.h.
friend class CigiViewCtrlV2 [friend] |
Definition at line 83 of file CigiBaseViewCtrl.h.
friend class CigiViewCtrlV3 [friend] |
Definition at line 84 of file CigiBaseViewCtrl.h.
Cigi_uint16 CigiBaseViewCtrl::EntityID [protected] |
EntityID
Uniquely identifies the specific entity
Definition at line 298 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), GetEntityID(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV1::Pack(), SetEntityID(), CigiViewCtrlV3::Unpack(), CigiViewCtrlV2::Unpack(), and CigiViewCtrlV1::Unpack().
Cigi_uint8 CigiBaseViewCtrl::GroupID [protected] |
GroupID
Specifies the view group that this packet controls.
Definition at line 311 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV1::Pack(), CigiViewCtrlV2::SetGroupID(), CigiViewCtrlV1::SetGroupID(), CigiViewCtrlV3::Unpack(), CigiViewCtrlV2::Unpack(), and CigiViewCtrlV1::Unpack().
float CigiBaseViewCtrl::Pitch [protected] |
Pitch
The pitch about the specified entity's body coordinate system.
Definition at line 380 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), GetPitch(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV1::Pack(), SetPitch(), CigiViewCtrlV3::Unpack(), CigiViewCtrlV2::Unpack(), and CigiViewCtrlV1::Unpack().
bool CigiBaseViewCtrl::PitchEn [protected] |
PitchEn
Pitch data valid and to be used.
Definition at line 341 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV3::Unpack(), and CigiViewCtrlV2::Unpack().
float CigiBaseViewCtrl::Roll [protected] |
Roll
The roll about the specified entity's body coordinate system.
Definition at line 374 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), GetRoll(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV1::Pack(), SetRoll(), CigiViewCtrlV3::Unpack(), CigiViewCtrlV2::Unpack(), and CigiViewCtrlV1::Unpack().
bool CigiBaseViewCtrl::RollEn [protected] |
RollEn
Roll data valid and to be used.
Definition at line 335 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV3::Unpack(), and CigiViewCtrlV2::Unpack().
Cigi_uint16 CigiBaseViewCtrl::ViewID [protected] |
ViewID
Specifies the view that this packet controls.
If The Group ID is not 0, ViewID is ignored.
Definition at line 305 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV1::Pack(), CigiViewCtrlV2::SetViewID(), CigiViewCtrlV1::SetViewID(), CigiViewCtrlV3::Unpack(), CigiViewCtrlV2::Unpack(), and CigiViewCtrlV1::Unpack().
float CigiBaseViewCtrl::XOff [protected] |
XOff
The Offset from the specified entity's origin along the entity's X axis.
Definition at line 354 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), GetXOff(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV1::Pack(), SetXOff(), CigiViewCtrlV3::Unpack(), CigiViewCtrlV2::Unpack(), and CigiViewCtrlV1::Unpack().
bool CigiBaseViewCtrl::XOffEn [protected] |
XOffEn
X Offset data valid and to be used.
Definition at line 317 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV3::Unpack(), and CigiViewCtrlV2::Unpack().
float CigiBaseViewCtrl::Yaw [protected] |
Yaw
The yaw about the specified entity's body coordinate system.
Definition at line 386 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), GetYaw(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV1::Pack(), SetYaw(), CigiViewCtrlV3::Unpack(), CigiViewCtrlV2::Unpack(), and CigiViewCtrlV1::Unpack().
bool CigiBaseViewCtrl::YawEn [protected] |
YawEn
Yaw data valid and to be used.
Definition at line 347 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV3::Unpack(), and CigiViewCtrlV2::Unpack().
float CigiBaseViewCtrl::YOff [protected] |
YOff
The Offset from the specified entity's origin along the entity's Y axis.
Definition at line 361 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), GetYOff(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV1::Pack(), SetYOff(), CigiViewCtrlV3::Unpack(), CigiViewCtrlV2::Unpack(), and CigiViewCtrlV1::Unpack().
bool CigiBaseViewCtrl::YOffEn [protected] |
YOffEn
Y Offset data valid and to be used.
Definition at line 323 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV3::Unpack(), and CigiViewCtrlV2::Unpack().
float CigiBaseViewCtrl::ZOff [protected] |
ZOff
The Offset from the specified entity's origin along the entity's Z axis.
Definition at line 368 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), GetZOff(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV1::Pack(), SetZOff(), CigiViewCtrlV3::Unpack(), CigiViewCtrlV2::Unpack(), and CigiViewCtrlV1::Unpack().
bool CigiBaseViewCtrl::ZOffEn [protected] |
ZOffEn
Z Offset data valid and to be used.
Definition at line 329 of file CigiBaseViewCtrl.h.
Referenced by CigiViewCtrlV1::CigiViewCtrlV1(), CigiViewCtrlV2::CigiViewCtrlV2(), CigiViewCtrlV3::CigiViewCtrlV3(), CigiViewCtrlV3::Pack(), CigiViewCtrlV2::Pack(), CigiViewCtrlV3::Unpack(), and CigiViewCtrlV2::Unpack().