|
Ogre Procedural
0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
|
class to store image data while processing More...
#include <ProceduralTextureBuffer.h>
Public Member Functions | |
| void | setPixel (size_t x, size_t y, Ogre::ColourValue colour) |
| Set colour of a specified pixel. More... | |
| void | setPixel (size_t x, size_t y, Ogre::uchar red, Ogre::uchar green, Ogre::uchar blue, Ogre::uchar alpha=255) |
| Set colour of a specified pixel. More... | |
| void | setPixel (size_t x, size_t y, Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f) |
| Set colour of a specified pixel. More... | |
| void | setRed (size_t x, size_t y, Ogre::uchar red) |
| Set red colour value of a specified pixel. More... | |
| void | setGreen (size_t x, size_t y, Ogre::uchar green) |
| Set green colour value of a specified pixel. More... | |
| void | setBlue (size_t x, size_t y, Ogre::uchar blue) |
| Set blue colour value of a specified pixel. More... | |
| void | setAlpha (size_t x, size_t y, Ogre::uchar alpha) |
| Set alpha colour value of a specified pixel. More... | |
| void | setRed (size_t x, size_t y, Ogre::Real red) |
| Set red colour value of a specified pixel. More... | |
| void | setGreen (size_t x, size_t y, Ogre::Real green) |
| Set green colour value of a specified pixel. More... | |
| void | setBlue (size_t x, size_t y, Ogre::Real blue) |
| Set blue colour value of a specified pixel. More... | |
| void | setAlpha (size_t x, size_t y, Ogre::Real alpha) |
| Set alpha colour value of a specified pixel. More... | |
| void | setData (size_t width, size_t height, Ogre::uchar *data) |
| Copy image data (RGBA) from a buffer to this object. More... | |
| void | setData (TextureBufferPtr buffer) |
| Copy image data (RGBA) from an other TextureBuffer object. More... | |
| Ogre::ColourValue | getPixel (size_t x, size_t y) const |
| Get colour value of a specified pixel. More... | |
| Ogre::uchar | getPixelRedByte (size_t x, size_t y) const |
| Get red colour value of a specified pixel. More... | |
| Ogre::uchar | getPixelGreenByte (size_t x, size_t y) const |
| Get green colour value of a specified pixel. More... | |
| Ogre::uchar | getPixelBlueByte (size_t x, size_t y) const |
| Get blue colour value of a specified pixel. More... | |
| Ogre::uchar | getPixelAlphaByte (size_t x, size_t y) const |
| Get alpha colour value of a specified pixel. More... | |
| Ogre::Real | getPixelRedReal (size_t x, size_t y) const |
| Get red colour value of a specified pixel. More... | |
| Ogre::Real | getPixelGreenReal (size_t x, size_t y) const |
| Get green colour value of a specified pixel. More... | |
| Ogre::Real | getPixelBlueReal (size_t x, size_t y) const |
| Get blue colour value of a specified pixel. More... | |
| Ogre::Real | getPixelAlphaReal (size_t x, size_t y) const |
| Get alpha colour value of a specified pixel. More... | |
| TextureBufferPtr | clone () const |
| Create a copy of the current texture image buffer. More... | |
| TextureBuffer (TextureBufferPtr tocopy) | |
| Standard constructor which copy a given image. More... | |
| TextureBuffer (Ogre::uint width_height) | |
| Standard constructor which creates a quadratic image buffer with the given size. More... | |
| ~TextureBuffer () | |
| Destructor which release memory. More... | |
| Ogre::uint | getWidth () const |
| Get the width of the stored image in px. More... | |
| Ogre::uint | getHeight () const |
| Get the height of the stored image in px. More... | |
| Ogre::Image * | getImage () const |
| Create a new image from buffer. More... | |
| void | saveImage (Ogre::String filename) const |
| Save the image from the buffer to a file. More... | |
| Ogre::TexturePtr | createTexture (Ogre::String name, Ogre::String group=Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) const |
| Creates an OGRE texture and add it to current TextureManager instance. More... | |
class to store image data while processing
Create a TextureBuffer object and move it to all classes inherited from TextureProcessing
| Procedural::TextureBuffer::TextureBuffer | ( | TextureBufferPtr | tocopy | ) |
Standard constructor which copy a given image.
| tocopy | Image which to copy |
| Ogre::InvalidParametersException | Pointer to source image must not be NULL! |
| Procedural::TextureBuffer::TextureBuffer | ( | Ogre::uint | width_height | ) |
Standard constructor which creates a quadratic image buffer with the given size.
| width_height | Edge length in px |
| Ogre::InvalidParametersException | Minimum edge size is 8! |
| Procedural::TextureBuffer::~TextureBuffer | ( | ) |
Destructor which release memory.
| TextureBufferPtr Procedural::TextureBuffer::clone | ( | ) | const |
Create a copy of the current texture image buffer.
| Ogre::TexturePtr Procedural::TextureBuffer::createTexture | ( | Ogre::String | name, |
| Ogre::String | group = Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME |
||
| ) | const |
Creates an OGRE texture and add it to current TextureManager instance.
| name | Name of the texture |
| group | Name of the resource group where to list the texture |
| Ogre::uint Procedural::TextureBuffer::getHeight | ( | ) | const |
Get the height of the stored image in px.
Referenced by Procedural::Blit::Blit(), Procedural::CircleTexture::CircleTexture(), Procedural::EllipseTexture::EllipseTexture(), Procedural::Polygon::Polygon(), and Procedural::RectangleTexture::RectangleTexture().
| Ogre::Image* Procedural::TextureBuffer::getImage | ( | ) | const |
Create a new image from buffer.
| Ogre::ColourValue Procedural::TextureBuffer::getPixel | ( | size_t | x, |
| size_t | y | ||
| ) | const |
Get colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::uchar Procedural::TextureBuffer::getPixelAlphaByte | ( | size_t | x, |
| size_t | y | ||
| ) | const |
Get alpha colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::Real Procedural::TextureBuffer::getPixelAlphaReal | ( | size_t | x, |
| size_t | y | ||
| ) | const |
Get alpha colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::uchar Procedural::TextureBuffer::getPixelBlueByte | ( | size_t | x, |
| size_t | y | ||
| ) | const |
Get blue colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::Real Procedural::TextureBuffer::getPixelBlueReal | ( | size_t | x, |
| size_t | y | ||
| ) | const |
Get blue colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::uchar Procedural::TextureBuffer::getPixelGreenByte | ( | size_t | x, |
| size_t | y | ||
| ) | const |
Get green colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::Real Procedural::TextureBuffer::getPixelGreenReal | ( | size_t | x, |
| size_t | y | ||
| ) | const |
Get green colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::uchar Procedural::TextureBuffer::getPixelRedByte | ( | size_t | x, |
| size_t | y | ||
| ) | const |
Get red colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::Real Procedural::TextureBuffer::getPixelRedReal | ( | size_t | x, |
| size_t | y | ||
| ) | const |
Get red colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::uint Procedural::TextureBuffer::getWidth | ( | ) | const |
Get the width of the stored image in px.
Referenced by Procedural::Blit::Blit(), Procedural::CircleTexture::CircleTexture(), Procedural::EllipseTexture::EllipseTexture(), Procedural::Polygon::Polygon(), and Procedural::RectangleTexture::RectangleTexture().
| void Procedural::TextureBuffer::saveImage | ( | Ogre::String | filename | ) | const |
Save the image from the buffer to a file.
| filename | Name (and path) of the image file where to save the buffer. |
| void Procedural::TextureBuffer::setAlpha | ( | size_t | x, |
| size_t | y, | ||
| Ogre::Real | alpha | ||
| ) |
Set alpha colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| alpha | New alpha value of pixel colour [0.0, 1.0] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| void Procedural::TextureBuffer::setAlpha | ( | size_t | x, |
| size_t | y, | ||
| Ogre::uchar | alpha | ||
| ) |
Set alpha colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| alpha | New alpha value of pixel colour [0, 255] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| void Procedural::TextureBuffer::setBlue | ( | size_t | x, |
| size_t | y, | ||
| Ogre::Real | blue | ||
| ) |
Set blue colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| blue | New blue value of pixel colour [0.0, 1.0] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| void Procedural::TextureBuffer::setBlue | ( | size_t | x, |
| size_t | y, | ||
| Ogre::uchar | blue | ||
| ) |
Set blue colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| blue | New blue value of pixel colour [0, 255] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| void Procedural::TextureBuffer::setData | ( | size_t | width, |
| size_t | height, | ||
| Ogre::uchar * | data | ||
| ) |
Copy image data (RGBA) from a buffer to this object.
| width | Width of the image in buffer |
| height | Height of the image in buffer |
| data | Image buffer as source for copy |
| void Procedural::TextureBuffer::setData | ( | TextureBufferPtr | buffer | ) |
Copy image data (RGBA) from an other TextureBuffer object.
| buffer | Image buffer as source for copy |
| void Procedural::TextureBuffer::setGreen | ( | size_t | x, |
| size_t | y, | ||
| Ogre::Real | green | ||
| ) |
Set green colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| green | New green value of pixel colour [0.0, 1.0] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| void Procedural::TextureBuffer::setGreen | ( | size_t | x, |
| size_t | y, | ||
| Ogre::uchar | green | ||
| ) |
Set green colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| green | New green value of pixel colour [0, 255] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| void Procedural::TextureBuffer::setPixel | ( | size_t | x, |
| size_t | y, | ||
| Ogre::ColourValue | colour | ||
| ) |
Set colour of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| colour | New colour of pixel |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
References Ogre::ColourValue::a, Ogre::ColourValue::b, Ogre::ColourValue::g, and Ogre::ColourValue::r.
| void Procedural::TextureBuffer::setPixel | ( | size_t | x, |
| size_t | y, | ||
| Ogre::Real | red, | ||
| Ogre::Real | green, | ||
| Ogre::Real | blue, | ||
| Ogre::Real | alpha = 1.0f |
||
| ) |
Set colour of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| red | New red value of pixel colour |
| green | New green value of pixel colour [0.0, 1.0] |
| blue | New blue value of pixel colour [0.0, 1.0] |
| alpha | New alpha value of pixel colour [0.0, 1.0] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::InvalidParametersException | Colour value must be between 0 and 1! |
| void Procedural::TextureBuffer::setPixel | ( | size_t | x, |
| size_t | y, | ||
| Ogre::uchar | red, | ||
| Ogre::uchar | green, | ||
| Ogre::uchar | blue, | ||
| Ogre::uchar | alpha = 255 |
||
| ) |
Set colour of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| red | New red value of pixel colour [0, 255] |
| green | New green value of pixel colour [0, 255] |
| blue | New blue value of pixel colour [0, 255] |
| alpha | New alpha value of pixel colour [0, 255] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| void Procedural::TextureBuffer::setRed | ( | size_t | x, |
| size_t | y, | ||
| Ogre::Real | red | ||
| ) |
Set red colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| red | New red value of pixel colour [0.0, 1.0] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
| Ogre::InvalidParametersException | Colour value must be between 0 and 1! |
| void Procedural::TextureBuffer::setRed | ( | size_t | x, |
| size_t | y, | ||
| Ogre::uchar | red | ||
| ) |
Set red colour value of a specified pixel.
| x | X position of pixel to paint on (0 <= x < width) |
| y | Y position of pixel to paint on (0 <= y < height) |
| red | New red value of pixel colour [0, 255] |
| Ogre::InvalidParametersException | Pixel location is out of bounds! |
1.8.17