How to Erase, Repaint or Delete a 3D object in wpf ? (Timer-Based Animation)
I am using a timer-based animation to animate three 3dobjects. I have used a dispatcher timer for this purpose, and within the timer task method I have called my 3Dobject creation method thrice. Right below that and within the same Timer task method I have included a set of statements that generates new position for the objects.
So, everytime the timer is triggered(currently set to trigger 10 times a second), the cubes are created in a new updated position(very slow though). But the problem I face right now that I could not delete the cubes in old positions. Thus, it leaves a whole trail of cubes when the timer progresses. I want to delete the cube in old position when the cube is created for the new position. Or I would like to use some repaint method or something that just allows me to create the cubes just once and after that it should just allow me to move the cube according to the new positions generated in time.
Basically, I just want all the 3D objects to move according to the new positions generated and should form a simple animation till the timer stops.
Just one humbe request. I am a beginner to graphics programming and please go easy on me. I would greatly appreciate a striaght forward answer with syntax or examples. Links are welcome too, but I don't need solutions in xaml. I am working completely on C#.