• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ident函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ident函数的典型用法代码示例。如果您正苦于以下问题:C++ ident函数的具体用法?C++ ident怎么用?C++ ident使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ident函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: make_translate

/*======== struct matrix * make_translate() ==========
Inputs:  int x
         int y
         int z 
Returns: The translation matrix created using x, y and z 
as the translation offsets.
====================*/
struct matrix * make_translate(double x, double y, double z) {

  struct matrix * m = new_matrix(4, 4);
  ident(m);

  m->m[0][3] = x;
  m->m[1][3] = y;
  m->m[2][3] = z;

  return m;
}
开发者ID:stuydw,项目名称:polygons,代码行数:18,代码来源:matrix.c


示例2: make_rotX

/*======== struct matrix * make_rotX() ==========
Inputs:  double theta

Returns: The rotation matrix created using theta as the 
angle of rotation and X as the axis of rotation.
====================*/
struct matrix * make_rotX(double theta) {
//printf("theta = %lf\n",theta);
  struct matrix * m = new_matrix(4, 4);
  ident(m);

  m->m[1][1] = cos( theta );
  m->m[1][2] = -1 *  sin( theta );
  m->m[2][1] = sin( theta );
  m->m[2][2] = cos( theta );
  return m;
}
开发者ID:stuydw,项目名称:mdl,代码行数:17,代码来源:matrix.c


示例3: make_rotZ

/*======== struct matrix * make_rotZ() ==========
Inputs:  double theta

Returns: The rotation matrix created using theta as the 
angle of rotation and Z as the axis of rotation.
====================*/
struct matrix * make_rotZ(double theta) {
  struct matrix *transform = new_matrix(4, 4);

  ident(transform);
  transform->m[0][0] = cos(convertToRadians(theta));
  transform->m[0][1] = -1 * sin(convertToRadians(theta));
  transform->m[1][1] = cos(convertToRadians(theta));
  transform->m[1][0] = sin(convertToRadians(theta));

  return transform;
}
开发者ID:roddajohn,项目名称:verbose-chainsaw,代码行数:17,代码来源:matrix.c


示例4: make_rotY

/*======== struct matrix * make_rotY() ==========
Inputs:  double theta

Returns: The rotation matrix created using theta as the 
angle of rotation and Y as the axis of rotation.
====================*/
struct matrix * make_rotY(double theta) {

  double deg = (theta * M_PI) / 180;
  struct matrix *y = new_matrix(4,4);
  ident(y);
  y->m[0][0] = cos(deg);
  y->m[0][2] = -sin(deg);
  y->m[2][0] = sin(deg);
  y->m[2][2] = cos(deg);
  return y;
}
开发者ID:stuydw,项目名称:transformations,代码行数:17,代码来源:matrix.c


示例5: make_rotZ

/*======== struct matrix * make_rotZ() ==========
Inputs:  double theta

Returns: The rotation matrix created using theta as the 
angle of rotation and Z as the axis of rotation.
====================*/
struct matrix * make_rotZ(double theta) {

   double deg = (theta * M_PI) / 180;
  struct matrix *z = new_matrix(4,4);
  ident(z);
  z->m[0][0] = cos(deg);
  z->m[0][1] = -sin(deg);
  z->m[1][0] = sin(deg);
  z->m[1][1] = cos(deg);
  return z;
}
开发者ID:stuydw,项目名称:transformations,代码行数:17,代码来源:matrix.c


示例6: make_rotX

/*======== struct matrix * make_rotX() ==========
Inputs:  double theta

Returns: The rotation matrix created using theta as the 
angle of rotation and X as the axis of rotation.
====================*/
struct matrix * make_rotX(double theta) {

  struct matrix * m = new_matrix(4, 4);
  ident(m);

  m->m[1][1] = cos( theta );
  m->m[1][2] = -1 *  sin( theta );
  m->m[2][1] = sin( theta );
  m->m[2][2] = cos( theta );
  return m;
}
开发者ID:stuydw,项目名称:polygons,代码行数:17,代码来源:matrix.c


示例7: make_scale

/*======== struct matrix * make_scale() ==========
Inputs:  int x
         int y
         int z 
Returns: The translation matrix creates using x, y and z
as the scale factors
====================*/
struct matrix * make_scale(double x, double y, double z) {

  struct matrix * m = new_matrix(4, 4);
  ident(m);

  m->m[0][0] = x;
  m->m[1][1] = y;
  m->m[2][2] = z;

  return m;
}
开发者ID:stuydw,项目名称:polygons,代码行数:18,代码来源:matrix.c


示例8: main

int main() {
	char resp = 'h';
	int num = 0;
	
	printf("Se desejar arvore aleatoria digite 'a'\nCaso contrário digite outra letra\n");
	scanf("%c",&resp);
	
	NO *raiz = NULL; 
	if(resp == 'a'){
		printf("Qual o numero de NOs desejados, além da raiz?\n");
		scanf("%i",&num);
		
		criar_abb_aleatorio(&raiz, num);
		
		printf("Árvore ANTES da exclusao:\n\n");
		ident(raiz, 0);
		
		printf("Qual nivel deve ser excluído?\n");
		scanf("%i",&num);
		excluirNivel(&raiz, num);

		printf("Árvore APOS da exclusao:\n\n");
		ident(raiz, 0);
	}
	else{
		printf("Use -1 para raiz sem filhos, 0  para raiz com um filho,\n1 para raiz com dois filhos, qualquer outro numero irá gerar arvore geral\nQue contém todos os casos\n");
		scanf("%i",&num);
		criar_abb(&raiz, num);

		printf("Árvore ANTES da exclusao:\n\n");
		ident(raiz, 0);

		printf("Qual nivel deve ser excluído?\n");
		scanf("%i",&num);
		excluirNivel(&raiz, num);

		printf("Árvore APOS da exclusao:\n\n");
		ident(raiz, 0);
		
	}
}
开发者ID:CrociDB,项目名称:EP-AED,代码行数:41,代码来源:main.cpp


示例9: _path

    RocksEngine::RocksEngine(const std::string& path, bool durable)
        : _path(path), _durable(durable) {
        {  // create block cache
            uint64_t cacheSizeGB = 0;
            ProcessInfo pi;
            unsigned long long memSizeMB = pi.getMemSizeMB();
            if (memSizeMB > 0) {
                double cacheMB = memSizeMB / 2;
                cacheSizeGB = static_cast<uint64_t>(cacheMB / 1024);
            }
            if (cacheSizeGB < 1) {
                cacheSizeGB = 1;
            }
            _block_cache = rocksdb::NewLRUCache(cacheSizeGB * 1024 * 1024 * 1024LL);
        }
        // open DB
        rocksdb::DB* db;
        auto s = rocksdb::DB::Open(_options(), path, &db);
        ROCKS_STATUS_OK(s);
        _db.reset(db);

        // open iterator
        boost::scoped_ptr<rocksdb::Iterator> _iter(_db->NewIterator(rocksdb::ReadOptions()));

        // find maxPrefix
        _maxPrefix = 0;
        _iter->SeekToLast();
        if (_iter->Valid()) {
            // otherwise the DB is empty, so we just keep it at 0
            bool ok = extractPrefix(_iter->key(), &_maxPrefix);
            // this is DB corruption here
            invariant(ok);
        }

        // load ident to prefix map
        {
            boost::mutex::scoped_lock lk(_identPrefixMapMutex);
            for (_iter->Seek(kMetadataPrefix);
                 _iter->Valid() && _iter->key().starts_with(kMetadataPrefix); _iter->Next()) {
                rocksdb::Slice ident(_iter->key());
                ident.remove_prefix(kMetadataPrefix.size());
                // this could throw DBException, which then means DB corruption. We just let it fly
                // to the caller
                BSONObj identConfig(_iter->value().data());
                BSONElement element = identConfig.getField("prefix");
                // TODO: SERVER-16979 Correctly handle errors returned by RocksDB
                // This is DB corruption
                invariant(!element.eoo() || !element.isNumber());
                uint32_t identPrefix = static_cast<uint32_t>(element.numberInt());
                _identPrefixMap[StringData(ident.data(), ident.size())] = identPrefix;
            }
        }
    }
开发者ID:rueckstiess,项目名称:mongo,代码行数:53,代码来源:rocks_engine.cpp


示例10: make_translate

/*======== struct matrix * make_translate() ==========
Inputs: int x
int y
int z
Returns: The translation matrix created using x, y and z
as the translation offsets.
====================*/
struct matrix * make_translate(double x, double y, double z) {
    struct matrix * g;
    g = new_matrix(4,4);
    ident(g);

    g->m[0][3] = x;
    g->m[1][3] = y;
    g->m[2][3] = z;

    return g;

}
开发者ID:stuydw,项目名称:transformations,代码行数:19,代码来源:matrix.c


示例11: make_rotZ

/*======== struct matrix * make_rotZ() ==========
Inputs: double theta

Returns: The rotation matrix created using theta as the
angle of rotation and Z as the axis of rotation.
====================*/
struct matrix * make_rotZ(double theta) {
    struct matrix * g;
    g = new_matrix(4,4);
    ident(g);

    g->m[0][0] = cos((M_PI * theta) / 180);
    g->m[0][1] = -1 * sin((M_PI * theta) / 180 );
    g->m[1][0] = sin((M_PI * theta) / 180);
    g->m[1][1] = cos((M_PI * theta) / 180);

    return g;
}
开发者ID:stuydw,项目名称:transformations,代码行数:18,代码来源:matrix.c


示例12: make_translate

/*======== struct matrix * make_translate() ==========
Inputs:  int x
         int y
         int z 
Returns: The translation matrix created using x, y and z 
as the translation offsets.
====================*/
struct matrix * make_translate(double x, double y, double z) {

  struct matrix *translate = new_matrix(4, 4); 

  ident(translate); 
  translate->m[0][3] = x;
  translate->m[1][3] = y; 
  translate->m[2][3] = z; 
  
  return translate; 

}
开发者ID:stuydw,项目名称:transformations,代码行数:19,代码来源:matrix.c


示例13: decodeTypeFunction

 void decodeTypeFunction() // 33
 {
     uint32_t result = decodeId();
     uint32_t return_type = decodeId();
     std::cout << ident() << "TypeFunction " << result << " " << return_type << " (";
     while(offset + 1 < length)
     {
         uint32_t paremeter_type = decodeId();
         std::cout << " " << paremeter_type;
     }
     std::cout << ")" << std::endl;
 }
开发者ID:lemoniac,项目名称:spirvviewer,代码行数:12,代码来源:spirvparser.cpp


示例14: factor

/* analisa e traduz um fator matemático */
void factor(){
        if (look == '(') {
        
                match('(');
                expression();
                match(')');

        } else if(isalpha(look))
                ident();
        else
                emit("MOV AX, %c", getNum());
}
开发者ID:daniloluca,项目名称:compiler-c,代码行数:13,代码来源:interpreter.c


示例15: ident

void 	CXmlOutPro::prtl_ident(PSTR fmt,...)
{
	ident();

    va_list argptr;
	char buf[280];

    va_start(argptr, fmt);
    vsprintf(buf, fmt, argptr);
    va_end(argptr);

	prtl("%s",buf);
}
开发者ID:JFreaker,项目名称:exetoc,代码行数:13,代码来源:CXmlPrt.cpp


示例16: ident_dir

int ident_dir(char *fn)
{
   int count,i = 0;
   struct dirent **files;
   int file_select = NULL;
   count = scandir(fn, &files, file_select, alphasort);
   if (count > 0) {
      for (i = 0; i < count; ++i) {
         ident(files[i]->d_name);
      }
   }
   return 0;
}
开发者ID:Judder,项目名称:Romident,代码行数:13,代码来源:romident.c


示例17: decodeCompositeConstruct

    void decodeCompositeConstruct() // 80
    {
        uint32_t result_type = decodeId();
        uint32_t result = decodeId();
        std::cout << ident() << "CompositeConstruct " << types.at(result_type) << " " << result;

        while(offset + 1 < length)
        {
            uint32_t constituent = decodeId();
            std::cout << " " << constituent;
        }
        std::cout << std::endl;
    }
开发者ID:lemoniac,项目名称:spirvviewer,代码行数:13,代码来源:spirvparser.cpp


示例18: operationIn

EncodedJSValue JIT_OPERATION operationIn(ExecState* exec, JSCell* base, StringImpl* key)
{
    VM* vm = &exec->vm();
    NativeCallFrameTracer tracer(vm, exec);

    if (!base->isObject()) {
        vm->throwException(exec, createInvalidParameterError(exec, "in", base));
        return JSValue::encode(jsUndefined());
    }

    Identifier ident(vm, key);
    return JSValue::encode(jsBoolean(asObject(base)->hasProperty(exec, ident)));
}
开发者ID:webOS-ports,项目名称:webkit,代码行数:13,代码来源:JITOperations.cpp


示例19: make_rotX

/*======== struct matrix * make_rotX() ==========
Inputs:  double theta

Returns: The rotation matrix created using theta as the 
angle of rotation and X as the axis of rotation.
====================*/
struct matrix * make_rotX(double theta) {
  theta = M_PI* (theta/180); //converted to radians
  //printf("%lf\n", theta); 
  struct matrix *rot= new_matrix(4,4); 
  ident(rot); 

  rot->m[1][1] = cos(theta); 
  rot->m[1][2] = -sin(theta); 
  rot ->m[2][1] = sin(theta); 
  rot->m[2][2] = cos(theta); 

  return rot; 
}
开发者ID:stuydw,项目名称:transformations,代码行数:19,代码来源:matrix.c


示例20: procedimento

/*** Função que confere um procedimento ***/
int procedimento() {
    if(match(PROCEDURE)) {
        if(ident()) {
            if(parametros()) {
                if(declaracao()) {
                    if(bloco()) {
                        return 1;
                    } else return 0;
                } else return 0;
            } else return 0;
        } else return 0;
    } else return 0;
}
开发者ID:trsampaio,项目名称:Pasquack,代码行数:14,代码来源:sintatico.c



注:本文中的ident函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ idnLogPrintf函数代码示例发布时间:2022-05-31
下一篇:
C++ ib_dma_map_single函数代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap