Dennis Schridde schreef: > Am Dienstag, 6. März 2007 schrieb Giel van Schijndel: > >> Author: muggenhor >> Date: Tue Mar 6 22:21:13 2007 >> New Revision: 854 >> >> URL: http://svn.gna.org/viewcvs/warzone?rev=854&view=rev >> Log: >> * Add Vertex base class (bases/vertex.hpp) to derive from for an interface >> to a coordinate set (x,y,z-coords from listener and sound source) * class >> soundDecoding: >> * Add soundDecoding::getSampleCount() which retrieves the amount of >> samples contained in the opened audio file (only works when file is >> seekable) * Remove dual decoding function in favor of the one that >> allocates a buffer on its own * interface.cpp: >> * Modify templated function validID() to also modify the ID number with a >> constant correction (ID -= 1) * Fix sound_Destroy2DStream to check the ID >> number for validity before using it * add subclass soundListener to >> soundContext which is derived from Vertex, this is to handle the listener >> seperately * class soundSource: >> * Removed initialization of OpenAL Source with a bunch of zeros >> * fix some error strings >> * Derive from Vertex and implement all its interface (virtual) functions >> > Maybe we are getting philosophical here, but is a soundListener or a > soundSource a Vertex? Shouldn't it _contain_ a Vertex? > Yes, it should contain a Vertex. But A) inheriting from a class is (IMO) mainly to inherit its interface (which in this case is exactly the same for a soundListener and soundSource). And B) when inheriting class Vertex into class soundSource/soundListener, class soundSource/soundListener will contain class Vertex.
Maybe I should call Vertex different. Because I want it to contain XYZ coordinates, velocity along the XYZ axis, and orientation on XYZ axis. So if you know a better name describing those three main properties (i.e. having a position, orientation and speed) please tell me. Oh and btw philosophy is indeed something on which I gladly spend my time. ;-) -- Giel
Description: OpenPGP digital signature
_______________________________________________ Warzone-dev mailing list Warzoneemail@example.com https://mail.gna.org/listinfo/warzone-dev