How to : Get event of Camera smooth transition after clicking Navigation Cube

When you want to run your code after camera moves smoothly by clicking Navigation Cube, you can create your own handler for SmoothTransitionCompleteEvent.

As you can see MyErrorHandler in mfc_sandbox, you can create your handler for SmoothTransitionCompleteEvent in the same way.

class MyHandler : public HPS::EventHandler
	MyHandler() : HPS::EventHandler() {}
	virtual ~MyHandler() { Shutdown(); }

	// Override to provide behavior for an event
	virtual HandleResult Handle(HPS::Event const* in_event)
		ASSERT(in_event != NULL);
		HPS::SmoothTransitionCompleteEvent const* error = static_cast<HPS::SmoothTransitionCompleteEvent const*>(in_event);
		HPS::UTF8 msg = HPS::UTF8("SmoothTransitionCompleteEvent\n");
		HPS::WCharArray wmsg;
		return HandleResult::Handled;
// Subscribe _myHandler to handle SmoothTransitionCompleteEvent
HPS::Database::GetEventDispatcher().Subscribe(_myHandler, HPS::Object::ClassID<HPS::SmoothTransitionCompleteEvent>());

Note that SmoothTransitionCompleteEvent will be triggered not only by Navigation Cube.
HPS::View::SmoothTransitionalso trigger this event and your event handler is called.

You can find more information :