本文整理汇总了C++中Track::GetPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ Track::GetPoint方法的具体用法?C++ Track::GetPoint怎么用?C++ Track::GetPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Track
的用法示例。
在下文中一共展示了Track::GetPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetPoint
Track *ActiveTrack::DoExtendDaily()
{
Track *pExtendTrack = NULL;
TrackPoint *pExtendPoint = NULL;
TrackPoint *pLastPoint = GetPoint( 0 );
wxTrackListNode *track_node = pTrackList->GetFirst();
while( track_node ) {
Track *ptrack = track_node->GetData();
if( !ptrack->m_bIsInLayer && ptrack->m_GUID != m_GUID ) {
TrackPoint *track_node = ptrack->GetLastPoint();
if( track_node->GetCreateTime() <= pLastPoint->GetCreateTime() ) {
if( !pExtendPoint || track_node->GetCreateTime() > pExtendPoint->GetCreateTime() ) {
pExtendPoint = track_node;
pExtendTrack = ptrack;
}
}
}
track_node = track_node->GetNext(); // next track
}
if( pExtendTrack
&& pExtendTrack->GetPoint( 0 )->GetCreateTime().FromTimezone( wxDateTime::GMT0 ).IsSameDate(pLastPoint->GetCreateTime().FromTimezone( wxDateTime::GMT0 ) ) ) {
int begin = 1;
if( pLastPoint->GetCreateTime() == pExtendPoint->GetCreateTime() ) begin = 2;
pSelect->DeleteAllSelectableTrackSegments( pExtendTrack );
wxString suffix = _T("");
if( GetName().IsNull() ) {
suffix = pExtendTrack->GetName();
if( suffix.IsNull() ) suffix = wxDateTime::Today().FormatISODate();
}
pExtendTrack->Clone( this, begin, GetnPoints(), suffix );
pSelect->AddAllSelectableTrackSegments( pExtendTrack );
pSelect->DeleteAllSelectableTrackSegments( this );
return pExtendTrack;
} else {
if( GetName().IsNull() )
SetName(wxDateTime::Today().FormatISODate());
return NULL;
}
}