//============================================================================== void Inertia::setSpatialTensor(const Eigen::Matrix6d& _spatial) { if(!verifySpatialTensor(_spatial, true)) dtwarn << "[Inertia::setSpatialTensor] Passing in an invalid spatial " << "inertia tensor. Results might not be physically accurate or " << "meaningful.\n"; mSpatialTensor = _spatial; computeParameters(); }
int CProxyCamera::init(const Matrix3d &K, int w, int h, const Matrix3d &R, const Vector3d &T) { m_cameraK = K; m_cameraR = R; m_cameraT = T; m_width = w; m_height = h; computeParameters(); return 1; }
// the function set3Points computes the plane's normal and distance to origin using 3 points on the plane // Note that the order of the points will affect the normal direction of the plane. void Plane::set3Points(point3 p1, point3 p2, point3 p3) { vec3 vec1, vec2; vec1 = p1 - p2; vec2 = p3 - p2; this->normal = cross(vec2, vec1); this->point = p2; computeParameters(); };
void CProxyCamera::defaultInit() { Matrix3d K,R; Vector3d T; K<<5.1930334103339817e+02f, 0.f,3.2850951551345941e+02f, 0.f, 5.1816401430246583e+02f, 2.5282555217253503e+02f, 0.f, 0.f, 1.f; R.setIdentity(); T.setZero(); m_cameraK = K; m_cameraR = R; m_cameraT = T; m_width = 640; m_height = 480; computeParameters(); }
bool CProxyCamera::load(FILE *fp) { int i; for (i=0;i<9;i++) { fread((double*)&m_cameraK(i),sizeof(double),1,fp); } for (i=0;i<9;i++) { fread((double*)&m_cameraR(i),sizeof(double),1,fp); } for (i=0;i<3;i++) { fread((double*)&m_cameraT(i),sizeof(double),1,fp); } fread(&m_width,sizeof(int),1,fp); fread(&m_height,sizeof(int),1,fp); computeParameters(); return true; }
void SubPixelFunction::initialize(URI &uri, URI &funcUri, PointingDevice *input, DisplayDevice *output) { debugLevel = 0 ; URI::getQueryArg(uri.query, "debugLevel", &debugLevel) ; func = TransferFunction::create(funcUri, input, output); isOn = true; cardinality = widgetSize = lastTime = 0; URI::getQueryArg(uri.query, "isOn", &isOn); URI::getQueryArg(uri.query, "cardinality", &cardinality); if (!URI::getQueryArg(uri.query, "widgetsize", &widgetSize)) URI::getQueryArg(uri.query, "widgetSize", &widgetSize); this->input = input; this->output = output; minGainAndVelocity(); int resHuman = DEFAULT_RESOLUTION_HUMAN; URI::getQueryArg(uri.query, "resHuman", &resHuman); setHumanResolution(resHuman); computeParameters(); }
void SubPixelFunction::setCardinalitySize(int cardinality, int size) { this->cardinality = cardinality; this->widgetSize = size; computeParameters(); }