36 class CL_ClipPrivateIO;
55 void copyContents(
const CL_Clip &v,
int data,
int slerps);
62 {
return myCheckDuplicateNames; }
65 { myCheckDuplicateNames =
val; }
71 void clearAndDestroy();
80 {
return myStart + myTrackLength - 1; }
83 {
return myTrackLength; }
85 void setTrackLength(
int length,
int clear_extra=0);
88 { mySampleRate =
SYSmax(rate, 1.0e-4); }
91 {
return mySampleRate; }
96 int getTracks(
UT_IntArray &list,
const char *pat)
const;
99 int isTimeDependent()
const;
106 int numSlerps()
const;
108 int copySlerpAttributes(
const CL_Clip &v,
113 int findSlerp(
const CL_Track *track,
int &idx)
const;
115 int getSlerp(
int slerp_idx,
127 mySXTracks.setCapacity(capacity);
128 mySYTracks.setCapacity(capacity);
129 mySZTracks.setCapacity(capacity);
132 int setSlerp(
int x_idx,
int y_idx,
int z_idx);
134 int slerpBlend(
int slerp_idx,
142 int slerpBlend(
int slerp_idx,
150 int validateSlerps();
156 {
return mySRotOrder; }
163 void removeTrack(
int idx);
166 { myTracks.setCapacity(capacity); }
174 {
return myTracks.entries(); }
177 {
return (index >= 0 && index < myTracks.entries()) ?
178 myTracks(index) : 0; }
181 {
return (index >= 0 && index < myTracks.entries()) ?
182 myTracks(index) : 0; }
197 {
return track->evaluateSingle(index - myStart); }
200 {
return evaluateSingle(track, getIndex(t)); }
204 {
return evaluateSingle(track, getIndexF(f, fps)); }
208 void evaluate(
const CL_Track *track,
210 fpreal *data,
int size)
const;
212 int evaluateSlerp(
int slerp_idx,
219 fpreal *data,
int size)
const
220 { evaluate(track, getIndex(start_time),
221 getIndex(stop_time), data, size); }
223 void resampleTime(
const CL_Track *track,
225 fpreal *data,
int size)
const;
230 void getHeight(
const CL_Track *track,
237 void evaluateHeightRange(
const CL_Track *track,
239 fpreal *data,
int size)
const;
248 int extendTime(
fpreal t,
int *delta);
256 {
return getTime(myStart); }
259 {
return getTime(myStart + myTrackLength - 1); }
261 void dupAttributes(
const CL_Clip &);
268 {
return time*mySampleRate; }
271 {
return index / mySampleRate; }
274 {
return index*fps/mySampleRate + 1;}
277 {
return getTimeF(frame, fps)*mySampleRate; }
280 {
return (frame - 1) / fps; }
283 {
return time*fps + 1; }
291 fpreal rightpos,
int discard);
306 const CL_ClipPrivateIO *priv = 0,
307 bool use_blosc_compresssion =
false)
const;
309 const CL_ClipPrivateIO *priv = 0,
310 bool use_blosc_compresssion =
false)
const;
311 int save(
const char *nm)
const;
316 int load(
const char *nm);
318 int64 getMemoryUsage(
bool inclusive)
const;
339 void crackSmooth(
int xidx,
int yidx,
int zidz,
347 int isSameRange(
const CL_Clip &v)
const;
353 void destroyStashed();
372 int setAttribute(
const UT_StringHolder &
name,
const int &v,
int track=-1,
int sample=-1 );
390 int getAttribute(
const UT_StringHolder &
name,
int &v,
int track=-1,
int sample=-1 )
const;
429 {
return myIsUsingCurrentFrame; }
431 { myIsUsingCurrentFrame =
b; myIsConstantSet =
false; }
435 if (myIsUsingCurrentFrame)
437 if (!myIsConstantSet)
438 const_cast<CL_Clip*
>(
this)->computeIsConstant();
442 { myIsConstantSet =
false; }
454 void clearTrackNames(
bool set_to_null=
true);
456 void computeIsConstant();
476 int myStashedTracksNext;
478 bool myCheckDuplicateNames;
479 bool myIsConstantSet;
481 unsigned myDisableRemovingTrackNames:1,
482 myIsUsingCurrentFrame:1,
485 class ClearTrackNamesTask;
486 friend class ClearTrackNamesTask;
504 *index = track ? track->
getIndex() : -1;
513 *index = track ? track->
getIndex() : -1;
524 if (track<0 && sample<0)
526 else if(track <0 && sample>=0)
528 else if(track >=0 && sample<0)
535 #endif // __CL_Clip__
fpreal evaluateSingleFrame(const CL_Track *track, fpreal f, fpreal fps) const
static fpreal getTimeF(fpreal frame, fpreal fps)
void setTrackCapacity(int capacity)
GT_API const UT_StringHolder time
UT_XformOrder::xyzOrder getSlerpOrder() const
void(* CL_InfoCallback)(UT_String &result, void *data, int idx)
GLsizei const GLchar *const * path
const CL_ClipAttributes * getAttributes() const
CL_Track * getTrack(int index)
fpreal getSampleRate() const
GLuint GLsizei GLsizei * length
UT_SharedPtr< CL_Clip > CL_ClipPtr
**But if you need a result
bool isUsingCurrentFrame() const
void setIsUsingCurrentFrame(bool b)
fpreal getStartTime() const
void evaluateTime(const CL_Track *track, fpreal start_time, fpreal stop_time, fpreal *data, int size) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
UT_VariantMap CL_ClipAttributes
int getCheckDuplicateNames() const
DATA_TYPE findSymbol(const UT_StringRef &symbol) const
static const UT_StringHolder theEmptyString
fpreal evaluateSingle(const CL_Track *track, fpreal index) const
GLdouble GLdouble GLint GLint order
fpreal getFrame(fpreal index, fpreal fps) const
void trim(std::string &s)
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
void setStart(fpreal start)
int sprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
void setSlerpCapacity(int capacity)
void setSampleRate(fpreal rate)
void setCheckDuplicateNames(int val)
LeafData & operator=(const LeafData &)=delete
fpreal evaluateSingleTime(const CL_Track *track, fpreal t) const
static bool buildKey(const UT_StringHolder &name, int track, int sample, UT_WorkBuffer &key)
void setSlerpOrder(UT_XformOrder::xyzOrder o)
int getTrackLength() const
fpreal getIndex(fpreal time) const
static fpreal getFrameT(fpreal time, fpreal fps)
fpreal getEndTime() const
UT_ValArray< const CL_Clip * > CL_ClipListC
UT_ValArray< CL_Clip * > CL_ClipList
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
fpreal getIndexF(fpreal frame, fpreal fps) const
ImageBuf OIIO_API crop(const ImageBuf &src, ROI roi={}, int nthreads=0)
const CL_Track * getTrack(int index) const
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
fpreal getTime(fpreal index) const
SYS_FORCE_INLINE bool isstring() const