|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
25 #ifndef _Hydrax_Image_H_
26 #define _Hydrax_Image_H_
159 const float&
getValue(
const int &
x,
const int &
y,
const int &c)
const;
168 float getValueLI(
const float &
x,
const float &
y,
const int &c)
const;
198 Pixel
getPixel(
const int &
x,
const int &
y)
const;
214 void setValue(
const int &
x,
const int &
y,
const int &c,
const float &v);
232 void setPixel(
const int &
x,
const int &
y,
const Pixel &p);
const float & getValue(const int &x, const int &y, const Channel &c) const
Get a pixel value.
Image(const Size &Size)
Constructor.
Pixel getPixelLI(const float &x, const float &y) const
Get a pixel with linear interpolation, like x = 4.56, y = 8.34.
int mChannels
Number of channels.
Pixel(const float &r, const float &g, const float &b, const float &a)
Constructor.
Pixel()
Default constructor.
Struct wich contains an especific width and height value.
void setValue(const int &x, const int &y, const Channel &c, const float &v)
Set a pixel value.
void _Initialize(const float &v)
Initialize array (Reserve dynamic memory)
float getValueLI(const float &x, const float &y, const Channel &c) const
Get a pixel value with linear interpolation, like x = 4.56, y = 8.34.
const float & getValue(const int &x, const int &y, const int &c) const
Get a pixel value.
float * mData
Our image data.
Pixel(const float &v)
Constructor.
float getValueLI(const float &x, const float &y, const int &c) const
Get a pixel value with linear interpolation, like x = 4.56, y = 8.34.
Type getType() const
Get image type.
void setPixel(const int &x, const int &y, const Pixel &p)
Set a pixel.
Pixel getPixel(const int &x, const int &y) const
Get a pixel.
Pixel(const float &r, const float &g, const float &b)
Constructor.
void setValue(const int &x, const int &y, const int &c, const float &v)
Set a pixel value.
const int & getNumberOfChannels() const
Get number of channels.
Class for store variable channels of an image.
float red
Pixel values (RGBA)
Size getSize() const
Get image size.