コード例 #1
0
ファイル: PlanarJoint.cpp プロジェクト: jpgr87/dart
//==============================================================================
PlanarJoint::UniqueProperties::UniqueProperties(PlaneType _planeType)
{
  switch(_planeType)
  {
    case PT_ARBITRARY:
    case PT_XY:
      setXYPlane();
      mPlaneType = _planeType; // In case the PlaneType was supposed to be arbitrary
      break;
    case PT_YZ:
      setYZPlane();
       break;
    case PT_ZX:
      setZXPlane();
      break;
  }
}
コード例 #2
0
ファイル: PlanarJoint.cpp プロジェクト: jpgr87/dart
//==============================================================================
void PlanarJoint::setProperties(const UniqueProperties& _properties)
{
  switch(_properties.mPlaneType)
  {
    case PT_XY:
      setXYPlane();
      break;
    case PT_YZ:
      setYZPlane();
      break;
    case PT_ZX:
      setZXPlane();
      break;
    case PT_ARBITRARY:
      setArbitraryPlane(_properties.mTransAxis1, _properties.mTransAxis2);
      break;
  }
}
コード例 #3
0
//==============================================================================
TranslationalJoint2DUniqueProperties::TranslationalJoint2DUniqueProperties(
    PlaneType planeType)
{
  switch (planeType)
  {
    case PlaneType::ARBITRARY:
    case PlaneType::XY:
      setXYPlane();
      mPlaneType
          = planeType; // In case the PlaneType was supposed to be arbitrary
      break;
    case PlaneType::YZ:
      setYZPlane();
      break;
    case PlaneType::ZX:
      setZXPlane();
      break;
  }
}
コード例 #4
0
//==============================================================================
TranslationalJoint2DUniqueProperties::TranslationalJoint2DUniqueProperties(
    const TranslationalJoint2DUniqueProperties& other)
{
  switch (other.mPlaneType)
  {
    case PlaneType::ARBITRARY:
      setArbitraryPlane(other.mTransAxes);
      break;
    case PlaneType::XY:
      setXYPlane();
      break;
    case PlaneType::YZ:
      setYZPlane();
      break;
    case PlaneType::ZX:
      setZXPlane();
      break;
  }
}
コード例 #5
0
//==============================================================================
PlanarJointUniqueProperties::PlanarJointUniqueProperties(
    const PlanarJointUniqueProperties& other)
{
  switch(other.mPlaneType)
  {
    case PlaneType::ARBITRARY:
      setArbitraryPlane(other.mTransAxis1, other.mTransAxis2);
      break;
    case PlaneType::XY:
      setXYPlane();
      break;
    case PlaneType::YZ:
      setYZPlane();
      break;
    case PlaneType::ZX:
      setZXPlane();
      break;
  }
}