# ReferenceKey

class ReferenceKey : public HPS::GeometryKey

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

  Public Functions

  ModellingMatrixControl 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.

  ModellingMatrixControl const 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.

  Key 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.

  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.

  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_that – An rvalue reference to a ReferenceKey to take the impl from.

    Returns:

      A reference to this ReferenceKey.

  ReferenceKey &operator=(ReferenceKey const &in_that)

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

    Parameters:

      in_that – The source ReferenceKey for the assignment.

    Returns:

      A reference to this ReferenceKey.

  ReferenceKey()

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

  explicit ReferenceKey(Key const &in_that)

    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_key – The source Key to copy.

  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_that – An rvalue reference to a ReferenceKey to take the impl from.

  ReferenceKey(ReferenceKey const &in_that)

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

    Parameters:

      in_that – The source ReferenceKey to copy.

  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.

    See also

    SegmentKey::SetCondition

    See also

    ConditionControl::SetCondition

    See also

    ConditionControl::AddCondition

    Parameters:

      in_conditional – The conditional expression for this ReferenceKey.

    Returns:

      A reference to this ReferenceKey.

  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_types – The geometry types to be processed by this reference.

  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_kit – The material mappings to set on this ReferenceKey.

    Returns:

      A reference to this ReferenceKey.

  void SetModellingMatrix(MatrixKit const &in_kit)

    Sets the specified modelling matrix on this reference.

    Parameters:

      in_kit – The modelling matrix to set on this reference.

  bool ShowConditionalExpression(ConditionalExpression &out_conditional) const

    Shows the conditional expression for this ReferenceKey.

    Parameters:

      out_conditional – The conditional expression for this ReferenceKey.

    Returns:

      true if a conditional expression is set on this ReferenceKey, false otherwise.

  size_t 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.

  size_t 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_types – The geometry types processed by this reference.

    Returns:

      A count of masked geometry types from this reference.

  bool ShowMaterialMapping(MaterialMappingKit &out_kit) const

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

  bool ShowModellingMatrix(MatrixKit &out_kit) const

    Shows the modelling matrix on this reference.

    Parameters:

      out_kit – The modelling matrix set on this reference.

    Returns:

      true if a modelling matrix was set, false otherwise.

  size_t ShowTargets(bool masked = true) const

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

    Parameters:

      masked – If true a geometry mask if present will be applied to the results.

    Returns:

      A count of targeted geometries or a segment from this reference.

  size_t ShowTargets(KeyArray &out_keys, bool masked = true) const

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

    Parameters:

      - out_keys – The keys targeted by this reference.

      - masked – If 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.

  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.

  ReferenceKey &UnsetGeometryMask()

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

    Returns:

      A reference to this ReferenceKey.

  ReferenceKey &UnsetMaterialMapping()

    Removes all material mapping settings from this ReferenceKey.

  void UnsetModellingMatrix()

    Removes the modelling matrix on this geometry reference.

  ~ReferenceKey()

  Public Static Attributes

  static const HPS::Type staticType = HPS::Type::ReferenceKey

Hello I'm HOOPSY!

HOOPSY BETA

Hello I am HOOPSY! your Docs generative AI assistant.

Ask me anything about HOOPS Visualize HPS or choose a sample question below to start a conversation:

Additional info

HOOPSY may store chats to provide and maintain the service according to OpenAI's data policy.

This feature is currently experimental. While we are continually enhancing its performance and quality, the underlying AI model may generate inaccurate or fabricated responses, especially if prompted to do so.

New Conversation
Continue generating