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

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ARTrackableSquare Class Reference

Single marker type of ARTrackable. More...

`#include <ARTrackableSquare.h>`

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

## Public Member Functions
| ARTrackableSquare ()
| ~ARTrackableSquare ()
ARdouble | getConfidence ()
ARdouble | getConfidenceCutoff ()
void | setConfidenceCutoff (ARdouble value)
ARdouble | width ()
void | setWidth (ARdouble width)
bool | initWithPatternFile (const char *path, ARdouble width, ARPattHandle *arPattHandle)
bool | initWithPatternFromBuffer (const char *buffer, ARdouble width, ARPattHandle *arPattHandle)
bool | initWithBarcode (int barcodeID, ARdouble width, uint64_t globalID_=0)
| Init the trackable as a barcode.
bool | updateWithDetectedMarkers (ARMarkerInfo *markerInfo, int markerNum, AR3DHandle *ar3DHandle)
| Updates the marker with new tracking info.
bool | updateWithDetectedMarkersStereo (ARMarkerInfo *markerInfoL, int markerNumL, ARMarkerInfo *markerInfoR, int markerNumR, AR3DStereoHandle *handle, ARdouble transL2R[3][4])
int | getPatternCount () override
std::pair< float, float > | getPatternSize (int patternIndex) override
std::pair< int, int > | getPatternImageSize (int patternIndex, AR_MATRIX_CODE_TYPE matrixCodeType) override
bool | getPatternTransform (int patternIndex, ARdouble T[16]) override
| Get the transform, relative to this trackable's origin, of this pattern.
bool | getPatternImage (int patternIndex, uint32_t *pattImageBuffer, AR_MATRIX_CODE_TYPE matrixCodeType) override
Public Member Functions inherited from ARTrackable
| 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 | patt_id
| Pattern ID provided by libAR.
int | patt_type
uint64_t | globalID
bool | useContPoseEstimation
Public Attributes inherited from ARTrackable
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.

## Protected Member Functions
bool | unload ()

## Protected Attributes
ARPattHandle * | m_arPattHandle
ARdouble | m_width
ARdouble | m_cf
ARdouble | m_cfMin
Protected Attributes inherited from ARTrackable
ARdouble | trans [3][4]
| Transformation from camera to this trackable. If stereo, transform from left camera to this trackable.
ARdouble | m_positionScaleFactor

## Additional Inherited Members
Public Types inherited from ARTrackable
enum | TrackableType { SINGLE , MULTI , NFT , TwoD , MULTI_AUTO }
Static Public Attributes inherited from ARTrackable
static const int | NO_ID = -1
| Value of UID that indicates no ID.
Static Protected Attributes inherited from ARTrackable
static std::atomic< int > | nextUID {0}

## Detailed Description

Single marker type of ARTrackable.

## Constructor & Destructor Documentation

## ◆ ARTrackableSquare()

ARTrackableSquare::ARTrackableSquare | ( |  | ) |

## ◆ ~ARTrackableSquare()

ARTrackableSquare::~ARTrackableSquare | ( |  | ) |

Here is the call graph for this function:

## Member Function Documentation

## ◆ getConfidence()

ARdouble ARTrackableSquare::getConfidence | ( |  | ) |

## ◆ getConfidenceCutoff()

ARdouble ARTrackableSquare::getConfidenceCutoff | ( |  | ) |

## ◆ getPatternCount()

int ARTrackableSquare::getPatternCount | ( |  | ) |
| override virtual

Implements ARTrackable.

## ◆ getPatternImage()

bool ARTrackableSquare::getPatternImage | ( | int | patternIndex,
|  | uint32_t * | pattImageBuffer,
|  | AR_MATRIX_CODE_TYPE | matrixCodeType
| ) |  |
| override virtual

Implements ARTrackable.

Here is the call graph for this function:

## ◆ getPatternImageSize()

std::pair< int, int > ARTrackableSquare::getPatternImageSize | ( | int | patternIndex,
|  | AR_MATRIX_CODE_TYPE | matrixCodeType
| ) |  |
| override virtual

Implements ARTrackable.

## ◆ getPatternSize()

std::pair< float, float > ARTrackableSquare::getPatternSize | ( | int | patternIndex | ) |
| override virtual

Implements ARTrackable.

## ◆ getPatternTransform()

bool ARTrackableSquare::getPatternTransform | ( | int | patternIndex,
|  | ARdouble | T[16]
| ) |  |
| override virtual

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

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

Implements ARTrackable.

## ◆ initWithBarcode()

bool ARTrackableSquare::initWithBarcode | ( | int | barcodeID,
|  | ARdouble | width,
|  | uint64_t | globalID_ = `0`
| ) |  |

Init the trackable as a barcode.

Parameters

  barcodeID | The barcode (matrix code) ID in the range alloweable by the current matrix code type, or 0 if the barcode is a globalD code,
  width | The width of the marker between the outer edge of the square borders, in calibrated camera units (usually millimetres).
  globalID_ | If barcodeID is 0 and this is non-zero, the globalID code to be used. Otherwise, ignored.

Here is the call graph for this function:

## ◆ initWithPatternFile()

bool ARTrackableSquare::initWithPatternFile | ( | const char * | path,
|  | ARdouble | width,
|  | ARPattHandle * | arPattHandle
| ) |  |

Here is the call graph for this function:

## ◆ initWithPatternFromBuffer()

bool ARTrackableSquare::initWithPatternFromBuffer | ( | const char * | buffer,
|  | ARdouble | width,
|  | ARPattHandle * | arPattHandle
| ) |  |

Here is the call graph for this function:

## ◆ setConfidenceCutoff()

void ARTrackableSquare::setConfidenceCutoff | ( | ARdouble | value | ) |

## ◆ setWidth()

void ARTrackableSquare::setWidth | ( | ARdouble | width | ) |
| inline

Here is the call graph for this function:

## ◆ unload()

bool ARTrackableSquare::unload | ( |  | ) |
| protected

Here is the call graph for this function:

## ◆ updateWithDetectedMarkers()

bool ARTrackableSquare::updateWithDetectedMarkers | ( | ARMarkerInfo * | markerInfo,
|  | int | markerNum,
|  | AR3DHandle * | ar3DHandle
| ) |  |

Updates the marker with new tracking info.

Then calls ARTrackable::update()

Parameters

  markerInfo | Array containing detected marker information
  markerNum | Number of items in the array
  ar3DHandle | AR3DHandle used to extract marker pose.

Here is the call graph for this function:

## ◆ updateWithDetectedMarkersStereo()

bool ARTrackableSquare::updateWithDetectedMarkersStereo | ( | ARMarkerInfo * | markerInfoL,
|  | int | markerNumL,
|  | ARMarkerInfo * | markerInfoR,
|  | int | markerNumR,
|  | AR3DStereoHandle * | handle,
|  | ARdouble | transL2R[3][4]
| ) |  |

Here is the call graph for this function:

## ◆ width()

ARdouble ARTrackableSquare::width | ( |  | ) |
| inline

## Member Data Documentation

## ◆ globalID

uint64_t ARTrackableSquare::globalID

## ◆ m_arPattHandle

ARPattHandle* ARTrackableSquare::m_arPattHandle
| protected

## ◆ m_cf

ARdouble ARTrackableSquare::m_cf
| protected

## ◆ m_cfMin

ARdouble ARTrackableSquare::m_cfMin
| protected

## ◆ m_width

ARdouble ARTrackableSquare::m_width
| protected

## ◆ patt_id

int ARTrackableSquare::patt_id

Pattern ID provided by libAR.

## ◆ patt_type

int ARTrackableSquare::patt_type

## ◆ useContPoseEstimation

bool ARTrackableSquare::useContPoseEstimation

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

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