Solar
Public Member Functions | Friends | List of all members
SolAR::datastructure::FiducialMarker Class Reference

This class defines a fiducial marker datastructure. More...

#include <FiducialMarker.h>

Inheritance diagram for SolAR::datastructure::FiducialMarker:
Inheritance graph
[legend]
Collaboration diagram for SolAR::datastructure::FiducialMarker:
Collaboration graph
[legend]

Public Member Functions

 FiducialMarker ()=default
 FiducialMarker default constructor.
 
 FiducialMarker (const std::string &url, const Sizef &size, const SquaredBinaryPattern &binaryPattern)
 FiducialMarker constructor with binary pattern and size of fiducial image. More...
 
TrackableType getType () const override
 Returns the type of the Trackable object. More...
 
void setPattern (const SquaredBinaryPattern &binaryPattern)
 Sets the binary pattern of the fiducial marker. More...
 
SquaredBinaryPattern getPattern () const
 Returns the pattern of the fiducial marker. More...
 
template<typename Archive >
void serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version)
 
- Public Member Functions inherited from SolAR::datastructure::Trackable2D
 Trackable2D ()=default
 Trackable default constructor.
 
 Trackable2D (const std::string &url, const Sizef &size)
 Trackable2D constructor with url and size.
 
 Trackable2D (const std::string &url, const float &width, const float &height)
 Trackable2D constructor with url, width and height.
 
virtual ~Trackable2D ()
 Trackable2D destructor.
 
Sizef getSize () const
 Provides the size of the 2D trackable object. More...
 
float getWidth () const
 Provides the width of the 2D trackable object. More...
 
float getHeight () const
 Provides the height of the 2D trackable object. More...
 
void setSize (const Sizef &size)
 Sets the size of the 2D trackable object. More...
 
void setWidth (const float &width)
 Sets the width of the 2D trackable object. More...
 
void setHeight (const float &height)
 Sets the height of the 2D trackable object. More...
 
FrameworkReturnCode getWorldCorners (std::vector< SolAR::datastructure::Point3Df > &worldCorners) const
 Provide the position of 3D corners in world coordinate system. More...
 
template<typename Archive >
void serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version)
 
- Public Member Functions inherited from SolAR::datastructure::Trackable
 Trackable ()=default
 Trackable default constructor.
 
 Trackable (const std::string &url)
 Trackable constructor with url.
 
virtual ~Trackable ()
 Trackable destructor.
 
std::string getURL () const
 Returns the url of the trackable object. More...
 
void setURL (const std::string &url)
 Sets the url of the trackable object. More...
 
datastructure::Transform3Df getTransform3D () const
 Returns the 3D transform from the trackable object to the world coordinates system. More...
 
void setTransform3D (const datastructure::Transform3Df &transform3D)
 Sets the 3D transform to the world coordinates system. More...
 
template<typename Archive >
void serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename JsonType >
void to_json (JsonType &j, const FiducialMarker &marker)
 
template<typename JsonType >
void from_json (JsonType &j, FiducialMarker &marker)
 

Additional Inherited Members

- Protected Attributes inherited from SolAR::datastructure::Trackable2D
Sizef m_size
 
- Protected Attributes inherited from SolAR::datastructure::Trackable
std::string m_url
 
datastructure::Transform3Df m_transform3D = Transform3Df::Identity()
 

Detailed Description

This class defines a fiducial marker datastructure.

Constructor & Destructor Documentation

◆ FiducialMarker()

SolAR::datastructure::FiducialMarker::FiducialMarker ( const std::string &  url,
const Sizef size,
const SquaredBinaryPattern binaryPattern 
)

FiducialMarker constructor with binary pattern and size of fiducial image.

Parameters
[in]urlurl of the trackable object
[in]sizesize (width and height) of the fiducial marker image
[in]binaryPatternbinary pattern of the fiducial marker

Member Function Documentation

◆ getPattern()

SquaredBinaryPattern SolAR::datastructure::FiducialMarker::getPattern ( ) const

Returns the pattern of the fiducial marker.

Returns
SquaredBinaryPattern: the binary pattern of the fiducial marker object

◆ getType()

TrackableType SolAR::datastructure::FiducialMarker::getType ( ) const
overridevirtual

Returns the type of the Trackable object.

Returns
TrackableType: the type of the instance

Implements SolAR::datastructure::Trackable.

◆ setPattern()

void SolAR::datastructure::FiducialMarker::setPattern ( const SquaredBinaryPattern binaryPattern)

Sets the binary pattern of the fiducial marker.

Parameters
[in]binaryPatternthe binary pattern of the fiducial marker object

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