OOC
-
class OOC
The OOC class contains objects used for importing OOC files.
Public Types
-
enum class IOResult
Designates the status of an IO operation.
Values:
-
enumerator Success
-
enumerator ErrorInvalidPointCloud
-
enumerator ErrorUnknownFailure
-
enumerator ErrorNoOOCView
-
enumerator ErrorCyclicFileDependencies
-
enumerator ErrorSerializationFailure
-
enumerator ErrorDeserializationFailure
-
enumerator ErrorIllegalFileName
-
enumerator ErrorFileSystemFailure
-
enumerator ErrorOOCRootAlreadyExists
-
enumerator ErrorInvalidBuffer
-
enumerator Success
-
typedef std::vector<PointCloud, HPS::Allocator<PointCloud>> PointCloudArray
Public Members
-
class OOC_API PointCloud
-
class OOC_API QueryFilter
-
class OOC_API QueryIterator
-
class OOC_API QueryResult
-
class OOC_API SynchronizedActions
-
class Area
The Area class is represents a quadrilateral area for highlighting.
Public Functions
-
inline Area()
-
inline Area(HPS::Rectangle const &in_rect, HPS::MatrixKit const &in_world_to_window, char const *in_name)
-
inline Area()
-
class AreaHighlightTracker
Override this class to customize Area Highlighting.
Public Functions
-
void AddArea(HPS::Rectangle const &in_rect, HPS::MatrixKit const &in_world_to_window, bool in_clear)
Adds an Area to track.
-
void AddPoint(HPS::WorldPoint const &in_point, bool in_clear)
Adds a world space point to track.
- Parameters:
in_point – The world space point being tracking.
in_clear – Indicates if all preexisting point should be removed before adding this new point.
-
void AddSection(HPS::PlaneArray const &in_planes, bool in_clear = false)
Adds a CuttingSection to track.
- Parameters:
in_planes – The section to also track.
in_clear – Indicates if all preexisting Sections should be removed before adding this new Section.
-
AreaHighlightTracker(HPS::Canvas const &in_canvas, HPS::SegmentKey const &in_area_cameras)
-
void Clear()
Removes all Areas from this object.
-
bool Empty() const
Returns true if this object is not tracking any Areas.
-
HPS::SegmentKey const &GetAreaCameraSegment() const
Returns the Camera SegmentKey associated with this object.
-
bool GetInspecting() const
-
bool Intersects(HPS::Point const &world_space_point) const
Determines if a point intersects any of the tracked Areas.
- Parameters:
world_space_point – The point to test
- Returns:
true if the point intersects one of the tracked Areas, false otherwise.
-
bool Intersects(HPS::SimpleCuboid const &world_space_bounding) const
Determines if a cuboid intersects any of the tracked Areas.
- Parameters:
world_space_bounding – The cuboid to test
- Returns:
true if the cuboid intersects one of the tracked Areas, false otherwise.
-
virtual ~AreaHighlightTracker()
-
void AddArea(HPS::Rectangle const &in_rect, HPS::MatrixKit const &in_world_to_window, bool in_clear)
-
class File
The File class provides functions to import OOC files.
Public Static Functions
-
static ImportNotifier Import(char const *in_file_name, ImportOptionsKit const &in_options)
Performs an asynchronous import of the specified OOC file with the provided options. May throw an IOException prior to starting the asynchronous import.
- Deprecated:
This function has been deprecated, please use Import with an ImportNotifier as parameter.
-
static void Import(char const *in_file_name, ImportOptionsKit const &in_options, ImportNotifier in_notifier)
Performs an asynchronous import of the specified OOC file with the provided options. May throw an IOException prior to starting the asynchronous import.
-
static ImportNotifier Import(char const *in_file_name, ImportOptionsKit const &in_options)
-
class ImportNotifier : public HPS::IONotifier
The ImportNotifier class is a smart-pointer that is tied to a file import. It is used to interact with an ongoing import or get the results from a completed import.
Public Functions
-
void Assign(ImportNotifier const &in_that)
Associate this ImportNotifier with the same file import as the source ImportNotifier.
- Parameters:
in_that – The source ImportNotifier for the assignment.
-
HPS::Model &GetTarget() const
Get the the Model where the OOC data was imported into. Throws an IOException if the import is not complete or was not successful.
- Returns:
The ImportResultsKit for a successful file import.
-
ImportNotifier()
The default constructor creates an ImportNotifier object which is not tied to any file import.
-
ImportNotifier(ImportNotifier &&in_that)
The move constructor creates an ImportNotifier by transferring the underlying impl of the rvalue reference to this ImportNotifier thereby avoiding a copy and allocation.
- Parameters:
in_that – An rvalue reference to an ImportNotifier to take the impl from.
-
ImportNotifier(ImportNotifier const &in_that)
The copy constructor creates a new ImportNotifier object that is associated with the same file import as the source ImportNotifier.
- Parameters:
in_that – The source ImportNotifier to copy.
-
ImportNotifier(IONotifier const &in_that)
The conversion constructor creates a new derived ImportNotifier object from a base IONotifier object. The copy will only be successful if the source notifier is really an upcast of this notifier type. Otherwise the copy will fail and the resulting ImportNotifier will be invalid.
- Parameters:
in_that – The source IONotifier to copy.
-
inline virtual HPS::Type ObjectType() const
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Returns:
The declared type of the object in question, which may differ from the true, underlying type.
-
ImportNotifier &operator=(ImportNotifier &&in_that)
The move assignment operator transfers the underlying impl of the rvalue reference to this ImportNotifier thereby avoiding a copy.
- Parameters:
in_that – An rvalue reference to an ImportNotifier to take the impl from.
- Returns:
A reference to this ImportNotfier.
-
ImportNotifier &operator=(ImportNotifier const &in_that)
Associate this ImportNotifier with the same file import as the source ImportNotifier.
- Parameters:
in_that – The source ImportNotifier for the assignment.
- Returns:
A reference to this ImportNotifier.
-
virtual ~ImportNotifier()
-
void Assign(ImportNotifier const &in_that)
-
class ImportOptionsKit : public HPS::Sprocket
The ImportOptionsKit class is a user space object. It contains settings controlling what and how data is imported via OOC.
Public Functions
-
virtual bool Empty() const
Indicates whether this ImportOptionsKit has any values set on it.
- Returns:
true if no values are set on this ImportOptionsKit, false otherwise.
-
bool Equals(ImportOptionsKit const &in_kit) const
Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.
- Parameters:
in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit.
- Returns:
true if the objects are equivalent, false otherwise.
-
ImportOptionsKit()
The default constructor creates an empty ImportOptionsKit object.
-
ImportOptionsKit(ImportOptionsKit &&in_that)
The move constructor creates an ImportOptionsKit by transferring the underlying impl of the rvalue reference to this ImportOptionsKit thereby avoiding a copy and allocation.
- Parameters:
in_that – An rvalue reference to an ImportOptionsKit to take the impl from.
-
ImportOptionsKit(ImportOptionsKit const &in_kit)
The copy constructor creates a new ImportOptionsKit object that contains the same settings as the source ImportOptionsKit.
- Parameters:
in_kit – The source ImportOptionsKit to copy.
-
inline virtual HPS::Type ObjectType() const
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Returns:
The declared type of the object in question, which may differ from the true, underlying type.
-
bool operator!=(ImportOptionsKit const &in_kit) const
Check if the source ImportOptionsKit is not equivalent to this ImportOptionsKit.
- Parameters:
in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit.
- Returns:
true if the objects are not equivalent, false otherwise.
-
ImportOptionsKit &operator=(ImportOptionsKit &&in_that)
The move assignment operator transfers the underlying impl of the rvalue reference to this ImportOptionsKit thereby avoiding a copy.
- Parameters:
in_that – An rvalue reference to an ImportOptionsKit to take the impl from.
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &operator=(ImportOptionsKit const &in_kit)
Copies the source ImportOptionsKit into this ImportOptionsKit.
- Parameters:
in_kit – The source ImportOptionsKit to copy.
- Returns:
A reference to this ImportOptionsKit.
-
bool operator==(ImportOptionsKit const &in_kit) const
Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.
- Parameters:
in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit.
- Returns:
true if the objects are equivalent, false otherwise.
-
void Set(ImportOptionsKit const &in_kit)
Copies the source ImportOptionsKit into this ImportOptionsKit.
- Parameters:
in_kit – The source ImportOptionsKit to copy.
-
ImportOptionsKit &SetAreaHighlightTracker(HPS::OOC::AreaHighlightTracker &in_area_highlight_tracker)
Sets the AreaHighlightTracker.
Note
You should pass in an instance of a class that derives from AreaHighlightTracker that implements your desired behavior.
- Parameters:
in_area_highlight_tracker – The AreaHighlightTracker to use for this
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &SetCenterBounding(bool in_center_bounding)
Configures the model set a transform to the center of the bounding.
- Parameters:
in_center_bounding – The new center bounding setting
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &SetManualUpdates(bool in_manual_updates)
Configures the model to only load based on manual updates.
- Parameters:
in_manual_updates – The new manual update setting
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &SetTarget(HPS::Model const &in_target)
Uses the Model to set the root segment, library segment, and portfolio where the data will be imported.
- Parameters:
in_model – Model to use to implicitly set Segment, Library and Portfolio into which the data will be imported.
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &SetTranslation(double in_x, double in_y, double in_z)
Configures a translate to be set on the model.
- Parameters:
in_x – The x translate
in_y – The y translate
in_z – The z translate
- Returns:
A reference to this ImportOptionsKit.
-
void Show(ImportOptionsKit &out_kit) const
Copies this ImportOptionsKit into the given ImportOptionsKit.
- Parameters:
out_kit – The ImportOptionsKit to populate with the contents of this ImportOptionsKit.
-
bool ShowCenterBounding(bool &out_center_bounding) const
Shows if the model is configured to transform to the center of the bounding.
- Parameters:
out_center_bounding – The current center bounding setting
- Returns:
Returns false if there is no manual update setting.
-
bool ShowManualUpdates(bool &out_manual_updates) const
Shows if the model is configured to only load based on manual updates.
- Parameters:
out_manual_updates – The current manual update setting
- Returns:
Returns false if there is no manual update setting.
-
bool ShowTarget(HPS::Model &out_model) const
Shows the root and library segments and portfolio where the data will be imported. If no segments are specified, root segments will be created for this purpose during import.
- Parameters:
out_model – Model to use to implicitly set Segment, Library and Portfolio into which the data will be imported.
- Returns:
Returns false if there is no target, false otherwise.
-
bool ShowTranslation(double &out_x, double &out_y, double &out_z) const
Shows if a translate is set.
- Parameters:
out_x – The x translate
out_y – The y translate
out_z – The z translate
- Returns:
Returns false if there is no manual update setting.
-
ImportOptionsKit &UnsetAreaHighlightTracker()
Removes the AreaHighlightTracker.
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &UnsetCenterBounding()
Removes the center bounding setting.
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &UnsetEverything()
Removes all settings from this ImportOptionsKit.
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &UnsetManualUpdates()
Removes the manual update setting.
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &UnsetTarget()
Removes the target and library segments, and Model import state.
- Returns:
A reference to this ImportOptionsKit.
-
ImportOptionsKit &UnsetTranslation()
Removes a translate setting.
- Returns:
A reference to this ImportOptionsKit.
-
virtual ~ImportOptionsKit()
Public Static Functions
-
static ImportOptionsKit GetDefault()
Creates an ImportOptionsKit which contains the default settings. The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default. These values will be used for import unless an option is overridden by the options passed to File::Import.
- Returns:
An ImportOptionsKit with the default settings.
-
virtual bool Empty() const
-
class NodeHandle
Public Functions
-
bool Empty() const
Check the state of the NodeHandle.
- Returns:
Returns true if this NodeHandle doesn’t exist.
-
bool Equals(NodeHandle const &other) const
-
HPS::SegmentKey GetSegment() const
Get the SegementKey associated with this node.
- Returns:
Returns the SegmentKey, if any.
-
HPS::ShellKey GetShell() const
Get the ShellKey associated with this node. This is unsynchronized.
- Returns:
Returns the ShellKey, if any.
-
NodeHandle(NodeHandle &&that)
-
bool operator!=(NodeHandle const &other) const
-
NodeHandle &operator=(NodeHandle &&other)
-
bool operator==(NodeHandle const &other) const
-
~NodeHandle()
Friends
- friend class HPS::OOC::FilterForwarder
- friend class HPS::OOC::PointCloud
- friend class HPS::OOC::QueryIterator
- friend class HPS::OOC::SynchronizedActions
-
bool Empty() const
-
class PointCloud
The PointCloud class provides interactions with a OOC point cloud.
Public Functions
-
size_t AddPoints(HPS::PointArray const &points, HPS::FloatArray const &intensities, HPS::RGBColorArray const &color)
Add points to the point cloud, and remove points outside of the bounding box.
- Parameters:
points – The points to add
intensities – The intensities for each points
color – The color for each points
- Returns:
number of points added
-
IOResult CommitDeltasToFile()
Saves to disk any changes made to the point cloud. Beware that moving or renaming dependent files will impact the saved delta file (OOCD) because the OOCD file references them. The most likely result would be that the file cannot be loaded.
A file is generated in the directory xxx/yyy_deltas/ as zzz.oocd where
xxx is the root directory for the OOC files
yyy is given by xxx/yyy.ooc
zzz is the generated file_name for the changes saved to disk.
Example: C:/some_dir/ooc_house_root/house.ooc C:/some_dir/ooc_house_root/house_deltas/00535fe253-0000251e.oocd Here
xxx is C:/some_dir/ooc_house_root
yyy is house
zzz is 00535fe253-0000251e
- Returns:
an IOResult return code.
-
bool DeleteFromPointCloud(HPS::OOC::AreaHighlightTracker &tracker)
Deletes points that intersect the areas from the provided tracker.
- Returns:
Returns true if no error occurs Returns false otherwise.
-
void Destroy()
Releases and removes point cloud. This is automatic when model is deleted.
-
bool Empty()
Check the state of the PointCloud.
- Returns:
Returns true if this PointCloud doesn’t exist.
-
bool Equals(PointCloud const &other) const
-
void Export()
Export the point cloud to the ooc file
-
NodeHandle GetNodeHandle(HPS::SegmentKey const &node_key)
Get a NodeHandle associated with a specific segment.
- Parameters:
node_key – The SegmentKey for the requested Node.
- Returns:
Returns the NodeHandle for the provided segment.
-
HPS::SegmentKey GetSegment()
Gets a the top segment for this PointCloud.
- Returns:
Returns the top segment for this PointCloud.
-
bool HasUncommittedDeltas()
Queries whether or not there are any uncommitted deltas in memory for a particular PointCloud.
- Returns:
Returns true if there have been any changes made to the point cloud that have not been committed to disk. Returns false otherwise.
-
bool operator!=(PointCloud const &other) const
-
PointCloud &operator=(PointCloud &&other)
-
bool operator==(PointCloud const &other) const
-
PointCloud()
Constructs an uninitialized point cloud.
- Returns:
The uninitialized point cloud.
-
PointCloud(HPS::Model const &in_model)
Retrieve an already displayed point cloud under an existing Model.
- Returns:
The point cloud.
-
PointCloud(HPS::Model const &in_model, OOC::PointCloudOptions const &pointCloudOptions)
Constructs a new point cloud under an existing Model, with a bounding box.
- Parameters:
in_model – HPS::Model to use
pointCloudOptions – Options for the new PointCloud
-
PointCloud(PointCloud &&that)
Move constructs a point cloud from an existing one.
- Returns:
The point cloud.
-
bool PollUpdateNeeded()
Used with manual updates load option. If this returns true an Update must be called on the model.
- Returns:
Returns true if the model must be updated otherwise it returns false.
-
OOC::QueryIterator QueryPoints(QueryFilter &filter)
Begin a query.
- Parameters:
filter – The filter to apply to the query.
- Returns:
Returns the QueryIterator.
-
void Release()
Removes ooc hooks. This is automatic when model is deleted.
-
HPS::OOC::SynchronizedActions::Result Synchronize(Synchronized &synchronized)
Begin a synchronized action.
- Parameters:
synchronized – The object to synchronize.
- Returns:
Returns the result of the synchronized actions.
-
~PointCloud()
-
size_t AddPoints(HPS::PointArray const &points, HPS::FloatArray const &intensities, HPS::RGBColorArray const &color)
-
class PointCloudOptions
Public Functions
-
class QueryFilter
QueryFilter is an class used to indicate what point data should be retrieved from OOC::PointCloud::QueryPoints. The default QueryFilter rejects nothing.
Public Functions
-
inline virtual bool AcceptPoint(Point const &point, size_t point_index)
Determines whether or not a single point is accepted by the filter.
- Parameters:
point – The coordinates of the point to accept or not in object space.
point_index – The index of the point to accept or not.
- Returns:
Returns true if the point is accepted. Returns false otherwise.
-
inline QueryFilter()
-
inline virtual bool RejectBounding(Point const &min_bound, Point const &max_bound)
Determines whether or not a bounding box of points is rejected by the filter.
- Parameters:
min_bound – The minimum corner of the bounding box to accept or reject in object space.
max_bound – The maximum corner of the bounding box to accept or reject in object space.
- Returns:
Returns true if the bounding is rejected. Returns false otherwise.
-
inline virtual bool RejectNode(NodeHandle const &node_handle)
Determines whether or not a point cloud node is rejected by the filter.
- Parameters:
node_handle – The handle of the node to accept or reject.
- Returns:
Returns true if the node is rejected. Returns false otherwise.
-
inline virtual bool RejectPointsInMemory()
Determines whether or not points in memory are rejected by the filter.
- Returns:
Returns true if the filter rejects points that are loaded into memory. Returns false otherwise.
-
inline virtual bool RejectPointsOnDisk()
Determines whether or not points not in memory are rejected by the filter.
- Returns:
Returns true if the filter rejects points that are not loaded into memory. Returns false otherwise.
-
inline virtual ~QueryFilter()
-
inline virtual bool AcceptPoint(Point const &point, size_t point_index)
-
class QueryIterator
The iterator returned from a call to OOC::PointCloud::QueryPoints.
Public Types
Public Functions
-
NodeHandle GetNodeHandle() const
Yields the currently processed point’s node handle.
- Returns:
the node handle of the current result
-
Point GetNodePoint() const
Yields the currently processed point’s coordinates in object space.
- Returns:
the object space coordinates for the point of the current result
-
RGBColor GetNodePointColor() const
Yields the currently processed point’s RGB color.
- Returns:
the RGB color for the point of the current result
-
size_t GetNodePointIndex() const
Yields the currently processed point’s index.
- Returns:
the index for the point of the current result.
-
Storage GetStorage() const
Yields the currently processed point’s storage.
- Returns:
the storage for the point of the current result.
-
void Next()
Advances the iterator to the next point result. This is only legal to call when this->GetStatus() returns OOC::QueryIterator::Status::Alive.
-
QueryIterator &operator=(QueryIterator &&other)
-
QueryIterator()
Constructs a dead query iterator.
- Returns:
The dead iterator
-
QueryIterator(QueryIterator &&other)
Constructs a query iterator from another with the same state and progress of other.
- Returns:
The query iterator to construct from.
-
~QueryIterator()
Friends
- friend class HPS::OOC::PointCloud
-
NodeHandle GetNodeHandle() const
-
class Synchronized
Override this class to access SynchronizedActions on a point cloud.
Public Functions
-
inline virtual HPS::OOC::SynchronizedActions::Result Actions(SynchronizedActions const &actions)
A virtual function for performing actions on a point cloud in a synchronized mannor. Override this function to call SynchronizedActions on a point cloud by calling PointCloud::Synchronize.
- Parameters:
actions – A SynchronizedActions object that enables you to perform delete and optimize operations on the point cloud.
- Returns:
The result of the action.
-
Synchronized()
-
virtual ~Synchronized()
-
inline virtual HPS::OOC::SynchronizedActions::Result Actions(SynchronizedActions const &actions)
-
class SynchronizedActions
This class provides ways to create and optimize OOC deltas.
Public Types
-
enum class Result
Designates the result of an synchronized action.
Values:
-
enumerator Success
-
enumerator ErrorInvalidNode
-
enumerator ErrorInvalidPointCloud
-
enumerator ErrorUnknownFailure
-
enumerator ErrorInternalFailure
-
enumerator ErrorCouldNotFindNode
-
enumerator ErrorInputIndicesAreNotStrictlyIncreasing
-
enumerator ErrorIllegalInputIndices
-
enumerator ErrorCorruptNode
-
enumerator ErrorFileSystemFailure
-
enumerator Success
Public Functions
-
Result DeleteNode(NodeHandle const &node_handle) const
Remove a whole node in the OOC model.
- Parameters:
node_handle – The node to apply to delete from the point cloud.
- Returns:
The result of the action.
-
Result DeleteSpecificPoints(NodeHandle const &node_handle, HPS::Int32Array const &point_indices) const
Remove a specific points from node in the OOC model.
- Parameters:
node_handle – The node to apply to delete points from.
point_indices – The indices of points to delete from the point cloud.
- Returns:
The result of the action.
-
Result DeleteSpecificPoints(NodeHandle const &node_handle, int32_t const point_indices[], size_t count) const
Remove a specific points from node in the OOC model.
- Parameters:
node_handle – The node to apply to delete points from.
point_indices – The indices of points to delete from the point cloud.
count – The number of indices provided.
- Returns:
The result of the action.
Friends
- friend class HPS::OOC::PointCloud
-
enum class Result
-
enum class IOResult