2 # pragma warning (disable: 4005) // for VS8 + WX
5 #include "CameraViewController.hh"
14 CameraViewController::~CameraViewController(){
15 delete p_externals; p_externals=NULL;
16 delete p_internals; p_internals=NULL;
20 CameraViewController::CameraViewController()
21 : p_externals(NULL), p_internals(NULL)
63 os<<
"CameraViewController : "<<endl;
104 const double scale=0.1;
105 offset += scale * deltaN[0] * v0;
106 offset += scale * deltaN[1] * v1;
128 const double scale = displaceCart.
Length()*2.0;
129 offset += scale * deltaN[0] * v0;
130 offset += scale * deltaN[1] * v1;
139 if (abs(fraction)>10.0)
141 BIASERR(
"fraction should be a normalized value, usually between -1.0 and +1.0. skipping motion");
147 direction *= fraction;
156 this->startpos = pos;
167 this->startpos = pos;
175 this->startpos = pos;
185 BIASERR(
"incorrectly implemented");
void MotionTranslationCoplanar(const BIAS::Vector2< double > &pos)
void MoveOrbit(const BIAS::Vector2< double > &deltaN)
BIAS::CameraViewExternals * p_externals
CameraViewInternals startposInt
double Length() const
returns the Euclidean Length of the Vector
std::ostream & Print(std::ostream &os=std::cout)
map update of one axis (mouse wheel, delta, key...) maps delta (e.g.
CameraViewExternals startposExt
BIAS::Vector2< double > startpos
virtual void DisplayGLInternal()
BIAS::CameraViewInternals * p_internals
std::ostream & Print(std::ostream &os=std::cout)
BIAS::Vector3< double > up
virtual void InitMembers()
any constructor should call this function to initialize all data members (e.g.
void MoveToCenter(const double &fraction)
void Set(const T &scalar)
set all elements to a scalar value
void CrossProduct(const Vector3< T > &argvec, Vector3< T > &destvec) const
cross product of two vectors destvec = this x argvec
void SetStartPos(const BIAS::Vector2< double > &pos)
toplevel entry for all motion controllers
CameraViewExternals GetExternals() const
CameraViewInternals GetInternals() const
void DivideIP(const T &scalar)
Division (in place) of an scalar.
void MotionTranslationForward(const BIAS::Vector2< double > &pos)
describes internal params of an (OpenGL) camera view
virtual void DisplayGLExternal()
BIAS::Vector3< double > viewAt
BIAS::Vector3< double > C
void MotionTranslation(const BIAS::Vector2< double > &pos)
simple translation
std::ostream & Print(std::ostream &os=std::cout) const
BIAS::Vector2< double > size
void MotionTrackballRotation(const BIAS::Vector2< double > &pos)
void MoveCoplanar(const BIAS::Vector2< double > &deltaN)
BIAS::Vector3< T > CartesianToPolar() const
Vector3< T > & Normalize()
normalize this vector to length 1
describes external params of a camera view Used e.g.