Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About PhaseSpace

  • Rank
  1. I am looking for reccomendations for open source C++ classes that are useful in video games. Specifically I would be interested in: 1) Math class, that handles vectors, matricies, scalars, and tensors. (I did find one located here: http://www.netwood.net/~edwin/svmtl/ but I am not sure if there is a better one) 2) Camera class, which would handle all types of camera movement using scalar - vector based functions. I wrote a camera class myself which works ok, but would like a more versitile version. 3) Model loading class (3ds or any other format) Thanks for any advice. PhaseSpace
  2. PhaseSpace

    Tractor - Trailor physics

    Thanks for your response, But having trouble following what you are saying. Could you lay it out in a more step-by-step manner? Thanks, PS
  3. PhaseSpace

    Tractor - Trailor physics

    I should clarify that it does not have to be a mass-momentum system. I have to integrate this problem into a real-time system with a window of 500 micro-seconds. If it is first order approximation, that would be fine. Any suggestion would be of help at this point.
  4. PhaseSpace

    Tractor - Trailor physics

    I am trying to set up physics for a vehicle towing a trailor. The set up of the situation is such: C(x,y) - Position of vehicle P(x,y) - Position of hitch (pivot point) E(x,y) - Position of end of vehicle length1 - length between pivot point and end of vehicle angle1 - Direction of Vehicle angle2 - Direction of End of Vehicle The vehicle will be driven, and the trailor has to rotate and follow the vehicle correctly. Does anyone know how to calculate this problems given the above variables? Or know of another method that works?
  5. PhaseSpace

    Handling graphics objects in OpenGL

    Ok, I will try to be a little more specific: I am leaving out the calls to opengl, as the problem has to do with the manner in which I am handling the object. The following process works: In my ObjectDisplay.h file, i declare an object. (I am using a MD2 format loader) ObjectMD2 m_treeModel; In my ObjectDisplay.cpp file, i call and display the object m_treeModel.Load("tris.md2","rhino.tga"); m_treeModel.SetAnimation(CSiwObjectMD2::IDLE); m_treeModel.Render(); In the 'Load' command, the vertex data is read from a file and loaded in to another object used by the MD2 class. This WORKS, but I don't want to do this because I am loading the file into the object each time. I want to be able to load at the startup, in a seperate class. The following gives me an error: In my ObjectDisplay.h file, i declare an object. (I am using a MD2 format loader) ObjectMD2 m_treeModel; In the same class, I create a function that will load the file into the object. I want to be able to call this from any class. void CObjectDisplay::LoadObjects() { m_treeModel.Load("tris.md2","rhino.tga"); m_treeModel.SetAnimation(CSiwObjectMD2::IDLE); } I call the Loading function from a different class CObjectDisplay call; call.LoadObjects(); I then render the object back in the object class void CObjectDisplay::Display() { m_treeModel.Render(); } Clear as mud? This second method will compile, but will crash when trying to access the vertex data loaded by the MD2 file class. So why does one method work and one not?
  6. I am having problems using objects, or pointers to objects loading graphics models. While in one particular class, I can load up a model from a file to a object, and then display the object with openGL. However, I am trying to do this in a large program, and would like to load a graphics file to an object or memory upon initialization, and then display much later in the program. This does not work, and causes opengl to crash the program when i try to display the object. I get a Access violation when opengl tries to draw the object. What is the most universal way to handle graphics objects in opengl? (Sorry if this too vague, I am hoping this is a fairly common problem)
  7. Hello, Been trying to locate a source code example to load a Milkshape file with animation. I search this forum and most of the links to info are not relevent or are dead. Any example codes out there?
  8. Ok, having some problems with Classes and hoping someone can help. I have a set of variables X,Y,Z that I want at least two different classes to have access to. In short in the FirstClass.h file, it is something like: class FirstClass() { public: float X,Y,Z; } In the FirstClass.cpp file I use the variables. Then in the SecondClass.cpp file I declare: FirstClass m_variables void SecondClass:SomeFunction() { m_vairables.X = (float) newvalue; m_variables.Y = (float) newvalue; m_variables.Z = (float) newvalue; } I hope you get the idea. The compiler does compile with no complaints, however the variables X,Y,Z remain unchanged in the class FirstClass, despite the apparent legal assignment of values in the class SecondClass. Question is, how do I modify the public variables X,Y,Z with the second class? I would like to avoid declaring global variables all over the place if possible.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!