| ARX 1.0 The next-generation open source augmented reality toolkit.

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
ARTrackable Class Referenceabstract

Base class for supported trackable types. More...

`#include <ARTrackable.h>`

Inheritance diagram for ARTrackable:
[legend]
Collaboration diagram for ARTrackable:
[legend]

## Public Types
enum | TrackableType { SINGLE , MULTI , NFT , TwoD , MULTI_AUTO }

## Public Member Functions
| ARTrackable (TrackableType type)
| Constructor takes the type of this trackable.
| ARTrackable (const ARTrackable &)=delete
| Copy construction is undefined.
ARTrackable & | operator= (const ARTrackable &)=delete
| Copy assignment is undefined.
virtual | ~ARTrackable ()
void | setPositionScalefactor (ARdouble scale)
ARdouble | positionScalefactor ()
virtual bool | update (const ARdouble transL2R[3][4]=NULL)
| Completes an update begun in the parent class, performing filtering, generating OpenGL view matrix and notifying listeners (just a log message at the moment).
virtual int | getPatternCount ()=0
virtual std::pair< float, float > | getPatternSize (int patternIndex)=0
virtual std::pair< int, int > | getPatternImageSize (int patternIndex, AR_MATRIX_CODE_TYPE matrixCodeType)=0
virtual bool | getPatternTransform (int patternIndex, ARdouble T[16])=0
| Get the transform, relative to this trackable's origin, of this pattern.
virtual bool | getPatternImage (int patternIndex, uint32_t *pattImageBuffer, AR_MATRIX_CODE_TYPE matrixCodeType)=0
void | setFiltered (bool flag)
bool | isFiltered ()
ARdouble | filterSampleRate ()
void | setFilterSampleRate (ARdouble rate)
ARdouble | filterCutoffFrequency ()
void | setFilterCutoffFrequency (ARdouble freq)

## Public Attributes
int | UID
| Internal unique ID (note: not the same as artoolkitX pattern ID)
TrackableType | type
| Type of trackable: single, multi, ...
bool | visiblePrev
| Whether or not the trackable was visible prior to last update.
bool | visible
| Whether or not the trackable is visible at current time.
ARdouble | transformationMatrix [16]
| Transformation suitable for use in OpenGL.
ARdouble | transformationMatrixR [16]
| Transformation suitable for use in OpenGL.

## Static Public Attributes
static const int | NO_ID = -1
| Value of UID that indicates no ID.

## Protected Attributes
ARdouble | trans [3][4]
| Transformation from camera to this trackable. If stereo, transform from left camera to this trackable.
ARdouble | m_positionScaleFactor

## Static Protected Attributes
static std::atomic< int > | nextUID {0}

## Detailed Description

Base class for supported trackable types.

## Member Enumeration Documentation

## ◆ TrackableType

enum ARTrackable::TrackableType

Enumerator
SINGLE | A standard single square marker.
MULTI | A composite marker made up of multiple square markers.
NFT | A rectangular textured marker backed by an NFT data set.
TwoD | A 2D textured marker backed by an image.
MULTI_AUTO | An automatically mapped composite marker made up of multiple square matrix (2D barcode) markers.

## Constructor & Destructor Documentation

## ◆ ARTrackable() [1/2]

ARTrackable::ARTrackable | ( | TrackableType | type | ) |

Constructor takes the type of this trackable.

## ◆ ARTrackable() [2/2]

ARTrackable::ARTrackable | ( | const ARTrackable & |  | ) |
| delete

Copy construction is undefined.

## ◆ ~ARTrackable()

ARTrackable::~ARTrackable | ( |  | ) |
| virtual

Here is the call graph for this function:

## Member Function Documentation

## ◆ filterCutoffFrequency()

ARdouble ARTrackable::filterCutoffFrequency | ( |  | ) |

## ◆ filterSampleRate()

ARdouble ARTrackable::filterSampleRate | ( |  | ) |

## ◆ getPatternCount()

virtual int ARTrackable::getPatternCount | ( |  | ) |
| pure virtual

Implemented in ARTrackableMultiSquare, ARTrackableMultiSquareAuto, and ARTrackableSquare.

## ◆ getPatternImage()

virtual bool ARTrackable::getPatternImage | ( | int | patternIndex,
|  | uint32_t * | pattImageBuffer,
|  | AR_MATRIX_CODE_TYPE | matrixCodeType
| ) |  |
| pure virtual

Implemented in ARTrackableMultiSquare, ARTrackableMultiSquareAuto, and ARTrackableSquare.

## ◆ getPatternImageSize()

virtual std::pair< int, int > ARTrackable::getPatternImageSize | ( | int | patternIndex,
|  | AR_MATRIX_CODE_TYPE | matrixCodeType
| ) |  |
| pure virtual

Implemented in ARTrackableMultiSquare, ARTrackableMultiSquareAuto, and ARTrackableSquare.

## ◆ getPatternSize()

virtual std::pair< float, float > ARTrackable::getPatternSize | ( | int | patternIndex | ) |
| pure virtual

Implemented in ARTrackableMultiSquare, ARTrackableMultiSquareAuto, and ARTrackableSquare.

## ◆ getPatternTransform()

virtual bool ARTrackable::getPatternTransform | ( | int | patternIndex,
|  | ARdouble | T[16]
| ) |  |
| pure virtual

Get the transform, relative to this trackable's origin, of this pattern.

Fills T with the transform in column-major (OpenGL) order.

Implemented in ARTrackableMultiSquare, ARTrackableMultiSquareAuto, and ARTrackableSquare.

## ◆ isFiltered()

bool ARTrackable::isFiltered | ( |  | ) |

## ◆ operator=()

ARTrackable & ARTrackable::operator= | ( | const ARTrackable & |  | ) |
| delete

Copy assignment is undefined.

## ◆ positionScalefactor()

ARdouble ARTrackable::positionScalefactor | ( |  | ) |

## ◆ setFilterCutoffFrequency()

void ARTrackable::setFilterCutoffFrequency | ( | ARdouble | freq | ) |

Here is the call graph for this function:

## ◆ setFiltered()

void ARTrackable::setFiltered | ( | bool | flag | ) |

Here is the call graph for this function:

## ◆ setFilterSampleRate()

void ARTrackable::setFilterSampleRate | ( | ARdouble | rate | ) |

Here is the call graph for this function:

## ◆ setPositionScalefactor()

void ARTrackable::setPositionScalefactor | ( | ARdouble | scale | ) |

## ◆ update()

bool ARTrackable::update | ( | const ARdouble | transL2R[3][4] = `NULL` | ) |
| virtual

Completes an update begun in the parent class, performing filtering, generating OpenGL view matrix and notifying listeners (just a log message at the moment).

Subclasses should first do their required updates, set visible, visiblePrev, and trans[3][4] then call ARTrackable::update().

Returns
  true if successful, false if an error occurred

Here is the call graph for this function:

## Member Data Documentation

## ◆ m_positionScaleFactor

ARdouble ARTrackable::m_positionScaleFactor
| protected

## ◆ nextUID

std::atomic< int > ARTrackable::nextUID {0}
| static protected

## ◆ NO_ID

const int ARTrackable::NO_ID = -1
| static

Value of UID that indicates no ID.

## ◆ trans

ARdouble ARTrackable::trans[3][4]
| protected

Transformation from camera to this trackable. If stereo, transform from left camera to this trackable.

## ◆ transformationMatrix

ARdouble ARTrackable::transformationMatrix[16]

Transformation suitable for use in OpenGL.

## ◆ transformationMatrixR

ARdouble ARTrackable::transformationMatrixR[16]

Transformation suitable for use in OpenGL.

## ◆ type

TrackableType ARTrackable::type

Type of trackable: single, multi, ...

## ◆ UID

int ARTrackable::UID

Internal unique ID (note: not the same as artoolkitX pattern ID)

## ◆ visible

bool ARTrackable::visible

Whether or not the trackable is visible at current time.

## ◆ visiblePrev

bool ARTrackable::visiblePrev

Whether or not the trackable was visible prior to last update.

The documentation for this class was generated from the following files:

- Source/ARX/include/ARX/ARTrackable.h
- Source/ARX/ARTrackable.cpp