HDK
|
#include <APEX_COW.h>
Public Member Functions | |
ApexGeometry () | |
Construct an empty ApexGeometry. More... | |
ApexGeometry (const GU_DetailHandle &gdh) | |
Construct an ApexGeometry referencing a GU_DetailHandle. More... | |
ApexGeometry (GU_DetailHandle &&gdh) | |
Construct an ApexGeometry referencing a GU_DetailHandle. More... | |
ApexGeometry (const ApexGeometry &other) | |
ApexGeometry (ApexGeometry &&other) noexcept | |
ApexGeometry & | operator= (const ApexGeometry &other) |
ApexGeometry & | operator= (ApexGeometry &&other) noexcept |
~ApexGeometry () | |
bool | isUnique () const |
Returns whether the geometry is unique - if so, asUnsafeHandle can be used safely. More... | |
void | makeUnique (bool for_overwrite=false) |
GU_Detail & | operator* () |
Return a reference to the underlying GU_Detail, ensuring uniqueness. More... | |
const GU_Detail & | operator* () const |
Return a const reference to the underlying GU_Detail, without ensuring uniqueness. More... | |
GU_Detail * | operator-> () |
Access the underlying GU_Detail, ensuring uniqueness. More... | |
const GU_Detail * | operator-> () const |
Access the underlying const GU_Detail, without ensuring uniqueness. More... | |
GU_Detail * | gdp () |
Access the underlying GU_Detail, ensuring uniqueness. More... | |
GU_Detail * | gdpForOverwrite () |
const GU_Detail * | gdp () const |
Access the underlying const GU_Detail, without ensuring uniqueness. More... | |
const GU_Detail & | peek () const |
Access the underlying const GU_Detail, without ensuring uniqueness. More... | |
const GU_Detail * | peekPtr () const |
Access the underlying const GU_Detail *, without ensuring uniqueness. More... | |
GU_DetailHandle & | asUnsafeHandle (bool for_overwrite=false) |
GU_DetailHandle & | asSafeHandle () |
Access the underlying GU_DetailHandle while first ensuring it is unique. More... | |
GU_ConstDetailHandle | asConstHandle (bool force_copy=false, GA_DataIdStrategy explicit_strategy=GA_DATA_ID_CLONE) const |
Static Public Member Functions | |
static APEX_API const ApexGeometry & | getStaticEmptyGeometry () |
APEX wrapper for geometry via GU_DetailHandle. Keeps a much stronger COW guarantee than a raw GU_DetailHandle by using preserve requests to track active APEX-side references to geo. Additionally, it lazily clears geo when reset to its default state via operator= to keep operations like replaceWith and stashAll fast.
Definition at line 138 of file APEX_COW.h.
|
inline |
Construct an empty ApexGeometry.
Definition at line 142 of file APEX_COW.h.
|
inline |
Construct an ApexGeometry referencing a GU_DetailHandle.
Definition at line 150 of file APEX_COW.h.
|
inline |
Construct an ApexGeometry referencing a GU_DetailHandle.
Definition at line 156 of file APEX_COW.h.
|
inline |
Definition at line 164 of file APEX_COW.h.
|
inlinenoexcept |
Definition at line 179 of file APEX_COW.h.
|
inline |
Definition at line 271 of file APEX_COW.h.
|
inline |
Create a GU_ConstDetailHandle aliasing the current handle; if the calling code will cast away the const, force_copy can be set to call duplicateGeometry first (with the default clone data ID strategy).
Definition at line 429 of file APEX_COW.h.
|
inline |
Access the underlying GU_DetailHandle while first ensuring it is unique.
Definition at line 420 of file APEX_COW.h.
|
inline |
Access the underlying detail handle, while only ensuring it is valid (i.e. without ensuring there are no other APEX references to it). Calling code should respect the rule that >1 preserveRequest means that other ApexGeometry objects are expecting the geo not to change.
Definition at line 405 of file APEX_COW.h.
|
inline |
Access the underlying GU_Detail, ensuring uniqueness.
Definition at line 378 of file APEX_COW.h.
|
inline |
Access the underlying const GU_Detail, without ensuring uniqueness.
Definition at line 393 of file APEX_COW.h.
|
inline |
Access the underlying GU_Detail. If the geometry is currently stashed, this can return the old stale geometry so long as it is unique. Otherwise, in any case where the normal access logic would perform a copy, this will return an empty geometry object instead - only returning the actual current data for an unstashed geometry if it is already unique.
This is useful for operations that will completely overwrite the contained geometry.
Definition at line 386 of file APEX_COW.h.
|
static |
|
inline |
Returns whether the geometry is unique - if so, asUnsafeHandle can be used safely.
Definition at line 278 of file APEX_COW.h.
|
inline |
Ensures the underlying GU_DetailHandle is not being aliased. If for_overwrite is passed, the caller does not care about the actual contents of the geometry - it can be cleared if that would be faster than performing a copy, and stale data should be kept if doing so would not cause aliasing.
Definition at line 284 of file APEX_COW.h.
|
inline |
Return a reference to the underlying GU_Detail, ensuring uniqueness.
Definition at line 350 of file APEX_COW.h.
|
inline |
Return a const reference to the underlying GU_Detail, without ensuring uniqueness.
Definition at line 356 of file APEX_COW.h.
|
inline |
Access the underlying GU_Detail, ensuring uniqueness.
Definition at line 363 of file APEX_COW.h.
|
inline |
Access the underlying const GU_Detail, without ensuring uniqueness.
Definition at line 370 of file APEX_COW.h.
|
inline |
Definition at line 194 of file APEX_COW.h.
|
inlinenoexcept |
Definition at line 231 of file APEX_COW.h.
|
inline |
Access the underlying const GU_Detail, without ensuring uniqueness.
Definition at line 396 of file APEX_COW.h.
|
inline |
Access the underlying const GU_Detail *, without ensuring uniqueness.
Definition at line 399 of file APEX_COW.h.