![]() |
Maria GDK 5.0.0.738
Documentation of native code in develop branch
|
#include <M3DGeometryData.h>
Public Member Functions | |
GeometryData (Maria::TileId tileId, const std::shared_ptr< Maria::SharedCounter > &memCounter, bool geoidCorrection) | |
~GeometryData () | |
void | ClearData () |
Delete all geometry data. | |
void | SetImage (std::shared_ptr< STK::Image > img) |
std::shared_ptr< const STK::Image > | GetImage () const |
double | getBoundingRadius () const |
const std::shared_ptr< std::vector< float > > & | getVertices () const |
bool | ProcessData (const MariaProtobuf::ProtoMapData &mapData) override |
std::shared_ptr< Maria3D::BoundingSphere > | calcChildBoundingSphere (int childDir) |
std::shared_ptr< BoundingSphere > | calcBoundingSphere () |
void | calcChildCorners (int childDir, std::vector< STK::Vector3d > &corners, STK::Vector3d ¢er) |
bool | calcRayIntersection (const STK::Vector3d &pos, const STK::Vector3d &dir, STK::Vector3d &intersection) |
const std::shared_ptr< TileCollisionObject > | getOrCreateCollisionObject (const Globe &globe) |
![]() | |
TileData (TileId tileId, const std::shared_ptr< Maria::SharedCounter > &memCounter) | |
void | SetState (TileState state) |
TileState | GetState () const |
bool | SetPendingDataRequest () |
void | SetTimestamp (int64_t timestamp) |
int64_t | GetTimestamp () const |
void | SetTileId (TileId tileId) |
TileId | GetTileId () const |
const BasicGeoTypes::GeoRect & | GetGeoRect () const |
void | SetGeoRect (const BasicGeoTypes::GeoRect &grc) |
int | getMemSize () const |
virtual bool | ProcessData (const MariaProtobuf::ProtoMapData &data) |
const std::shared_ptr< MariaProtobuf::Metadata > & | getMetaData () const |
void | setMetaData (const std::shared_ptr< MariaProtobuf::Metadata > &metaData) |
Protected Member Functions | |
double | calcBoundingRadius (const QuadCoo &quad_coo, const STK::Image &img) |
Protected Attributes | |
std::shared_ptr< std::vector< float > > | vertices_ |
std::shared_ptr< STK::Image > | _img |
double | radius_ = 0.0 |
bool | _geoidCorrection = false |
std::shared_ptr< TileCollisionObject > | collision_object_ |
![]() | |
std::atomic< TileState > | _state |
std::mutex | _requestLock |
TileId | _tile_id |
std::atomic< int64_t > | _timestamp |
int | _memsize |
std::shared_ptr< Maria::SharedCounter > | _cache_mem_counter |
BasicGeoTypes::GeoRect | _grc |
std::shared_ptr< MariaProtobuf::Metadata > | _metaData |
Additional Inherited Members | |
![]() | |
enum | TileState { Empty , Pending , Ready , OutsideArea , OutsideResolution , Error } |
![]() | |
static int | getNumTilesInMemory () |
GeometryData - Data item for all the tile geometry. Detailed description.
GeometryData::GeometryData | ( | Maria::TileId | tileId, |
const std::shared_ptr< Maria::SharedCounter > & | memCounter, | ||
bool | geoidCorrection | ||
) |
Default constructor. Will create an empty tile mesh item.
GeometryData::~GeometryData | ( | ) |
Destructor.
std::shared_ptr< BoundingSphere > GeometryData::calcChildBoundingSphere | ( | int | childDir | ) |
Calculate the bounding sphere of the given child quadrant of the current dataset.
bool GeometryData::calcRayIntersection | ( | const STK::Vector3d & | pos, |
const STK::Vector3d & | dir, | ||
STK::Vector3d & | intersection | ||
) |
Calculate intersection between the tile geometry and a ray in geocentric coordinates. Returns true if an intersection was found. The intersecting point is returned in the intersection argument.
|
inline |
Return the radius of the bounding sphere of the data. The bounding sphere is centered in the geocentric origin of the QuadTile.
|
overridevirtual |
Process the newly loaded data. This virtual method is run after the data has been received and unpacked. This happens in the same thread as the data unpacking, which is separate from both main thread and data reader threads. This method can be used to do potentially costly data processing that needs to be done before the data can be used for rendering.
Reimplemented from Maria::TileData.