Picking Types

group FnPickingTypes

Typedefs

typedef uint64_t FnPickId

An integer that identifies a pickable object.

See pickIdToColor() to see how this can be converted into an ID color that can be used in Viewport::pickerDraw() and ViewportLayer::pickerDraw().

Functions

inline void pickIdToColor(FnPickId pickId, Vec4i &color)

Updates the given color with values that represent the given pick ID.

Given a pick ID, this returns a color that should be used when rendering the IDs for picking in the functions Viewport::pickerDraw() and ViewportLayer::pickerDraw(). Since this is a 64bit ID, this color will refer only to its first 32 lower bits.

inline void pickIdToColor(FnPickId pickId, Vec4f &color)

Updates the given color with values that represent the given pick ID.

Given a pick ID, this returns a color that should be used when rendering the IDs for picking in the functions Viewport::pickerDraw() and ViewportLayer::pickerDraw(). Since this is a 64bit ID, this color will refer only to its first 32 lower bits.

class PickedAttrsMap : public std::map<FnPickId, FnAttribute::Attribute>
#include <FnPickingTypes.h>

Maps picking IDs with an Attribute that contains information about the corresponding pickable object. This can be converted from/into a GroupAttribute that contains a string representation of the FnPickId numbers (map keys) as the child names and the Attribute objects (map values) as its children.

Public Functions

inline FnAttribute::GroupAttribute toGroupAttribute()

Utility function that returns a GroupAttribute that contains a string representation of the FnPickId numbers (map keys) as the child names and the Attribute objects (map values) as its children.

Returns:

A GroupAttribute that contains a string representation of this map.

inline void fromGroupAttribute(FnAttribute::GroupAttribute groupAttr)

Utility function that fills the map with entries from a GroupAttribute that contains a string representation of the FnPickId numbers (map keys) as the child names and the Attribute objects (map values) as its children.

Parameters:

groupAttr – The GroupAttribute to parse to fill this map.