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

Description

A box of pixels in memory, with a known pixel format.

Binding of Ogre::PixelBox.

Remarks
You get one from HardwarePixelBufferPtr::lock() (it then points directly into the locked buffer) or from Image::getPixelBox(). It can be passed to HardwarePixelBufferPtr::blitFromMemory() and HardwarePixelBufferPtr::blitToMemory().
Note
A PixelBox does not own its memory - it's only valid while the buffer or image it came from exists (and, for a locked buffer, until unlock() is called).

Definition at line 20 of file AngelOgre_PixelBox.h.

Public Member Functions

 PixelBox ()
 
 PixelBox (const PixelBox &in other)
 
PixelBox & opAssign (const PixelBox &in other)
 
color getColourAt (uint32 x, uint32 y, uint32 z)
 
void setColourAt (const color &c, uint32 x, uint32 y, uint32 z)
 
uint getWidth ()
 
uint getHeight ()
 
uint getDepth ()
 

Constructor & Destructor Documentation

◆ PixelBox() [1/2]

AngelOgre::PixelBox::PixelBox ( )

Creates an empty PixelBox which points to no memory.

◆ PixelBox() [2/2]

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

Creates a copy referencing the same memory.

Member Function Documentation

◆ getColourAt()

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

Gets the colour of the pixel at the given position.

Parameters
xColumn, relative to the box's left edge.
yRow, relative to the box's top edge.
zSlice, relative to the box's front edge (use 0 for 2D images).

◆ getDepth()

uint AngelOgre::PixelBox::getDepth ( )

Depth of the box, in pixels (1 for 2D images).

◆ getHeight()

uint AngelOgre::PixelBox::getHeight ( )

Height of the box, in pixels.

◆ getWidth()

uint AngelOgre::PixelBox::getWidth ( )

Width of the box, in pixels.

◆ opAssign()

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

◆ setColourAt()

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

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

Parameters
cThe colour.
xColumn, relative to the box's left edge.
yRow, relative to the box's top edge.
zSlice, relative to the box's front edge (use 0 for 2D images).

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