Skip to content

builtin/texture_packer.cpp

Functions

Name
std::vector< cv::Rect2f > _getCropRects(std::vector< stbrp_rect > const & rects, std::vector< std::pair< cbuffer, cv::Rect2f > > const & textures, cv::Size atlasSize)
std::vector< stbrp_rect > _getRects(std::vector< std::pair< cbuffer, cv::Rect2f > > const & textures, float scaleFactor, cv::Size atlasSize)
cbuffer createTextureAtlasBgr(std::vector< std::pair< cbuffer, cv::Rect2f > > const & textures, std::vector< cv::Rect > const & dstRects, cv::Size atlasSize, std::array< int, 3 > const & bgColor, builtin::ResizeMethod const =builtin::ResizeMethod::SQUASH, std::string const & interpolation =std::string("LINEAR"))

Defines

Name
STB_RECT_PACK_IMPLEMENTATION

Functions Documentation

function _getCropRects

static std::vector< cv::Rect2f > _getCropRects(
    std::vector< stbrp_rect > const & rects,
    std::vector< std::pair< cbuffer, cv::Rect2f > > const & textures,
    cv::Size atlasSize
)

function _getRects

static std::vector< stbrp_rect > _getRects(
    std::vector< std::pair< cbuffer, cv::Rect2f > > const & textures,
    float scaleFactor,
    cv::Size atlasSize
)

function createTextureAtlasBgr

static cbuffer createTextureAtlasBgr(
    std::vector< std::pair< cbuffer, cv::Rect2f > > const & textures,
    std::vector< cv::Rect > const & dstRects,
    cv::Size atlasSize,
    std::array< int, 3 > const & bgColor,
    builtin::ResizeMethod const  =builtin::ResizeMethod::SQUASH,
    std::string const & interpolation =std::string("LINEAR")
)

Macros Documentation

define STB_RECT_PACK_IMPLEMENTATION

#define STB_RECT_PACK_IMPLEMENTATION