Login Register


VB.NET - Simple Collision Detection filter_list
Author
Message
RE: VB.NET - Simple Collision Detection #11
Quote:Not too bad, but why did you go with a Class instead of a Structure?
I don't know as well. Maybe, I feel that Class is more extendable and feature-rich
than Structure. Anyway, it is a just a small demonstration of how to detect
circle and rectangle detection. I don't know what is the name of my algorithm.

Reply

RE: VB.NET - Simple Collision Detection #12
(08-12-2013, 05:26 PM)invisal Wrote:
Quote:Not too bad, but why did you go with a Class instead of a Structure?
I don't know as well. Maybe, I feel that Class is more extendable and feature-rich
than Structure. Anyway, it is a just a small demonstration of how to detect
circle and rectangle detection. I don't know what is the name of my algorithm.

It is, but it's not needed here anyways. Plus a class object is a reference type, not a value type like a stucture is, thus it's allocated on the heap, and not the stack, which makes instantiation slower. This is a fairly small usertype too, so structure's would be much more appropriate.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply







Users browsing this thread: 1 Guest(s)