33 NotifyCategoryDecl(shadowatlas, EXPORT_CLASS, EXPORT_TEMPL);
49 MAKE_PROPERTY(num_used_tiles, get_num_used_tiles);
50 MAKE_PROPERTY(coverage, get_coverage);
65 inline void set_tile(
size_t x,
size_t y,
bool flag);
66 inline bool get_tile(
size_t x,
size_t y)
const;
68 inline bool region_is_free(
size_t x,
size_t y,
size_t w,
size_t h)
const;
69 void reserve_region(
size_t x,
size_t y,
size_t w,
size_t h);
74 size_t _num_used_tiles;
78 #include "shadowAtlas.I" 80 #endif // SHADOWATLAS_H ~ShadowAtlas()
Destructs the shadow atlas.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ShadowAtlas(size_t size, size_t tile_size=32)
Constructs a new shadow atlas.
void free_region(const LVecBase4i ®ion)
Frees a given region.
int get_tile_size() const
RenderPipeline.
get_num_used_tiles
Returns the amount of used tiles.
int get_required_tiles(size_t resolution) const
Returns the amount of tiles required to store a resolution.
LVecBase4 region_to_uv(const LVecBase4i ®ion)
Converts a tile-space region to uv space.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Class which manages distributing shadow maps in an atlas.
get_coverage
Returns the amount of used tiles in percentage.
LVecBase4i find_and_reserve_region(size_t tile_width, size_t tile_height)
Finds space for a map of the given size in the atlas.