| Home | Download | Screen shots | Discussion | Documentation |
|---|


Public Member Functions | |
| sfimage () throw () | |
| sfimage (size_t x, size_t y, size_t comp, const unsigned char *array=0) throw (std::bad_alloc) | |
| Construct. | |
| sfimage (const sfimage &) throw (std::bad_alloc) | |
| Copy constructor. | |
| virtual | ~sfimage () throw () |
| Destroy. | |
| sfimage & | operator= (const sfimage &sfimage) throw (std::bad_alloc) |
| Assignment. | |
| size_t | x () const throw () |
| Get the image width. | |
| size_t | y () const throw () |
| Get the image height. | |
| size_t | comp () const throw () |
| Get the number of components. | |
| const unsigned char * | array () const throw () |
| Get the pixel data. | |
| void | set (size_t x, size_t y, size_t comp, const unsigned char *array) throw (std::bad_alloc) |
| Set the image. | |
| virtual std::auto_ptr< field_value > | clone () const throw (std::bad_alloc) |
| Virtual copy constructor. | |
| virtual field_value & | assign (const field_value &value) throw (std::bad_cast, std::bad_alloc) |
| Virtual assignment. | |
| virtual type_id | type () const throw () |
| Get the field_value::type_id associated with this class. | |
Private Member Functions | |
| virtual void | print (std::ostream &out) const |
| Print to an output stream. | |
Private Attributes | |
| size_t | d_w |
| Image width. | |
| size_t | d_h |
| Image height. | |
| size_t | d_nc |
| Number of components. | |
| unsigned char * | d_pixels |
| Pixel data. | |
|
|
Construct. |
|
||||||||||||||||||||
|
Construct. Note that the pixels read from lower left to upper right, which is a reflection around the y-axis from the "normal" convention. Note also that width and height are specified in pixels, and a pixel may be more than one byte wide. For example, an image with a width and height of 16, and nc==3, would have a pixel array w*h*nc = 16*16*3 = 768 bytes long. See the class intro above for the interpretation of different pixel depths.
|
|
|
Copy constructor.
|
|
|
Get the pixel data.
|
|
|
Virtual assignment.
Implements openvrml::field_value. |
|
|
Virtual copy constructor.
Implements openvrml::field_value. |
|
|
Get the number of components.
|
|
|
Assignment.
|
|
|
Print to an output stream.
Implements openvrml::field_value. |
|
||||||||||||||||||||
|
Set the image.
|
|
|
Get the field_value::type_id associated with this class.
Implements openvrml::field_value. |
|
|
Get the image width.
|
|
|
Get the image height.
|