ARX  1.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
Functions
ARX_c.cpp File Reference
#include <ARX/ARX_c.h>
#include <ARX/ARController.h>
#include <stdio.h>
#include <pthread.h>
Include dependency graph for ARX_c.cpp:

Functions

void arwRegisterLogCallback (PFN_LOGCALLBACK callback)
 Registers a callback function to use when a message is logged. More...
 
void arwSetLogLevel (const int logLevel)
 
bool arwInitialiseAR ()
 Initialises the artoolkitX. More...
 
bool arwGetARToolKitVersion (char *buffer, int length)
 Gets the artoolkitX version as a string, such as "10.0.0". More...
 
int arwGetError ()
 Return error information Returns the value of the error flag. More...
 
bool arwChangeToResourcesDir (const char *resourcesDirectoryPath)
 Changes the working directory to the resources directory used by artoolkitX. More...
 
bool arwStartRunning (const char *vconf, const char *cparaName)
 Initialises and starts video capture. More...
 
bool arwStartRunningB (const char *vconf, const char *cparaBuff, const int cparaBuffLen)
 Initialises and starts video capture. More...
 
bool arwStartRunningStereo (const char *vconfL, const char *cparaNameL, const char *vconfR, const char *cparaNameR, const char *transL2RName)
 
bool arwStartRunningStereoB (const char *vconfL, const char *cparaBuffL, const int cparaBuffLenL, const char *vconfR, const char *cparaBuffR, const int cparaBuffLenR, const char *transL2RBuff, const int transL2RBuffLen)
 
bool arwIsRunning ()
 Returns true if artoolkitX is running, i.e. More...
 
bool arwIsInited ()
 Returns true if artoolkitX is initialized and read for adding trackables. More...
 
bool arwStopRunning ()
 Stops video capture and frees video capture resources. More...
 
bool arwShutdownAR ()
 Shuts down the artoolkitX and frees all resources. More...
 
bool arwGetProjectionMatrix (const float nearPlane, const float farPlane, float p[16])
 Populates the given float array with the projection matrix computed from camera parameters for the video source. More...
 
bool arwGetProjectionMatrixStereo (const float nearPlane, const float farPlane, float pL[16], float pR[16])
 Populates the given float arrays with the projection matrices computed from camera parameters for each of the stereo video sources. More...
 
bool arwGetVideoParams (int *width, int *height, int *pixelSize, char *pixelFormatStringBuffer, int pixelFormatStringBufferLen)
 Returns the parameters of the video source frame. More...
 
bool arwGetVideoParamsStereo (int *widthL, int *heightL, int *pixelSizeL, char *pixelFormatStringBufferL, int pixelFormatStringBufferLenL, int *widthR, int *heightR, int *pixelSizeR, char *pixelFormatStringBufferR, int pixelFormatStringBufferLenR)
 Returns the parameters of the video source frames. More...
 
bool arwCapture ()
 Captures a newest frame from the video source. More...
 
bool arwUpdateAR ()
 Performs tracking and trackable updates. More...
 
bool arwUpdateTexture32 (uint32_t *buffer)
 Asks the video source to push the most recent frame into the passed-in buffer. More...
 
bool arwUpdateTexture32Stereo (uint32_t *bufferL, uint32_t *bufferR)
 Asks the video source to push the most recent stereo frame into the passed-in buffer. More...
 
bool arwDrawVideoInit (const int videoSourceIndex)
 Initialise drawing of video frames in a graphics context. More...
 
bool arwDrawVideoSettings (int videoSourceIndex, int width, int height, bool rotate90, bool flipH, bool flipV, int hAlign, int vAlign, int scalingMode, int32_t viewport[4])
 Specify the layout of the graphics context in which drawing of video frames will occur. More...
 
bool arwDrawVideo (const int videoSourceIndex)
 Draws the latest frame from the video source in the active graphics context. More...
 
bool arwDrawVideoFinal (const int videoSourceIndex)
 Finalise drawing of video frames in a graphics context. More...
 
void arwSetTrackerOptionBool (int option, bool value)
 Set boolean options associated with a tracker. More...
 
void arwSetTrackerOptionInt (int option, int value)
 Set integer options associated with a tracker. More...
 
void arwSetTrackerOptionFloat (int option, float value)
 Set floating-point options associated with a tracker. More...
 
bool arwGetTrackerOptionBool (int option)
 Get boolean options associated with a tracker. More...
 
int arwGetTrackerOptionInt (int option)
 Get integer options associated with a tracker. More...
 
float arwGetTrackerOptionFloat (int option)
 Get floating-point options associated with a tracker. More...
 
int arwAddTrackable (const char *cfg)
 Adds a trackable as specified in the given configuration string. More...
 
bool arwGetTrackables (int *count_p, ARWTrackableStatus **statuses_p)
 Gets all current trackables and their status. More...
 
bool arwRemoveTrackable (int trackableUID)
 Removes the trackable with the given unique identifier (UID). More...
 
int arwRemoveAllTrackables ()
 Clears the collection of trackables. More...
 
bool arwQueryTrackableVisibilityAndTransformation (int trackableUID, float matrix[16])
 Returns the visibility and pose of the specified trackable. More...
 
bool arwQueryTrackableVisibilityAndTransformationStereo (int trackableUID, float matrixL[16], float matrixR[16])
 Returns the visibility and stereo pose of the specified trackable. More...
 
int arwGetTrackablePatternCount (int trackableUID)
 Returns the number of pattern images associated with the specified trackable. More...
 
bool arwGetTrackablePatternConfig (int trackableUID, int patternID, float matrix[16], float *width, float *height, int *imageSizeX, int *imageSizeY)
 Gets configuration of a pattern associated with a trackable. More...
 
bool arwGetTrackablePatternImage (int trackableUID, int patternID, uint32_t *buffer)
 Gets a pattern image associated with a trackable. More...
 
bool arwGetTrackableOptionBool (int trackableUID, int option)
 Get boolean options associated with a trackable. More...
 
void arwSetTrackableOptionBool (int trackableUID, int option, bool value)
 Set boolean options associated with a trackable. More...
 
int arwGetTrackableOptionInt (int trackableUID, int option)
 Get integer options associated with a trackable. More...
 
void arwSetTrackableOptionInt (int trackableUID, int option, int value)
 Set integer options associated with a trackable. More...
 
float arwGetTrackableOptionFloat (int trackableUID, int option)
 Get floating-point options associated with a trackable. More...
 
void arwSetTrackableOptionFloat (int trackableUID, int option, float value)
 Set floating-point options associated with a trackable. More...
 
bool arwLoadOpticalParams (const char *optical_param_name, const char *optical_param_buff, const int optical_param_buffLen, const float projectionNearPlane, const float projectionFarPlane, float *fovy_p, float *aspect_p, float m[16], float p[16])
 Loads an optical parameters structure from file or from buffer. More...
 

Function Documentation

◆ arwAddTrackable()

int arwAddTrackable ( const char *  cfg)

Adds a trackable as specified in the given configuration string.

The format of the string can be one of:

  • Square marker from pattern file: "single;pattern_file;pattern_width", e.g. "single;data/hiro.patt;80"
  • Square marker from pattern passed in config: "single_buffer;pattern_width;buffer=[]", e.g. "single_buffer;80;buffer=234 221 237..."
  • Square barcode marker: "single_barcode;barcode_id;pattern_width", e.g. "single_barcode;0;80"
  • Multi-square marker: "multi;config_file", e.g. "multi;data/multi/marker.dat"
  • Multi-square auto marker: "multi;origin_barcode_id;pattern_width", e.g. "multi;0;80.0"
  • NFT marker: "nft;nft_dataset_pathname", e.g. "nft;gibraltar"
    Parameters
    cfgThe configuration string
    Returns
    The unique identifier (UID) of the trackable instantiated based on the configuration string, or -1 if an error occurred

◆ arwCapture()

bool arwCapture ( )

Captures a newest frame from the video source.

Returns
true if successful, false if an error occurred
Here is the call graph for this function:

◆ arwChangeToResourcesDir()

bool arwChangeToResourcesDir ( const char *  resourcesDirectoryPath)

Changes the working directory to the resources directory used by artoolkitX.

Normally, this would be called immediately after arwInitialiseAR()

Returns
true if successful, false if an error occurred
See also
arwInitialiseAR()
Here is the call graph for this function:

◆ arwDrawVideo()

bool arwDrawVideo ( const int  videoSourceIndex)

Draws the latest frame from the video source in the active graphics context.

This function performs actual drawing of the latest video frame.

This function must only be called with a graphics context active (typically from the rendering thread) and only while arwIsRunning is true and only between calls to arwDrawVideoInit and arwDrawVideoFinal, and after at least one call to arwDrawVideoSettings.

Parameters
videoSourceIndexThe 0-based index of the video source which is supplying frames for drawing.
Returns
true if successful, false if an error occurred.
See also
arwIsRunning
arwDrawVideoInit
arwDrawVideoFinal
arwDrawVideoSettings
Here is the call graph for this function:

◆ arwDrawVideoFinal()

bool arwDrawVideoFinal ( const int  videoSourceIndex)

Finalise drawing of video frames in a graphics context.

When drawing of video frames is no longer required, this function must be called to clean up structures allocated by the call to arwDrawVideoInit.

This function must only be called with a graphics context active (typically from the rendering thread).

Parameters
videoSourceIndexThe 0-based index of the video source which supplied frames for drawing.
Returns
true if successful, false if an error occurred.
See also
arwDrawVideoInit
Here is the call graph for this function:

◆ arwDrawVideoInit()

bool arwDrawVideoInit ( const int  videoSourceIndex)

Initialise drawing of video frames in a graphics context.

If drawing of video frames into a graphics context is desired, this function must be called from the rendering thread to initialise graphics library structures for future drawing of video frames.

This function must be called only with a valid graphics context active (typically from the rendering thread) and only when the function arwIsRunning() returns true.

When drawing of video frames is no longer required, the function arwDrawVideoFinal must be called to clean up structures allocated by this call.

Parameters
videoSourceIndexThe 0-based index of the video source which will supply frames for drawing. Normally 0, but for the second camera in a stereo pair, 1.
Returns
true if successful, false if an error occurred.
See also
arwIsRunning
arwDrawVideoFinal
Here is the call graph for this function:

◆ arwDrawVideoSettings()

bool arwDrawVideoSettings ( int  videoSourceIndex,
int  width,
int  height,
bool  rotate90,
bool  flipH,
bool  flipV,
int  hAlign,
int  vAlign,
int  scalingMode,
int32_t  viewport[4] 
)

Specify the layout of the graphics context in which drawing of video frames will occur.

As the layout of the graphics context (e.g. size, orientation) may differ widely from the format of the video frames which are to be drawn, this function specifies the layout of the graphics context and the desired scaling and positioning of the video frames within this context. Optionally, a calculated OpenGL-style viewport can be returned to the caller.

This function must only be called with a graphics context active (i.e. typically called only from a rendering thread) and only while arwIsRunning is true and only between calls to arwDrawVideoInit and arwDrawVideoFinal.

Parameters
videoSourceIndexThe 0-based index of the video source which is supplying frames for drawing. Normally 0, but for the second camera in a stereo pair, 1.
widthThe width in pixels of the graphics context.
heightThe height in pixels of the graphics context.
rotate90If true, content should be rendered in the graphics context rotated 90-degrees.
flipHIf true, content should be rendered in the graphics context mirrored (flipped) in the horizontal dimension.
flipVIf true, content should be rendered in the graphics context mirrored (flipped) in the vertical dimension.
hAlignAn enum ARW_H_ALIGN_* specifying the desired horizontal alignment of video frames in the graphics context. If unsure, pass ARW_H_ALIGN_CENTRE.
vAlignAn enum ARW_V_ALIGN_* specifying the desired vertical alignment of video frames in the graphics context. If unsure, pass ARW_V_ALIGN_CENTRE.
scalingModeAn enum ARW_SCALE_MODE_* specifying the desired scaling of the video frames to the graphics context. If unsure, pass ARW_SCALE_MODE_FIT.
viewportIf non-null, must be an array of 4 32-bit signed integers, in which the calculated OpenGL-style viewport parameters will be returned. The order of the parameters is: x-coordinate of the left edge of the viewport (may be negative), the y-coordinate of the bottom edge of the viewport (may be negative), the width of the viewport in the x-axis in pixels, and the height of the viewport in the y-axis in pixels.
Returns
true if successful, false if an error occurred.
See also
arwIsRunning
arwDrawVideoInit
arwDrawVideoFinal
Here is the call graph for this function:

◆ arwGetARToolKitVersion()

bool arwGetARToolKitVersion ( char *  buffer,
int  length 
)

Gets the artoolkitX version as a string, such as "10.0.0".

Must not be called prior to arwInitialiseAR().

Parameters
bufferThe character buffer to populate
lengthThe maximum number of characters to set in buffer
Returns
true if successful, false if an error occurred
Here is the call graph for this function:

◆ arwGetError()

int arwGetError ( )

Return error information Returns the value of the error flag.

Each detectable error is assigned a numeric code and symbolic name. When an error occurs, the error flag is set to the appropriate error code value. No other errors are recorded until arwGetError is called, the error code is returned, and the flag is reset to AR_ERROR_NONE. If a call to arwGetError returns AR_ERROR_NONE, there has been no detectable error since the last call to arwGetError, or since the the library was initialized.

To allow for distributed implementations, there may be several error flags. If any single error flag has recorded an error, the value of that flag is returned and that flag is reset to AR_ERROR_NONE when arwGetError is called. If more than one flag has recorded an error, arwGetError returns and clears an arbitrary error flag value. Thus, arwGetError should always be called in a loop, until it returns AR_ERROR_NONE, if all error flags are to be reset.

Initially, all error flags are set to AR_ERROR_NONE.

Returns
enum with error code.
Here is the call graph for this function:

◆ arwGetProjectionMatrix()

bool arwGetProjectionMatrix ( const float  nearPlane,
const float  farPlane,
float  p[16] 
)

Populates the given float array with the projection matrix computed from camera parameters for the video source.

Parameters
nearPlaneNear plane distance for projection matrix calculation.
farPlaneFar plane distance for projection matrix calculation.
pFloat array to populate with OpenGL compatible projection matrix.
Returns
true if successful, false if an error occurred
Here is the call graph for this function:

◆ arwGetProjectionMatrixStereo()

bool arwGetProjectionMatrixStereo ( const float  nearPlane,
const float  farPlane,
float  pL[16],
float  pR[16] 
)

Populates the given float arrays with the projection matrices computed from camera parameters for each of the stereo video sources.

Parameters
nearPlaneNear plane distance for projection matrix calculation.
farPlaneFar plane distance for projection matrix calculation.
pLFloat array to populate with OpenGL compatible projection matrix for the left camera of the stereo video pair.
pRFloat array to populate with OpenGL compatible projection matrix for the right camera of the stereo video pair.
Returns
true if successful, false if an error occurred
Here is the call graph for this function:

◆ arwGetTrackableOptionBool()

bool arwGetTrackableOptionBool ( int  trackableUID,
int  option 
)

Get boolean options associated with a trackable.

Parameters
trackableUIDThe unique identifier (UID) of the trackable
optionSymbolic constant identifying trackable option to get.
Returns
true if option is set, false if option is not set or an error occurred.
Here is the call graph for this function:

◆ arwGetTrackableOptionFloat()

float arwGetTrackableOptionFloat ( int  trackableUID,
int  option 
)

Get floating-point options associated with a trackable.

Parameters
trackableUIDThe unique identifier (UID) of the trackable
optionSymbolic constant identifying trackable option to get.
Returns
floating-point value of option, or NAN if an error occurred.
Here is the call graph for this function:

◆ arwGetTrackableOptionInt()

int arwGetTrackableOptionInt ( int  trackableUID,
int  option 
)

Get integer options associated with a trackable.

Parameters
trackableUIDThe unique identifier (UID) of the trackable
optionSymbolic constant identifying trackable option to get.
Returns
integer value of option, or INT_MIN if an error occurred.
Here is the call graph for this function:

◆ arwGetTrackablePatternConfig()

bool arwGetTrackablePatternConfig ( int  trackableUID,
int  patternID,
float  matrix[16],
float *  width,
float *  height,
int *  imageSizeX,
int *  imageSizeY 
)

Gets configuration of a pattern associated with a trackable.

Parameters
trackableUIDThe unique identifier (UID) of the trackable
patternIDThe id of the pattern within the trackable, in range from 0 to arwGetTrackablePatternCount() - 1, inclusive. Ignored for single square markers and NFT markers (i.e. 0 assumed).
matrixThe float array to populate with the 4x4 transformation matrix of the pattern (column-major order).
widthFloat value to set to the width of the pattern
heightFloat value to set to the height of the pattern.
imageSizeXInt value to set to the width of the pattern image (in pixels).
imageSizeYInt value to set to the height of the pattern image (in pixels).
Returns
true if successful, false if an error occurred
Here is the call graph for this function:

◆ arwGetTrackablePatternCount()

int arwGetTrackablePatternCount ( int  trackableUID)

Returns the number of pattern images associated with the specified trackable.

A single square marker trackable has one pattern image. A multi-square marker trackable has one or more pattern images. Images of NFT marker trackables are not currently supported, so at present this function will return 0 for NFT trackables.

Parameters
trackableUIDThe unique identifier (UID) of the trackable
Returns
The number of pattern images.
Here is the call graph for this function:

◆ arwGetTrackablePatternImage()

bool arwGetTrackablePatternImage ( int  trackableUID,
int  patternID,
uint32_t *  buffer 
)

Gets a pattern image associated with a trackable.

The provided color buffer is populated with the image of the pattern for the specified trackable. If the trackable is a multi-square marker, then the pattern image specified by patternID is used. Images of NFT marker trackables are not currently supported, so at present this function will return no image for NFT trackables.

Parameters
trackableUIDThe unique identifier (UID) of the trackable
patternIDThe id for the pattern within that trackable. Ignored for single square marker and NFT marker trackables.
bufferPointer to a buffer of pixels (of type 'uint32_t') to be filled with pattern image. It is the caller's responsibility to ensure that the buffer is of sufficient size. Use arwGetTrackablePatternConfig to get the required size of this array (imageSizeX * imageSizeY elements). The pixels are RGBA in little-endian systems, or ABGR in big-endian systems.
Returns
true if successful, false if an error occurred
Here is the call graph for this function:

◆ arwGetTrackables()

bool arwGetTrackables ( int *  count_p,
ARWTrackableStatus **  statuses_p 
)

Gets all current trackables and their status.

Parameters
count_pPointer to a location which will be filled with the number of trackable statuses in the array pointed to by statuses_p.
statuses_pPointer to a location which will be filled with a pointer to the first element of an array of trackable statuses, or NULL if the current status is not required. This array is allocated internally and must be deallocated (by calling free() on the pointer) when the caller has finished using the array.
Returns
true if the function proceeded without error, false if an error occurred
Here is the call graph for this function:

◆ arwGetTrackerOptionBool()

bool arwGetTrackerOptionBool ( int  option)

Get boolean options associated with a tracker.

Parameters
optionSymbolic constant identifying tracker option to get.
Returns
true if option is set, false if option is not set or an error occurred.
Here is the call graph for this function:

◆ arwGetTrackerOptionFloat()

float arwGetTrackerOptionFloat ( int  option)

Get floating-point options associated with a tracker.

Parameters
optionSymbolic constant identifying tracker option to get.
Returns
floating-point value of option, or NAN if an error occurred.
Here is the call graph for this function:

◆ arwGetTrackerOptionInt()

int arwGetTrackerOptionInt ( int  option)

Get integer options associated with a tracker.

Parameters
optionSymbolic constant identifying tracker option to get.
Returns
integer value of option, or INT_MAX if an error occurred.
Here is the call graph for this function:

◆ arwGetVideoParams()

bool arwGetVideoParams ( int *  width,
int *  height,
int *  pixelSize,
char *  pixelFormatStringBuffer,
int  pixelFormatStringBufferLen 
)

Returns the parameters of the video source frame.

Parameters
widthPointer to an int which will be filled with the width (in pixels) of the video frame, or NULL if this information is not required.
heightPointer to an int which will be filled with the height (in pixels) of the video frame, or NULL if this information is not required.
pixelSizePointer to an int which will be filled with the numbers of bytes per pixel of the source frame.
pixelFormatStringBufferPointer to a buffer which will be filled with the symolic name of the pixel format (as a nul-terminated C-string) of the video frame, or NULL if this information is not required. The name will be of the form "AR_PIXEL_FORMAT_xxx".
pixelFormatStringBufferLenLength (in bytes) of pixelFormatStringBuffer, or 0 if this information is not required.
Returns
True if the values were returned OK, false if there is currently no video source or an error int[] .
See also
arwGetVideoParamsStereo
Here is the call graph for this function:

◆ arwGetVideoParamsStereo()

bool arwGetVideoParamsStereo ( int *  widthL,
int *  heightL,
int *  pixelSizeL,
char *  pixelFormatStringBufferL,
int  pixelFormatStringBufferLenL,
int *  widthR,
int *  heightR,
int *  pixelSizeR,
char *  pixelFormatStringBufferR,
int  pixelFormatStringBufferLenR 
)

Returns the parameters of the video source frames.

Parameters
widthLPointer to an int which will be filled with the width (in pixels) of the video frame, or NULL if this information is not required.
widthRPointer to an int which will be filled with the width (in pixels) of the video frame, or NULL if this information is not required.
heightLPointer to an int which will be filled with the height (in pixels) of the video frame, or NULL if this information is not required.
heightRPointer to an int which will be filled with the height (in pixels) of the video frame, or NULL if this information is not required.
pixelSizeLPointer to an int which will be filled with the numbers of bytes per pixel of the source frame, or NULL if this information is not required.
pixelSizeRPointer to an int which will be filled with the numbers of bytes per pixel of the source frame, or NULL if this information is not required.
pixelFormatStringBufferLPointer to a buffer which will be filled with the symbolic name of the pixel format (as a nul-terminated C-string) of the video frame, or NULL if this information is not required. The name will be of the form "AR_PIXEL_FORMAT_xxx".
pixelFormatStringBufferRPointer to a buffer which will be filled with the symbolic name of the pixel format (as a nul-terminated C-string) of the video frame, or NULL if this information is not required. The name will be of the form "AR_PIXEL_FORMAT_xxx".
pixelFormatStringBufferLenLLength (in bytes) of pixelFormatStringBufferL, or 0 if this information is not required.
pixelFormatStringBufferLenRLength (in bytes) of pixelFormatStringBufferR, or 0 if this information is not required.
Returns
True if the values were returned OK, false if there is currently no stereo video source or an error int[] .
See also
arwGetVideoParams
Here is the call graph for this function:

◆ arwInitialiseAR()

bool arwInitialiseAR ( )

Initialises the artoolkitX.

For any square template (pattern) marker trackables, the number of rows and columns in the template defaults to AR_PATT_SIZE1 and the maximum number of markers that may be loaded for a single matching pass defaults to AR_PATT_NUM_MAX.

Returns
true if successful, false if an error occurred
See also
arwShutdownAR()
Here is the call graph for this function:

◆ arwIsInited()

bool arwIsInited ( )

Returns true if artoolkitX is initialized and read for adding trackables.

Returns
true when running, otherwise false
Here is the call graph for this function:

◆ arwIsRunning()

bool arwIsRunning ( )

Returns true if artoolkitX is running, i.e.

detecting trackables.

Returns
true when running, otherwise false
Here is the call graph for this function:

◆ arwLoadOpticalParams()

bool arwLoadOpticalParams ( const char *  optical_param_name,
const char *  optical_param_buff,
const int  optical_param_buffLen,
const float  projectionNearPlane,
const float  projectionFarPlane,
float *  fovy_p,
float *  aspect_p,
float  m[16],
float  p[16] 
)

Loads an optical parameters structure from file or from buffer.

Parameters
optical_param_nameIf supplied, points to a buffer specifying the path to the optical parameters file (as generated by the calib_optical utility.)
optical_param_buffIf optical_param_name is NULL, the contents of this buffer will be interpreted as containing the contents of an optical parameters file.
optical_param_buffLenLength of the buffer specified in optical_param_buff. Ignored if optical_param_buff is NULL.
projectionNearPlaneIf p is non-NULL, near plane distance for projection matrix calculation.
projectionFarPlaneIf p is non-NULL, far plane distance for projection matrix calculation.
fovy_pPointer to a float, which will be filled with the field-of-view (Y axis) component of the optical parameters, in degrees.
aspect_pPointer to a float, which will be filled with the aspect ratio (width / height) component of the optical parameters.
mPointer to an array of 16 floats, which will be filled with the transformation matrix component of the optical parameters.
p(Optional) May be NULL, or a pointer to an array of 16 floats, which will be filled with the perspective matrix calculated from fovy and aspect combined with the near and far projection values supplied in projectionNearPlane and projectionFarPlane.
Here is the call graph for this function:

◆ arwQueryTrackableVisibilityAndTransformation()

bool arwQueryTrackableVisibilityAndTransformation ( int  trackableUID,
float  matrix[16] 
)

Returns the visibility and pose of the specified trackable.

After a call to arwUpdate, all trackable information will be current. Any trackable can then be checked for visibility in the current frame, and if visible, additionally queried for its pose.

Parameters
trackableUIDThe unique identifier (UID) of the trackable to query.
matrixA float array to populate with an OpenGL-compatible transformation matrix.
Returns
true if the specified trackable is visible, false if not, or an error occurred.
Here is the call graph for this function:

◆ arwQueryTrackableVisibilityAndTransformationStereo()

bool arwQueryTrackableVisibilityAndTransformationStereo ( int  trackableUID,
float  matrixL[16],
float  matrixR[16] 
)

Returns the visibility and stereo pose of the specified trackable.

After a call to arwUpdate, all trackable information will be current. Any trackable can then be checked for visibility in the current frame, and if visible, additionally queried for its pose.

Parameters
trackableUIDThe unique identifier (UID) of the trackable to query
matrixLThe float array to populate with an OpenGL-compatible transformation matrix for the left camera.
matrixRThe float array to populate with an OpenGL-compatible transformation matrix for the right camera.
Returns
true if the specified trackable is visible, false if not, or an error occurred
Here is the call graph for this function:

◆ arwRegisterLogCallback()

void arwRegisterLogCallback ( PFN_LOGCALLBACK  callback)

Registers a callback function to use when a message is logged.

If the callback is to become invalid, be sure to call this function with NULL first so that the callback is unregistered.

Here is the call graph for this function:

◆ arwRemoveAllTrackables()

int arwRemoveAllTrackables ( )

Clears the collection of trackables.

Returns
The number of trackables removed
Here is the call graph for this function:

◆ arwRemoveTrackable()

bool arwRemoveTrackable ( int  trackableUID)

Removes the trackable with the given unique identifier (UID).

Parameters
trackableUIDThe unique identifier (UID) of the trackable to remove
Returns
true if the trackable was removed, false if an error occurred

◆ arwSetLogLevel()

void arwSetLogLevel ( const int  logLevel)

◆ arwSetTrackableOptionBool()

void arwSetTrackableOptionBool ( int  trackableUID,
int  option,
bool  value 
)

Set boolean options associated with a trackable.

Parameters
trackableUIDThe unique identifier (UID) of the trackable
optionSymbolic constant identifying trackable option to set.
valueThe value to set it to.
Here is the call graph for this function:

◆ arwSetTrackableOptionFloat()

void arwSetTrackableOptionFloat ( int  trackableUID,
int  option,
float  value 
)

Set floating-point options associated with a trackable.

Parameters
trackableUIDThe unique identifier (UID) of the trackable
optionSymbolic constant identifying trackable option to set.
valueThe value to set it to.
Here is the call graph for this function:

◆ arwSetTrackableOptionInt()

void arwSetTrackableOptionInt ( int  trackableUID,
int  option,
int  value 
)

Set integer options associated with a trackable.

Parameters
trackableUIDThe unique identifier (UID) of the trackable
optionSymbolic constant identifying trackable option to set.
valueThe value to set it to.
Here is the call graph for this function:

◆ arwSetTrackerOptionBool()

void arwSetTrackerOptionBool ( int  option,
bool  value 
)

Set boolean options associated with a tracker.

Parameters
optionSymbolic constant identifying tracker option to set.
valueThe value to set it to.
Here is the call graph for this function:

◆ arwSetTrackerOptionFloat()

void arwSetTrackerOptionFloat ( int  option,
float  value 
)

Set floating-point options associated with a tracker.

Parameters
optionSymbolic constant identifying tracker option to set.
valueThe value to set it to.
Here is the call graph for this function:

◆ arwSetTrackerOptionInt()

void arwSetTrackerOptionInt ( int  option,
int  value 
)

Set integer options associated with a tracker.

Parameters
optionSymbolic constant identifying tracker option to set.
valueThe value to set it to.
Here is the call graph for this function:

◆ arwShutdownAR()

bool arwShutdownAR ( )

Shuts down the artoolkitX and frees all resources.

N.B.: If this is being called from the destructor of the same module which supplied the log callback, be sure to call arwRegisterLogCallback(NULL) prior to calling this function.

Returns
true if successful, false if an error occurred
See also
arwInitialiseAR()

◆ arwStartRunning()

bool arwStartRunning ( const char *  vconf,
const char *  cparaName 
)

Initialises and starts video capture.

Parameters
vconfThe video configuration string
cparaNameThe camera parameter file, which is used to form the projection matrix
Returns
true if successful, false if an error occurred
See also
arwStopRunning()
Here is the call graph for this function:

◆ arwStartRunningB()

bool arwStartRunningB ( const char *  vconf,
const char *  cparaBuff,
const int  cparaBuffLen 
)

Initialises and starts video capture.

Parameters
vconfThe video configuration string
cparaBuffA string containing the contents of a camera parameter file, which is used to form the projection matrix.
cparaBuffLenNumber of characters in cparaBuff.
Returns
true if successful, false if an error occurred
See also
arwStopRunning()
Here is the call graph for this function:

◆ arwStartRunningStereo()

bool arwStartRunningStereo ( const char *  vconfL,
const char *  cparaNameL,
const char *  vconfR,
const char *  cparaNameR,
const char *  transL2RName 
)
Here is the call graph for this function:

◆ arwStartRunningStereoB()

bool arwStartRunningStereoB ( const char *  vconfL,
const char *  cparaBuffL,
const int  cparaBuffLenL,
const char *  vconfR,
const char *  cparaBuffR,
const int  cparaBuffLenR,
const char *  transL2RBuff,
const int  transL2RBuffLen 
)
Here is the call graph for this function:

◆ arwStopRunning()

bool arwStopRunning ( )

Stops video capture and frees video capture resources.

Returns
true if successful, false if an error occurred
See also
arwStartRunning()
Here is the call graph for this function:

◆ arwUpdateAR()

bool arwUpdateAR ( )

Performs tracking and trackable updates.

The newest frame from the video source is retrieved and analysed. All loaded trackables are updated.

Returns
true if successful, false if an error occurred
Here is the call graph for this function:

◆ arwUpdateTexture32()

bool arwUpdateTexture32 ( uint32_t *  buffer)

Asks the video source to push the most recent frame into the passed-in buffer.

Parameters
bufferPointer to a buffer of pixels (of type 'uint32_t') to be filled with video. It is the caller's responsibility to ensure that the buffer is of sufficient size, e.g. using arwGetVideoParams. The pixels are RGBA in little-endian systems, or ABGR in big-endian systems.
Returns
true if successful, false if an error occurred
Here is the call graph for this function:

◆ arwUpdateTexture32Stereo()

bool arwUpdateTexture32Stereo ( uint32_t *  bufferL,
uint32_t *  bufferR 
)

Asks the video source to push the most recent stereo frame into the passed-in buffer.

Parameters
bufferLPointer to a buffer of pixels (of type 'uint32_t') to be filled with video from the left camera. It is the caller's responsibility to ensure that the buffer is of sufficient size, e.g. using arwGetVideoParamsStereo. The pixels are RGBA in little-endian systems, or ABGR in big-endian systems.
bufferRPointer to a buffer of pixels (of type 'uint32_t') to be filled with video from the right camera. It is the caller's responsibility to ensure that the buffer is of sufficient size, e.g. using arwGetVideoParamsStereo. The pixels are RGBA in little-endian systems, or ABGR in big-endian systems.
Returns
true if successful, false if an error occurred
Here is the call graph for this function: