-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_animation.html
206 lines (204 loc) · 23.1 KB
/
_animation.html
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Nebula: Animation Subsystem</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="custom.css" rel="stylesheet" type="text/css"/>
<link href="custom_dark_theme.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Nebula
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function(){initNavTree('_animation.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div><div class="header">
<div class="headertitle"><div class="title">Animation Subsystem</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="The"></a>
Animation Subsystem</h1>
<p>The <a class="el" href="namespace_animation.html">Animation</a> system provides an interface to play, pause and seek nax3 animation clips, which can be extracted either from an asset file at import, or constructed by some tool. The animation system also provides support for animation events - triggers which should play when an animation arrives at a certain frame. Animations are played as a sequence timeline with several tracks, each track corresponding to a single animation clip for a certain time. The tracks have weights attached to them, and can also be provided a skeleton mask. This allows for animations to play simultaneously, blend together, and mask out certain parts of the skeleton we wish to not animate for that track.</p>
<p>An animation resource is split up into several clips, each clip being a sequence of transforms, a duration, begin and end interpolation modes.</p>
<p>To construct an instance of an animation resource in <a class="el" href="namespace_nebula.html">Nebula</a>, we need to run:</p>
<div class="fragment"><div class="line">CoreAnimation::AnimResourceId <span class="keywordtype">id</span> = <a class="code hl_function" href="namespace_resources.html#a06149171c66844225680ba6cdadbd323">Resources::CreateResource</a>()</div>
<div class="ttc" id="anamespace_resources_html_a06149171c66844225680ba6cdadbd323"><div class="ttname"><a href="namespace_resources.html#a06149171c66844225680ba6cdadbd323">Resources::CreateResource</a></div><div class="ttdeci">Resources::ResourceId CreateResource(const ResourceName &res, const Util::StringAtom &tag, std::function< void(const Resources::ResourceId)> success=nullptr, std::function< void(const Resources::ResourceId)> failed=nullptr, bool immediate=false, bool stream=true)</div><div class="ttdef"><b>Definition</b> resourceserver.h:355</div></div>
</div><!-- fragment --><p>Providing CreateResource with a file with the extension .nax3 and it will load as an animation. This means we have now loaded all the animation data and handle <code>id</code> will hold on to it. Animations are evaluated by interpolating between frames, and there are two functions (which can be passed to the job system), that provides this functionality. The following code shows how we can evaluate animation samples on a job, clip being the clip index we want to evaluate:</p>
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (firstAnimTrack || playing.blend != 1.0f)</div>
<div class="line"> job = <a class="code hl_function" href="namespace_jobs.html#af1a0500babaf3a835fa53d06dc9ba52e">Jobs::CreateJob</a>({ AnimSampleJob });</div>
<div class="line"><span class="keywordflow">else</span></div>
<div class="line"> job = <a class="code hl_function" href="namespace_jobs.html#af1a0500babaf3a835fa53d06dc9ba52e">Jobs::CreateJob</a>({ AnimSampleJobWithMix });</div>
<div class="line"> </div>
<div class="line"><span class="keyword">const</span> <a class="code hl_class" href="class_core_animation_1_1_anim_clip.html">CoreAnimation::AnimClip</a>& <a class="code hl_function" href="namespace_math.html#a6c814a471f23def327660b84a0e9bd29">clip</a> = <a class="code hl_function" href="namespace_core_animation.html#ab3f98480a3c45b5c94165f173c69ba63">CoreAnimation::AnimGetClip</a>(<span class="keywordtype">id</span>, clip);</div>
<div class="line"><a class="code hl_typedef" href="namespace_timing.html#a1884fd8969a4a431040692fbcf9f5f1e">Timing::Tick</a> keyDuration = <a class="code hl_function" href="namespace_math.html#a6c814a471f23def327660b84a0e9bd29">clip</a>.GetKeyDuration();</div>
<div class="line"><a class="code hl_typedef" href="types_8h.html#ad119735112d40fd29a3017de944ccc98">IndexT</a> keyIndex0 = ClampKeyIndex((sampleTime / keyDuration), clip);</div>
<div class="line"><a class="code hl_typedef" href="types_8h.html#ad119735112d40fd29a3017de944ccc98">IndexT</a> keyIndex1 = ClampKeyIndex(keyIndex0 + 1, clip);</div>
<div class="line"><a class="code hl_typedef" href="namespace_timing.html#a1884fd8969a4a431040692fbcf9f5f1e">Timing::Tick</a> inbetweenTicks = InbetweenTicks(sampleTime, clip);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// create scratch memory</span></div>
<div class="line">AnimSampleMixInfo* sampleMixInfo = (AnimSampleMixInfo*)<a class="code hl_function" href="namespace_jobs.html#a56025012a52787cf078d493b6abe2fbe">Jobs::JobAllocateScratchMemory</a>(job, <a class="code hl_enumvalue" href="namespace_memory.html#a876b4d169c56fbc6a73614d357a46a56ad89580c5de6d2ecb0b5057c0928cced4">Memory::ScratchHeap</a>, <span class="keyword">sizeof</span>(<a class="code hl_class" href="struct_core_animation_1_1_anim_sample_mix_info.html">CoreAnimation::AnimSampleMixInfo</a>));</div>
<div class="line"><a class="code hl_function" href="namespace_memory.html#ad8504a1916282a835f1e16e3912e4c87">Memory::Clear</a>(sampleMixInfo, <span class="keyword">sizeof</span>(AnimSampleMixInfo));</div>
<div class="line">sampleMixInfo->sampleType = SampleType::Linear;</div>
<div class="line">sampleMixInfo->sampleWeight = float(inbetweenTicks) / float(keyDuration);</div>
<div class="line">sampleMixInfo->velocityScale.set(timeFactor, timeFactor, timeFactor, 0);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// get pointers to memory and size</span></div>
<div class="line"><a class="code hl_typedef" href="types_8h.html#a869418dc7a0404b6441ebc39c5b4bb37">SizeT</a> src0Size, src1Size;</div>
<div class="line"><span class="keyword">const</span> <a class="code hl_struct" href="struct_math_1_1vec4.html">Math::vec4</a> *src0Ptr = <span class="keyword">nullptr</span>, *src1Ptr = <span class="keyword">nullptr</span>;</div>
<div class="line">AnimComputeSlice(anim, clip, keyIndex0, src0Size, src0Ptr);</div>
<div class="line">AnimComputeSlice(anim, clip, keyIndex1, src1Size, src1Ptr);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// setup output</span></div>
<div class="line"><a class="code hl_struct" href="struct_math_1_1vec4.html">Math::vec4</a>* outSamplesPtr = sampleBuffer.GetSamplesPointer();</div>
<div class="line"><a class="code hl_typedef" href="types_8h.html#a869418dc7a0404b6441ebc39c5b4bb37">SizeT</a> numOutSamples = sampleBuffer.GetNumSamples();</div>
<div class="line"><a class="code hl_typedef" href="types_8h.html#a869418dc7a0404b6441ebc39c5b4bb37">SizeT</a> outSamplesByteSize = numOutSamples * <span class="keyword">sizeof</span>(<a class="code hl_struct" href="struct_math_1_1vec4.html">Math::vec4</a>);</div>
<div class="line"><a class="code hl_typedef" href="types_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* outSampleCounts = sampleBuffer.GetSampleCountsPointer();</div>
<div class="line"> </div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.input.<a class="code hl_variable" href="struct_jobs2_1_1_jobs2_context.html#a4664ae1b831b295ff0fbc5815948205f">numBuffers</a> = 2;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.output.<a class="code hl_variable" href="struct_jobs2_1_1_jobs2_context.html#a4664ae1b831b295ff0fbc5815948205f">numBuffers</a> = 2;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.uniform.<a class="code hl_variable" href="struct_jobs2_1_1_jobs2_context.html#a4664ae1b831b295ff0fbc5815948205f">numBuffers</a> = 3;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// setup inputs</span></div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.input.data[0] = (<span class="keywordtype">void</span>*)src0Ptr;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.input.dataSize[0] = src0Size;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.input.sliceSize[0] = src0Size;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.input.data[1] = (<span class="keywordtype">void</span>*)src1Ptr;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.input.dataSize[1] = src1Size;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.input.sliceSize[1] = src1Size;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// setup outputs</span></div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.output.data[0] = (<span class="keywordtype">void</span>*)outSamplesPtr;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.output.dataSize[0] = outSamplesByteSize;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.output.sliceSize[0] = outSamplesByteSize;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.output.data[1] = (<span class="keywordtype">void</span>*)outSampleCounts;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.output.dataSize[1] = <a class="code hl_function" href="class_util_1_1_round.html#a2660d3525cc878636c7bd78e20ec9dd7">Util::Round::RoundUp16</a>(numOutSamples);</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.output.sliceSize[1] = <a class="code hl_function" href="class_util_1_1_round.html#a2660d3525cc878636c7bd78e20ec9dd7">Util::Round::RoundUp16</a>(numOutSamples);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// setup uniforms</span></div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.uniform.data[0] = &<a class="code hl_function" href="namespace_math.html#a6c814a471f23def327660b84a0e9bd29">clip</a>.CurveByIndex(0);</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.uniform.dataSize[0] = <a class="code hl_function" href="namespace_math.html#a6c814a471f23def327660b84a0e9bd29">clip</a>.GetNumCurves() * <span class="keyword">sizeof</span>(AnimCurve);</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.uniform.data[1] = sampleMixInfo;</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.uniform.dataSize[1] = <span class="keyword">sizeof</span>(AnimSampleMixInfo);</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.uniform.data[2] = (<span class="keyword">const</span> <span class="keywordtype">void</span>*)playing.mask; </div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.uniform.dataSize[2] = <span class="keyword">sizeof</span>(AnimSampleMask*);</div>
<div class="line"><a class="code hl_variable" href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">ctx</a>.uniform.scratchSize = 0;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// schedule jobs</span></div>
<div class="line"><a class="code hl_function" href="namespace_jobs.html#a96f00b4872bd1a2c0dfb4835e72f90e7">Jobs::JobSchedule</a>(job, jobPort, ctx);</div>
<div class="line"> </div>
<div class="line">firstAnimTrack = <span class="keyword">false</span>;</div>
<div class="ttc" id="aclass_core_animation_1_1_anim_clip_html"><div class="ttname"><a href="class_core_animation_1_1_anim_clip.html">CoreAnimation::AnimClip</a></div><div class="ttdoc">An animation clip is a collection of related animation curves (for instance all curves required to an...</div><div class="ttdef"><b>Definition</b> animclip.h:25</div></div>
<div class="ttc" id="aclass_util_1_1_round_html_a2660d3525cc878636c7bd78e20ec9dd7"><div class="ttname"><a href="class_util_1_1_round.html#a2660d3525cc878636c7bd78e20ec9dd7">Util::Round::RoundUp16</a></div><div class="ttdeci">static uint RoundUp16(uint val)</div><div class="ttdoc">round up to nearest 16 bytes boundary</div><div class="ttdef"><b>Definition</b> round.h:65</div></div>
<div class="ttc" id="anamespace_core_animation_html_ab3f98480a3c45b5c94165f173c69ba63"><div class="ttname"><a href="namespace_core_animation.html#ab3f98480a3c45b5c94165f173c69ba63">CoreAnimation::AnimGetClip</a></div><div class="ttdeci">const AnimClip & AnimGetClip(const AnimationId &id, const IndexT index)</div><div class="ttdoc">Get single clip.</div><div class="ttdef"><b>Definition</b> animation.cc:57</div></div>
<div class="ttc" id="anamespace_jobs2_html_a5024ab14716e1ca71effa71a87ddca25"><div class="ttname"><a href="namespace_jobs2.html#a5024ab14716e1ca71effa71a87ddca25">Jobs2::ctx</a></div><div class="ttdeci">Jobs2Context ctx</div><div class="ttdef"><b>Definition</b> jobs2.cc:13</div></div>
<div class="ttc" id="anamespace_jobs_html_a56025012a52787cf078d493b6abe2fbe"><div class="ttname"><a href="namespace_jobs.html#a56025012a52787cf078d493b6abe2fbe">Jobs::JobAllocateScratchMemory</a></div><div class="ttdeci">void * JobAllocateScratchMemory(const JobId &job, const Memory::HeapType heap, const SizeT size)</div><div class="ttdoc">allocate memory for job</div><div class="ttdef"><b>Definition</b> jobs.cc:238</div></div>
<div class="ttc" id="anamespace_jobs_html_a96f00b4872bd1a2c0dfb4835e72f90e7"><div class="ttname"><a href="namespace_jobs.html#a96f00b4872bd1a2c0dfb4835e72f90e7">Jobs::JobSchedule</a></div><div class="ttdeci">void JobSchedule(const JobId &job, const JobPortId &port, const JobContext &ctx, const bool cycleThreads)</div><div class="ttdoc">schedule job to be executed</div><div class="ttdef"><b>Definition</b> jobs.cc:91</div></div>
<div class="ttc" id="anamespace_jobs_html_af1a0500babaf3a835fa53d06dc9ba52e"><div class="ttname"><a href="namespace_jobs.html#af1a0500babaf3a835fa53d06dc9ba52e">Jobs::CreateJob</a></div><div class="ttdeci">JobId CreateJob(const CreateJobInfo &info)</div><div class="ttdoc">create job</div><div class="ttdef"><b>Definition</b> jobs.cc:62</div></div>
<div class="ttc" id="anamespace_math_html_a6c814a471f23def327660b84a0e9bd29"><div class="ttname"><a href="namespace_math.html#a6c814a471f23def327660b84a0e9bd29">Math::clip</a></div><div class="ttdeci">ClipStatus::Type clip(const plane &plane, const line &l, line &outClippedLine)</div><div class="ttdef"><b>Definition</b> plane.h:208</div></div>
<div class="ttc" id="anamespace_memory_html_a876b4d169c56fbc6a73614d357a46a56ad89580c5de6d2ecb0b5057c0928cced4"><div class="ttname"><a href="namespace_memory.html#a876b4d169c56fbc6a73614d357a46a56ad89580c5de6d2ecb0b5057c0928cced4">Memory::ScratchHeap</a></div><div class="ttdeci">@ ScratchHeap</div><div class="ttdef"><b>Definition</b> osxmemoryconfig.h:30</div></div>
<div class="ttc" id="anamespace_memory_html_ad8504a1916282a835f1e16e3912e4c87"><div class="ttname"><a href="namespace_memory.html#ad8504a1916282a835f1e16e3912e4c87">Memory::Clear</a></div><div class="ttdeci">void Clear(void *ptr, size_t numBytes)</div><div class="ttdoc">Overwrite a chunk of memory with 0's.</div><div class="ttdef"><b>Definition</b> osxmemory.cc:229</div></div>
<div class="ttc" id="anamespace_timing_html_a1884fd8969a4a431040692fbcf9f5f1e"><div class="ttname"><a href="namespace_timing.html#a1884fd8969a4a431040692fbcf9f5f1e">Timing::Tick</a></div><div class="ttdeci">int Tick</div><div class="ttdoc">the tick datatype (one tick == 1 millisecond)</div><div class="ttdef"><b>Definition</b> time.h:20</div></div>
<div class="ttc" id="astruct_core_animation_1_1_anim_sample_mix_info_html"><div class="ttname"><a href="struct_core_animation_1_1_anim_sample_mix_info.html">CoreAnimation::AnimSampleMixInfo</a></div><div class="ttdoc">A data structure for providing sample/mixing attributes to asynchronous jobs in the CoreAnimation sub...</div><div class="ttdef"><b>Definition</b> animsamplemixinfo.h:21</div></div>
<div class="ttc" id="astruct_jobs2_1_1_jobs2_context_html_a4664ae1b831b295ff0fbc5815948205f"><div class="ttname"><a href="struct_jobs2_1_1_jobs2_context.html#a4664ae1b831b295ff0fbc5815948205f">Jobs2::Jobs2Context::numBuffers</a></div><div class="ttdeci">SizeT numBuffers</div><div class="ttdef"><b>Definition</b> jobs2.h:111</div></div>
<div class="ttc" id="astruct_math_1_1vec4_html"><div class="ttname"><a href="struct_math_1_1vec4.html">Math::vec4</a></div><div class="ttdoc">A 4D vector.</div><div class="ttdef"><b>Definition</b> vec4.h:24</div></div>
<div class="ttc" id="atypes_8h_html_a65f85814a8290f9797005d3b28e7e5fc"><div class="ttname"><a href="types_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a></div><div class="ttdeci">unsigned char uchar</div><div class="ttdef"><b>Definition</b> types.h:33</div></div>
<div class="ttc" id="atypes_8h_html_a869418dc7a0404b6441ebc39c5b4bb37"><div class="ttname"><a href="types_8h.html#a869418dc7a0404b6441ebc39c5b4bb37">SizeT</a></div><div class="ttdeci">int SizeT</div><div class="ttdef"><b>Definition</b> types.h:49</div></div>
<div class="ttc" id="atypes_8h_html_ad119735112d40fd29a3017de944ccc98"><div class="ttname"><a href="types_8h.html#ad119735112d40fd29a3017de944ccc98">IndexT</a></div><div class="ttdeci">int IndexT</div><div class="ttdef"><b>Definition</b> types.h:48</div></div>
</div><!-- fragment --><p>This code is taken from <a class="el" href="class_characters_1_1_character_context.html" title="Assumes control over the character animation functionalities of a model if it contains a character de...">Characters::CharacterContext</a> and slightly modified to make it simpler. What we are doing is we are setting up a duration, how much time there is between animation ticks, a temporary buffer (called a scratch buffer) to hold intermediate data in the job. We then prepare the job context with all this information, and schedule it to execute. outSamplesPtr will then contain the result of this job when the job is finished.</p>
<p>Using <a class="el" href="class_core_animation_1_1_anim_sample_buffer.html" title="Stores the result of an animation sampling operation, stores samples key values and sample-counts whi...">CoreAnimation::AnimSampleBuffer</a> (which is outSamplesPtr in the above example), we can then figure out how many <a class="el" href="struct_math_1_1vec4.html" title="A 4D vector.">Math::vec4</a> elements we have, such that we can intelligently make decisions about how to use this data to perform transformations. In most cases, a single joint contains 3 <a class="el" href="struct_math_1_1vec4.html" title="A 4D vector.">Math::vec4</a>, because we have a scale, rotation and transformation vector, which when combined will be our final matrix. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">
Generated on Tue Jan 28 2025 22:43:09 for Nebula. Dark theme by <a href="http://majerle.eu" target="_new">Tilen Majerle</a>. All rights reserved.
</li>
</ul>
</div>
<script src="custom.js"></script>
</body>
</html>