#include <SoTransparency.h>
|
| virtual void | GLRender (SoGLRenderAction *action) |
| virtual void | callback (SoCallbackAction *action) |
| virtual void | doAction (SoAction *action) |
Definition at line 20 of file SoTransparency.h.
◆ SoTransparency()
| SoTransparency::SoTransparency |
( |
| ) |
|
◆ callback()
| void SoTransparency::callback |
( |
SoCallbackAction * | action | ) |
|
|
protectedvirtual |
◆ doAction()
| void SoTransparency::doAction |
( |
SoAction * | action | ) |
|
|
protectedvirtual |
Definition at line 70 of file SoTransparency.cxx.
71{
72
73
75 return;
76
77 const float isRelative =
relative.getValue();
79 if ( isRelative && transpVal<=0.0f )
80 return;
81
82 const SoTransparencyElement * STE = SoTransparencyElement::getInstance(
action->getState() );
83 const int n = STE->getNum();
84 if (n<=0)
85 return;
86
87 float * finalTransparency =
new float[
n];
88 for (
int i = 0;
i <
n;
i++)
89 finalTransparency[i] = std::min<float>( 1.0f, std::max<float>( 0.0f, ( isRelative ? ( 1.0 - (1.0 - transpVal) * (1.0 - STE->get(0)) ) : transpVal ) ) );
90
91 SoTransparencyElement::set(
action->getState(),
this, n, finalTransparency);
92
93}
◆ GLRender()
| void SoTransparency::GLRender |
( |
SoGLRenderAction * | action | ) |
|
|
protectedvirtual |
Definition at line 55 of file SoTransparency.cxx.
56{
58 SoMaterialBundle
mb(action);
60}
const double mb
1mb to cm2
◆ initClass()
| void SoTransparency::initClass |
( |
| ) |
|
|
static |
Definition at line 29 of file SoTransparency.cxx.
30{
31 [[maybe_unused]] static const bool didInit = [&]() {
33 return true;
34 }();
35}
◆ SO_NODE_HEADER()
◆ ~SoTransparency()
| SoTransparency::~SoTransparency |
( |
| ) |
|
|
privatevirtual |
◆ relative
| SoSFBool SoTransparency::relative |
◆ transparency
| SoSFFloat SoTransparency::transparency |
The documentation for this class was generated from the following files: