#include <hps.h>

Inheritance diagram for HPS::ReferenceKey:
HPS::GeometryKey HPS::Key HPS::Object

Public Member Functions

ModellingMatrixControl GetModellingMatrixControl ()
 
ModellingMatrixControl const GetModellingMatrixControl () const
 
Key GetTarget () const
 
HPS::Type ObjectType () const
 
ReferenceKeyoperator= (ReferenceKey const &in_that)
 
ReferenceKeyoperator= (ReferenceKey &&in_that)
 
 ReferenceKey ()
 
 ReferenceKey (Key const &in_that)
 
 ReferenceKey (ReferenceKey const &in_that)
 
 ReferenceKey (ReferenceKey &&in_that)
 
ReferenceKeySetConditionalExpression (ConditionalExpression const &in_conditional)
 
ReferenceKeySetGeometryMask (SearchTypeArray const &in_geometry_types)
 
ReferenceKeySetMaterialMapping (MaterialMappingKit const &in_kit)
 
void SetModellingMatrix (MatrixKit const &in_kit)
 
bool ShowConditionalExpression (ConditionalExpression &out_conditional) const
 
size_t ShowGeometryMask () const
 
size_t ShowGeometryMask (SearchTypeArray &out_geometry_types) const
 
bool ShowMaterialMapping (MaterialMappingKit &out_kit) const
 
bool ShowModellingMatrix (MatrixKit &out_kit) const
 
size_t ShowTargets (bool masked=true) const
 
size_t ShowTargets (KeyArray &out_keys, bool masked=true) const
 
ReferenceKeyUnsetConditionalExpression ()
 
ReferenceKeyUnsetGeometryMask ()
 
ReferenceKeyUnsetMaterialMapping ()
 
void UnsetModellingMatrix ()
 
- Public Member Functions inherited from HPS::GeometryKey
 GeometryKey ()
 
 GeometryKey (Key const &in_that)
 
 GeometryKey (GeometryKey const &in_that)
 
 GeometryKey (GeometryKey &&in_that)
 
GeometryKeyoperator= (GeometryKey const &in_that)
 
GeometryKeyoperator= (GeometryKey &&in_that)
 
GeometryKeySetPriority (int in_priority)
 
GeometryKeySetUserData (intptr_t in_index, size_t in_bytes, byte const in_data[])
 
GeometryKeySetUserData (intptr_t in_index, ByteArray const &in_data)
 
GeometryKeySetUserData (IntPtrTArray const &in_indices, ByteArrayArray const &in_data)
 
bool ShowBounding (BoundingKit &out_kit) const
 
bool ShowPriority (int &out_priority) const
 
size_t ShowReferrers (SegmentKeyArray &out_segments) const
 
size_t ShowReferrers (ReferenceKeyArray &out_references) const
 
bool ShowUserData (intptr_t in_index, ByteArray &out_data) const
 
bool ShowUserData (IntPtrTArray &out_indices, ByteArrayArray &out_data) const
 
size_t ShowUserDataCount () const
 
bool ShowUserDataIndices (IntPtrTArray &out_indices) const
 
GeometryKeyUnsetAllUserData ()
 
GeometryKeyUnsetPriority ()
 
GeometryKeyUnsetUserData (intptr_t in_index)
 
GeometryKeyUnsetUserData (size_t in_count, intptr_t const in_indices[])
 
GeometryKeyUnsetUserData (IntPtrTArray const &in_indices)
 
- Public Member Functions inherited from HPS::Key
virtual void Assign (Key const &in_that)
 
Key CopyTo (SegmentKey const &in_destination) const
 
void Delete ()
 
bool Equals (Key const &in_that) const
 
size_t GetHash () const
 
bool HasOwner () const
 
 Key ()
 
 Key (Key const &in_that)
 
 Key (Control const &in_control)
 
 Key (Key &&in_that)
 
void MoveTo (SegmentKey const &in_new_owner)
 
bool operator!= (Key const &in_that) const
 
Keyoperator= (Key &&in_that)
 
Keyoperator= (Key const &in_that)
 
bool operator== (Key const &in_that) const
 
SegmentKey Owner () const
 
SegmentKey Up () const
 
virtual ~Key ()
 
- Public Member Functions inherited from HPS::Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
 Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::ReferenceKey
 
- Static Public Attributes inherited from HPS::GeometryKey
static const HPS::Type staticType = HPS::Type::GeometryKey
 
- Static Public Attributes inherited from HPS::Key
static const HPS::Type staticType = HPS::Type::Key
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Detailed Description

The ReferenceKey class is a smart pointer to a database object. It is a handle to a geometry reference returned by SegmentKey::ReferenceGeometry.

Constructor & Destructor Documentation

◆ ReferenceKey() [1/4]

HPS::ReferenceKey::ReferenceKey ( )

The default constructor creates an uninitialized ReferenceKey object. The Type() function will return Type::None.

◆ ReferenceKey() [2/4]

HPS::ReferenceKey::ReferenceKey ( Key const &  in_that)
explicit

This constructor creates an ReferenceKey object that shares the underlying smart-pointer of the source Key. The copy will only be successful if the source key is really an upcast of a reference key. Otherwise the copy will fail and the resulting ReferenceKey will be invalid.

Parameters
in_keyThe source Key to copy.

◆ ReferenceKey() [3/4]

HPS::ReferenceKey::ReferenceKey ( ReferenceKey const &  in_that)

The copy constructor creates a ReferenceKey object that shares the underlying smart-pointer of the source ReferenceKey.

Parameters
in_thatThe source ReferenceKey to copy.

◆ ReferenceKey() [4/4]

HPS::ReferenceKey::ReferenceKey ( ReferenceKey &&  in_that)

The move constructor creates a ReferenceKey by transferring the underlying impl of the rvalue reference to this ReferenceKey thereby avoiding a copy and allocation.

Parameters
in_thatAn rvalue reference to a ReferenceKey to take the impl from.

Member Function Documentation

◆ GetModellingMatrixControl() [1/2]

ModellingMatrixControl HPS::ReferenceKey::GetModellingMatrixControl ( )

Gets a control that allows querying and modifying modelling matrices set on this reference.

Returns
A control that allows querying and modifying modelling matrices set on this reference.

◆ GetModellingMatrixControl() [2/2]

ModellingMatrixControl const HPS::ReferenceKey::GetModellingMatrixControl ( ) const

Gets a control that allows querying modelling matrices set on this reference.

Returns
A control that allows querying modelling matrices set on this reference.

◆ GetTarget()

Key HPS::ReferenceKey::GetTarget ( ) const

Gets the geometry or segment key that was used to create this ReferenceKey. If multiple geometry are referenced only the first is returned.

Returns
The geometry or segment key that was used to create this ReferenceKey.

◆ ObjectType()

HPS::Type HPS::ReferenceKey::ObjectType ( ) const
inlinevirtual

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.

Reimplemented from HPS::GeometryKey.

◆ operator=() [1/2]

ReferenceKey& HPS::ReferenceKey::operator= ( ReferenceKey const &  in_that)

Associate this ReferenceKey with the same underlying impl as the source ReferenceKey.

Parameters
in_thatThe source ReferenceKey for the assignment.
Returns
A reference to this ReferenceKey.

◆ operator=() [2/2]

ReferenceKey& HPS::ReferenceKey::operator= ( ReferenceKey &&  in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this ReferenceKey thereby avoiding a copy.

Parameters
in_thatAn rvalue reference to a ReferenceKey to take the impl from.
Returns
A reference to this ReferenceKey.

◆ SetConditionalExpression()

ReferenceKey& HPS::ReferenceKey::SetConditionalExpression ( ConditionalExpression const &  in_conditional)

Sets a conditional expression on this ReferenceKey. This will either make an unconditional reference into a conditional reference, or modify the condition for an existing conditional reference. The target geometry or segment referenced by this reference will only be drawn in the owning segment if a condition satisfying the given conditional expression is set above this reference in the tree.

Parameters
in_conditionalThe conditional expression for this ReferenceKey.
Returns
A reference to this ReferenceKey.
See also
SegmentKey::SetCondition
ConditionControl::SetCondition
ConditionControl::AddCondition

◆ SetGeometryMask()

ReferenceKey& HPS::ReferenceKey::SetGeometryMask ( SearchTypeArray const &  in_geometry_types)

Sets the masked geometry types. Only the geometry types included in the mask will be processed by this ReferenceKey. Set HPS::Search::Type::Geometry to process all geometry types.

Parameters
in_geometry_typesThe geometry types to be processed by this reference.

◆ SetMaterialMapping()

ReferenceKey& HPS::ReferenceKey::SetMaterialMapping ( MaterialMappingKit const &  in_kit)

Sets the specified material mappings on this ReferenceKey. This function will not override colors set directly on the original geometry. Light colors and Window colors are not valid on a ReferenceKey.

Parameters
in_kitThe material mappings to set on this ReferenceKey.
Returns
A reference to this ReferenceKey.

◆ SetModellingMatrix()

void HPS::ReferenceKey::SetModellingMatrix ( MatrixKit const &  in_kit)

Sets the specified modelling matrix on this reference.

Parameters
in_kitThe modelling matrix to set on this reference.

◆ ShowConditionalExpression()

bool HPS::ReferenceKey::ShowConditionalExpression ( ConditionalExpression out_conditional) const

Shows the conditional expression for this ReferenceKey.

Parameters
out_conditionalThe conditional expression for this ReferenceKey.
Returns
true if a conditional expression is set on this ReferenceKey, false otherwise.

◆ ShowGeometryMask() [1/2]

size_t HPS::ReferenceKey::ShowGeometryMask ( ) const

Gets the count of masked geometry types. Only the geometry types included in the mask will be processed by this ReferenceKey. If no mask was explicitly set the mask size is one and the value is HPS::Search::Type::Geometry.

Returns
A count of masked geometry types from this reference.

◆ ShowGeometryMask() [2/2]

size_t HPS::ReferenceKey::ShowGeometryMask ( SearchTypeArray out_geometry_types) const

Gets the masked geometry types. Only the geometry types included in the mask will be processed by this ReferenceKey. If no mask was explicitly set the mask size is one and the value is HPS::Search::Type::Geometry.

Parameters
out_geometry_typesThe geometry types processed by this reference.
Returns
A count of masked geometry types from this reference.

◆ ShowMaterialMapping()

bool HPS::ReferenceKey::ShowMaterialMapping ( MaterialMappingKit out_kit) const

Shows the material mapping settings on this segment. Returns false if no material mapping settings exist on this ReferenceKey.

◆ ShowModellingMatrix()

bool HPS::ReferenceKey::ShowModellingMatrix ( MatrixKit out_kit) const

Shows the modelling matrix on this reference.

Parameters
out_kitThe modelling matrix set on this reference.
Returns
true if a modelling matrix was set, false otherwise.

◆ ShowTargets() [1/2]

size_t HPS::ReferenceKey::ShowTargets ( bool  masked = true) const

Gets the count of geometry keys or a segment key targeted by this ReferenceKey.

Parameters
maskedIf true a geometry mask if present will be applied to the results.
Returns
A count of targeted geometries or a segment from this reference.

◆ ShowTargets() [2/2]

size_t HPS::ReferenceKey::ShowTargets ( KeyArray out_keys,
bool  masked = true 
) const

Gets the geometries keys or a segment key targeted by this ReferenceKey.

Parameters
out_keysThe keys targeted by this reference.
maskedIf true a geometry mask if present will be applied to the results.
Returns
A count of targeted geometries or segment from this reference and populates out_keys with their keys.

◆ UnsetConditionalExpression()

ReferenceKey& HPS::ReferenceKey::UnsetConditionalExpression ( )

Removes the conditional expression on this ReferenceKey. This will turn a conditional reference into an unconditional reference.

Returns
A reference to this ReferenceKey.

◆ UnsetGeometryMask()

ReferenceKey& HPS::ReferenceKey::UnsetGeometryMask ( )

Resets the masked geometry types on this ReferenceKey to HPS::Search::Type::Geometry.

Returns
A reference to this ReferenceKey.

◆ UnsetMaterialMapping()

ReferenceKey& HPS::ReferenceKey::UnsetMaterialMapping ( )

Removes all material mapping settings from this ReferenceKey.

◆ UnsetModellingMatrix()

void HPS::ReferenceKey::UnsetModellingMatrix ( )

Removes the modelling matrix on this geometry reference.


The documentation for this class was generated from the following file: