Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualalvaro

Posted 01 May 2012 - 06:12 AM

Vector3D _pos, _lookVector, _upVector,


_localVelocity, _axisVelocity;



Quaternion _qHeading, _qPitch;



float _pitch, _heading, _roll,


_acceleration, _friction;



bool _xLocked, _yLocked, _zLocked,


_xViewLocked, _yViewLocked, _zViewLocked,


_moving;



That looks like way too much state. In order to describe where an object is, all you need is a position (a 3D vector) and an attitude (a quaternion). I can see an argument for having an angular velocity as well (another 3D vector) if you want to use Physics on your objects. Everything else is redundant, unclear or both, and should go.

#1alvaro

Posted 01 May 2012 - 06:10 AM

Vector3D _pos, _lookVector, _upVector,


_localVelocity, _axisVelocity;



Quaternion _qHeading, _qPitch;



float _pitch, _heading, _roll,


_acceleration, _friction;



bool _xLocked, _yLocked, _zLocked,


_xViewLocked, _yViewLocked, _zViewLocked,


_moving;



That looks like way too much state. In order to describe where an object is, all you need is a position (a 3D vector) and an attitude (a quaternion). I can see an argument for having an angular velocity as well (another 3D vector). Everything else is redundant, unclear or both, and should go.

PARTNERS