# Alias2

Member

18

122 Neutral

• Rank
Member
1. ## Anyone know how to write a plugin for VS.net 2003

For documentation on how to do it, check The Visual Studio Extensibility Center. For starters, there's a project template that can get you started. Just choose: File->New Project->Other Projects->Visual Studio .NET Addin. Here's a link with a tutorial for getting started: http://www.c-sharpcorner.com/Code/2002/Oct/AddIns.asp. I'm sure if you google for "Visual Studio .NET Addins" you'll get a bunch of other sites as well. -Alias
2. ## Easy vector math question...

Well, the question of detecting whether or not two boxes colide is relatively straight forward for a 2D plot. You have the vertices of rightBox, so go through each vertex and see if any of them lie inside the other box, i.e.: if (vertex <= leftBox.MaxX && vertex <= leftBox.MaxY && vertex >= leftBox.MinX && vertex >= leftBox.MinY) { // boxes collided. } (the code sample is assuming leftBox is axis-aligned, obviously. If that's not the case you'll have to transform the box or change the test a bit) That obviously only tests whether or not one vertex of rightBox is inside leftBox. In order to be completely correct, you should test for the case where one face of rightBox intersects with a corner of leftBox (i.e. test each face of rightbox to see if it overlaps leftBox. You can do this by testing whether any of the vertices of leftBox are inside rightBox). (then there's the border case where two of the faces directly overlap. You can choose whether or not to handle that case based on what makes sense for your program) If you want to find which face it is that the collision happened, then you need to know the velocity of rightBox, so you can determine which direction it's moving. For example: In your example, how do you know that it intersected the right face of leftBox? It could have taken a while drawing the last frame and rightBox may have been moving left-to-right and just passed most of the way through leftBox. -Alias
3. ## Lights and X File

No, the mesh definition (i.e. the .x file) does not contain any information on lights. Are you sure that you have lighting enabled and that you don't have any ambient light turned on?
4. ## 3ds max 7 converter

The panda exporter worked fine for me in 3dsmax 7 for static meshes, however, when trying to export any animations I started having problems. Significant sections were left out of the resulting file (i.e. most of the frame heirarchy, etc.), leading me to believe the add-in crashed as it was exporting. You'll notice they've posted an ominous warning on their site regarding using max 7. link The last I worked with their exporter, though, was the beginning of November and shortly after I was having my problems the first warning went up. It looks like they've finally got around to fixing some of the problems, which is good to see. In the mean-time I've been using the Quest 3D exporter (link) which works fine, but I find the exporter extremely limited. I think the best bet is to just build an exporter that does what you want and that you can update when you run into problems. The source for the exporter that ships in the directx SDK is available as a good start. -Alias

Quote: 1. What is the pros/cons on C# This is going to start a flame-war, try it out and decide for yourself. Quote: 2. Is it good for 2D Game Development? See the answer to #1. Quote: 3. Is it good for 3D Game Development? See the answer to #1. Quote: 4. Does it have something like an FSTREAM? System.IO.FileStream Quote: 5. What is the difference between Visual C# Express and Visual C#? There are multiple versions of the IDE: - Visual C# Express is the free download for the beta. Note: This uses C# 2.0, which is still in Beta (and currently cannot be used with Managed DirectX). - Visual C# 2003 is the previous version of the IDE, which uses the C# language version 1.1 and is the current supported verison (i.e. stable), works with Managed DirectX, but won't have all the new cool bells and whistles that the beta version has.
6. ## const WCHAR *filename question

WCHAR is a wide char (i.e. unicode character), so you need to assign it to a unicode string. The following: WCHAR *str = "foo"; ...will give an error because you're assigning an ASCII string to a char (they're different types / different sizes) In order to assign to a unicode string, you use the prefix "L" before the string: WCHAR *str = L"foo"; Similarly, when passing a string constant to a function you need to do the same thing, for the same reasons: myfunc(L"file.txt"); -Alias
7. ## [.net] finally clause of C-sharp

You're correct, the book is wrong (or maybe just improperly worded) The finally clause will get executed when control flow leaves the try / catch block, regardless of whether there was an exception or not. So your output is correct. What book is it that you're reading? We should submit an entry for its errata. -Alias
8. ## Solution Files in C#

No, the .sln and .vcproj files do not contain any user / machine information and are safe to check into source code control systems. VS stores all of the user-specific solution / project information files labelled .suo and .vcproj.username -Alias