blob: a7de648be953845071f9936b9883b5962466b97c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#pragma once
#include "Runtime/mecanim/defs.h"
#include "Runtime/Serialize/Blobification/offsetptr.h"
namespace mecanim
{
namespace animation
{
struct ConstantClip
{
UInt32 curveCount;
OffsetPtr<float> data;
ConstantClip () : curveCount (0) { }
DEFINE_GET_TYPESTRING(ConstantClip)
template<class TransferFunction>
inline void Transfer (TransferFunction& transfer)
{
TRANSFER_BLOB_ONLY(curveCount);
MANUAL_ARRAY_TRANSFER2(float, data, curveCount);
}
};
// Sample functions
void SampleClip (const ConstantClip& curveData, uint32_t outputCount, float* output);
float SampleClipAtIndex (const ConstantClip& curveData, int index);
void DestroyConstantClip (ConstantClip& clip, memory::Allocator& alloc);
void CreateConstantClip (ConstantClip& clip, size_t curveCount, memory::Allocator& alloc);
}
}
|