Introduced a cast(T) method into the ImageUtils template functor to allow code reading images to handle casting from source data to a form that a user can use more conviently

This commit is contained in:
Robert Osfield
2013-11-06 09:23:21 +00:00
parent ef3a65b93f
commit 6f6c44446c
6 changed files with 126 additions and 5 deletions

View File

@@ -22,7 +22,7 @@
namespace osg
{
struct FindRangeOperator
struct FindRangeOperator : public CastAndScaleToFloatOperation
{
FindRangeOperator():
_rmin(FLT_MAX),
@@ -168,7 +168,7 @@ void _copyRowAndScale(const unsigned char* src, GLenum srcDataType, unsigned cha
}
}
struct RecordRowOperator
struct RecordRowOperator : public CastAndScaleToFloatOperation
{
RecordRowOperator(unsigned int num):_colours(num),_pos(0) {}