A CachingAligner wraps another Aligner and checks for precomputed alignments. More...
#include <caching_aligner.h>

Public Member Functions | |
| virtual bool | Align (const Model &source, const Model &dest, float transform[16]) const |
| Implementation of (<Aligner>"::")<Align> | |
| CachingAligner (const DatabaseManager &db_manager, const bool cache_results, const bool cache_inverse_results, const string alignment_method_name, const Aligner< Model > &aligner=Aligner< Model >()) | |
Private Member Functions | |
| bool | InvertTransform (float *, float *) const |
| A helper function to invert a 4x4 transform. | |
Private Attributes | |
| const Aligner< Model > | aligner_ |
| The Aligner that is used if the database lookup fails. | |
| const string | alignment_method_name_ |
| The ID of the alignment method to use when querying the database. | |
| const bool | cache_inverse_results_ |
| Flags for whether inverses are written back into the database. | |
| const bool | cache_results_ |
| Flags for whether computed alignments are written back into the database. | |
| const DatabaseManager & | db_manager_ |
| A DatabaseManager representing the database to query for alignments. | |
A CachingAligner wraps another Aligner and checks for precomputed alignments.
Precomputed alignments come from a database. If "cache_results_" is true, then new alignments are written back to the database, and if "cache_inverse_results" is true the inverse is cached as well. By default the wrapped Aligner is the base class, which always fails.
Definition at line 48 of file caching_aligner.h.
| db_planner::CachingAligner::CachingAligner | ( | const DatabaseManager & | db_manager, | |
| const bool | cache_results, | |||
| const bool | cache_inverse_results, | |||
| const string | alignment_method_name, | |||
| const Aligner< Model > & | aligner = Aligner<Model>() | |||
| ) | [inline] |
Definition at line 64 of file caching_aligner.h.
| virtual bool db_planner::CachingAligner::Align | ( | const Model & | source, | |
| const Model & | dest, | |||
| float | transform[16] | |||
| ) | const [inline, virtual] |
Implementation of (<Aligner>"::")<Align>
Transforms are left-multiply and column major.
Reimplemented from db_planner::Aligner< Model >.
Definition at line 77 of file caching_aligner.h.
| bool db_planner::CachingAligner::InvertTransform | ( | float * | , | |
| float * | ||||
| ) | const [inline, private] |
A helper function to invert a 4x4 transform.
Definition at line 61 of file caching_aligner.h.
const Aligner<Model> db_planner::CachingAligner::aligner_ [private] |
The Aligner that is used if the database lookup fails.
Definition at line 59 of file caching_aligner.h.
const string db_planner::CachingAligner::alignment_method_name_ [private] |
The ID of the alignment method to use when querying the database.
Definition at line 57 of file caching_aligner.h.
const bool db_planner::CachingAligner::cache_inverse_results_ [private] |
Flags for whether inverses are written back into the database.
Definition at line 55 of file caching_aligner.h.
const bool db_planner::CachingAligner::cache_results_ [private] |
Flags for whether computed alignments are written back into the database.
Definition at line 53 of file caching_aligner.h.
const DatabaseManager& db_planner::CachingAligner::db_manager_ [private] |
A DatabaseManager representing the database to query for alignments.
Definition at line 51 of file caching_aligner.h.