#include "samplescommon.h"
#ifdef UNICODE
#define tcout std::wcout
#else
#define tcout std::cout
#endif
class ResizeAnimator : public bex::SceneUpdater {
public:
m_targetEntity(targetEntity),
m_timer(0.0f),
m_even(true)
{
}
virtual void update(float deltaTime) {
const float timerInterval = 10.0f;
m_timer += deltaTime;
if (m_timer >= timerInterval) {
m_timer -= timerInterval;
if (m_even) {
} else {
}
m_even = !m_even;
}
}
private:
float m_timer;
bool m_even;
};
int main(char argc, char** argv) {
try {
bex::setupCamera(scene);
bex::InstanceMap instances;
bex::setupTestScene(bmh, scene, instances);
bex::apiCall(
ILBAddBakeInstance(textureTarget, instances[_T(
"FloorInstance")], &textureTargetEntity));
ResizeAnimator animator(textureTargetEntity);
int returnCode = 0;
if (!bex::displayLiveJob(job, tcout, textureTarget, &animator)) {
returnCode = 1;
}
return returnCode;
} catch(bex::Exception& ex) {
std::cout << "Beast API error" << std::endl;
std::cout << "Error: " << bex::convertStringHandle(errorString) << std::endl;
std::cout << "Info: " << bex::convertStringHandle(extendedError) << std::endl;
return 1;
} catch(std::exception& ex) {
std::cout << "Standard exception" << std::endl;
std::cout << "Error: " << ex.what() << std::endl;;
return 1;
}
}