The thread Lesshardtofind is referencing is over here, though at the time of this post the "when is friendship appropriate" discussion didnt really have much meat to it. As grumpy mentioned, the...
Type: Posts; User: blakeo_x
The thread Lesshardtofind is referencing is over here, though at the time of this post the "when is friendship appropriate" discussion didnt really have much meat to it. As grumpy mentioned, the...
If I understand your question correctly, yes, your second iteration should work the way you expect. Also, it's not required to declare in .h and define in .cpp. In fact, you could write your entire...
0xdeadbeef is just a placeholder address for example purposes, similar to "foo", "bar", etc. The address has no significant meaning in C++.
The location of the pointer operator can indeed be in...
Thanks for that snippet. One thing I notice is that the result of the quat multiplication is normalized, not the quat being multiplied by. In other words, multiplying a unit quat by a non-unit quat...
I changed the transform order to the correct order. I also changed tempRot to (0.0f, 0.0f, D3DXToRadian(45)*delta, 1.0f), which seems to rotate in the expected manner. I was under the impression that...
I found some great information from an article on cprogramming.com ( :) ) where quaternions were explained in such a way that didn't confuse me with all the mathematics involved. Quaternions and 3D...
Thanks for the insight, VirtualAce. After searching more about avoiding gimbal lock, I found some tips to use quaternions and even found a related thread on this board. I'm pretty confused as to how...
That's correct. I realize that X * Y * Z is not the same as Z * Y * X. However, the problem exists no matter what order you multiply in. The first rotation axis will be offset by the next two, the...
Sorry, I should have made it more clear that I want to rotate the single model alone, not the entire scene or the viewpoint. So I don't think your solution is applicable here (unless I...
I've been struggling with this concept for the past few weeks. Let me set up an example to demonstrate what I'm trying to do...
If you imagine we are looking from (0, 0, -1, y-up) at an airplane...
I have not yet applied the suggestions you gave in your last post, but attached is what I have thus far. I realize the matrix math in the render methods isnt as optimized as it should be, but that...
Sorry for the late reply. I was trying to do a little more research on all this.
Thanks for the tips, guys. I changed the presentation interval to D3DPRESENT_INTERVAL_IMMEDIATE as was suggested....
I'm still kind of new to programming games in C++ with DirectX. I have this project I'm working on in preparation for my senior project coming soon (I'm in school for Game and Simulation...
Sorry, I thought since this was in C++ it was meant to go to the C++ forum.
I figured out a solution today. By swapping the last two vertices, the square is drawn just fine. This doesn't make...
Hey guys, I don't know why this won't work. I'm trying to draw a simple square made of four vertices. I'm using vertex buffers and DrawPrimitive, if that matters. For some reason, the following only...
I found a solution, courtesy of a set of tutorials for this that I somehow couldnt find before. The Function Pointer Tutorials - Syntax
First, sorry I put the main() inside the class body. Second,...
Solved. Related question: Is there a way to create a function pointer that can point to a member of any class?
Can someone share with me the correct way to use a function belonging to another...
Oh wow, that works too! Did I mention I'm new to C++? Thanks again for the tips.
WOOPS! Disregard that. It was just a warning message, and it did in fact build, and it does in fact execute. I apologize.
At any rate, thank you very much for your patience and assistance in...
enumdefs.h:
#ifndef __ENUMS
#define __ENUMS
class enumdefs
{
public:
enum aNewEnum {red, white, blue};
};
I separated the enum to its own header/class named enumdefs. When I try the first version, I get warning C4482: nonstandard extension used: enum 'enumdefs::aNewEnum' used in qualified name.
And...
I think I get it now. Thanks for taking the time to help me out! It looks like I'll just have to redesign my program. I'm thinking separate the enum from the other two classes/headers.
I have one...
Do circular include problems exist even though I have #ifndefs present in both headers?
Also, what if main/newtest has a datamember that needs something from foo? A method that requires the output...
Ah, I can see how that could be a problem. Stupid mistake on my part. However, after renaming main and correcting all relative lines to a new name "newtest", the error still occurs. Any other insight?
Hi guys,
I'm trying to figure out why this piece of code, while simple, just refuses to compile in Visual C++ 2010. I have these three example files (two headers, and one main CPP code file). I'd...