Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

693 Good

About tom_mai78101

  • Rank
    Advanced Member

Personal Information


  • Twitter
  • Github
  • Twitch
  • Steam

Recent Profile Visitors

20728 profile views
  1. I'm doing research at the moment, and I came across some interesting things with Window Styles for OpenGL on Windows platform: WS_CLIPCHILDREN and WS_CLIPSIBLINGS are both required for OpenGL applications. WS_POPUP is preferred over WS_OVERLAPPEDWINDOW, WS_OVERLAPPED, and WS_POPUPWINDOW. But, it didn't say if it's required, or it's explicitly not necessary for OpenGL applications. WS_BORDER is also required for OpenGL applications. WS_VISIBLE is necessary as a precaution. So all of those explanations are just comments and posts spread out across many different forums, answer posts, StackOverflow, and on old MSDN blog comments. There's too many to list, so I just wanted brevity over having to cite out quite a bit of references. Anyway, what I personally don't understand about the Window Styles is: How do I describe the effects of WS_CLIPCHILDREN and WS_CLIPSIBLINGS on an OpenGL application? Its uses has some uses related to how OpenGL applications have their own pixel formats supported by the device context, and how it may be possible for a parent window to spawn children windows and somehow, miraculously clipping each other. Or, maybe the flag is put there mainly so the parent window, or the primary OpenGL application window, is prevented from being clipped by any children and parent siblings (windows)? Why is it preferrable to use WS_POPUP over WS_OVERLAPPEDWINDOW? I am speculating it has to do with toggling fullscreen and windowed mode for any OpenGL application, but, does that mean, just by setting WS_POPUP, it is enough to have fullscreen toggling support? Or, does it require that the window itself need to set/remove certain Window Styles, so WS_POPUP = fullscreen, and then WS_OVERLAPPED | ~(WS_POPUP) is used for windowed mode? Why is WS_VISIBLE necessary? Does that mean it can skip a step for setting the window to be visible? WS_BORDER is for windowed mode only, and thus it's required? Or that fullscreen and windowed mode both need WS_BORDER to function? So, those are my questions I have right now. Am I correct to assume all if these? Thanks in advance.
  2. Currently job-seeking for entry level positions.
  3. Currently job-seeking for entry level positions.
  4. tom_mai78101

    [Poll] Managing my limited free time while job seeking

      Problem is, I get turned down for internships because they are mostly looking for undergraduates who are still in school, instead of me who is in the transitioning phase from Masters to Doctorate. 
  5. I'm polling to see what choices can I make during my spare time, while I'm looking for a job. I'm a recent graduate, so I no longer am in school.   I feel like I need to brush up on some of the stuffs taught in class, but another part of me felt like finishing up on the open-source project that I'm working on. What to choose?   If anyone have a better choice for me to do something else more productive, which also benefits me while job seeking, please specify, so I can take a look.
  6. Ah, it seems I was missing a conjugate to achieve rotation multiplication with quaternions. No wonder I was confused about this. I will heed your warning. Is there anything else I am missing in regards to quaternion alternatives to rotation matrix multiplications?
  7.   The order I'm using is the order going from the left to the right. Same with the example I used in the GIF at the very top. I thought I was consistent enough and therefore there's no need to explain or define the multiplication order for both the Mat3x3 and the quaternions. Sorry.   As for the code snippet I mentioned, I was referring to your quote saying:       To me, it sounds like you were referring that, assuming the order of operations is exactly the same (going from left to right, and the placement is   result = old * new   The pattern of the following operation:   Mat3x3 result = Mat3x3 old * Mat3x3 new, where operator* denotes the multiplication, and Mat3x3 is the type.   Is exactly the same, literally and logically, as the following operation (just the pattern):   Quaternion result = Quaternion old * Quaternion new, where operator* denotes the multiplication, and Quaternion is the type.   I would like to seek clarification on this. Thanks again.
  8.   So, this is correct? // Generate new local_rotation, matrix-wise // local_rotation = rotation matrix representing the current orientation // new_rotation = rotation matrix representing the difference. (Rotation difference from new_rotation to local_rotation). // total = rotation matrix representing (the final new orientation) total = local_rotation * new_rotation // Generate new local_rotation, quaternion-wise // local_rotation = quaternion representing the current orientiation. // total = quaternion representing (the local_rotation + the difference from the old orientation to the the final new orientation.) total = local_rotation * total
  9. Let's say you have a 3x3 matrix that stores an object's current rotation. As we know, by multiplying it with a new 3x3 rotation matrix, we will get a brand new rotation matrix.   newMat3x3 = Mat3x3A * Mat3x3B.     Now, I have came across an issue where I see Mat3x3 rotation matrix being multiplied together to form the spinning cube, shown above. But the device that I'm using has limited memory, prompting me to figure out (and struggling along the way) to find an alternative to multiplying rotation matrices using quaternions (since it saves memory). In other words, I would like to replace rotation matrices with quaternions, but I don't know what is the quaternion equivalent to 2 rotation matrices multiplied together.   What is the quaternion equivalent to Mat3x3 * Mat3x3, or rotation matrix multiplications?   PS: I mashed 2 copies of the same cube together, so it is directly overlapping each other. One of the cubes is not spinning, because that cube is used for implementing the quaternion alternative method, but the method is not complete, so the orientation is set to its quaternion identity. So, no, it's not a graphical glitch, but an intentional test.
  10.   Yep, just added them in. Unfortunately I didn't come up with the names for a lot of these things. Extent. Incident. Bleh. Also it's much easier to just derive things on paper and copy down into the code the equations, so a lot of abstract symbols come up, like e and whatnot. Apologies if any of that is confusing. Hopefully, some of the issues/pull requests are handled. I noticed there is one which resolved some other confusing parts in your code, but I have no idea if it is better. Thanks again.
  11. Not sure. Nonetheless, yay! Thanks.
  12. Oh, that's even better. Thanks, and I'll try my best to fetch the answers for this thread, so future readers will be able to see them.
  13. I'm currently porting / learning C++ code of a lightweight physics engine over to a C code variant engine. The lightweight physics engine is qu3e, written by Randy Gaul. Source code   While porting the code over, I spot a few things that I'm confused about. Given that there are no comments that explain what these variables are for, and doesn't say what their meanings are, I am asking for help to explain the meaning and intentions for these variables.   _____________________________________________________   Here's one.   I know Feature Pairs in a physics engine refers to "The closest pair of features (edge or vertex)". So I am confused about what inR, inI, outR, and outI stands for. What do these 4 variables have to do with Feature Pairs?   _____________________________________________________   This is another one.   In this context, I know this struct is referred to as the Axis-Aligned Bounding Box struct, or AABB. Even with that in mind, I still have no idea what the e variable represents in the AABBes. Is there something important about the letter "e", as in, it could be some mathematical constant? Or is it energy?
  14. The question is asking about human readability, to read the various matrix orientations in a way that the method can be applied to all situations. So, when the human is reading the line of code and picturing the numbers, the human will project the relations for each member of the matrix by referring it to the mathematical representation of an ideal matrix that the human has a preference over. In other words, since every developers have their own ways of piecing the matrix data together in their minds, one of which is "considered" better than the other based on preference, I am proposing a shortcut method interpreting the data into a very high-level concept that the human can grasp, and can be "translated" to their respective context given for various libraries. I have this idea when I was working on a 3D graphics library, and I still have trouble grasping the concept of a different matrix orientation that I'm unfamiliar with my math textbook mathematical representation. Whenever I make a big change to a matrix math function, I would sometimes get told the matrix is inadvertently transposed than it was intended, and that kind of confusion would lead me to frustrating debugging situations. With this method I proposed, I find reading matrices in my head a bit easier to do. I'm very sure there are more better methods than my idea.
  15. When I say "reading", I meant to say, "reading the line of code and picturing the numbers in relations to what each member of the matrix is referring to." This is not referred to as "a compiler reading the lines of code.". I have come across an interesting observation where there are many orientations of a written 4x4 matrix. Some matrices used in some libraries are shown as:   [0] [4] [8] [12] [1] [5] [9] [13] [2] [6] [10] [14] [3] [7] [11] [15] And some matrices are shown as:   [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] For row-major and column-major matrices, they would also have orientations laid out as either one of these:   [1] [0] [0] [0] [0] [1] [0] [0] [0] [0] [1] [0] [0] [0] [0] [1] [0] [0] [0] [1] [0] [0] [1] [0] [0] [1] [0] [0] [1] [0] [0] [0] Depending on Big Endian or Little Endian order. Do note that I am unsure of this, as to why the diagonals of the matrix is forward/backward slanting, depending on how the graphics chipset on various devices reads the data structure. I'm assuming it to be Big / Little Endian based on the reading order of the memory. Combining these findings, I can see there are 4 types of matrix orientations commonly used in various libraries for various devices/applications. I want to know if my proposed method below is the best method of reading these various matrix orientations, and holds the concept:   ------------------   For instance, given the following matrix:   [0] [4] [8] [12] [1] [5] [9] [13] [2] [6] [10] [14] [3] [7] [11] [15] We can assume this is the case in an OpenGL environment:   RT = right UP = up BK = back POS = position/translation US = uniform scale [RT.x] [UP.x] [BK.x] [POS.x] [RT.y] [UP.y] [BK.y] [POS.y] [RT.z] [UP.z] [BK.z] [POS.Z] [ ] [ ] [ ] [US ] To humanly read a matrix, instead of looking at the matrix aligned in a 4x4 grid, we should look at each individual elements used in the matrix, as if the matrix is an array.   [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]   This means, by reordering our matrix to the following:   [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] And knowing the relations of each member element of the matrix as:   RT = right UP = up BK = back POS = position/translation US = uniform scale [RT.x] [RT.y] [RT.z] [ ] [UP.x] [UP.y] [UP.z] [ ] [BK.x] [BK.y] [BK.z] [ ] [POS.x] [POS.y] [POS.Z] [ US ] We can let a human read all matrix orientations by mapping the indices of the array to the associated properties of the matrix:   [0..2] = RT [4..6] = UP [8..10] = BK [12..14] = POS [15] = US And read the indices in reverse/forward for each sub-array based on Big or Little Endian. This, in turn, can be easier to translate into code for the compiler to read, without worrying about any various 4x4 matrix orientations.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!