>> What do you think Stopwatch is "more object oriented" usage? Compared with what do you have this conclusion? :-)
By "more object oriented" i mean that the measuring is packed into a class. You...
Type: Posts; User: Raven Arkadon
>> What do you think Stopwatch is "more object oriented" usage? Compared with what do you have this conclusion? :-)
By "more object oriented" i mean that the measuring is packed into a class. You...
The system. (Well actually the Stopwatch queries the system for a high resolution timer - and if it doesn't find one, i guess it resorts to the DateTime method).
No, not for DateTime (The...
Stopwatch has 2 static properties:
.) IsHighResolution and
.) Frequency - the number of ticks - so even if you calculate in ticks you shouldn't assume that its constant (e.g. just divide by 10000),...
The most convenient way i found was using System.Diagnostics.Stopwatch.
(In fact, i was just writing a stopwatch class when i figured out there was already one)
using System.Diagnostics;...
One question concerning Dispose:
Is it ok the resuse "Dispose" just for Raising an Disposed-Event, so listeners can assume the object is dead and react to that - although the object never held any...
Hi,
is there a way to retrieve the address of an object? (Or some id that is unique to the object)
I want to define the identity of an Edge based on the addresses of the Nodes it refers to....
Thx for your reply :)
Well yes, as i said: It doesn't scale perfectly, but i guess for collision checking there aren't that many different shapes, so maintenance isn't impossible, and imo in this...
Hi, so i found a - in my eyes - nice way to allow code like this:
AbstractShape a = new Box(..);
AbstractShape b = new Sphere(...);
a.TestIntersection(b);
Declare your Random object outside of the loop. Since the random seed is stored inside the Random object, recreating it will reset the random seed.
(The random seed is a number that is used to make...
Math.Asin (arcus sine == inverse sine)
Hi, i'm taking a course on game development, and unfortunately we have to use M$ C# and XNA.
Although its M$, i must admit that both C# and XNA are pretty cool ;)
Can someone tell me if i got...
is there some trick to have an epsilon_p as a root_node?
(using ast_parse)
so id like this grammar to work:
expression_0
= expression_1 >> *(root_node_d[epsilon_p] >> expression_2) //!!!...
Hm, thanks.
Basically i guess it turns out that typeinfo should at least provide inheritance information.
(Are there plans to adding this to C++ (maybe even an introspection API))?
Because the...
oh... and it makes sense to split up "does_accept(a, b)" method into a does_accept_first(a) and does_accept_second(b) method. then a container can figure out which types are accepted in linear time...
Well but still the collision detection function would have to check the type of the OTHER object.
And actually its not the sphere's business to know how to collide with a cuboid. Some meta level...
Well actually most troubles i have with my current solutions is, that i would need somthing like the java "instanceof" operator -
so i need to check wheter some typeid(XXX) is a base of typeid(YYY)....
Hi,
so lets assume i wanted to write i collision system that can determine wheter some objects collide (e.g. sphere - cuboid, or triangle cylinder, or whatever).
The thing is, that all these...
well of course i could read the whole z-buffer and pass it back in as a texture. but then i have to copy around the zbuffer all the time - right?
>> No practical work-around. But theoretically, you could write variables as fragment data per-pixel, and then extract this data from the screen on the CPU.
>> can you render to a texture instead of...
hmmm... so i have read around with shaders - and it seems there is no way of letting a pixel (fragment) shader write to a "variable" that could be read by the application? (so communication between...
hm ok ive just read through ARB_occlusion_query and this is bascially exactly what i had in mind.
but i think id like to reinvent the wheel for that test - cause i think its a good thing to learn...
so i have my scene organized in some kind of tree (e.g. kd-tree, oct tree)
each node has a bounding object assigned to it (e.g. axis aligned cuboid (bounding box))
now i position the camera...
>> like moving to 8 children,
no, its 3 children.
an octree-node has 8 children.
a binary tree has, when moving from some node 3 steps down, a total of 2^3=8 children in that level (relative to...
does anyone know if there is an significant difference in using these structures for scene management? (so the objects stored in the nodes have bounding boxes, and the nodes of the trees have also...
ah i meant direc3d by directx. sry. but ive listed some libraries already which handle input and sound and stuff.
there are also complete cross platform engine packages out there (e.g. neo engine)....