Jump to content

  • Log In with Google      Sign In   
  • Create Account


MarkS

Member Since 09 Jan 2001
Offline Last Active Sep 13 2014 06:42 AM

#5085879 Merge Wavefront files

Posted by MarkS on 14 August 2013 - 12:13 PM

It could be as simple as opening both files in a text editor and copying one into the other. But that doesn't sound like what you want.

The OBJ format does allow for multiple meshes within one file, but that is rarely used in most importers. How is your importer written and what features can it support?

What exactly are you trying to do? If you are trying for a custom file format, I'd personally recommend that you skip OBJ and go another route.


#5085684 Question about dereferencing syntax in C/C++...

Posted by MarkS on 13 August 2013 - 04:48 PM

I'm always perplexed that this is seen as an issue.


It isn't so much of an issue as unnecessary. It is a distinction that doesn't seem to fulfill a need.


#5085673 Question about dereferencing syntax in C/C++...

Posted by MarkS on 13 August 2013 - 04:31 PM

I have always accepted how C/C++ dreferences structs and pointers to structs until a recent thread on a new language, C-UP. The developer stated that the language doesn't use the '->' operator to dereference pointers.

This makes a lot of sense. I'm curious why the C++ standard still requires the use of '->' and '*'?
 
struct foo{
int i;
int *j;
};
 
foo foo1,*foo2;
int temp;

// These next lines do the exact same thing...
foo1.i = 1;
foo2->i = 1;
temp = foo1.i;
temp = foo2->i;
temp = *foo1.j;
temp = *foo2->j;
The only reason I can see for the disparity is that '->' and '*' informs the reader that a pointer is being dereferenced. Does it truly matter? All that is being done is accessing a member of a class or struct.


#5082321 My OLD Syntax

Posted by MarkS on 01 August 2013 - 04:15 PM

Is that legal syntax? I tried that in VS 2012 and it yelled at me.




#5082222 List of C++11 compliant compilers?

Posted by MarkS on 01 August 2013 - 10:33 AM

I'm getting fed up with Visual Studio Express 2012. There are so many new language features that I can only look at in code samples.

 

Are there any *free* Windows-based C++11 compilers? What are some recommendations?




#5081254 "Standard" Resolution Performance

Posted by MarkS on 28 July 2013 - 01:05 PM

I apologize. I am not known for very eloquent speech. I should have written that as "...some in academia...". I know that not everyone is like that, but I've heard and read so many horror stories. I did not many any offense.

I still believe and stand behind my statement that this professor is stuck in the past. There was a time where he would have been correct, but that time ended about a decade ago. To teach this as current fact is puzzling at best.


#5081038 Jittery Movement and Uncontrollable Rotating

Posted by MarkS on 27 July 2013 - 03:47 PM

Keep track of the mouse position. If the new mouse position is viable, save it and use it to determine the rotation. If it is not viable, discard it and use the stored position to determine rotation.

 
I don't think you read the post or the code :/
I am already doing that.


No, you are tracking the rotation. Track the mouse position.

if fabs(old_pos - mouse_pos) > epsilon then
old_pos = mouse_pos
directionV = Normalize(mouse_pos- sp.Position);
else
directionV = Normalize(old_pos- sp.Position);
endif

newRot = (float)Math.Atan2(directionV.Y, directionV.X) * 180 / (float)Math.PI + 90;



#5081030 Jittery Movement and Uncontrollable Rotating

Posted by MarkS on 27 July 2013 - 03:27 PM

Think about it. When the mouse point is equal to the rotation point, exactly what orientation should the sprite have? A better way to look at it is this: Imagine a point in the exact center of your body. Now, orient yourself to face that point. The results from atan2 at this point are undefined.


#5080993 Rule of Three, and const-correctness questions

Posted by MarkS on 27 July 2013 - 12:31 PM

I looked at L. Spiro's link about the Rule of Two.

I'm confused about a couple of points. What is the purpose of the reset() and swap() functions? Reset deletes the pointer then assigns the incoming pointer to the deleted pointer! O.o How does that work and under what circumstances would I use swap?


#5080023 "Standard" Resolution Performance

Posted by MarkS on 23 July 2013 - 09:57 PM

Seriously, ask him what those "advanced graphics algorithms" are. Ask for names. Names of algorithms, names of researchers, names of books or other publications. If he "doesn't remember", ask him exactly what problems those algorithms solve. If you manage to get any answers, we'll look them up.


I would disagree. While I haven't been to college, I do know that those in academia do not like to be challenged and a professor can make your life a living hell. He is clearly stuck in the past on this issue. This is a time where you smile and nod. You gain nothing from challenging him and stand to lose a great deal.


#5077710 VS2012 Declarations in Loops

Posted by MarkS on 14 July 2013 - 04:56 PM

The older version of VS was incorrect. The variable should go out of scope after the loop terminates. The second loop should have given you an error. Your second and third methods are correct.


#5077637 How to read/adapt coding style that look like this

Posted by MarkS on 14 July 2013 - 12:19 PM

[edit]
This post was completely wrong and helped no one. Just not my day today.
[/edit]


#5076936 OpenGL Connundrum

Posted by MarkS on 11 July 2013 - 01:01 PM

If the user's machine doesn't meet the requirements, why not tell them so? It is entirely expected to be asked to download current drivers if the drivers are out of date.




#5076496 Properly implemented loader objects?

Posted by MarkS on 09 July 2013 - 08:53 PM

I used the wrong word here:

And don't apologize. Not every member on this site speaks fluent English and it is expected.


It should read:

And don't apologize. Not every member on this site speaks fluent English and it is understood.

That completely changes the meaning.

I ONLY speak English and even I mess up! sleep.png

Rus:
 
Приветствую, недавно я решил написать загрузчик объектов под OpenGL, исходный код можно найти внизу, меня интересует, правильно ли я все сделал или есть какие-то недочёты, заранее спасибо smile.png


I ran that through Google Translate and it came out much more understandable!

Greetings, I recently decided to write a loader object under OpenGL, the source code can be found at the bottom, I was wondering whether I did or have any flaws, thanks in advance


I took a look at your code and I'm not sure I can help. It is based on Qt and I have very little experience with Qt. I would have to go by your comments, and they are in Russian.

Have you tested the code? That is the best indicator of success. If it doesn't work correctly, then we can help you with the issues. If it works correctly, then you're done.


#5076491 Properly implemented loader objects?

Posted by MarkS on 09 July 2013 - 08:19 PM

Let us know what language you speak fluently and I am sure that there is someone here that can translate. From looking at the source, I'm guessing Russian?

 

And don't apologize. Not every member on this site speaks fluent English and it is expected.






PARTNERS