Basic element that displays a texture. Has many optional configuration parameters. More...

#include <Image.hpp>

Public Member Functions

 Image (Instance *)
 
void status (iv::TableDebugView *view)
 
virtual void render (CameraState const &camera, std::optional< float > depth_override) override
 
Imageenabled (bool val)
 
Imagepreblend (float4 val)
 
Imagetranslucent (bool val)
 
Imagefilename (ResourcePath const &val)
 
ImagefittingStage (FlatShader::FittingStage v)
 
ImagepixelizeStage (FlatShader::PixelizeStage v)
 
ImagepixelizeSize (float2 v)
 
ImagepixelizeOffset (float2 v)
 
ImageresizeStage (FlatShader::ResizeStage v)
 
ImageresizeAnchor (float2 v)
 
ImagefilteringStage (FlatShader::FilteringStage v)
 
ImagefilteringAlphaThreshold (float v)
 
ImagefilteringAlphaWidth (float v)
 
Imagealpha (float v)
 
ImagecolorTransform (float4x4 const &v)
 
Instanceinstance () const
 
- Public Member Functions inherited from iv::Elem
 Elem (Instance *inst)
 
 ~Elem ()
 
void status (iv::TableDebugView *view)
 
Instanceinstance () const
 
void elem_setParent (Elem *)
 
Elemelem_getParent ()
 
virtual Cameraelem_getRoot ()
 
virtual void elem_eachChild (std::function< void(Elem *) > const &)
 
virtual void elem_childDisconnect (Elem *)
 
void first_pass (ElementRenderer *)
 
void second_pass (ElementRenderer *)
 
unsigned first_pass_frame_id ()
 
unsigned second_pass_frame_id ()
 
Elemenabled (bool val)
 
void quiet (bool)
 
bool quiet () const
 
float3 FromLocalSpaceToScreenSpace (float3 local_space)
 
float3 FromScreenSpaceToLocalSpace (float3 screen_space)
 
float2 FromScreenPlaneToLocalPlane (float2 screen_space)
 
void Add_InputNode (InputNode *node)
 
void Remove_InputNode (InputNode *node)
 
- Public Member Functions inherited from iv::InputNode
 InputNode (Instance *inst)
 
 ~InputNode ()
 
Instanceinstance () const
 
void status (iv::TableDebugView *view)
 
void inputEnabled (bool)
 
bool inputEnabled ()
 
void quiet (bool)
 
bool quiet () const
 
void input_deactivate ()
 
void input_treeRefresh ()
 
void input_setParent (InputNode *)
 
InputNodeinput_getParent ()
 
virtual InputRootinput_getRoot ()
 
bool input_trigger_visit (InputRoot *root, Input::DeviceKey key)
 
bool input_visit (InputRoot *root, Input::DeviceKey key, bool &press, bool &real, bool &offspace)
 
- Public Member Functions inherited from iv::SlotChild
 SlotChild (Elem *elem)
 
Instanceinstance () const
 
void status (iv::TableDebugView *view)
 
virtual bool picking_test (int2 input_pos) override
 
- Public Member Functions inherited from iv::Pickable
 Pickable (Elem *elem)
 
Elemelem ()
 
const Elemelem () const
 
- Public Member Functions inherited from iv::TranslucentElem
 TranslucentElem (Elem *elem)
 
void status (iv::TableDebugView *view)
 
Elemelem ()
 
const Elemelem () const
 
TranslucentElempreblend (float4 val)
 
TranslucentElemtranslucent (bool val)
 

Public Attributes

ClientMarker cm
 
DirtyAttr< ResourcePathattr_filename
 
FlatShader::Params shading
 
- Public Attributes inherited from iv::Elem
ClientMarker cm
 
DirtyAttr< bool > attr_enabled
 
DirtyAttr< float4x4modelTransform
 
DirtyAttr< ShaderScissorscissor
 
- Public Attributes inherited from iv::InputNode
ClientMarker cm
 
- Public Attributes inherited from iv::SlotChild
ClientMarker cm
 
DirtyAttr< float3expectedSize
 
DirtyAttr< float3preferredSize
 
DirtyAttr< float3size
 
- Public Attributes inherited from iv::Pickable
ClientMarker cm
 
- Public Attributes inherited from iv::TranslucentElem
ClientMarker cm
 
DirtyAttr< float4attr_preblend
 Enables blending in fragment shader - blends into a fixed color rather than into the current content of framebuffer. This allows us to emulate blending in static scenes without requiring specific draw order. More...
 
DirtyAttr< bool > attr_translucent
 Item will be drawn as translucent - enables blending and draws after all opaque elements sorted by depth with other translucent objects. More...
 

Protected Member Functions

virtual void first_pass_impl (ElementRenderer *) override
 
virtual void second_pass_impl (ElementRenderer *) override
 
virtual bool picking_test_pixel_perfect (float2 local_pos) override
 
- Protected Member Functions inherited from iv::Elem
virtual void input_childDisconnect (InputNode *) override
 
virtual void input_eachChild (std::function< void(InputNode *) > const &) override
 
- Protected Member Functions inherited from iv::InputNode
virtual bool input_trigger_process (InputRoot *root, Input::DeviceKey key)
 
virtual void input_process (InputRoot *root, Input::DeviceKey key, bool &press, bool &real, bool &offspace)
 

Detailed Description

Basic element that displays a texture. Has many optional configuration parameters.

Definition at line 18 of file Image.hpp.

Constructor & Destructor Documentation

◆ Image()

iv::Image::Image ( Instance inst)

Definition at line 8 of file Image.cpp.

Member Function Documentation

◆ status()

void iv::Image::status ( iv::TableDebugView view)

Definition at line 23 of file Image.cpp.

◆ render()

void iv::Image::render ( CameraState const &  camera,
std::optional< float >  depth_override 
)
overridevirtual

Implements iv::Renderable.

Definition at line 110 of file Image.cpp.

◆ enabled()

Image * iv::Image::enabled ( bool  val)

Definition at line 204 of file Image.cpp.

◆ preblend()

Image * iv::Image::preblend ( float4  val)

Definition at line 210 of file Image.cpp.

◆ translucent()

Image * iv::Image::translucent ( bool  val)

Definition at line 216 of file Image.cpp.

◆ filename()

Image * iv::Image::filename ( ResourcePath const &  val)

Definition at line 222 of file Image.cpp.

◆ fittingStage()

Image * iv::Image::fittingStage ( FlatShader::FittingStage  v)

Definition at line 228 of file Image.cpp.

◆ pixelizeStage()

Image * iv::Image::pixelizeStage ( FlatShader::PixelizeStage  v)

Definition at line 234 of file Image.cpp.

◆ pixelizeSize()

Image * iv::Image::pixelizeSize ( float2  v)

Definition at line 240 of file Image.cpp.

◆ pixelizeOffset()

Image * iv::Image::pixelizeOffset ( float2  v)

Definition at line 246 of file Image.cpp.

◆ resizeStage()

Image * iv::Image::resizeStage ( FlatShader::ResizeStage  v)

Definition at line 252 of file Image.cpp.

◆ resizeAnchor()

Image * iv::Image::resizeAnchor ( float2  v)

Definition at line 258 of file Image.cpp.

◆ filteringStage()

Image * iv::Image::filteringStage ( FlatShader::FilteringStage  v)

Definition at line 264 of file Image.cpp.

◆ filteringAlphaThreshold()

Image * iv::Image::filteringAlphaThreshold ( float  v)

Definition at line 270 of file Image.cpp.

◆ filteringAlphaWidth()

Image * iv::Image::filteringAlphaWidth ( float  v)

Definition at line 276 of file Image.cpp.

◆ alpha()

Image * iv::Image::alpha ( float  v)

Definition at line 282 of file Image.cpp.

◆ colorTransform()

Image * iv::Image::colorTransform ( float4x4 const &  v)

Definition at line 288 of file Image.cpp.

◆ first_pass_impl()

void iv::Image::first_pass_impl ( ElementRenderer er)
overrideprotectedvirtual

Implements iv::Elem.

Definition at line 49 of file Image.cpp.

◆ second_pass_impl()

void iv::Image::second_pass_impl ( ElementRenderer er)
overrideprotectedvirtual

Reimplemented from iv::Elem.

Definition at line 106 of file Image.cpp.

◆ picking_test_pixel_perfect()

bool iv::Image::picking_test_pixel_perfect ( float2  local_pos)
overrideprotectedvirtual

Reimplemented from iv::SlotChild.

Definition at line 161 of file Image.cpp.

◆ instance()

Instance * iv::Elem::instance

Definition at line 57 of file Elem.cpp.

Member Data Documentation

◆ cm

ClientMarker iv::Image::cm

Definition at line 21 of file Image.hpp.

◆ attr_filename

DirtyAttr< ResourcePath > iv::Image::attr_filename

Definition at line 31 of file Image.hpp.

◆ shading

FlatShader::Params iv::Image::shading

Definition at line 32 of file Image.hpp.


The documentation for this class was generated from the following files: