Search found 34 matches

by terier
Tue Mar 15, 2011 7:59 pm
Forum: Everything 2d/3d Graphics
Topic: Find leftmost point in 2D
Replies: 3
Views: 1432

Thanks for replies, guys :) @nespa getHorizontalAngle() includes a sqrt calculation and 2 arctan calculations, so I don't think that would be a good choice. Thanks for working on my problem though ;) @CuteAlien I will definitely try this one, not sure what impact the normalizations will have on spee...
by terier
Tue Mar 15, 2011 2:15 pm
Forum: Everything 2d/3d Graphics
Topic: Find leftmost point in 2D
Replies: 3
Views: 1432

Find leftmost point in 2D

Assume we have a line, defined by two points (A and B), and a set of points we have to test. Now we have to find the point where the angle PHI (see image) is the largest we can find. If we mirror a point over the line, the test should yield different results, as we want only negative-oriented points...
by terier
Tue Aug 17, 2010 9:38 pm
Forum: Off-topic
Topic: Funny programming pictures, jokes & quotes
Replies: 436
Views: 166839

EPIC WIN!!
I bet the seats are quite comfortable!
by terier
Sat Aug 14, 2010 4:04 pm
Forum: Game Programming
Topic: Vertex-Winding-Order
Replies: 8
Views: 4142

If you want only the 2D solution then here's my solution:
- take a point (P3)
- make a line out of other points (P1 --> P2)
- determine if the point is BELOW or ABOVE the line
- below: negative orientation of the tri.
- above: positive orientation of the tri.
by terier
Thu Aug 12, 2010 11:46 pm
Forum: Game Programming
Topic: Get Static/BasePointer from dynamic pointer address
Replies: 1
Views: 1445

Re: Get Static/BasePointer from dynamic pointer address

Or is there already a tool where i can enter the address of the life value, and the tool displays the address of the base/static pointer plus the corresponding offsets? You should try studying reverse engineering. Oh yeah, ever heard of cheat engine? And here's a better alternative: memoryhacking.c...
by terier
Thu Aug 12, 2010 11:31 pm
Forum: Beginners Help
Topic: Diference between 0 and (1 << 0)?
Replies: 15
Views: 1104

Well then here's another one for you to figure out:
Why did they invent the so-called bit fields?
by terier
Mon Aug 09, 2010 9:58 pm
Forum: Beginners Help
Topic: set texture to specific cube side
Replies: 6
Views: 568

Right, it seems like its problem with this plane I made in blender. Its just plane I exported to 3ds, but it seems like I have to bark something with materials first. First you must unwrap it. While in edit mode just hit 'U'. Personally I find "smart projections" and "reset" the...
by terier
Sat Aug 07, 2010 11:38 pm
Forum: Beginners Help
Topic: How do I check for a valid node pointer?
Replies: 14
Views: 1033

agamemnus wrote:I'll let the OS handle that. :P
You shouldn't rely too much on your OS. Instead, try to understand how destructors work and how to properly delete object instances.
by terier
Sat Aug 07, 2010 11:25 am
Forum: Everything 2d/3d Graphics
Topic: How to save a depth buffer to image file (as greyscale)?
Replies: 8
Views: 5587

BlindSide wrote:But be careful you don't store the exponential part in the green channel, that's for VSM. In the green channel just store fract(depth / 255.0) * 255.0.
Sorry, my bad. I meant to say fractional part, not exponential :oops:
by terier
Fri Aug 06, 2010 7:25 pm
Forum: Everything 2d/3d Graphics
Topic: How to save a depth buffer to image file (as greyscale)?
Replies: 8
Views: 5587

Grayscale depth buffer is pretty much useless, because it can only store 8 bit values. Your buffer should store the z values in the red channel and their exponential part in the green channel (you could also make use of the blue channel, but it's not necessary), so that it can be decyphered like thi...
by terier
Tue Aug 03, 2010 6:21 pm
Forum: Advanced Help
Topic: How to get a ball to stop on a slope.
Replies: 7
Views: 1669

I believe your damping values are way to high. You should set them to about 0.1 or 0.2 (I actually don't know, I've never used bullet, but I did work with newton. You should definitely try experimenting with those values). The thing is that spheres have nothing to do with friction if there is no dam...
by terier
Mon Aug 02, 2010 3:56 pm
Forum: Bug reports
Topic: Animating mesh moves around
Replies: 2
Views: 571

Maybe you're using too small values, as floats are in fact quite inaccurate on small scales.
by terier
Thu Jul 22, 2010 11:30 pm
Forum: Beginners Help
Topic: 3rd person camera help[solved]
Replies: 4
Views: 501

Code: Select all

cam->setPosition(mainChar->getPosition() + vector3df(50,20,20));
You certainly can't, if you set camera's absolute position each frame :)
short question - short answer
by terier
Thu Jul 22, 2010 1:21 pm
Forum: Off-topic
Topic: 4D hypercube?
Replies: 13
Views: 1560

Maybe you should take a look at this:
http://en.wikipedia.org/wiki/File:8-cell-simple.gif
http://www.superliminal.com/cube/cube.htm
I guess it's possible, but not really practical...
by terier
Tue Jul 20, 2010 5:12 pm
Forum: Beginners Help
Topic: How do I use local Movement?[solved]
Replies: 11
Views: 1229

Have you ever heard of trigonometric functions? You probably need something like this: vector3df pos = node->getPosition(); f32 rot = node->getRotation().Y; f32 distance = 10.f; //or speed, if you'd like to put it that way pos.X += cos(rot * DEGTORAD) * distance; pos.Z += sin(rot * DEGTORAD) * dista...