NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
texture_interface.h
Go to the documentation of this file.
1 
10 #ifndef SDK_VIS_TEXTURE_INTERFACE_H_
11 #define SDK_VIS_TEXTURE_INTERFACE_H_
12 #pragma once
13 
14 #include <base/inc/platform.h>
15 #include <base/inc/base_types.h>
16 #include <base/inc/forward_declarations.h>
18 #include <base/inc/sdk_ref_ptr.h>
21 
22 namespace sdk {
23 namespace vis {
24 namespace scene {
25 
26 FWD_DECL_INTERFACE(ITexture);
27 
31 {
35 };
36 
40 {
43 };
44 
48 {
51 };
52 
55 class ITexture : public ISDKProperties
56 {
57 public:
59  virtual SDKResult SDK_CALLTYPE GetSize(SDKSize& size) const throw() = 0;
60 
62  virtual SDKResult SDK_CALLTYPE CopyFrom(const ITextureSP& texture) throw() = 0;
63 
66  virtual SDKResult SDK_CALLTYPE GetBits(TextureFormat& format, SDKUInt32& stride_size,
67  TextureStrideOrder& stride_order, SDKArray& bits) const throw() = 0;
68 
70  virtual SDKResult SDK_CALLTYPE SetBits(const SDKSize& texture_size,
71  const TextureFormat& data_format, const SDKUInt32& data_stride_size,
72  const TextureStrideOrder& data_stride_order, const SDKArray& bits) throw() = 0;
73 
75  virtual SDKResult SDK_CALLTYPE CopyBits(const SDKRect2D& rect_to_copy,
76  const TextureFormat& format, const SDKUInt32& stride_size,
77  const TextureStrideOrder& stride_order, const SDKUInt32& bits_size,
78  SDKUInt8* const bits) const throw() = 0;
79 
86  virtual SDKResult SDK_CALLTYPE Swap(
87  const ITextureSP& texture, const bool& force_resize) throw() = 0;
88 
89  SDK_IMPLEMENT_IID(ITexture)
90  SDK_END_INTERFACE(ITexture)
91 };
92 SDK_DECLARE_IID(ITexture)
93 
94 } // namespace scene
95 } // namespace vis
96 } // namespace sdk
97 
98 #endif // SDK_VIS_TEXTURE_INTERFACE_H_
sdk::vis::scene::ITexture::GetSize
virtual SDKResult SDK_CALLTYPE GetSize(SDKSize &size) const =0
Returns size of texture object.
sdk::vis::scene::kTextureStrideOrder_BottomToTop
@ kTextureStrideOrder_BottomToTop
First stride for bottom bitmap scanline.
Definition: texture_interface.h:42
base_types.h
SDK base types.
geometry_base_types_helpers.h
Geometry types.
sdk::vis::scene::ITexture::CopyBits
virtual SDKResult SDK_CALLTYPE CopyBits(const SDKRect2D &rect_to_copy, const TextureFormat &format, const SDKUInt32 &stride_size, const TextureStrideOrder &stride_order, const SDKUInt32 &bits_size, SDKUInt8 *const bits) const =0
Copies bits of texture object into user-defined array.
sdk_ref_ptr.h
Interfaces wrapper with reference count control.
sdk::vis::scene::TextureStrideOrder
TextureStrideOrder
Texture strides order.
Definition: texture_interface.h:39
properties_interface.h
Object generic properties interface.
sdk::vis::scene::kTextureFormat_RGBA
@ kTextureFormat_RGBA
RGBA, 32 bit per pixel.
Definition: texture_interface.h:33
sdk::vis::scene::ITexture::CopyFrom
virtual SDKResult SDK_CALLTYPE CopyFrom(const ITextureSP &texture)=0
Copies data from another texture.
SDKResult
SDKInt32 SDKResult
Type of all error or return codes which SDK functions can end with.
Definition: sdk_results.h:17
sdk::vis::scene::ITexture::GetBits
virtual SDKResult SDK_CALLTYPE GetBits(TextureFormat &format, SDKUInt32 &stride_size, TextureStrideOrder &stride_order, SDKArray &bits) const =0
Returns bits of texture object. Texture data will be copied into new array.
sdk::vis::scene::kTextureProperty_ID
@ kTextureProperty_ID
Unique texture ID, SDKUint64.
Definition: texture_interface.h:49
sdk::ISDKProperties
Provides access to members that control the properties.
Definition: properties_interface.h:32
sdk::vis::scene::TexturePropertyIDs
TexturePropertyIDs
Generic texture properties.
Definition: texture_interface.h:47
sdk::vis::scene::TextureFormat
TextureFormat
Texture bytes format.
Definition: texture_interface.h:30
sdk::vis::scene::kTextureFormat_BGRA
@ kTextureFormat_BGRA
BGRA, 32 bit per pixel.
Definition: texture_interface.h:34
sdk::vis::scene::kTextureStrideOrder_TopToBottom
@ kTextureStrideOrder_TopToBottom
First stride for top bitmap scanline.
Definition: texture_interface.h:41
sdk::vis::scene::kTextureFormat_Unknown
@ kTextureFormat_Unknown
Unknown texture format.
Definition: texture_interface.h:32
sdk_component_interface.h
Common base SDK interfaces.
platform.h
Describes the platform constants.
sdk::vis::scene::ITexture::SetBits
virtual SDKResult SDK_CALLTYPE SetBits(const SDKSize &texture_size, const TextureFormat &data_format, const SDKUInt32 &data_stride_size, const TextureStrideOrder &data_stride_order, const SDKArray &bits)=0
Sets bits to texture object, resizes the texture, if needed.
sdk::vis::scene::kTextureProperty_Version
@ kTextureProperty_Version
Texture version, increased at every texture change, SDKUint64.
Definition: texture_interface.h:50
SDKSize
SizeUI.
Definition: geometry_base_types.h:1235
sdk::vis::scene::ITexture
Platform independent texture.
Definition: texture_interface.h:55
FWD_DECL_INTERFACE
FWD_DECL_INTERFACE(ILWEParserWrapper)
Provides a wrapper around the message parser to get, add or remove the.
sdk::vis::scene::ITexture::Swap
virtual SDKResult SDK_CALLTYPE Swap(const ITextureSP &texture, const bool &force_resize)=0
Swaps given texture data with data from source texture force_resize flag forces the resizing of given...