Mercile55

Members
  • Content count

    20
  • Joined

  • Last visited

Community Reputation

136 Neutral

About Mercile55

  • Rank
    Member
  1. Cloned Texture not displayed with Linked List

    Are you sure that SetVertexBuffer will copy not only texture coords, but the texture resource too?
  2. Cloned Texture not displayed with Linked List

      If you're setting same texture on all sprites, shouldn't those pointers be all the same then, or have I missed something?
  3. Cloned Texture not displayed with Linked List

      This depends on the case you're testing for performance, whether it's access or management. In most cases, where add/insert/delete are being called many times, it's not a correct statement, as every such call causes whole array to be reallocated. Random access on the other hand is much faster on an array than linked list, providing that the index is known, and iterator isn't being used to find the item.     This is incorrect. Using static_cast<> with a pointer type will not call any constructors for the pointed at type. You're absolutely correct, not on a pointer.
  4. Killing AI

    Remember that modification of the for-loop index inside the loop is one bad programming practice. It usually leads to infinite loops and computer hang ups.
  5. Cloned Texture not displayed with Linked List

    Just one more question for clarity. How does SetTexture get called and m_Texture set in effect ? EDIT(2): I think there's either something wrong with the LinkedList, so that for some reason, things get reset. EDIT: removed invalid statement. Other than that, check pointers to m_Texture when calling Draw for every item on the list, and compare to the root one from m_pSquare (I believe). It maybe easier if you could post complete code of the AddNode, CLinkedList constructor that is being used, and ==/!= overloads, only any code dealing with CNode and head/end objects.
  6. Killing AI

    this will do the job :)
  7. Ray to Plane Collision

    If it's a heightmap, you should already know the A,B,C of any given triangle of the terrain (you must know at least two points on the plane to calculate third), and then use SuperVGA's formula to calculate it. Calculating collision in real-time against a terrain is a waste of time (unless it's morphing infinite terrain), and you want that time to be spent on collision detection with other things, i.e. buildings, moving objects, etc. EDIT: Also, is your Temp vector normalized, when calling DotProduct, or do you normalize inside?
  8. Cloned Texture not displayed with Linked List

    1. You didn't specify what data you're passing when calling CLinkedList::AddNode(VOID*...). 2. With static_cast, you need to be sure that target type is compatible in all terms, i.e. you should not cast statically from base class to an object that derives from it, unless you're absolutely sure of its content. Remember that it will always return something that may not be valid. The null check will only protect you if source pData is null. 3. You also didn't write, how and where Clone is being used, and whether is works, when you Clone more than once. 4. Do you actually set CNode's pNext to the next node's pointer ? If the m_LLFaces.m_HeadNode points to the first CNode, then m_LLFaces.m_HeadNode.pNext will most likely be the second. That's how LL works, pNext is always the second or "this" is the last if it's NULL.   More details please.
  9. How to handle this problem

    There are parsers, i.e. lex and yacc that would help you to create proper parser, but if you want to do it from scratch, all by yourself, then go ahead. Instead of doing it step by step / token by token, allow user to type if entire formula, i.e. 5+5/2 Then tokenize entered text, by splitting it into functional entities, and verify its structure, rejecting when suspicious. i.e. 1. 5 2. + 3. 5 4. / 5. 2 (if you want to handle proper operation order, like *, /, +, -, then make sure that you order entities properly. RPN is the best choice of notation, which orders entities in a simple stack format) then do the operations in the proper order, between the entities. i.e. 3,4,5: 5 / 2 => 2.5 and gives: 1. 5 2. + 3. 2.5 ... etc
  10. Languages for Image Files

    Just make it as a web app. Other than that: C++/python with ImageMagick + QT/GDK+ for UI?
  11. Killing AI

    This isn't right man, try this when all Zombies are dead, and you'll end up with a crash, as when you pop_back the very first element, the iterator becomes invalid. It will be ok, as long as there's at least one element left though. It's always good idea to make sure what does and what doesn't invalidate your iterator, and avoid any such cases if possible. It saves time in the future. remove_if() does the trick for most cases, although it may not be as fast, due to additional calls overhead.
  12. Not necessarily Graphics processing, but image processing in general, i.e. image comparison, effects, i.e. extrusion, edge detection, emboss, take you pick. All of those are best suited for parallel processing. Face detection is one nice pick, and with OpenCV not so hard to do.
  13. You can also ask the Autodesk support, as every legit customer has support.
  14. Basic rotation matrices are clockwise !

    Your example gives (0,-1,0). it should be: [1      0      0     ]   [0] [0  cos(90) -sin(90) ] X [0] [0  sin(90)  cos(90) ]   [1]
  15. Depends on what is it supposed to represent, but in general, you can use an image with a picture box container, or you could draw on any bitmap surface, and then put it in the picture box. Knowing the size of the board, and functionality, create a collection of areas that are in some way functional, and then work your way from there.