Wednesday, December 23, 2015

Point and Spin

Today was a day to perfect and make sure pausing and tessellation worked the way it should. Thankfully I fixed it before committing the most recent work, since I was putting the commands for resuming the work in the Scale change command, instead of the actual run command. Been a long day...

As for the tessellation, I figured a sharp change in tessellation would not do, so I incorporated a smooth linear interpolation from the current displacement to a target displacement. I also figured a more interesting movement (like a spinning motion) would be more interesting to show off the tessellation, so I put in a torque force that was applied, with angular drag doing the work for negating rewards for me. Lo and behold, a spinny-spiky-crystal thing!


As for studies today, I mainly went over associative containers and iterators (and ran out of notebook space). For example, casting from const_iterators to iterators is impossible, but by constructing a new iterator and moving it to the current const_iterator position is feasible using advance and distance. Problem is....is it a random access iterator, or a bidirectional iterator?

Also, maps have a very interesting "add and update" logic associated with their [ ] operators, so one can balance between using [ ] and inserts to make faster updating and adding, respectively.

Also, the age-old question that confuses many new to associative containers (me): What is the difference between equality and equivalence?

Equality? Just equal values. Equivalence? Neither precedes the other in a sort order. Think of it as !(x < y) && !(y < x). All strange sort orders (ignoring case, <=) applies, although it's wise to return false on an equal operator.

What next? If artists don't come to my rescue, I might just work on procedural mesh creation.

No comments:

Post a Comment