Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 09 Oct 2000
Offline Last Active Jul 26 2016 05:06 PM

Posts I've Made

In Topic: Making Win8 touch applications using VS 2008

20 April 2013 - 10:21 AM

Some misinformation in this thread....


You can make win32 applications that respond to touch and that run on windows 8.


x86-based tablets can run win32 applications, only arm-based windows 8 tablets can't.


The win32 wm_gesture messages work on windows 7 and windows 8.


You can make win32 applications that respond to gesture messages using any compiler/IDE that works with the windows 7 platform sdk or later.

In Topic: accessing/modifying data in a tree structure (hierarchical skeleton)

12 January 2013 - 03:14 PM

Does the hierarchy change? If not, you don't need to store in a tree with actual parent-> child ptrs. Instead, store all the bones in an array/vector, and keep the index of each. Instead of traversing the tree, just look up using the index. Keep a map of strings to indices for lookup in asset loading / ui / scripting, but otherwise refer to joints by their index.

In Topic: Possible C++ scope issue with class and vector of pointers

12 January 2013 - 01:15 PM

Do vectors allocate contiguous memory if initialized to size? I assume vectors can't do that when using push_back()? or maybe they re-create themselves after every added element so that it can fit into contiguous memory?

That's an astute question. In addition to setting the number of elements on construction as suggested above, you can also use vector::reserve to ensure a reasonable amount of space is available, without actually changing the number of elements 'in' the vector. This allows you to control when the allocation occurs, while still allowing you to use push_back or insertion iterators. While that's no better in this case, it's worth knowing.

In Topic: Design Patterns, which ones should I be using?

19 December 2012 - 11:22 AM

You shouldn't go out looking to use any particular pattern; but sometime in the future you may find yourself using one if you practice good design. At that point, if you need to explain the architecture of something to someone you can refer to its usage of the decorator pattern or whatever.

I wish I could +1 this harder, and beat lazy interviewers over the head with it.

In Topic: Is C++ too complex?

06 December 2012 - 06:33 AM

People who dislike the compilation model may want to look out for (or even give feedback to the standards committee on) proposals for Modules. There have been proposals mentioning partial classes for easier code-gen tooling as well, but I don't know whether this is part of the Modules working group or separate at this point.