コード例 #1
0
ファイル: OrbAlm.cpp プロジェクト: SGL-UT/GPSTk
   void OrbAlm::dumpHeader(std::ostream& s) const
         throw( gpstk::InvalidRequest )
   {
     if (!dataLoaded())
      {
         InvalidRequest exc("Required data not stored.");
         GPSTK_THROW(exc);
      }

      s << "**************************************************************" << std::endl
        << " ORB/CLK ALMANAC PARAMETERS FOR " << subjectSV
        << std::endl;

      std::string tform("test");
      
         // To do, generalize for all systems
      if (subjectSV.system==SatID::systemIRNSS)
	 tform = "%02m/%02d/%Y %03j %02H:%02M:%02S  %7.0s  %4O %6.0g  %P";
      else 
	 tform = "%02m/%02d/%Y %03j %02H:%02M:%02S  %7.0s  %4F %6.0g  %P";
      
      s << std::endl
        << "              MM/DD/YYYY DOY HH:MM:SS      SOD  WWWW    SOW\n";
      s << "Transmit   :  "
        << printTime(beginValid,tform) << std::endl;
      s << "Orbit Epoch:  "
        << printTime(ctToe,tform) << std::endl;
      s << std::endl; 
   }
コード例 #2
0
ファイル: tform.C プロジェクト: asmagina1995/roottest
int main(int argc,char**argv) {

   if (argc!=3) {
      fprintf(stderr,"tform requires 1 argument:\n");
      fprintf(stderr,"tform <formula#> <samplesize>\n");
      return 1;
   }
   
   int formula = atoi(argv[1]);
   int size = atoi(argv[2]);
   tform(formula,size);
}
コード例 #3
0
ファイル: Light.cpp プロジェクト: Factoid/free-allegiance
  osg::ref_ptr<osg::Node> Light::buildGraph( osg::ref_ptr<osg::Node> node )
  {
    osg::ref_ptr<osg::PositionAttitudeTransform> tform( new osg::PositionAttitudeTransform );
    osg::ref_ptr<osg::Billboard> gnode( new osg::Billboard );
    tform->addChild(gnode);
    tform->setPosition(position.toVec3d());
    gnode->setMode(osg::Billboard::Mode::POINT_ROT_EYE);
    osg::ref_ptr<osg::Material> mat( new osg::Material );
    mat->setDiffuse( osg::Material::FRONT, osg::Vec4(0,0,0,1) );
    mat->setSpecular( osg::Material::FRONT, osg::Vec4(0,0,0,1) );
    mat->setAmbient( osg::Material::FRONT, osg::Vec4(0,0,0,1) );
    mat->setEmission( osg::Material::FRONT, color.toVec4() );
    lightImg.buildGraph(tform);

    osg::ref_ptr<osg::BlendFunc> trans( new osg::BlendFunc );
    trans->setFunction( osg::BlendFunc::ONE, osg::BlendFunc::ONE );
    gnode->getOrCreateStateSet()->setMode(GL_BLEND,osg::StateAttribute::ON);
    gnode->getOrCreateStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
    gnode->getOrCreateStateSet()->setAttribute(mat);
    gnode->getOrCreateStateSet()->setAttribute(trans);
    gnode->addDrawable( ResourceManager::instance()->getPrimative( ResourceManager::PrimativeType::PRIMATIVE_QUAD ) );
    return tform;
  }
コード例 #4
0
ファイル: xacto2d.cpp プロジェクト: mkovacs/xacto2d-c
x2d_Transform* x2d_reflect_y(void) {
  Transformation_2 tform(1,  0,
                         0, -1);
  return new x2d_Transform(tform);
}
コード例 #5
0
ファイル: xacto2d.cpp プロジェクト: mkovacs/xacto2d-c
x2d_Transform* x2d_reflect_x(void) {
  Transformation_2 tform(-1, 0,
                          0, 1);
  return new x2d_Transform(tform);
}
コード例 #6
0
ファイル: xacto2d.cpp プロジェクト: mkovacs/xacto2d-c
x2d_Transform* x2d_rotate(double angle) {
  Transformation_2 tform(CGAL::ROTATION, sin(angle), cos(angle));
  return new x2d_Transform(tform);
}
コード例 #7
0
ファイル: xacto2d.cpp プロジェクト: mkovacs/xacto2d-c
x2d_Transform* x2d_scale(double factor) {
  Transformation_2 tform(CGAL::SCALING, factor);
  return new x2d_Transform(tform);
}
コード例 #8
0
ファイル: xacto2d.cpp プロジェクト: mkovacs/xacto2d-c
x2d_Transform* x2d_move(double dx, double dy) {
  Transformation_2 tform(CGAL::TRANSLATION, Vector_2(dx, dy));
  return new x2d_Transform(tform);
}
コード例 #9
0
ファイル: xacto2d.cpp プロジェクト: mkovacs/xacto2d-c
/* constructors */
x2d_Transform* x2d_identity(void) {
  Transformation_2 tform(CGAL::IDENTITY);
  return new x2d_Transform(tform);
}