Use Timer In vtkRenderWindowInteractor To Do Task
We can create an timer in vtkRenderWindowInteractor object, then register timerEvent for it to trigger task. Here is simple example about rotating a cone automatically. Result:
We can create an timer in vtkRenderWindowInteractor object, then register timerEvent for it to trigger task. Here is simple example about rotating a cone automatically. Result:
The following content involves the concepts of synchronous and asynchronous. Here is a C++ class that simulates a timer. Output asynchronously. To simulate a timer for sequentially outputting numbers, we can do it like this: We cannot execute the task of rendering frames by creating a new thread in this Read more…
The website has just uploaded a new small tool that supports to make image clearer. Link: https://www.weiy.city/image-processing/ The image processing kernel used is: You can also use another editor: https://www.weiy.city/image-filter/ to customize the kernel you desire to get a better result.
The so-called “Qingmiao Law” can be explained in one sentence: County officials would distribute loans to farmers in their jurisdiction for a period of six months every February and June, and then charge interest at an annual rate of 40%, with the interest being cleared along with the principal. Borrowing Read more…
Yang Yan, born during the “Flourishing Era of Kaiyuan” in ancient China’s Tang Dynasty, witnessed the complete process of the empire’s rise and decline. Although Yang Yan’s early career was not smooth, his literary talent had long been renowned throughout the court. In the final days, Emperor Daizong of Tang Read more…
In the Tang Dynasty of China, there was a book called “The Story of Li Wa.” The protagonist, Li Wa, was a fallen courtesan, while the male lead, Zheng Yuanhe, was a scholar from a high-ranking official’s family. The story revolves around Zheng Yuanhe, who encounters Li Wa, the courtesan, Read more…
当智宣子去世后,智襄子接任政务,与韩康子、魏桓子在蓝台举行宴会。宴席上,智襄子戏弄韩康子,并侮辱了他的宰相段规。智国听闻此事后劝告道:“主公如果不防备其他国家的报复,那么报复一定会来临!”智襄子回答说:“局面将由我来决定。如果我不给他们制造麻烦,谁还敢挑事儿呢!” 智国又说:“不是这样的。《夏书》上说:‘一个人犯了三次错误,怨恨不会公然表现出来,应该在未显露之前防备。’君子能够勤勉地处理小事,因此不会有大的困扰。现在主公只是一次宴会就羞辱了别国的君主和宰相,而且没有做好防备,还说‘他们不敢挑事儿’,这样的态度难道不是错的吗?蚊虫、蚂蚁、蜜蜂、蝎子,都能够伤害人,更何况其他国家的君主和宰相呢!”然而,智襄子没有听取劝告。 After the death of Zhixuanzi, Zhixiangzi took over the governance and held a banquet at Lantai with Hankangzi and Weihuanzi.During the banquet, Zhixiangzi mocked Hankangzi and insulted his chancellor, Duan Gui.When Zhiguo heard about this, he advised, “My lord, if you don’t guard against retaliation from other countries, Read more…
My old CPlusPlus project which uses VTK to display 3D scene worked on web page as wasm file. But after upgrading emsdk and compiling the multithreaded version of VTK, I always get the following error on the web page. I test VTK example at vtk/src/Examples/Emscripten/Cxx/Cone from GitHub. But the similar Read more…
We can export a CPlusPlus function in wasm for JS to control the time of invoking vtkRenderWindowInteractor::Start. But after the exported function called, we can’t run the following JS code due to the event loop caused the blockage. Read the code in VTK to find the way to give JS Read more…