78 for (
int i = 0; i < 3; i++) center[i] = _center[i];
84 void MouseOnTrackball(
int eventType,
int thisButton,
int xcrd,
int ycrd,
int width,
int height);
89 bool setFromFrame(
const std::vector<double> &posvec,
const std::vector<double> &dirvec,
const std::vector<double> &upvec,
const std::vector<double> ¢erRot,
bool perspective);
91 bool setFromFrame(
const double posvec[3],
const double dirvec[3],
const double upvec[3],
const double centerRot[3],
bool perspective)
93 std::vector<double> pos, dir, up, center;
94 for (
int i = 0; i < 3; i++) {
95 pos.push_back(posvec[i]);
96 dir.push_back(dirvec[i]);
97 up.push_back(upvec[i]);
98 center.push_back(centerRot[i]);
100 return setFromFrame(pos, dir, up, center, perspective);
105 _scale[0] = scale[0];
106 _scale[1] = scale[1];
107 _scale[2] = scale[2];
115 void setCenter(
const std::vector<double> &newCenter)
117 _center[0] = newCenter[0];
118 _center[1] = newCenter[1];
119 _center[2] = newCenter[2];
128 double _lastx, _lasty;
130 double _modelViewMatrix[16];
double GetOrthoSize() const
void MouseOnTrackball(int eventType, int thisButton, int xcrd, int ycrd, int width, int height)
void TrackballPan(double newx, double newy)
const double * GetModelViewMatrix() const
void TrackballSetPosition(double newx, double newy)
void SetScale(const double scale[3])
Trackball(float scale[3])
void TrackballStopSpinning()
void GetCenter(double center[3]) const
void TrackballCopyTo(Trackball *dst)
void TrackballRotate(double newx, double newy)
void TrackballSetMatrix()
void TrackballZoom(double newx, double newy)
void TrackballFlip(int axis)
bool setFromFrame(const double posvec[3], const double dirvec[3], const double upvec[3], const double centerRot[3], bool perspective)
bool ReconstructCamera(double position[3], double upVec[3], double viewDir[3]) const
bool setFromFrame(const std::vector< double > &posvec, const std::vector< double > &dirvec, const std::vector< double > &upvec, const std::vector< double > ¢erRot, bool perspective)