• Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Soulkeeper

  • Rank
  1. DirectX tutorials?

    I would advise against visiting the toymaker site above without a heavily secured browser. I should definitely get NoScript for Firefox. Anyway, it decided to disable my firewall and install some malware which I'm removing right now.
  2. They shouldn't call the base destructor explicitly as this will be done automatically.
  3. Pollish type question

    I have no time whatsoever to work on my own projects at the moment. All of my time is taken up by school and work.
  4. OpenGL Drawing 3D "manually"...

    Quote:Original post by Namethatnobodyelsetook What then occurs is: vertexposition (with an assumed w of 1...[x,y,z,1]) * world * view * projection. The resulting vector is the divided by W. Now you're in clip space. In DX thats -1<x<1, -1<y<1, and 0<z<1. I have a question on this. What happens if W is now 0? I've been working on a project like this for a class at school and I am having that problem. Where I have a unit pyramid with the top point at (0, .5, 0, 1) and after I do all my transformations and go to do perspective division W is now 0 so it screws it all up. BTW, I have my world axes with X->right, Z->up, Y->in (because our teacher wants it that way). So maybe I'm doing something wrong with the transformations. I don't know. But if you could just answer that question for me I'd be grateful. :)
  5. How do you push out vertices of a tesselated sphere?

    Alright, I fixed it. My problem was that when I was normalizing my vertex (I use 4 components because of homogeneous-ness) I was taking into account that 4th component, and I obviously shouldn't have been. I am now only calculating the normal using the 3 standard components and it works fine. Thanks guys.
  6. Ok, this was posted a while ago but I'm not sure how to go about doing this: Quote: Now, instead of placing these new vertices on the exact same planes as the old ones, move them away from the center of your polyhedron so that every vertex is the exact same distance from the center (this distance is the radius of your sphere.) The result? Your octahedron now has 32 sides, and it looks a lot more like a sphere than it did before. Now, apply the process again - split the triangles into smaller triangles with new vertices placed at the midpoint of the line segments joining the previous vertices, then place them all the same distance from the center - and the result looks a whole, whole lot like a sphere. After tesselating an octahedron twice I've tried normalizing the vertices but that doesn't really make my object look anything like a sphere. It looks more like a slightly bulbous octahedron. So really what I need is an explanation on how to go about blowing out the vertices to make it look more like a sphere. BTW, I've searched google a million times, I probably just suck at it though.

    The linking errors are because some .h file is being used twice and you don't have inclusion guards or the #pragma once directive. Do this in each .h file and you should be fine. At the top put #ifndef FILENAME_H #define FILENAME_H where FILENAME is the name of your file or #pragma once If you put the #ifndef version do this at the bottom of the .h file #endif That should fix those errors so that they won't get parsed twice and be defined again. Oh yeah... the reason you needed a default constructor (because I didn't see anyone explain it) is because when using the STL it will use a lot of stuff that has to be defined in the class. It'll use default constructors, copy constructors (so if you do memory allocation you better have this one customized), sometimes it'll use different operators that you'll need to define depending on the algorithms you use.
  8. how to handle complex item templates

    You don't need to write a scripting engine at all though. All you really need to do it the simplest way that I can think of is to store the rules as a binary tree. Quite like a calculator would evaluate things I suppose. So let's say you've got the rule: 20 * rating + 50 You just take a string as input when making the rule and parse it to create a binary tree from it. (Which I called an expression tree in my earlier post). So now your tree will look like this: + / | / | * 50 / | / | rating 20 then you just evaluate the tree using an in-order traversal. (left, visit, right) You can make the tree out of a series of classes so that the variable expression can hook up with your property class and just ask it for the value. That I believe would be the easiest way to do what you want. The only semi difficult part is parsing the string correctly to make the correct tree. And that only if you want to take into account parentheses. Edit: couldn't figure out how to format the tree so it looked right... so I cheated :)
  9. Full Sail?

    Not to mention it also is in the same building as a Nintendo warehouse... I haven't really witnessed any whoring for Nintendo though... They pretty much just rent us the approximately half a building and leave us alone.
  10. how to handle complex item templates

    If I understand you correctly then I've done precisely this sort of thing before. :) Just to check... you want to have some property defined somewhere (cost, memoryusage) but you don't want them hardcoded right? And these properties have rules associated with them (2*blah/3-4) but you don't want those to be hardcoded? And finally... these rules can have some kind of variable or 3 used inside them... and of course... you don't want those hardcoded? Your crazy! Ok, just kidding... I've done precisely this thing for a Genetic Algorithm project I worked on... It's really not that hard at all actually. First, you'll want to have some classes associated with these "variables", or however many things you are actually using. You'll want them to be able to read a file of course. Then, you'll want a definition file that defines the "variables". So far we've got classes that abstract the "variables" and tell us how they work (or rather just basically store a name and a number. Except for the rule, that stores a property and an expression.) Now you want to build an expression simplifier class... or series of classes. This is basically one class that can process the expression by asking any variables what they hold at the moment (so it's gotta be able to interface with whatever the variable class is and ask it for the current value.) Finally... you make a function somewhere (probably in the rule class) that reads in a rule from a file and passes it the expression simplifier for it to create the expression tree from. And... it should be as simple as that. If you want any code examples I can supply them... though they are in C#, but they shouldn't be hard to transfer to C++. Good luck!