Mt2dTrackData Class Reference Library » 运动追踪器

#include <lib_motiontracker.h>

详细描述

Provides access to 2D Tracking data.

Allows specific tracks to be retrieved based on name, index or unique ID.

公共成员函数

Int32   GetTrackCount () const
Mt2dTrack *  GetTrackByIndex ( Int32 idx) const
Mt2dTrack *  GetTrackByGid (const MtTrkGid *sdkTrkGid) const
BaseSelect *  GetTrackIndices ( Bool userTracks=true, Bool autoTracks=false) const
Mt2dTrack *  GetTrackByName (const String &name) const

静态公共成员函数

static Mt2dTrackData *  Alloc ()
static void  Free ( Mt2dTrackData *&p)

私有成员函数

  Mt2dTrackData ()
  ~Mt2dTrackData ()

构造函数 & 析构函数文档编制

◆  Mt2dTrackData()

Mt2dTrackData () private

◆  ~Mt2dTrackData()

~ Mt2dTrackData () private

成员函数文档编制

◆  Alloc()

static Mt2dTrackData * Alloc ( )
static

Internal .

◆  Free()

static void Free ( Mt2dTrackData *&  p )
static

Destructs Mt2dTrackDatas allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

参数
[in,out] p The Mt2dTrackData to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆  GetTrackCount()

Int32 GetTrackCount ( ) const

Queries the number of 2D tracks.

返回
The number of tracks.

◆  GetTrackByIndex()

Mt2dTrack * GetTrackByIndex ( Int32   idx ) const

Retrieves a track by index.

注意
Caller is responsible for calling Free() on the returned track when it is no longer needed.
参数
[in] idx The index of desired track: 0 <= idx < GetTrackCount() .
返回
A copy of the track, or nullptr . The caller owns the pointed Mt2dTrack .

◆  GetTrackByGid()

Mt2dTrack * GetTrackByGid ( const MtTrkGid *  sdkTrkGid ) const

Retrieves a track by global identifier.

警告
Caller is responsible for calling Free() on the returned track when it is no longer needed.
参数
[in] sdkTrkGid The global ID of the desired track. The caller owns the pointed MtTrkGid .
返回
A copy of the track, or nullptr . The caller owns the pointed Mt2dTrack .

◆  GetTrackIndices()

BaseSelect * GetTrackIndices ( Bool   userTracks = true ,
Bool   autoTracks = false  
) const

Retrieves a BaseSelect containing the valid indices for the tracks.

警告
Caller is responsible for calling Free() on the returned track when it is no longer needed.
注意
若 userTracks is true and autoTracks is true then the function returns all indices from 0 to GetTrackCount() - 1 .
参数
[in] userTracks true to include user created tracks, otherwise false .
[in] autoTracks true to include automatic tracks, otherwise false .
返回
A copy of the track, or nullptr . The caller owns the pointed Mt2dTrack .

◆  GetTrackByName()

Mt2dTrack * GetTrackByName ( const String &  name ) const

Retrieves a track by name.

警告
Caller is responsible for calling Free() on the returned track when it is no longer needed.
注意
The function returns the first track matching name .
参数
[in] name The name of wanted track.
返回
A copy of the track, or nullptr . The caller owns the pointed Mt2dTrack .