|
| ImageMap (const int &tile_size=DEFAULT_TILE_SIZE) |
| Default constructor.
|
|
| ImageMap (const ImageMap &src, bool copy_data=true, const GMathVec4i *region=0) |
| Initialize an image map using the configuration of another image.
|
|
ImageMapChannel * | add_channel (const CoreString &name, const ImagePixel::BitDepth &bdepth, const ImagePixel::BitType &bit_type) |
| Adds a channel, if it doesn't already exists.
|
|
void | add_channel (ImageMapChannel *channel, const unsigned int &channel_index) |
| Adds a channelto the current map.
Warning: this is a check free function that requires a fully configured ImageMapChannel.
|
|
const CoreVector
< ImageMapChannel * > & | get_channels () const |
| Returns the list of channels.
|
|
void | set_auto_check_uniformity (const bool &flag) |
| Enable/disable auto check uniformity.
|
|
const bool & | get_auto_check_uniformity () const |
| Returns auto check uniformity status.
|
|
ImageMapChannel * | get_channel (const int id) const |
| Returns a pointer to the requested channel. Return value may be null!
|
|
unsigned int | get_custom_channel_count () const |
| Returns the number of custom channels in the image.
|
|
unsigned int | get_channel_index_by_name (const CoreString &name) const |
| Returns the index of the requested channel. Returns -1 if the channel name was not found.
|
|
ImageMapChannel * | get_channel_by_name (const CoreString &name) const |
| Returns the channel matching the requested name. Returns null if the channel name was not found.
|
|
ImageMapChannel * | get_red_channel () const |
| Returns ta pointer to the red channel. May be null.
|
|
ImageMapChannel * | get_green_channel () const |
| Returns ta pointer to the green channel. May be null.
|
|
ImageMapChannel * | get_blue_channel () const |
| Returns ta pointer to the blue channel. May be null.
|
|
ImageMapChannel * | get_alpha_channel () const |
| Returns ta pointer to the alpha channel. May be null.
|
|
ImageMapChannel * | get_luminance_channel () const |
| Returns ta pointer to the luminance channel. May be null.
|
|
void | set_depth (ImagePixel::Depth depth, ImagePixel::BitDepth bit_depth, ImagePixel::BitType bit_type) |
| Set image data format:
|
|
const ImagePixel::Depth & | get_depth () const |
| Returns the image depth.
|
|
const ImagePixel::BitDepth & | get_bit_depth () const |
| Returns the pixel bit depth.
|
|
const ImagePixel::BitType & | get_bit_type () const |
| Returns the pixel bit type.
|
|
const ImagePixel::RepeatMode & | get_u_repeat_mode () const |
| Returns the horizontal repeat mode.
|
|
const ImagePixel::RepeatMode & | get_v_repeat_mode () const |
| Returns the vertical repeat mode.
|
|
void | set_repeat_mode (const ImagePixel::RepeatMode &u_mode, const ImagePixel::RepeatMode &v_mode) |
| Sets the repeat modes.
|
|
const unsigned int & | get_channel_count () const |
| Returns the number of channels stored.
|
|
const unsigned int & | get_tile_size () const |
| Returns the size of a tile. ( size = width = height )
|
|
void | get_sorted_tiles (const GMathVec4i ®ion, CoreArray< ImageMapTileHandle > *sorted_tiles, unsigned int &items_count, bool allow_empty=true) const |
| Returns a sorted list of tiles pointers for the specified region.
|
|
void | get_sorted_tiles (const GMathVec4i ®ion, CoreArray< ImageMapTileHandle > *sorted_tiles, unsigned int &items_count, bool allow_empty) |
| Returns a list of tiles for the specified region. Non-const version of the function above.
|
|
bool | get_dirty_tiles (const GMathVec4i ®ion, CoreArray< ImageMapTileHandle > *sorted_tiles, CoreArray< bool > &dirtiness_flag, unsigned int &items_count) |
| Returns a list of dirty tiles for the specified region.
|
|
void | get_clean_tiles (const GMathVec4i ®ion, CoreArray< ImageMapTileHandle > *tiles, unsigned int &items_count) |
| Returns a list of clean tiles for the specified region.
|
|
unsigned int | get_dirty_pixel_count (const GMathVec4i ®ion) |
|
bool | is_luminance_alpha () const |
| Returns whether the image has a Luminance and an alpha channel.
|
|
bool | is_rgb () const |
| Returns whether the image has RGB but no alpha channel.
|
|
bool | is_rgba () const |
| Returns whether the image has RGB and an alpha channel.
|
|
bool | has_alpha () const |
| Returns whether the image has an alpha channel.
|
|
bool | has_one_clean_tile () const |
| Returns whether the image has at least one clean tile.
|
|
void | set_one_clean_tile () const |
| Tell the image at least one tile is clean.
|
|
void | remove_all_channels () |
| Remove all the channels that are in the map.
|
|
void | reset () |
| Resets the image. All parameters are set to 0. Channels are removed.
|
|
void | finalize (ImageEvalContext &context, const GMathVec4i ®ion, const bool &set_clean=true, const bool &force_mono_thread=false) |
| Tidy the image after a render so it can be evaluated through a texture.
|
|
void | compute_image_edges (ImageEvalContext &context, const GMathVec4i ®ion) |
| Computes an extra line of pixels on the edge of an image so the texture evaluation works properly.
|
|
void | get_pixel_nearest (ImageEvalContext &context, const MapEvalCtx &eval_ctx, float x, float y, const GMathVec4i &canvas, GMathVec4f &color, const ImagePixel::RepeatMode &x_mode=ImagePixel::DEFAULT, const ImagePixel::RepeatMode &y_mode=ImagePixel::DEFAULT) const |
| Returns the value of the pixel at the given coordinates.
|
|
void | get_pixel_bilinear (ImageEvalContext &context, const MapEvalCtx &eval_ctx, const float &x, const float &y, const GMathVec4i &canvas, GMathVec4f &color, const ImagePixel::RepeatMode &x_mode=ImagePixel::DEFAULT, const ImagePixel::RepeatMode &y_mode=ImagePixel::DEFAULT) const |
| Returns the value of the pixel at the given coordinates, using bilinear filtering.
|
|
void | create_buffer_rgba (ImageEvalContext &context, const GMathVec4i ®ion, float *out_buffer, unsigned int channel_size, const ImagePixel::RepeatMode &x_mode, const ImagePixel::RepeatMode &y_mode) const |
| Creates a buffer of floats that contains the color values of the RGBA channels of the image for the specified region.
|
|
void | get_rgba_channels (ImageMapChannels *channels_vector) const |
| Get the RGBA channels of the image.
|
|
void | fill_from_buffer_rgba (const GMathVec4i ®ion, float *in_buffer, bool process_region_edges=true) |
| Fill the image using the float buffer given as parameter.
|
|
void | fill_channels_from_buffer (const GMathVec4i ®ion, unsigned int &channel_count, float *in_buffer, bool process_region_edges=true) |
| Fill the first channels of the image using the data given as parameter.
|
|
void | fill_clean_data (const ImageMap &src, const GMathVec4i ®ion) |
| Copy the data from the clean tiles of the source image map.
|
|
void | set_data (const unsigned char *data, const unsigned int &data_size, const GMathVec4i &canvas, const char *name) const |
| Fill a channel using the data passed as parameter.
|
|
void | set_data (const float *data, const unsigned int &data_size, const GMathVec4i &canvas, const KnownChannels index) const |
| Fill a channel using the float buffer passed as parameter.
|
|
void | make_half (ImageEvalContext &context, ImageMap &up_image, const GMathVec4i ®ion) const |
| Computes a half-sized mipmap from another ImageMap.
|
|
void | invalidate_all () |
| Invalidates all channels.
|
|
void | invalidate_channels (const CoreVector< CoreString > &channel_names) |
| Invalidates the specified channels.
|
|
void | copy_channel_list (const ImageMap &src) |
| Initialise the list of channels of the current ImageMap using another ImageMap.
|
|
void | update_custom_channels (const CoreVector< CoreString > &to_remove, const CoreVector< CoreString > &to_add) |
| Updates the list of channels in the image.
|
|
void | dirty_border (const GMathVec4i ®ion) |
| Dirty all the tiles of all channels that intersect the region.
|
|
void | on_update_visible (const GMathBbox2i &old_region, const GMathBbox2i &new_region) |
| Updates the image channels after the visible part of the region has been modified.
|
|
virtual size_t | get_memory_size () const override |
| Get the amount of memory occupied by the resource.
|
|
void | get_stats (Stats &stats) const |
|
void | move_data (const int &offset_x, const int &offset_y) |
| Shift the data of the image.
|
|
void | copy_data (const ImageMap &src, int offset_x, int offset_y, const GMathVec4i *region=0) |
| Copy data from another ImageMap.
|
|
void | create_tiles (const GMathVec4i ®ion, bool visible_only=false) |
| Creates tiles for the specified region in all channels.
|
|
void | fill_rgba_from_channels (const ImageMap &src, const CoreBasicArray< CoreString > &channel_names, int offset_x, int offset_y, const GMathVec4i *region) |
| Fill the RGBA channels of the current image using data from the specified channels of the source image.
|
|
void | get_bounding_box (GMathBbox2i &bbox) const |
| Compute the bounding box of the data actually stored in the image.
|
|
GMathBbox2i | get_bounding_box () const |
|
void | get_tiles_bounding_box (GMathBbox2i &bbox) const |
| Compute the bounding box of the tiles instancianted in the image.
|
|
void | set_bounding_box (const GMathBbox2i &bbox) |
| Sets the bounding box of the data actually stored in the image.
|
|
void | process_visible (ImageMapCtx &ctx, ImageChannelProcess_callback process, void *user_data=0, const GMathVec4i *region=0) |
| Apply a process on the visible channels of the image.
|
|
void | blit_visible (const ImageMap &source, const GMathVec4i ®ion, const ImagePixel::BlitMode &mode=ImagePixel::BLIT_MODE_REPLACE) |
| Copy data from the visible channels.
|
|
void | blit (const ImageMap &source, const GMathVec4i ®ion, const ImagePixel::BlitMode &mode=ImagePixel::BLIT_MODE_REPLACE) |
| Copies the content of a tile from source to destination using the specified copy mode. (deprecated)
|
|
bool | blit_bucket_aligned (const ImageMap &source, const GMathVec4i ®ion, const ImagePixel::BlitMode &mode=ImagePixel::BLIT_MODE_REPLACE) |
| Copies the content of a tile from source to destination using the specified copy mode.
|
|
const unsigned int | get_theoric_tile_count () const |
| Returns the theoric number of tiles per channel the image can contain, ie, how many tiles we would have if the bounding box was filled with data.
|
|
void | create_data (const GMathVec4i ®ion, const ImagePixel::Depth &depth, const ImagePixel::BitDepth &bit_depth, const ImagePixel::BitType &bit_type, const int &tile_size) |
| Sets up image parameters and creates channels and.
|
|
void | create_rgba_channels (const GMathVec4i ®ion) |
| Creates R,G,B,A channels and the tiles for the specified region if they don't exist.
|
|
void | fill_from (const ImageMap &src, const GMathVec4i &src_data_region, const GMathVec4i &dest_data_region, AppBase *app) |
| Fills the image using the content of the source image.
|
|
void | init (const ImagePixel::Depth &depth, const ImagePixel::BitDepth &bit_depth, const ImagePixel::BitType &bit_type, const int &tile_size) |
| Sets image parameters.
|
|
| ResourceData (const ResourceData &other) |
|
ResourceImportData * | get_import_data () const |
|
void | set_import_data (ResourceImportData *data) |
|
virtual Core128BitHashKey | get_hash_key () const |
| Get the hash key of the resource.
|
|
virtual bool | is_serializable () const |
| Tell if the resource can be serialized or not.
|
|
virtual void * | serialize (size_t &serial_size) const |
| Serialize the resource data.
|
|
virtual bool | deserialize (void *serial, const size_t &serial_size) |
| Deserialize the resource data.
|
|
void | advert_memory_changed () const |
| Adverts that the memory usage of the resource has changed.
|
|
bool | is_protected () const |
|
| EventObject () |
| Constructor.
|
|
| EventObject (const EventObject &src) |
| Copy Constructor.
|
|
virtual | ~EventObject () override |
| Destructor.
|
|
void | connect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0) |
| Connects this to an object to listen to a specific event.
|
|
void | connect (EventObject &sender, EventInfoMethod event_cb, void *data=0) |
| Connects this to an object to listen any of its events.
|
|
bool | disconnect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0) |
|
bool | disconnect_all (EventObject &sender) |
| Disconnects from all objects sender was listening on.
|
|
void | disconnect_all () |
| Disconnects from all objects we were listening on.
|
|
void | remove_all_connection () |
| Disconnects object from other objects it is listening to, and also disconnects all objects listening to it.
|
|
void | raise_event (const CoreString &event_id) const |
| sends an event
|
|
void | raise_event (const EventInfo &event_info) const |
| sends an event
|
|
bool | is_connected (EventObject &sender, const CoreString &event_id, void *data) |
|
void | set_mute (const bool &mute) |
| Asks for object muting. This will increase or decrease the muting counter. Unmuting may not be immediat since it will happen only when counter reaches 0.
|
|
bool | is_mute () const |
| Returns if object is muted.
|
|
CoreArray< EventObject * > | get_senders () const |
|
unsigned int | get_sender_count () const |
|
unsigned int | get_receiver_count () const |
|
void | connect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0) |
| Connects this to an object to listen to a specific event.
|
|
void | connect (EventObject &sender, EventMethod event_cb, void *data=0) |
| Connects this to an object to listen any of its events.
|
|
bool | disconnect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0) |
| Disconnects this from an object for a specific event.
|
|
| CoreCustomData (const CoreCustomData &src) |
|
void | add_custom_data (void *key, const bool &data) |
|
void | add_custom_data (void *key, const int &data) |
|
void | add_custom_data (void *key, const unsigned int &data) |
|
void | add_custom_data (void *key, const char *data) |
|
void | add_custom_data (void *key, const CoreString &data) |
|
void | add_custom_data (void *key, const double &data) |
|
void | add_custom_data (void *key, void *data) |
|
void | remove_custom_data (void *key) |
|
void | remove_all_custom_data () |
|
void | set_custom_data (void *key, const bool &data) |
|
void | set_custom_data (void *key, const int &data) |
|
void | set_custom_data (void *key, const unsigned int &data) |
|
void | set_custom_data (void *key, const double &data) |
|
void | set_custom_data (void *key, const char *data) |
|
void | set_custom_data (void *key, const CoreString &data) |
|
void | set_custom_data (void *key, void *data) |
|
void | get_custom_data (void *key, bool &data) const |
|
void | get_custom_data (void *key, int &data) const |
|
void | get_custom_data (void *key, unsigned int &data) const |
|
void | get_custom_data (void *key, double &data) const |
|
void | get_custom_data (void *key, CoreString &data) const |
|
void | get_custom_data (void *key, void *&data) const |
|
bool | is_kindof (const CoreBaseObject &object) const |
|
CoreString | get_class_info_name () const |
|
const unsigned long & | get_class_info_id () const |
|
virtual bool | is_kindof (const CoreClassInfo &cinfo) const |
|
virtual const CoreClassInfo & | get_class_info () const |
|
template<class T > |
T * | cast () |
|
template<class T > |
const T * | cast () const |
|
bool | is_kindof (const CoreClassInfo &cinfo) const |
|