11 #ifndef __GT_DAParametric__
12 #define __GT_DAParametric__
43 init(nu, nv, u0,
u1,
v0,
v1);
58 const char *
className()
const override {
return "GT_DAParametric"; }
69 myUinc = myNu > 1 ? (
u1-u0)/
fpreal64(myNu - 1) : 1;
75 void splitU1() { myUinc *= 0.5; myU0 += myUinc*myNu; }
77 void splitV1() { myVinc *= 0.5; myV0 += myVinc*myNv; }
87 {
return sizeof(*this); }
93 {
return getF64(offset, idx) > 0.5; }
95 {
return getF64(offset, idx) > 0.5; }
97 {
return getF64(offset, idx) > 0.5; }
99 {
return idx ? getV(offset) : getU(offset); }
101 {
return idx ? getV(offset) : getU(offset); }
103 {
return idx ? getV(offset) : getU(offset); }
126 return myU0 +
fpreal64(offset % myNu) * myUinc;
130 return myV0 +
fpreal64(offset / myNu) * myVinc;
int64 getI64(GT_Offset offset, int idx) const override
GT_DAParametric(GT_Size nu, GT_Size nv, fpreal64 u0=0, fpreal64 u1=1, fpreal64 v0=0, fpreal64 v1=1)
Useful constructor.
GT_DAParametric(const GT_DAParametric &src)
Copy constructor.
const char * className() const override
fpreal32 getF32(GT_Offset offset, int idx) const override
virtual fpreal64 getF64(GT_Offset offset, int idx=0) const
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
void getIndexedDicts(UT_Array< UT_OptionsHolder > &, UT_IntArray &) const override
GT_Size entries() const override
void init(GT_Size nu, GT_Size nv, fpreal64 u0=0, fpreal64 u1=1, fpreal64 v0=0, fpreal64 v1=1)
Initialize with given data.
GT_Type getTypeInfo() const override
int64 getMemoryUsage() const override
GT_DAParametric()
Default constructor.
GT_DataArrayHandle harden() const override
Abstract data class for an array of float, int or string data.
void getIndexedStrings(UT_StringArray &, UT_IntArray &) const override
UT_IntrusivePtr< GT_DataArray > GT_DataArrayHandle
GT_Offset getDictIndex(GT_Offset, int) const override
static const UT_StringHolder theEmptyString
GT_Offset getStringIndex(GT_Offset, int) const override
virtual GT_Type getTypeInfo() const
Return "type" information for the data. This defaults to GT_TYPE_NONE.
GT_String getS(GT_Offset, int) const override
fpreal64 getF64(GT_Offset offset, int idx) const override
GT_Size getStringIndexCount() const override
fpreal16 getF16(GT_Offset offset, int idx) const override
GT_Storage getStorage() const override
int32 getI32(GT_Offset offset, int idx) const override
uint8 getU8(GT_Offset offset, int idx) const override
Provide uniform parametric coordinates for a curve/surface.
GT_Size getTupleSize() const override
GT_Size getDictIndexCount() const override