![]() |
VR-Forces 4.0.4 Class Documentation
|

Public Types | |
| enum | DtPasteFlags { DtPasteNewName = 0x00000001, DtPasteAppearance = 0x00000002, DtPasteHeading = 0x00000004, DtPasteEngagement = 0x00000008, DtPastePlan = 0x00000010, DtPasteAboveSeaLevel = 0x00000020, DtPasteAboveTerrain = 0x00000040, DtPasteFormation = 0x00000080, DtAllPasteFlags = DtPasteNewName | DtPasteAppearance | DtPasteHeading | DtPasteEngagement | DtPastePlan | DtPasteAboveTerrain } |
Public Member Functions | |
| DtCopyObject (makVrv::DtDe &) | |
| virtual | ~DtCopyObject () |
| virtual void | copy (makVrv::DtSimEntry *) |
| Starts copy process. Subclasses need to implement specific copy procedures. | |
| virtual void | read (const std::string &buf) |
| Reads data from the buffer. | |
| virtual void | cancel () |
| Cancels copy. Emits signal when cancel is complete. | |
| const std::string & | name () const |
| virtual std::string | copyPendingMessage () const |
| Message that is describing what this object is waiting for as far as copying goes. | |
| virtual std::string | pastePendingMessage () const |
| Message that is describing what this object is waiting for as far as pasting goes. | |
| virtual void | setAltitudeClampType (DtAltitudeClampType) |
| Sets the clamp type to used when calculating localLocation. Default is above terrain. | |
| DtAltitudeClampType | altitudeClampType () const |
| void | setType (int t) |
| int | type () const |
| void | setBuffer (const std::string &b) |
| const std::string & | buffer () const |
| virtual void | paste (const DtVector &, int flags=DtAllPasteFlags) |
| Pastes object given the current information. | |
| virtual DtGeodeticCoord | center () const |
| Returns the center of the object in geocentric coordinates. | |
| virtual DtVector | localCenter () const |
| virtual DtGeodeticCoord | calculateCenter () const |
| virtual DtVector | origin () const |
| If facade is available, returns the origin of the facade, else returns center(). | |
| virtual void | setGeometricCenter (const DtGeodeticCoord &) |
| Sets the center of all objects being painted (in geocentric as per center() call). | |
| const DtGeodeticCoord & | geometricCenter () const |
| virtual void | createFacade () |
| Creates the facade that will be used to display a temp item during paste operation. Base does nothing. | |
| virtual void | setOrigin (const DtGeodeticCoord &) |
| Sets new location of object. Base member is no-op. Location is in local database coordinates. | |
| const makVrv::DtVrlinkSimulatedBaseState * | readableStateData () const |
Public Attributes | |
| boost::signal< void(DtCopyObject *)> | signal_copyCancelled |
| boost::signal< void(DtCopyObject *, const std::string &)> | signal_copied |
| boost::signal< void(DtCopyObject *, const std::string &)> | signal_copyOperationPending |
| boost::signal< void(DtCopyObject *)> | signal_pasted |
| boost::signal< void(DtCopyObject *, const std::string &)> | signal_pasteOperationPending |
| boost::signal< void(DtCopyObject *)> | signal_pasteCancelled |
Protected Types | |
| typedef std::vector< double > | HeightOffsets |
Protected Member Functions | |
| virtual void | write (std::ostringstream &str, const makVrv::DtVrlinkSimulatedBaseState *data, makVrv::DtUniqueID id) |
| Writes data to stream. | |
| virtual void | write (std::ostringstream &str, const DtVrfObjectDataState *data) |
| Writes vrf object data state. | |
| virtual DtVrfObjectDataState * | createReadableObjectStateData () const |
| Creates state data that will be used to read into a readable buffer. | |
| virtual makVrv::DtVrlinkSimulatedBaseState * | createReadableStateData () const |
| virtual void | read (std::istringstream &str, makVrv::DtVrlinkSimulatedBaseState *data) |
| Reads data from stream. | |
| virtual void | read (std::istringstream &str, DtVrfObjectDataState *data) |
| Reads vrf object data state. | |
| virtual void | checkCopyComplete () |
| Checks whether or not the copy is complete, and, if it is, calls copyComplet() | |
| virtual bool | copyOperationsPending () const |
| Return true if copy operations are complete, else false will signal that there are other operations yet to be done. | |
| virtual void | copyComplete () |
| Sends copied message with resultant copied string. | |
| virtual bool | cancelComplete () const |
| Returns true if cancel is complete. | |
| virtual void | readComplete (std::istringstream &str) |
| Called when reading of buffer for object is complete. | |
| virtual void | checkPasteComplete () |
| Checks to see if paste operation is complete. | |
| virtual bool | pasteComplete () const |
| Returns true if paste operation is complete. Default is true. | |
| virtual void | createObject (const DtVector &) |
| Creates the object locally or on the network. | |
| virtual int | generateRequestId () |
| Generates a request id to match our request. | |
| virtual double | groundHeight (const DtVector ¤tLocal) const |
| Returns the height at the given local position. | |
| virtual void | setupOffsets (const DtGeodeticCoord &) |
| Sets up offsets from geometric center. | |
| virtual DtVector | offsetLocation (int, const DtVector &loc) const |
| Returns the geocentric location of the point at offset location index offset by geocentric loc. | |
| virtual DtGeodeticCoord | calculateOffsetPoint (const DtGeodeticCoord &start, const DtGeodeticCoord &end, double &altAboveTerrain, double &altAboveSeaLevel) const |
| Calculates an offset point based on the start and end positions. | |
| virtual DtVector | localLocation (const DtGeodeticCoord &, int) const |
| Given an origin and an index, return local location as an offset from that origin. | |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| std::ostringstream | myOutput |
| std::string | myName |
| int | myPasteFlags |
| DtVrfObjectDataState * | myReadableObjectStateData |
| makVrv::DtVrlinkSimulatedBaseState * | myReadableStateData |
| DtGeodeticCoord | myCenter |
| CopyOffsets | myOffsets |
| HeightOffsets | myAltitudeAboveTerrain |
| HeightOffsets | myAltitudeAboveSeaLevel |
| DtAltitudeClampType | myAltitudeClampType |
| DtReferenceEllipsoid | myReferenceEllipsoid |
| int | myType |
| std::string | myBuffer |
| DtGeodeticCoord | myGeometricCenter |
Private Types | |
| typedef std::vector < DtGeodeticCoord > | CopyOffsets |
typedef std::vector<DtGeodeticCoord> makVrf::DtCopyObject::CopyOffsets [private] |
typedef std::vector<double> makVrf::DtCopyObject::HeightOffsets [protected] |
| virtual makVrf::DtCopyObject::~DtCopyObject | ( | ) | [virtual] |
| virtual void makVrf::DtCopyObject::copy | ( | makVrv::DtSimEntry * | ) | [virtual] |
Starts copy process. Subclasses need to implement specific copy procedures.
Reimplemented in makVrf::DtAggregateCopyObject.
| virtual void makVrf::DtCopyObject::read | ( | const std::string & | buf | ) | [virtual] |
Reads data from the buffer.
Creates the state data to read into from a call to createReadableStateData()
| virtual void makVrf::DtCopyObject::cancel | ( | ) | [virtual] |
Cancels copy. Emits signal when cancel is complete.
Reimplemented in makVrf::DtAggregateCopyObject, and makVrf::DtEntityCopyObject.
| const std::string& makVrf::DtCopyObject::name | ( | ) | const [inline] |
| virtual std::string makVrf::DtCopyObject::copyPendingMessage | ( | ) | const [virtual] |
Message that is describing what this object is waiting for as far as copying goes.
Reimplemented in makVrf::DtAggregateCopyObject, and makVrf::DtEntityCopyObject.
| virtual std::string makVrf::DtCopyObject::pastePendingMessage | ( | ) | const [virtual] |
Message that is describing what this object is waiting for as far as pasting goes.
Reimplemented in makVrf::DtEntityCopyObject, and makVrf::DtAggregateCopyObject.
| virtual void makVrf::DtCopyObject::setAltitudeClampType | ( | DtAltitudeClampType | ) | [virtual] |
Sets the clamp type to used when calculating localLocation. Default is above terrain.
| void makVrf::DtCopyObject::setType | ( | int | t | ) | [inline] |
| int makVrf::DtCopyObject::type | ( | ) | const [inline] |
| void makVrf::DtCopyObject::setBuffer | ( | const std::string & | b | ) | [inline] |
| const std::string& makVrf::DtCopyObject::buffer | ( | ) | const [inline] |
| virtual void makVrf::DtCopyObject::write | ( | std::ostringstream & | str, |
| const makVrv::DtVrlinkSimulatedBaseState * | data, | ||
| makVrv::DtUniqueID | id | ||
| ) | [protected, virtual] |
Writes data to stream.
Override to write own data, but, make sure to call parent method
Reimplemented in makVrf::DtEntityCopyObject, and makVrf::DtEnvironmentalCopyObject.
| virtual void makVrf::DtCopyObject::write | ( | std::ostringstream & | str, |
| const DtVrfObjectDataState * | data | ||
| ) | [protected, virtual] |
Writes vrf object data state.
Reimplemented in makVrf::DtEntityCopyObject.
| virtual DtVrfObjectDataState* makVrf::DtCopyObject::createReadableObjectStateData | ( | ) | const [protected, virtual] |
Creates state data that will be used to read into a readable buffer.
Will persist until object is deleted
| virtual makVrv::DtVrlinkSimulatedBaseState* makVrf::DtCopyObject::createReadableStateData | ( | ) | const [protected, virtual] |
Reimplemented in makVrf::DtAggregateCopyObject, makVrf::DtEntityCopyObject, and makVrf::DtEnvironmentalCopyObject.
| virtual void makVrf::DtCopyObject::read | ( | std::istringstream & | str, |
| makVrv::DtVrlinkSimulatedBaseState * | data | ||
| ) | [protected, virtual] |
Reads data from stream.
Override to read own data, but, make sure to call parent method
Reimplemented in makVrf::DtEntityCopyObject, and makVrf::DtEnvironmentalCopyObject.
| virtual void makVrf::DtCopyObject::read | ( | std::istringstream & | str, |
| DtVrfObjectDataState * | data | ||
| ) | [protected, virtual] |
Reads vrf object data state.
Reimplemented in makVrf::DtEntityCopyObject.
| virtual void makVrf::DtCopyObject::checkCopyComplete | ( | ) | [protected, virtual] |
Checks whether or not the copy is complete, and, if it is, calls copyComplet()
| virtual bool makVrf::DtCopyObject::copyOperationsPending | ( | ) | const [protected, virtual] |
Return true if copy operations are complete, else false will signal that there are other operations yet to be done.
Reimplemented in makVrf::DtAggregateCopyObject, and makVrf::DtEntityCopyObject.
| virtual void makVrf::DtCopyObject::copyComplete | ( | ) | [protected, virtual] |
Sends copied message with resultant copied string.
Reimplemented in makVrf::DtAggregateCopyObject.
| virtual bool makVrf::DtCopyObject::cancelComplete | ( | ) | const [protected, virtual] |
Returns true if cancel is complete.
Reimplemented in makVrf::DtAggregateCopyObject.
| virtual void makVrf::DtCopyObject::paste | ( | const DtVector & | , |
| int | flags = DtAllPasteFlags |
||
| ) | [virtual] |
Pastes object given the current information.
If paste is not complete, will send out pasteOperationPending signal. The geocentric coordinate given the the center around which this item should be placed. This object will figure out the correct placement based on that center (in geocentric coordinates)
| virtual DtGeodeticCoord makVrf::DtCopyObject::center | ( | ) | const [virtual] |
Returns the center of the object in geocentric coordinates.
| virtual DtVector makVrf::DtCopyObject::localCenter | ( | ) | const [virtual] |
| virtual DtGeodeticCoord makVrf::DtCopyObject::calculateCenter | ( | ) | const [virtual] |
Reimplemented in makVrf::DtEntityCopyObject, and makVrf::DtEnvironmentalCopyObject.
| virtual DtVector makVrf::DtCopyObject::origin | ( | ) | const [virtual] |
If facade is available, returns the origin of the facade, else returns center().
Returns origin in local coordinates
Reimplemented in makVrf::DtEnvironmentalShapeCopyObject, makVrf::DtEnvironmentalPointCopyObject, and makVrf::DtEntityCopyObject.
| virtual void makVrf::DtCopyObject::setGeometricCenter | ( | const DtGeodeticCoord & | ) | [virtual] |
Sets the center of all objects being painted (in geocentric as per center() call).
Will store both the center in a member variable
| const DtGeodeticCoord& makVrf::DtCopyObject::geometricCenter | ( | ) | const |
| virtual void makVrf::DtCopyObject::createFacade | ( | ) | [virtual] |
Creates the facade that will be used to display a temp item during paste operation. Base does nothing.
Reimplemented in makVrf::DtEnvironmentalShapeCopyObject, makVrf::DtEnvironmentalPointCopyObject, and makVrf::DtEntityCopyObject.
| virtual void makVrf::DtCopyObject::setOrigin | ( | const DtGeodeticCoord & | ) | [virtual] |
Sets new location of object. Base member is no-op. Location is in local database coordinates.
Reimplemented in makVrf::DtEnvironmentalShapeCopyObject, makVrf::DtEnvironmentalPointCopyObject, and makVrf::DtEntityCopyObject.
| const makVrv::DtVrlinkSimulatedBaseState* makVrf::DtCopyObject::readableStateData | ( | ) | const [inline] |
| virtual void makVrf::DtCopyObject::readComplete | ( | std::istringstream & | str | ) | [protected, virtual] |
Called when reading of buffer for object is complete.
Reimplemented in makVrf::DtAggregateCopyObject.
| virtual void makVrf::DtCopyObject::checkPasteComplete | ( | ) | [protected, virtual] |
Checks to see if paste operation is complete.
If it is, then, will signal pasted, else signals the pasteOperationPending message with the message of what it is doing
| virtual bool makVrf::DtCopyObject::pasteComplete | ( | ) | const [protected, virtual] |
Returns true if paste operation is complete. Default is true.
Reimplemented in makVrf::DtEntityCopyObject, and makVrf::DtAggregateCopyObject.
| virtual void makVrf::DtCopyObject::createObject | ( | const DtVector & | ) | [protected, virtual] |
Creates the object locally or on the network.
Default implementation does nothing. Vector is supplied in geocentric coordinates
Reimplemented in makVrf::DtEntityCopyObject, makVrf::DtEnvironmentalShapeCopyObject, makVrf::DtEnvironmentalPointCopyObject, and makVrf::DtAggregateCopyObject.
| virtual int makVrf::DtCopyObject::generateRequestId | ( | ) | [protected, virtual] |
Generates a request id to match our request.
| virtual double makVrf::DtCopyObject::groundHeight | ( | const DtVector & | currentLocal | ) | const [protected, virtual] |
Returns the height at the given local position.
| virtual void makVrf::DtCopyObject::setupOffsets | ( | const DtGeodeticCoord & | ) | [protected, virtual] |
Sets up offsets from geometric center.
Default adds one offset from center() of object
Reimplemented in makVrf::DtEnvironmentalShapeCopyObject.
| virtual DtVector makVrf::DtCopyObject::offsetLocation | ( | int | , |
| const DtVector & | loc | ||
| ) | const [protected, virtual] |
Returns the geocentric location of the point at offset location index offset by geocentric loc.
| virtual DtGeodeticCoord makVrf::DtCopyObject::calculateOffsetPoint | ( | const DtGeodeticCoord & | start, |
| const DtGeodeticCoord & | end, | ||
| double & | altAboveTerrain, | ||
| double & | altAboveSeaLevel | ||
| ) | const [protected, virtual] |
Calculates an offset point based on the start and end positions.
Return vector is geodetic. The altAboveTerrain and altAboveSeaLevel relate to the start point. Given the clamp type, the local location will return a different value if the offsets are there for above terrain and above sea level. If not, no offset will be applied
| virtual DtVector makVrf::DtCopyObject::localLocation | ( | const DtGeodeticCoord & | , |
| int | |||
| ) | const [protected, virtual] |
Given an origin and an index, return local location as an offset from that origin.
| boost::signal<void (DtCopyObject*)> makVrf::DtCopyObject::signal_copyCancelled |
| boost::signal<void (DtCopyObject*, const std::string&)> makVrf::DtCopyObject::signal_copied |
| boost::signal<void (DtCopyObject*, const std::string&)> makVrf::DtCopyObject::signal_copyOperationPending |
| boost::signal<void (DtCopyObject*)> makVrf::DtCopyObject::signal_pasted |
| boost::signal<void (DtCopyObject*, const std::string&)> makVrf::DtCopyObject::signal_pasteOperationPending |
| boost::signal<void (DtCopyObject*)> makVrf::DtCopyObject::signal_pasteCancelled |
makVrv::DtDe& makVrf::DtCopyObject::myDe [protected] |
std::ostringstream makVrf::DtCopyObject::myOutput [protected] |
std::string makVrf::DtCopyObject::myName [protected] |
int makVrf::DtCopyObject::myPasteFlags [protected] |
DtGeodeticCoord makVrf::DtCopyObject::myCenter [mutable, protected] |
CopyOffsets makVrf::DtCopyObject::myOffsets [protected] |
DtReferenceEllipsoid makVrf::DtCopyObject::myReferenceEllipsoid [protected] |
int makVrf::DtCopyObject::myType [protected] |
std::string makVrf::DtCopyObject::myBuffer [protected] |
DtGeodeticCoord makVrf::DtCopyObject::myGeometricCenter [protected] |