Rhino C++ API
8.10
|
#include <opennurbs_bounding_box.h>
Public Member Functions | |
ON_BoundingBoxCache ()=default | |
ON_BoundingBoxCache (const ON_BoundingBoxCache &)=default | |
~ON_BoundingBoxCache ()=default | |
void | AddBoundingBox (const ON_BoundingBox &bbox, const ON_SHA1_Hash &hash) |
void | AddBoundingBox (const ON_BoundingBoxAndHash &bbox_and_hash) |
unsigned int | BoundingBoxCount () const |
bool | GetBoundingBox (const ON_SHA1_Hash &hash, ON_BoundingBox &bbox) const |
ON_BoundingBoxCache & | operator= (const ON_BoundingBoxCache &)=default |
bool | Read (class ON_BinaryArchive &archive) |
void | RemoveAllBoundingBoxes () |
bool | RemoveBoundingBox (const ON_SHA1_Hash &hash) |
bool | Write (class ON_BinaryArchive &archive) const |
A class that caches 8 bounding box - hash pairs and keeps the most frequently used bounding boxes.
|
default |
|
default |
|
default |
void ON_BoundingBoxCache::AddBoundingBox | ( | const ON_BoundingBox & | bbox, |
const ON_SHA1_Hash & | hash | ||
) |
Description: Add a bounding box that can be found from a hash value. Parameters: bbox - [in] hash - [in] A hash of the information needed to create this bounding box.
void ON_BoundingBoxCache::AddBoundingBox | ( | const ON_BoundingBoxAndHash & | bbox_and_hash | ) |
unsigned int ON_BoundingBoxCache::BoundingBoxCount | ( | ) | const |
Returns: Number of cached boxes.
bool ON_BoundingBoxCache::GetBoundingBox | ( | const ON_SHA1_Hash & | hash, |
ON_BoundingBox & | bbox | ||
) | const |
Description: Get a cached bounding box. Parameters: hash - [in] bbox - [out] If the hash identifies a bounding box in the cache, then that bounding box is returned. Otherwise ON_BoundingBox::NanBoundingBox is returned. Returns: true - cached bounding box returned false - bounding box not in cache.
|
default |
bool ON_BoundingBoxCache::Read | ( | class ON_BinaryArchive & | archive | ) |
void ON_BoundingBoxCache::RemoveAllBoundingBoxes | ( | ) |
Description: Removes all bounding boxes. Remarks: If the hash values you are using are correctly computed and include all information that the bounding box depends on, then you never need to remove bounding boxes. Unused ones will get removed as new ones are added. If the hash does not include all information required to compute the bounding boxes, then call RemoveAllBoundingBoxes() when the non-hashed information changes.
bool ON_BoundingBoxCache::RemoveBoundingBox | ( | const ON_SHA1_Hash & | hash | ) |
Description: Remove a bounding box that can be found from a hash value. Parameters: hash - [in] Returns: true - hash was in the cache and removed. false - hash was not in the cache. Remarks: If the hash values you are using are correctly computed and include all information that the bounding box depends on, then you never need to remove bounding boxes. Unused ones will get removed as new ones are added.
bool ON_BoundingBoxCache::Write | ( | class ON_BinaryArchive & | archive | ) | const |