Beispiel #1
0
PlanarJoint::PlanarJoint(const std::string& _name)
  : Joint(_name)
{
  mGenCoords.push_back(&mCoordinate[0]);
  mGenCoords.push_back(&mCoordinate[1]);
  mGenCoords.push_back(&mCoordinate[2]);

  mS = Eigen::Matrix<double, 6, 3>::Zero();
  mdS = Eigen::Matrix<double, 6, 3>::Zero();

  mSpringStiffness.resize(3, 0.0);
  mDampingCoefficient.resize(3, 0.0);
  mRestPosition.resize(3, 0.0);

  setPlaneType(PT_XY);
}
Beispiel #2
0
/**Group the typical plane definition uses together.
 */
void SliceComputer::initializeFromPlane(PLANE_TYPE plane, bool useGravity, const Vector3D& gravityDir, bool useViewOffset, double viewportHeight, double toolViewOffset, CLINICAL_VIEW application, bool useConstrainedViewOffset)
{
	setPlaneType(plane);
	mClinicalApplication = application;

	if (plane == ptSAGITTAL || plane == ptCORONAL || plane == ptAXIAL )
	{
		setOrientationType(otORTHOGONAL);
		setFollowType(ftFIXED_CENTER);
	}
	else if (plane == ptANYPLANE || plane==ptRADIALPLANE || plane==ptSIDEPLANE)
	{
		setOrientationType(otOBLIQUE);
		setFollowType(ftFOLLOW_TOOL);

		setGravity(useGravity, gravityDir);
		setToolViewOffset(useViewOffset, viewportHeight, toolViewOffset, useConstrainedViewOffset); // TODO finish this one
	}
}