Commit cdbf211c authored by Ken Martin's avatar Ken Martin
Browse files

added GetUCharPtr method

parent 01b7f988
......@@ -42,6 +42,7 @@ public:
int GetNumberOfScalars() {return (this->S.GetMaxId()+1)/2;};
void Squeeze() {this->S.Squeeze();};
int GetNumberOfValuesPerPoint() {return 2;};
unsigned char *GetUCharPtr() {return S.GetPtr(0);};
// miscellaneous
vlAGraymap &operator=(const vlAGraymap& fs);
......
......@@ -42,6 +42,7 @@ public:
int GetNumberOfScalars() {return (this->S.GetMaxId()+1)/4;};
void Squeeze() {this->S.Squeeze();};
int GetNumberOfValuesPerPoint() {return 4;};
unsigned char *GetUCharPtr() {return S.GetPtr(0);};
// miscellaneous
vlAPixmap &operator=(const vlAPixmap& fs);
......
......@@ -41,6 +41,7 @@ public:
int GetNumberOfValuesPerPoint() {return 1;};
int GetNumberOfScalars() {return (this->S.GetMaxId()+1);};
void Squeeze() {this->S.Squeeze();};
unsigned char *GetUCharPtr() {return S.GetPtr(0);};
// miscellaneous
vlGraymap &operator=(const vlGraymap& fs);
......
......@@ -41,6 +41,7 @@ public:
int GetNumberOfScalars() {return (this->S.GetMaxId()+1)/3;};
void Squeeze() {this->S.Squeeze();};
int GetNumberOfValuesPerPoint() {return 3;};
unsigned char *GetUCharPtr() {return S.GetPtr(0);};
// miscellaneous
vlPixmap &operator=(const vlPixmap& fs);
......
......@@ -80,6 +80,12 @@ public:
// Reclaim any extra memory.
virtual void Squeeze() = 0;
// Description:
// Get data as pointer to unsigned char. Used for high performance texture
// and color manipulation. Not supported for all scalar types: check for
// NULL return value.
virtual unsigned char *GetUCharPtr() {return NULL;};
void GetScalars(vlIdList& ptId, vlFloatScalars& fs);
virtual void ComputeRange();
float *GetRange();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment