NVIDIA IndeX API nvidia_logo_transpbg.gif Up
icolormap.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_ICOLORMAP_H
8#define NVIDIA_INDEX_ICOLORMAP_H
9
10#include <mi/base/interface_declare.h>
11#include <nv/index/iattribute.h>
12
13namespace nv
14{
15namespace index
16{
17
22class IColormap :
23 public mi::base::Interface_declare<0x68ba9632,0xe3d6,0x4ced,0xa8,0xd7,0x32,0x0f,0x87,0x33,0xde,0x1b,
24 nv::index::IAttribute>
25{
26public:
35 virtual mi::math::Color_struct get_color(mi::Uint32 idx) const = 0;
36
41 virtual void set_color(
42 mi::Uint32 idx,
43 const mi::math::Color_struct& color) = 0;
44
50 virtual void set_colormap(
51 const mi::math::Color_struct* colormap_values,
52 mi::Uint32 nb_entries) = 0;
53
59 virtual const mi::math::Color_struct* get_colormap() const = 0;
60
63 virtual mi::Uint32 get_number_of_entries() const = 0;
64
69 mi::Uint32& min,
70 mi::Uint32& max) const = 0;
71
99 virtual void set_domain(
100 mi::Float32 value_first,
101 mi::Float32 value_last) = 0;
102
109 virtual void get_domain(
110 mi::Float32& value_first,
111 mi::Float32& value_last) const = 0;
112
116 {
124 };
125
131
137};
138
139}} // namespace index / nv
140
141#endif // NVIDIA_INDEX_ICOLORMAP_H
An abstract representation of a colormap for storing in the distributed database.
Definition: icolormap.h:25
virtual void set_color(mi::Uint32 idx, const mi::math::Color_struct &color)=0
Sets an entry of the colormap.
virtual void set_colormap(const mi::math::Color_struct *colormap_values, mi::Uint32 nb_entries)=0
Set the colormap values using an array of color values.
virtual void set_domain(mi::Float32 value_first, mi::Float32 value_last)=0
Sets the domain of the colormap, describing how source data (e.g.
virtual const mi::math::Color_struct * get_colormap() const =0
Returns a reference to the colormap array.
virtual void get_domain(mi::Float32 &value_first, mi::Float32 &value_last) const =0
Returns the domain of the colormap.
Domain_boundary_mode
Controls how data values that are outside of the colormap's domain should be treated.
Definition: icolormap.h:116
@ CLAMP_TO_TRANSPARENT
Data values outside of the domain will be considered fully transparent and therefore ignored for rend...
Definition: icolormap.h:123
@ CLAMP_TO_EDGE
Data values outside of the domain will be clamped to the domain, i.e.
Definition: icolormap.h:120
virtual mi::Uint32 get_number_of_entries() const =0
Returns the number of entries in the colormap.
virtual mi::math::Color_struct get_color(mi::Uint32 idx) const =0
Returns an entry of the colormap.
virtual void set_domain_boundary_mode(Domain_boundary_mode mode)=0
Sets the mode for handling data values outside of the colormap's domain.
virtual void get_non_transparent_range(mi::Uint32 &min, mi::Uint32 &max) const =0
Returns the range of colormap indices in which color values are non-transparent.
virtual Domain_boundary_mode get_domain_boundary_mode() const =0
Returns the mode for handling data values outside of the colormap's domain.
Base class representing attributes that can be defined in a scene description.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349