From: Hedayat V. <hed...@ai...> - 2009-12-10 10:10:46
|
Hi, IMHO using a GenericPhysicsObject class for passing all parameters is not very nice. For example, it doesn't show that CRM function needs a matrix. I suggest defining a class for each type: e.g. GenericPhysicsMatrix for functions which need a matrix. Also, if engine specific classes inherit from generic classes (ODEMatrixClass inherited from both GenericPhysicsMatrix and dMatrix3, or inherited from GenericPhysicsMatrix and having a dMatrix3 member), you won't need to cast the object to the Generic class when passing object as a function parameter. BTW, use whatever you prefer. Thanks a lot, Hedayat On ۰۹/۱۲/۱۰ 12:04, a-...@us... wrote: > Revision: 118 > http://simspark.svn.sourceforge.net/simspark/?rev=118&view=rev > Author: a-held > Date: 2009-12-10 08:34:56 +0000 (Thu, 10 Dec 2009) > > Log Message: > ----------- > Searched and renamed all CCylinders, CappedCylinders and Capped Cylinders to Capsule > Implemented bridge pattern for CapsuleCollider > Provided bridge pattern for ConeCollider > Declared GenericPhysicsObject class that can be cast to in order to pass pointers > to engine-specific objects on to the abstract layer (like void*, but cleaner) > |