re-add morph animation
This commit is contained in:
@@ -117,6 +117,11 @@ extern "C" {
|
|||||||
((FilamentViewer*)viewer)->applyWeights(weights, count);
|
((FilamentViewer*)viewer)->applyWeights(weights, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void animate_weights(void* viewer, float* data, int numWeights, int numFrames, float frameRate) {
|
||||||
|
__android_log_print(ANDROID_LOG_VERBOSE, "filament_api", "Animating %d frames, each with %d weights", numFrames, numWeights);
|
||||||
|
((FilamentViewer*)viewer)->animateWeights((float*)data, numWeights, numFrames, frameRate);
|
||||||
|
}
|
||||||
|
|
||||||
void get_target_names(void* viewer, char* meshName, char*** outPtr, int* countPtr ) {
|
void get_target_names(void* viewer, char* meshName, char*** outPtr, int* countPtr ) {
|
||||||
StringList names = ((FilamentViewer*)viewer)->getTargetNames(meshName);
|
StringList names = ((FilamentViewer*)viewer)->getTargetNames(meshName);
|
||||||
|
|
||||||
@@ -136,9 +141,11 @@ extern "C" {
|
|||||||
void free_pointer(char*** ptr, int size) {
|
void free_pointer(char*** ptr, int size) {
|
||||||
__android_log_print(ANDROID_LOG_VERBOSE, "filament_api", "Freeing %d char pointers", size);
|
__android_log_print(ANDROID_LOG_VERBOSE, "filament_api", "Freeing %d char pointers", size);
|
||||||
for(int i = 0; i < size; i++) {
|
for(int i = 0; i < size; i++) {
|
||||||
free((*ptr)[i]);
|
__android_log_print(ANDROID_LOG_VERBOSE, "filament_api", "%d", i);
|
||||||
|
// free((*ptr)[i]);
|
||||||
}
|
}
|
||||||
free(*ptr);
|
__android_log_print(ANDROID_LOG_VERBOSE, "filament_api", "Free complete");
|
||||||
|
// free(*ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void release_source_assets(void* viewer) {
|
void release_source_assets(void* viewer) {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ interface FilamentInterop : Library {
|
|||||||
|
|
||||||
fun load_gltf(viewer:Pointer, uri:String, relativeResourcePath:String) : Pointer;
|
fun load_gltf(viewer:Pointer, uri:String, relativeResourcePath:String) : Pointer;
|
||||||
|
|
||||||
fun set_camera(viewer:Pointer, nodeName:String) : Pointer;
|
fun set_camera(viewer:Pointer, nodeName:String) : Boolean;
|
||||||
|
|
||||||
fun render(viewer:Pointer);
|
fun render(viewer:Pointer);
|
||||||
|
|
||||||
@@ -52,9 +52,11 @@ interface FilamentInterop : Library {
|
|||||||
|
|
||||||
fun apply_weights(viewer:Pointer, weights:FloatArray, size:Int);
|
fun apply_weights(viewer:Pointer, weights:FloatArray, size:Int);
|
||||||
|
|
||||||
|
fun animate_weights(viewer:Pointer, frames:FloatArray, numWeights:Int, numFrames:Int, frameRate:Float);
|
||||||
|
|
||||||
fun get_target_names(viewer:Pointer, meshName:String, outPtr:PointerByReference, outLen:IntByReference);
|
fun get_target_names(viewer:Pointer, meshName:String, outPtr:PointerByReference, outLen:IntByReference);
|
||||||
|
|
||||||
fun free_pointer(ptr:Pointer, size:Int)
|
fun free_pointer(ptr:PointerByReference, size:Int)
|
||||||
|
|
||||||
fun release_source_assets(viewer:Pointer)
|
fun release_source_assets(viewer:Pointer)
|
||||||
|
|
||||||
|
|||||||
@@ -182,11 +182,15 @@ PlatformView {
|
|||||||
"setCamera" -> {
|
"setCamera" -> {
|
||||||
if (_viewer == null)
|
if (_viewer == null)
|
||||||
return;
|
return;
|
||||||
_lib.set_camera(
|
val success = _lib.set_camera(
|
||||||
_viewer!!,
|
_viewer!!,
|
||||||
call.arguments as String
|
call.arguments as String
|
||||||
)
|
)
|
||||||
result.success("OK");
|
if(success) {
|
||||||
|
result.success("OK");
|
||||||
|
} else {
|
||||||
|
result.error("failed","failed", "Failed to set camera")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"zoom" -> {
|
"zoom" -> {
|
||||||
if(_viewer == null)
|
if(_viewer == null)
|
||||||
@@ -203,8 +207,14 @@ PlatformView {
|
|||||||
|
|
||||||
val names = arrPtr.value.getStringArray(0, countPtr.value);
|
val names = arrPtr.value.getStringArray(0, countPtr.value);
|
||||||
|
|
||||||
_lib.free_pointer(arrPtr.value, countPtr.getValue())
|
Log.v(TAG, "Got target names $names")
|
||||||
val namesAsList = names.toCollection(ArrayList())
|
|
||||||
|
val namesAsList = names.toCollection(ArrayList())
|
||||||
|
|
||||||
|
_lib.free_pointer(arrPtr, countPtr.getValue())
|
||||||
|
|
||||||
|
Log.v(TAG, "Free complete")
|
||||||
|
|
||||||
result.success(namesAsList)
|
result.success(namesAsList)
|
||||||
}
|
}
|
||||||
"applyWeights" -> {
|
"applyWeights" -> {
|
||||||
@@ -215,6 +225,17 @@ PlatformView {
|
|||||||
_lib.apply_weights(_viewer!!, weights.toFloatArray(), weights.size)
|
_lib.apply_weights(_viewer!!, weights.toFloatArray(), weights.size)
|
||||||
result.success("OK");
|
result.success("OK");
|
||||||
}
|
}
|
||||||
|
"animateWeights" -> {
|
||||||
|
if(_viewer == null)
|
||||||
|
return;
|
||||||
|
val args = call.arguments as ArrayList<Any?>
|
||||||
|
val frames = args[0] as ArrayList<Float>;
|
||||||
|
val numWeights = args[1] as Int
|
||||||
|
val frameRate = args[2] as Double
|
||||||
|
|
||||||
|
_lib.animate_weights(_viewer!!, frames.toFloatArray(), numWeights, (frames.size / numWeights).toInt(), frameRate.toFloat())
|
||||||
|
result.success("OK");
|
||||||
|
}
|
||||||
"panStart" -> {
|
"panStart" -> {
|
||||||
val args = call.arguments as ArrayList<Any?>
|
val args = call.arguments as ArrayList<Any?>
|
||||||
_lib.grab_begin(_viewer!!, args[0] as Int, args[1] as Int, true)
|
_lib.grab_begin(_viewer!!, args[0] as Int, args[1] as Int, true)
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ class _MyAppState extends State<MyApp> {
|
|||||||
_filamentController.zoom(-1.0);
|
_filamentController.zoom(-1.0);
|
||||||
},
|
},
|
||||||
child: const Text('zoom in')),
|
child: const Text('zoom in')),
|
||||||
|
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_filamentController.zoom(1.0);
|
_filamentController.zoom(1.0);
|
||||||
@@ -93,33 +92,50 @@ class _MyAppState extends State<MyApp> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
_filamentController.setCamera("Camera.001");
|
_filamentController.setCamera("Camera.001");
|
||||||
},
|
},
|
||||||
child: const Text('Set Camera')),
|
child: const Text('set camera')),
|
||||||
Builder(builder:(innerCtx) => ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () {
|
||||||
final names = await _filamentController
|
final framerate = 30;
|
||||||
.getTargetNames("Cube.001");
|
final totalSecs = 5;
|
||||||
|
final numWeights = 8;
|
||||||
await showDialog(
|
final totalFrames = framerate * totalSecs;
|
||||||
builder: (ctx) {
|
final frames = List.generate(
|
||||||
return Container(
|
totalFrames,
|
||||||
color: Colors.white,
|
(frame) => List.filled(
|
||||||
height:200, width:200,
|
numWeights, frame / totalFrames))
|
||||||
child: Column(
|
.reduce((accum, next) => accum + next);
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: names
|
_filamentController.animate(frames, numWeights, framerate.toDouble());
|
||||||
.map((name) => Text(name))
|
|
||||||
.cast<Widget>()
|
|
||||||
.toList() +
|
|
||||||
<Widget>[
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: () =>
|
|
||||||
Navigator.of(ctx).pop(),
|
|
||||||
child: Text("Close"))
|
|
||||||
]));
|
|
||||||
},
|
|
||||||
context: innerCtx);
|
|
||||||
},
|
},
|
||||||
child: const Text('get target names'))),
|
child: const Text('animate weights')),
|
||||||
|
Builder(
|
||||||
|
builder: (innerCtx) => ElevatedButton(
|
||||||
|
onPressed: () async {
|
||||||
|
final names = await _filamentController
|
||||||
|
.getTargetNames("Cube.001");
|
||||||
|
|
||||||
|
await showDialog(
|
||||||
|
builder: (ctx) {
|
||||||
|
return Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 200,
|
||||||
|
width: 200,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: names
|
||||||
|
.map((name) => Text(name))
|
||||||
|
.cast<Widget>()
|
||||||
|
.toList() +
|
||||||
|
<Widget>[
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () =>
|
||||||
|
Navigator.of(ctx).pop(),
|
||||||
|
child: Text("Close"))
|
||||||
|
]));
|
||||||
|
},
|
||||||
|
context: innerCtx);
|
||||||
|
},
|
||||||
|
child: const Text('get target names'))),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await _filamentController.panStart(1, 1);
|
await _filamentController.panStart(1, 1);
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ static void* freeResourceGlobal(ResourceBuffer rb) {
|
|||||||
for(int i =0 ; i < [frameData count]; i++) {
|
for(int i =0 ; i < [frameData count]; i++) {
|
||||||
*(framesArr+i) = [[frameData objectAtIndex:i] floatValue];
|
*(framesArr+i) = [[frameData objectAtIndex:i] floatValue];
|
||||||
}
|
}
|
||||||
_viewer->animateWeights((float*)framesArr, [numWeights intValue], [frameData count], [frameRate floatValue]);
|
_viewer->animateWeights((float*)framesArr, [numWeights intValue], [frameData count] / numWeights, [frameRate floatValue]);
|
||||||
result(@"OK");
|
result(@"OK");
|
||||||
} else if([@"createMorpher" isEqualToString:call.method]) {
|
} else if([@"createMorpher" isEqualToString:call.method]) {
|
||||||
const char* meshName = [call.arguments[0] UTF8String];
|
const char* meshName = [call.arguments[0] UTF8String];
|
||||||
|
|||||||
@@ -517,6 +517,10 @@ void FilamentViewer::render() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(morphAnimationBuffer) {
|
||||||
|
updateMorphAnimation();
|
||||||
|
}
|
||||||
|
|
||||||
math::float3 eye, target, upward;
|
math::float3 eye, target, upward;
|
||||||
manipulator->getLookAt(&eye, &target, &upward);
|
manipulator->getLookAt(&eye, &target, &upward);
|
||||||
_mainCamera->lookAt(eye, target, upward);
|
_mainCamera->lookAt(eye, target, upward);
|
||||||
@@ -544,52 +548,37 @@ void FilamentViewer::updateViewportAndCameraProjection(int width, int height, fl
|
|||||||
Log("Set viewport to %d %d", _width, _height);
|
Log("Set viewport to %d %d", _width, _height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FilamentViewer::animateWeights(float* data, int numWeights, int numFrames, float frameRate) {
|
||||||
|
morphAnimationBuffer = std::make_unique<MorphAnimationBuffer>(data, numWeights, numFrames, 1000 / frameRate );
|
||||||
|
}
|
||||||
|
|
||||||
|
void FilamentViewer::updateMorphAnimation() {
|
||||||
|
|
||||||
|
if(morphAnimationBuffer->frameIndex >= morphAnimationBuffer->numFrames) {
|
||||||
|
morphAnimationBuffer = nullptr;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(morphAnimationBuffer->frameIndex == -1) {
|
||||||
|
morphAnimationBuffer->frameIndex++;
|
||||||
|
morphAnimationBuffer->startTime = std::chrono::high_resolution_clock::now();
|
||||||
|
applyWeights(morphAnimationBuffer->frameData, morphAnimationBuffer->numWeights);
|
||||||
|
} else {
|
||||||
|
std::chrono::duration<double, std::milli> dur = std::chrono::high_resolution_clock::now() - morphAnimationBuffer->startTime;
|
||||||
|
int frameIndex = dur.count() / morphAnimationBuffer->frameLength;
|
||||||
|
if(frameIndex != morphAnimationBuffer->frameIndex) {
|
||||||
|
morphAnimationBuffer->frameIndex = frameIndex;
|
||||||
|
applyWeights(morphAnimationBuffer->frameData + (morphAnimationBuffer->frameIndex * morphAnimationBuffer->numWeights), morphAnimationBuffer->numWeights);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//void FilamentViewer::updateAnimation(AnimationBuffer animation, std::function<void(int)> moo) {
|
|
||||||
// if(morphAnimationBuffer.frameIndex >= animation.numFrames) {
|
|
||||||
// this.animation = null;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(animation.frameIndex == -1) {
|
|
||||||
// animation->frameIndex++;
|
|
||||||
// animation->lastTime = std::chrono::high_resolution_clock::now();
|
|
||||||
// callback(); // applyWeights(morphAnimationBuffer->frameData, morphAnimationBuffer->numWeights);
|
|
||||||
// } else {
|
|
||||||
// duration dur = std::chrono::high_resolution_clock::now() - morphAnimationBuffer->lastTime;
|
|
||||||
// float msElapsed = dur.count();
|
|
||||||
// if(msElapsed > animation->frameLength) {
|
|
||||||
// animation->frameIndex++;
|
|
||||||
// animation->lastTime = std::chrono::high_resolution_clock::now();
|
|
||||||
// callback(); // applyWeights(frameData + (frameIndex * numWeights), numWeights);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
// void FilamentViewer::updateMorphAnimation() {
|
|
||||||
|
}
|
||||||
// if(morphAnimationBuffer->frameIndex >= morphAnimationBuffer->numFrames) {
|
|
||||||
// morphAnimationBuffer = nullptr;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if(morphAnimationBuffer->frameIndex == -1) {
|
|
||||||
// morphAnimationBuffer->frameIndex++;
|
|
||||||
// morphAnimationBuffer->startTime = std::chrono::high_resolution_clock::now();
|
|
||||||
// applyWeights(morphAnimationBuffer->frameData, morphAnimationBuffer->numWeights);
|
|
||||||
// } else {
|
|
||||||
// std::chrono::duration<double, std::milli> dur = std::chrono::high_resolution_clock::now() - morphAnimationBuffer->startTime;
|
|
||||||
// int frameIndex = dur.count() / morphAnimationBuffer->frameLength;
|
|
||||||
// if(frameIndex != morphAnimationBuffer->frameIndex) {
|
|
||||||
// morphAnimationBuffer->frameIndex = frameIndex;
|
|
||||||
// applyWeights(morphAnimationBuffer->frameData + (morphAnimationBuffer->frameIndex * morphAnimationBuffer->numWeights), morphAnimationBuffer->numWeights);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void FilamentViewer::updateEmbeddedAnimation() {
|
// void FilamentViewer::updateEmbeddedAnimation() {
|
||||||
// duration<double> dur = duration_cast<duration<double>>(std::chrono::high_resolution_clock::now() - embeddedAnimationBuffer->lastTime);
|
// duration<double> dur = duration_cast<duration<double>>(std::chrono::high_resolution_clock::now() - embeddedAnimationBuffer->lastTime);
|
||||||
@@ -632,26 +621,6 @@ void FilamentViewer::updateViewportAndCameraProjection(int width, int height, fl
|
|||||||
// embeddedAnimationBuffer = make_unique<EmbeddedAnimationBuffer>(index, _animator->getAnimationDuration(index));
|
// embeddedAnimationBuffer = make_unique<EmbeddedAnimationBuffer>(index, _animator->getAnimationDuration(index));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// void FilamentViewer::animateWeights(float* data, int numWeights, int length, float frameRate) {
|
|
||||||
// morphAnimationBuffer = std::make_unique<MorphAnimationBuffer>(data, numWeights, length / numWeights, 1000 / frameRate );
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if(shaderPath) {
|
|
||||||
// opaqueShaderResources = _loadResource(opaqueShaderPath);
|
|
||||||
// fadeShaderResources = _loadResource(fadeShaderPath);
|
|
||||||
// _materialProvider = createGPUMorphShaderLoader(
|
|
||||||
// opaqueShaderResources.data,
|
|
||||||
// opaqueShaderResources.size,
|
|
||||||
// fadeShaderResources.data,
|
|
||||||
// fadeShaderResources.size,
|
|
||||||
// _engine);
|
|
||||||
// } else {
|
|
||||||
// }
|
|
||||||
// void printWeights(float* weights, int numWeights) {
|
|
||||||
// for(int i =0; i < numWeights; i++) {
|
|
||||||
// // std::cout << weights[i];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void FilamentViewer::createMorpher(const char* meshName, int* primitives, int numPrimitives) {
|
// void FilamentViewer::createMorpher(const char* meshName, int* primitives, int numPrimitives) {
|
||||||
// // morphHelper = new gltfio::GPUMorphHelper((FFilamentAsset*)_asset, meshName, primitives, numPrimitives);
|
// // morphHelper = new gltfio::GPUMorphHelper((FFilamentAsset*)_asset, meshName, primitives, numPrimitives);
|
||||||
@@ -680,4 +649,25 @@ void FilamentViewer::updateViewportAndCameraProjection(int width, int height, fl
|
|||||||
// // xform = composeMatrix(translation + float3 { weights[0], weights[1], weights[2] }, rotation, scale );
|
// // xform = composeMatrix(translation + float3 { weights[0], weights[1], weights[2] }, rotation, scale );
|
||||||
// transformManager.setTransform(node, xform);
|
// transformManager.setTransform(node, xform);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// void FilamentViewer::updateAnimation(AnimationBuffer animation, std::function<void(int)> callback) {
|
||||||
|
// if(morphAnimationBuffer.frameIndex >= animation.numFrames) {
|
||||||
|
// this.animation = null;
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(animation.frameIndex == -1) {
|
||||||
|
// animation->frameIndex++;
|
||||||
|
// animation->lastTime = std::chrono::high_resolution_clock::now();
|
||||||
|
// callback(); // applyWeights(morphAnimationBuffer->frameData, morphAnimationBuffer->numWeights);
|
||||||
|
// } else {
|
||||||
|
// duration dur = std::chrono::high_resolution_clock::now() - morphAnimationBuffer->lastTime;
|
||||||
|
// float msElapsed = dur.count();
|
||||||
|
// if(msElapsed > animation->frameLength) {
|
||||||
|
// animation->frameIndex++;
|
||||||
|
// animation->lastTime = std::chrono::high_resolution_clock::now();
|
||||||
|
// callback(); // applyWeights(frameData + (frameIndex * numWeights), numWeights);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
@@ -72,6 +72,23 @@ namespace polyvox {
|
|||||||
using LoadResource = std::function<ResourceBuffer(const char* uri)>;
|
using LoadResource = std::function<ResourceBuffer(const char* uri)>;
|
||||||
using FreeResource = std::function<void (ResourceBuffer)>;
|
using FreeResource = std::function<void (ResourceBuffer)>;
|
||||||
|
|
||||||
|
struct MorphAnimationBuffer {
|
||||||
|
|
||||||
|
MorphAnimationBuffer(float* frameData,
|
||||||
|
int numWeights,
|
||||||
|
int numFrames,
|
||||||
|
float frameLength) : frameData(frameData), numWeights(numWeights), numFrames(numFrames), frameLength(frameLength) {
|
||||||
|
}
|
||||||
|
|
||||||
|
int frameIndex = -1;
|
||||||
|
int numFrames;
|
||||||
|
float frameLength;
|
||||||
|
time_point_t startTime;
|
||||||
|
|
||||||
|
float* frameData;
|
||||||
|
int numWeights;
|
||||||
|
};
|
||||||
|
|
||||||
class FilamentViewer {
|
class FilamentViewer {
|
||||||
public:
|
public:
|
||||||
FilamentViewer(void* layer, const char* opaqueShaderPath, const char* fadeShaderPath, LoadResource loadResource, FreeResource freeResource);
|
FilamentViewer(void* layer, const char* opaqueShaderPath, const char* fadeShaderPath, LoadResource loadResource, FreeResource freeResource);
|
||||||
@@ -87,7 +104,7 @@ namespace polyvox {
|
|||||||
StringList getTargetNames(const char* meshName);
|
StringList getTargetNames(const char* meshName);
|
||||||
Manipulator<float>* manipulator;
|
Manipulator<float>* manipulator;
|
||||||
void applyWeights(float* weights, int count);
|
void applyWeights(float* weights, int count);
|
||||||
// void animateWeights(float* data, int numWeights, int length, float frameRate);
|
void animateWeights(float* data, int numWeights, int length, float frameRate);
|
||||||
// void animateBones();
|
// void animateBones();
|
||||||
void playAnimation(int index);
|
void playAnimation(int index);
|
||||||
bool setCamera(const char* nodeName);
|
bool setCamera(const char* nodeName);
|
||||||
@@ -140,18 +157,20 @@ namespace polyvox {
|
|||||||
|
|
||||||
float _cameraFocalLength = 0.0f;
|
float _cameraFocalLength = 0.0f;
|
||||||
|
|
||||||
|
void updateMorphAnimation();
|
||||||
|
// void updateEmbeddedAnimation();
|
||||||
|
|
||||||
|
// animation flags;
|
||||||
|
bool isAnimating;
|
||||||
|
unique_ptr<MorphAnimationBuffer> morphAnimationBuffer;
|
||||||
|
// unique_ptr<EmbeddedAnimationBuffer> embeddedAnimationBuffer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// void updateMorphAnimation();
|
|
||||||
// void updateEmbeddedAnimation();
|
|
||||||
|
|
||||||
// animation flags;
|
|
||||||
// bool isAnimating;
|
|
||||||
// unique_ptr<MorphAnimationBuffer> morphAnimationBuffer;
|
|
||||||
// unique_ptr<EmbeddedAnimationBuffer> embeddedAnimationBuffer;
|
|
||||||
|
|
||||||
// struct EmbeddedAnimationBuffer {
|
// struct EmbeddedAnimationBuffer {
|
||||||
|
|
||||||
@@ -162,19 +181,4 @@ namespace polyvox {
|
|||||||
// time_point_t lastTime;
|
// time_point_t lastTime;
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// struct MorphAnimationBuffer {
|
|
||||||
|
|
||||||
// MorphAnimationBuffer(float* frameData,
|
|
||||||
// int numWeights,
|
|
||||||
// int numFrames,
|
|
||||||
// float frameLength) : frameData(frameData), numWeights(numWeights), numFrames(numFrames), frameLength(frameLength) {
|
|
||||||
// }
|
|
||||||
|
|
||||||
// int frameIndex = -1;
|
|
||||||
// int numFrames;
|
|
||||||
// float frameLength;
|
|
||||||
// time_point_t startTime;
|
|
||||||
|
|
||||||
// float* frameData;
|
|
||||||
// int numWeights;
|
|
||||||
// };
|
|
||||||
Reference in New Issue
Block a user