Open3D (C++ API)  0.18.0
Data Structures | Public Types | Public Member Functions
open3d::visualization::gui::UIImage Class Reference

#include <UIImage.h>

Data Structures

struct  DrawParams
 
struct  Impl
 

Public Types

enum class  Scaling { NONE , ANY , ASPECT }
 

Public Member Functions

 UIImage (const char *image_path)
 
 UIImage (std::shared_ptr< geometry::Image > image)
 
 UIImage (std::shared_ptr< t::geometry::Image > image)
 
 UIImage (visualization::rendering::TextureHandle texture_id, float u0=0.0f, float v0=0.0f, float u1=1.0f, float v1=1.0f)
 
 ~UIImage ()
 
void UpdateImage (std::shared_ptr< geometry::Image > image)
 
void UpdateImage (std::shared_ptr< t::geometry::Image > image)
 
void SetScaling (Scaling scaling)
 
Scaling GetScaling () const
 
Size CalcPreferredSize (const LayoutContext &context, const Widget::Constraints &constraints) const
 
DrawParams CalcDrawParams (visualization::rendering::Renderer &renderer, const Rect &frame) const
 

Member Enumeration Documentation

◆ Scaling

Enumerator
NONE 
ANY 

No scaling, fixed size.

ASPECT 

Scales to any size and aspect ratio.

Scales to any size, but fixed aspect ratio (default)

Constructor & Destructor Documentation

◆ UIImage() [1/4]

open3d::visualization::gui::UIImage::UIImage ( const char *  image_path)
explicit

◆ UIImage() [2/4]

open3d::visualization::gui::UIImage::UIImage ( std::shared_ptr< geometry::Image image)
explicit

◆ UIImage() [3/4]

open3d::visualization::gui::UIImage::UIImage ( std::shared_ptr< t::geometry::Image image)
explicit

◆ UIImage() [4/4]

open3d::visualization::gui::UIImage::UIImage ( visualization::rendering::TextureHandle  texture_id,
float  u0 = 0.0f,
float  v0 = 0.0f,
float  u1 = 1.0f,
float  v1 = 1.0f 
)
explicit

Uses an existing texture, using texture coordinates (u0, v0) to (u1, v1). Does not deallocate texture on destruction. This is useful for using an icon atlas to reduce draw calls.

◆ ~UIImage()

open3d::visualization::gui::UIImage::~UIImage ( )

Member Function Documentation

◆ CalcDrawParams()

UIImage::DrawParams open3d::visualization::gui::UIImage::CalcDrawParams ( visualization::rendering::Renderer renderer,
const Rect frame 
) const

◆ CalcPreferredSize()

Size open3d::visualization::gui::UIImage::CalcPreferredSize ( const LayoutContext context,
const Widget::Constraints constraints 
) const

◆ GetScaling()

UIImage::Scaling open3d::visualization::gui::UIImage::GetScaling ( ) const

◆ SetScaling()

void open3d::visualization::gui::UIImage::SetScaling ( Scaling  scaling)

◆ UpdateImage() [1/2]

void open3d::visualization::gui::UIImage::UpdateImage ( std::shared_ptr< geometry::Image image)

Updates the contents of the texture. If the image is a different size from the original, a new texture will be created.

◆ UpdateImage() [2/2]

void open3d::visualization::gui::UIImage::UpdateImage ( std::shared_ptr< t::geometry::Image image)

Updates the contents of the texture. If the image is a different size from the original, a new texture will be created.


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