Private member m_aPaths in GroupInstancePath is not exported and causes a warning that can be safely ignored.
The GroupInstancePath class contains a vector of ObjectHistoryIDs, representing a path through the group and instance hierarchy starting from a given history and ending at a given object.
The last element in the vector is the selected object, and the ones before that are the group instances through which it was selected.
#include <ObjectHistoryID.h>
Public Member Functions | |
GroupInstancePath () | |
clang will give this error if =default is used here: default initialization of an object of const type requires a user-provided default constructor. | |
GroupInstancePath (size_t nTopHistory, size_t nObjectID) | |
This constructs a path from a single object in the same history where the selection was done. | |
GroupInstancePath (ObjectHistoryID const &id) | |
This constructs a path from a single object in the same history where the selection was done. | |
GroupInstancePath (WSM::GroupInstancePath const &path, size_t id) | |
This constructs a path from an existing path and a new object ID value in that same path. | |
GroupInstancePath (1::vector< ObjectHistoryID > const &aIDs) | |
These construct a path with the group selected objects. | |
GroupInstancePath (1::vector< ObjectHistoryID > &&aIDs) | |
operator bool () const | |
bool | operator< (WSM::GroupInstancePath const &r) const |
Primarily for putting the objects in std::map collections. | |
bool | operator== (WSM::GroupInstancePath const &r) const |
bool | operator!= (WSM::GroupInstancePath const &r) const |
bool | IsValid () const |
Check to see if there are enough IDs in the path and they're not invalid. | |
bool | IsAlive () const |
Check to see if everything in the path is alive. | |
void | clear () |
Set this to an invalid path. | |
ObjectHistoryID | GetFinalObjectHistoryID () const |
Get the final ObjectHistoryID from the path. | |
size_t | GetFinalHistoryID () const |
Get the history in which the final object is held. | |
size_t | GetFinalObjectID () const |
Get the ID of the final object. | |
ObjectHistoryID | GetTopObjectHistoryID () const |
Get the top ObjectHistoryID from the path. | |
size_t | GetTopHistoryID () const |
Get the ID of the history from which this path is referenced. | |
size_t | GetTopObjectID () const |
Get the ID of the first instance from which this path is referenced. | |
void | ReplaceFinalObjectID (size_t id) |
Change the ID of the object this is referencing. | |
void | AppendObjectHistoryID (ObjectHistoryID const &id) |
Combine the object with the existing path, used for combining an in-context editing path with a selected object. | |
size_t | GetEditingObjectID (GroupInstancePath const &editing) const |
Get the ID of the object in this path which is in the in context editing path. | |
void | SetToEditingObjectPath (GroupInstancePath const &editing) |
Set this GroupInstancePath to the path of the object in this GroupInstancePath which is in the in context editing path. | |
void | SetToTopObjectHistoryID () |
Strip off all but the top level object in this path. | |
Result | GetObjectTransform (Transf3d &trans) const |
Get a transform that accounts for the instance transforms, if any. | |
Result | GetObjectTransform (Transf3d &trans, Transf3d const &additional, GroupInstancePath const &after) const |
Get a transform that accounts for the instance transforms, if any while additionally applying an additional transform in the start/middle specified by supplying an "after" path. | |
template<typename T > | |
bool | LocalToWorld (T &val, const WSM::Transf3d *pPreLocalTransf3d=nullptr) const |
Converts the given object through the transform returned by GetObjectTransform. | |
template<typename T > | |
bool | WorldToLocal (T &val, const WSM::Transf3d *pPreLocalTransf3d=nullptr) const |
Converts the given object through the inverse transform returned by GetObjectTransform. | |
const ::vector< ObjectHistoryID > & | GetObjectHistoryIDs () const |
Allow read-only access to the vector of object history IDs that make up the path. | |
bool | IsPrefixOf (GroupInstancePath const &right) const |
Returns true if this path is a strict prefix of another path. | |
bool | IsFullPathOf (GroupInstancePath const &right) const |
Returns true if this path is exactly the same as all but the last entry from another path. | |
void | pop_back () |
This removes the last component from the path, effectively selecting the instance that referenced the final component. | |
void | swap (GroupInstancePath &right) |
auto | begin () const |
auto | end () const |
auto | rbegin () const |
auto | rend () const |
void | UpdateHistoryIDs (size_t nTopHistory) |
This function is used after reading in a journalized GroupInstancePath to handle history IDs that may be different than when the path was journaled. | |
|
inline |
clang will give this error if =default is used here: default initialization of an object of const type requires a user-provided default constructor.
This requirement is a standard defect (DR 253) in that it does not consider that a compiler generated default constructor fully initializes a class where all sub-objects are fully initialized by their default constructors. GCC and MSVC behave as if this DR has already been resolved.
|
inline |
This constructs a path from a single object in the same history where the selection was done.
|
inline |
This constructs a path from a single object in the same history where the selection was done.
|
inline |
This constructs a path from an existing path and a new object ID value in that same path.
|
inline |
These construct a path with the group selected objects.
|
inline |
|
inline |
Combine the object with the existing path, used for combining an in-context editing path with a selected object.
|
inline |
|
inline |
Set this to an invalid path.
|
inline |
size_t WSM::GroupInstancePath::GetEditingObjectID | ( | GroupInstancePath const & | editing | ) | const |
Get the ID of the object in this path which is in the in context editing path.
|
inline |
Get the history in which the final object is held.
|
inline |
Get the final ObjectHistoryID from the path.
If there aren't any IDs, return a default constructed (invalid) ID
|
inline |
Get the ID of the final object.
|
inline |
Allow read-only access to the vector of object history IDs that make up the path.
Get a transform that accounts for the instance transforms, if any.
If the final object is also an instance, this also includes the transform of that instance.
Result WSM::GroupInstancePath::GetObjectTransform | ( | Transf3d & | trans, |
Transf3d const & | additional, | ||
GroupInstancePath const & | after | ||
) | const |
Get a transform that accounts for the instance transforms, if any while additionally applying an additional transform in the start/middle specified by supplying an "after" path.
|
inline |
Get the ID of the history from which this path is referenced.
|
inline |
Get the top ObjectHistoryID from the path.
If there aren't any IDs, return a default constructed (invalid) ID
|
inline |
Get the ID of the first instance from which this path is referenced.
bool WSM::GroupInstancePath::IsAlive | ( | ) | const |
Check to see if everything in the path is alive.
|
inline |
Returns true if this path is exactly the same as all but the last entry from another path.
|
inline |
Returns true if this path is a strict prefix of another path.
|
inline |
Check to see if there are enough IDs in the path and they're not invalid.
|
inline |
Converts the given object through the transform returned by GetObjectTransform.
It returns true or false to indicate whether or not a change was made. This can be called with any type for which operator*=(T, WSM::Transf3d) is available. If pPreLocalTransf3d is given, it is applied first.
|
inlineexplicit |
|
inline |
|
inline |
Primarily for putting the objects in std::map collections.
|
inline |
|
inline |
This removes the last component from the path, effectively selecting the instance that referenced the final component.
|
inline |
|
inline |
|
inline |
Change the ID of the object this is referencing.
void WSM::GroupInstancePath::SetToEditingObjectPath | ( | GroupInstancePath const & | editing | ) |
Set this GroupInstancePath to the path of the object in this GroupInstancePath which is in the in context editing path.
|
inline |
Strip off all but the top level object in this path.
|
inline |
void WSM::GroupInstancePath::UpdateHistoryIDs | ( | size_t | nTopHistory | ) |
This function is used after reading in a journalized GroupInstancePath to handle history IDs that may be different than when the path was journaled.
The parameter is the current top history.
|
inline |
Converts the given object through the inverse transform returned by GetObjectTransform.
It returns true or false to indicate whether or not a change was made. This can be called with any type for which operator*=(T, WSM::Transf3d) is available. If pPreLocalTransf3d is given, it's inverse is applied last.