#include <pickingaction.h>
Associate a range of picking colors / indices to a callback function. Created and handled by the PickingManger. Use a PickingMapper to ask the PickingManager for a PickingAction.
◆ getColor()
vec3 inviwo::PickingAction::getColor |
( |
size_t |
id = 0 | ) |
const |
The picking color to use for the object with local index id. This is eqvivalent to PickingManager::indexToColor(getPickingId(id))/255.0
- Parameters
-
id | the local picking index |
◆ getLocalPickingId()
size_t inviwo::PickingAction::getLocalPickingId |
( |
size_t |
globalId = 0 | ) |
const |
Returns the local picking index, the local index converted from the global index by subtracting the start id making it range from 0 to size-1
- Parameters
-
globalId | the global picking index |
◆ getPickingId()
size_t inviwo::PickingAction::getPickingId |
( |
size_t |
id = 0 | ) |
const |
Returns the global picking index, the global index can be used with the PickingManager::indexToColor(size_t index) function to get a picking color.
- Parameters
-
id | the local picking index |
◆ getSize()
size_t inviwo::PickingAction::getSize |
( |
| ) |
const |
The number of picking indices in this picking object.
◆ isIndex()
bool inviwo::PickingAction::isIndex |
( |
size_t |
globalId | ) |
const |
Check if a global picking index belongs to this picking action.
◆ setAction()
void inviwo::PickingAction::setAction |
( |
Callback |
action | ) |
|
◆ setEnabled()
void inviwo::PickingAction::setEnabled |
( |
bool |
enabled | ) |
|
Enable or disable calling of the callback action.
◆ setProcessor()
void inviwo::PickingAction::setProcessor |
( |
Processor * |
processor | ) |
|
Set the processor where the picking colors is drawn.
The documentation for this class was generated from the following files:
- pickingaction.h
- pickingaction.cpp