Timeline for Different types of cubes
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 16, 2013 at 18:57 | comment | added | Christian Frantz | I've learned over the past few weeks that the Cube class is only representing the data drawn by my indices and vertices, and isn't actually needed for anything other than representing that point on the map. So maybe I wouldn't need a cube class, but for now it helps while I'm trying to get my BoundingBox stuff working | |
Jul 16, 2013 at 18:50 | comment | added | Sean Middleditch |
yes. for one, it's way more code and complexity than you need, which is always bad. two, it couples code to things that don't need it, making it really hard to change and extend later; it's just the usual bad OOP abuse you see all too often from bad learning materials. third, yes, having a Cube object at all is massively wasteful, though @Blau's answer didn't address that specifically, I may write one to explain this better than I can in a comment.
|
|
Jul 16, 2013 at 18:44 | comment | added | Christian Frantz | Is there a downside to using my method? Performance wise or anything like that | |
Jul 16, 2013 at 18:39 | comment | added | Christian Frantz | huh I did't even notice that answer lol | |
Jul 16, 2013 at 18:21 | comment | added | Sean Middleditch | I'd recommend against this. Inheritance is totally the wrong approach here. Use data, not code, to define what blocks are, how they look, and how they behave. See @Blau's answer for a better approach. | |
Jul 16, 2013 at 16:31 | review | Suggested edits | |||
Jul 16, 2013 at 16:43 | |||||
Jul 16, 2013 at 8:58 | history | answered | Christian Frantz | CC BY-SA 3.0 |