Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_graphics
Elements
TranslucentElem.cpp
Go to the documentation of this file.
1
#include "
TranslucentElem.hpp
"
2
3
namespace
iv
4
{
5
6
TranslucentElem::TranslucentElem
(
Elem
* elem ) :
7
cm( elem->instance(), this,
"TranslucentElem"
,
ClientMarker
::Status() ),
8
attr_preblend( &this->cm,
float4
( 0, 0, 0, 0 ) ),
9
attr_translucent( &this->cm, false ),
10
_elem( elem )
11
{
12
}
13
14
void
TranslucentElem::status
(
iv::TableDebugView
* view )
15
{
16
static
iv::TableId
DebugTable =
TableId::create
(
"TranslucentElem"
);
17
18
auto
row = view->
Table
( DebugTable ).
Row
(
this
);
19
20
row.
Column
(
"preblend"
, this->
attr_preblend
.
Get
() );
21
row.Column(
"translucent"
, this->
attr_translucent
.
Get
() );
22
}
23
24
Elem
*
TranslucentElem::elem
()
25
{
26
return
this->_elem;
27
}
28
29
Elem
const
*
TranslucentElem::elem
()
const
30
{
31
return
this->_elem;
32
}
33
34
TranslucentElem
*
TranslucentElem::preblend
(
float4
val )
35
{
36
this->
attr_preblend
.
Set
( val );
37
return
this
;
38
}
39
40
TranslucentElem
*
TranslucentElem::translucent
(
bool
val )
41
{
42
this->
attr_translucent
.
Set
( val );
43
return
this
;
44
}
45
46
}