Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Public Member Functions
AngelOgre::Image Class Reference

Description

An image in system memory, which can hold multiple faces (cubemaps) and mipmap levels.

Binding of Ogre::Image.

Remarks
Load one with GameScriptClass::loadImageResource(). To display it, copy it into a texture with HardwarePixelBufferPtr::blitFromMemory() using getPixelBox().

Definition at line 17 of file AngelOgre_Image.h.

Public Member Functions

 Image ()
 
 Image (const Image &in other)
 
Image & opAssign (const Image &in other)
 
color getColourAt (uint32 x, uint32 y, uint32 z)
 
void setColourAt (const color &c, uint32 x, uint32 y, uint32 z)
 
Image & flipAroundX ()
 
Image & flipAroundY ()
 
uint getNumMipmaps ()
 
uint getNumFaces ()
 
PixelBox getPixelBox (uint face, uint mipmap)
 
uint getSize ()
 
uint getWidth ()
 
uint getHeight ()
 
void resize (uint16 width, uint16 height, ImageFilter filter)
 

Constructor & Destructor Documentation

◆ Image() [1/2]

AngelOgre::Image::Image ( )

Creates an empty image.

◆ Image() [2/2]

AngelOgre::Image::Image ( const Image &in  other)

Creates a copy of the image, including pixel data.

Member Function Documentation

◆ flipAroundX()

Image & AngelOgre::Image::flipAroundX ( )

Flips (mirrors) the image around the X axis (upside down), in place.

◆ flipAroundY()

Image & AngelOgre::Image::flipAroundY ( )

Flips (mirrors) the image around the Y axis (left to right), in place.

◆ getColourAt()

color AngelOgre::Image::getColourAt ( uint32  x,
uint32  y,
uint32  z 
)

Gets the colour of the pixel at the given position.

Parameters
zSlice; use 0 for 2D images.

◆ getHeight()

uint AngelOgre::Image::getHeight ( )

Height of the image, in pixels.

◆ getNumFaces()

uint AngelOgre::Image::getNumFaces ( )

Number of faces - 6 for cubemaps, 1 otherwise.

◆ getNumMipmaps()

uint AngelOgre::Image::getNumMipmaps ( )

Number of mipmaps, excluding the base level.

◆ getPixelBox()

PixelBox AngelOgre::Image::getPixelBox ( uint  face,
uint  mipmap 
)

Returns a PixelBox pointing into the image's memory.

Parameters
faceFace index; 0 unless it's a cubemap.
mipmapMipmap level; 0 is the full-size image.
Note
The PixelBox is only valid while the image exists.

◆ getSize()

uint AngelOgre::Image::getSize ( )

Size of the image data, in bytes.

◆ getWidth()

uint AngelOgre::Image::getWidth ( )

Width of the image, in pixels.

◆ opAssign()

Image & AngelOgre::Image::opAssign ( const Image &in  other)

◆ resize()

void AngelOgre::Image::resize ( uint16  width,
uint16  height,
ImageFilter  filter 
)

Resizes the image in place, resampling the pixels.

Parameters
filterResampling method, see ImageFilter.

◆ setColourAt()

void AngelOgre::Image::setColourAt ( const color &  c,
uint32  x,
uint32  y,
uint32  z 
)

Sets the colour of the pixel at the given position, converting it to the image's pixel format.

Parameters
zSlice; use 0 for 2D images.

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