Commit c9bb40b1 authored by Will Schroeder's avatar Will Schroeder
Browse files

ENH: Added direct write method.

parent 4cd8ce86
......@@ -50,6 +50,7 @@ public:
void GetScalars(vlIdList& ptIds, vlFloatScalars& fs);
// miscellaneous
unsigned char *WritePtr(const int id, const int number);
vlBitScalars &operator=(const vlBitScalars& cs);
void operator+=(const vlBitScalars& cs) {this->S += cs.S;};
void Reset() {this->S.Reset();};
......@@ -58,4 +59,12 @@ protected:
vlBitArray S;
};
// Description:
// Get pointer to data. Useful for direct writes into object. MaxId is bumped
// by number (and memory allocated if necessary). Id is the locaation you
// wish to write into; number is the number of scalars to write.
inline unsigned char *vlBitScalars::WritePtr(const int id, const int number)
{
return this->S.WritePtr(id,number);
}
#endif
......@@ -46,6 +46,7 @@ public:
void GetScalars(vlIdList& ptIds, vlFloatScalars& fs);
// miscellaneous
float *WritePtr(const int id, const int number);
vlFloatScalars &operator=(const vlFloatScalars& fs);
void operator+=(const vlFloatScalars& fs) {this->S += fs.S;};
void Reset() {this->S.Reset();};
......@@ -54,4 +55,13 @@ protected:
vlFloatArray S;
};
// Description:
// Get pointer to data. Useful for direct writes into object. MaxId is bumped
// by number (and memory allocated if necessary). Id is the locaation you
// wish to write into; number is the number of scalars to write.
inline float *vlFloatScalars::WritePtr(const int id, const int number)
{
return this->S.WritePtr(id,number);
}
#endif
......@@ -49,6 +49,7 @@ public:
void GetScalars(vlIdList& ptIds, vlFloatScalars& fs);
// miscellaneous
short *WritePtr(const int id, const int number);
vlShortScalars &operator=(const vlShortScalars& ss);
void operator+=(const vlShortScalars& ss) {this->S += ss.S;};
void Reset() {this->S.Reset();};
......@@ -57,4 +58,13 @@ private:
vlShortArray S;
};
// Description:
// Get pointer to data. Useful for direct writes into object. MaxId is bumped
// by number (and memory allocated if necessary). Id is the locaation you
// wish to write into; number is the number of scalars to write.
inline short *vlShortScalars::WritePtr(const int id, const int number)
{
return this->S.WritePtr(id,number);
}
#endif
......@@ -13,9 +13,6 @@ without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
//
// Scalar values, floating representation
//
#include "SScalars.hh"
vlScalars *vlShortScalars::MakeObject(int sze, int ext)
......
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