« first day (598 days earlier)
← previous day
next day →
last day (4426 days later) »
ClassicThunder
1:07 AM
is there any way to prevent intellisense from going full retard when working with multi-line object initializers?
ClassicThunder
1:22 AM
also for a second opinion is this readable? or am I abusing the object initializers too much?
pastebin.com/cqS2Aamt
2 hours later…
William 'MindWorX' Mariager
2:54 AM
Sometimes I wonder what's going through peoples heads when they do something like this:
payloadData[i] = byte.Parse("FF", System.Globalization.NumberStyles.HexNumber);
Daniel
3:22 AM
haha
Hmmm, out of interest, how does everyone store their AABBs...
Center, Extents?
Min, Max?
Extents only (w/ Center as a parameter)
William 'MindWorX' Mariager
I have top, left, bottom, right.
Well, actually, I have x,y,width,height.
Then I have a few helpers for the other parameters.
Daniel
so younstore center, extents
William 'MindWorX' Mariager
Not center. I guess what I store is Top, Left, Width, Height. :P
Those are the values on my entities.
Daniel
hah
thats an interesting approach lol
William 'MindWorX' Mariager
Well, with all the helper methods, I guess the way I store it doesn't really matter. :P
Daniel
3:37 AM
so I guess
William 'MindWorX' Mariager
Could be center and extents, I'd still have Top, Left, Bottom and Right helpers for the collision stuff.
Daniel
you update your AABB each frame?
William 'MindWorX' Mariager
Yeah, update the x/left, y/top part.
Daniel
hmmm
I'm thinking of just storing my AABBs as:
class AABB {
Vector3 const* m_center;
Vector3 const* m_extents;
public:
AABB(Vector3 const* center, Vector3 const* extents) : m_center(center), m_extents(extents) {}
Vector3 center() const { return *m_center; }
Vector3 extents() const { return *m_extents; }
Vector3 min() const { return (center() - extents()); }
Vector3 max() const { return (center() + extents()); }
};
Maybe have m_extents stored inline, but maybe not
that way, it doesn't need to be updated every step
and you can pass it around without having to also pass around its origin
Ah, Mindworx, apparently ur method is called : "min" width :P
tho actually, wouldnt that be bottom left? :P
6 hours later…
Gajet
9:30 AM
@ClassicThunder when C# intellisencse falls, you sure are abusing something.
@Daniel @daniel change center and extends function as follow:
const Vector3& center() const { return *m_center; }
const Vector3& extents() const { return *m_extents; }
it provides better performance, while you don't want to edit their results.
4 hours later…
Daniel
1:20 PM
@Gajet
It actually doesn't, GCC produces the same ASM for both sets of code with optimisation flags on... I prefer the cleaner syntax tbh
Besides, although that was a C++ example, I'm writing in D nowadays anyway... so you don't bother with that lol
4 hours later…
Chorche
5:14 PM
can anyone help me with GLUT?
user4704
5:30 PM
Only if you ask a question.
3
William 'MindWorX' Mariager
10:29 PM
@John, Could you give me a ping when you see this? :)
Gajet
11:11 PM
@WilliamMindWorXMariager John needs an IP address!
William 'MindWorX' Mariager
Harh harh. ;)
« first day (598 days earlier)
← previous day
next day →
last day (4426 days later) »
all rooms
Transcript for
Mar
24
Mar '12
25
Mar
26
Game Development
Game development and other polite discussion. Game development...
4
game-design
game-industry
rubber-ducks
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile