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

C++ outputError函数代码示例

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

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



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

示例1: ShowNavError

bool CNavMesh::raycast(position_t& start, position_t& end)
{
    if (start.x == end.x && start.y == end.y && start.z == end.z)
        return true;
    dtStatus status;

    float spos[3];
    CNavMesh::ToDetourPos(&start, spos);

    float epos[3];
    CNavMesh::ToDetourPos(&end, epos);

    float polyPickExt[3];
    polyPickExt[0] = 30;
    polyPickExt[1] = 60;
    polyPickExt[2] = 30;

    float snearest[3];

    dtQueryFilter filter;
    filter.setIncludeFlags(0xffff);
    filter.setExcludeFlags(0);

    dtPolyRef startRef;

    status = m_navMeshQuery->findNearestPoly(spos, polyPickExt, &filter, &startRef, snearest);

    if (dtStatusFailed(status))
    {
        ShowNavError("CNavMesh::raycastPoint start point invalid (%f, %f, %f) (%u)\n", spos[0], spos[1], spos[2], m_zoneID);
        outputError(status);
        return true;
    }

    if (!m_navMesh->isValidPolyRef(startRef))
    {
        ShowNavError("CNavMesh::raycastPoint startRef is invalid (%f, %f, %f) (%u)\n", start.x, start.y, start.z, m_zoneID);
        return true;
    }

    status = m_navMeshQuery->raycast(startRef, spos, epos, &filter, 0, &m_hit);

    if (dtStatusFailed(status))
    {
        ShowNavError("CNavMesh::raycastPoint raycast failed (%f, %f, %f)->(%f, %f, %f) (%u)\n", spos[0], spos[1], spos[2], epos[0], epos[1], epos[2], m_zoneID);
        outputError(status);
        return true;
    }

    // no wall was hit
    if (m_hit.t == FLT_MAX)
    {
        return true;
    }

    return false;
}
开发者ID:lenonk,项目名称:darkstar,代码行数:57,代码来源:navmesh.cpp


示例2: stop

	bool Movie::openFromFile(const std::string& filename)
	{
		int err = 0;
		bool preloaded = false;

		// Make sure everything is cleaned before opening a new movie
		stop();
		close();
		
		// Load all the decoders
		av_register_all();

		// Open the movie file
		err = avformat_open_input(&m_avFormatCtx, filename.c_str(), NULL, NULL);

		if (err != 0)
		{
			outputError(err, "unable to open file " + filename);
			return false;
		}

		// Read the general movie informations
		err = avformat_find_stream_info(m_avFormatCtx, NULL);

		if (err < 0)
		{
			outputError(err);
			close();
			return false;
		}

		if (usesDebugMessages())
			// Output the movie informations
			av_dump_format(m_avFormatCtx, 0, filename.c_str(), 0);

		// Perform the audio and video loading
		m_hasVideo = m_video->initialize();
		m_hasAudio = m_audio->initialize();
		
		if (m_hasVideo)
		{
			preloaded = m_video->preLoad();
			
			if (!preloaded) // Loading first frames failed
			{
				if (sfe::Movie::usesDebugMessages())
					std::cerr << "Movie::OpenFromFile() - Movie_video::PreLoad() failed.\n";
			}
		}
		
		return m_hasAudio || (m_hasVideo && preloaded);
	}
开发者ID:nicholaskell,项目名称:sfeMovie,代码行数:52,代码来源:Movie.cpp


示例3: ShowError

int16 CNavMesh::findRandomPath(position_t start, float maxRadius, position_t* path, uint16 pathSize)
{

  dtStatus status;
  int16 length = 0;

  float spos[3];
  spos[0] = start.x;
  spos[1] = start.y * -1;
  spos[2] = start.z * -1;

  float polyPickExt[3];
  polyPickExt[0] = 30;
  polyPickExt[1] = 60;
  polyPickExt[2] = 30;

  float randomPt[3];
  float snearest[3];

  dtQueryFilter filter;
  filter.setIncludeFlags(0xffff);
  filter.setExcludeFlags(0);

  dtPolyRef startRef;
  dtPolyRef randomRef;

  status = m_navMeshQuery->findNearestPoly(spos, polyPickExt, &filter, &startRef, snearest);

  if(dtStatusFailed(status))
  {
    ShowError("CNavMesh::findRandomPath start point invalid (%f, %f, %f)\n", spos[0], spos[1], spos[2]);
    outputError(status);
    return ERROR_NEARESTPOLY;
  }

  status = m_navMeshQuery->findRandomPointAroundCircle(startRef, spos, maxRadius, &filter, &RandomNumber, &randomRef, randomPt);

  if(dtStatusFailed(status))
  {
    ShowError("CNavMesh::findRandomPath Error\n");
    outputError(status);
    return ERROR_NEARESTPOLY;
  }

  position_t end;

  end.x = randomPt[0];
  end.y = randomPt[1] * -1;
  end.z = randomPt[2] * -1;

  return findPath(start, end, path, pathSize);
}
开发者ID:ZeDingo,项目名称:darkstar,代码行数:52,代码来源:navmesh.cpp


示例4: errMsg

void errMsg(char* formate, ...){
    va_list argList;
    va_start(argList, formate);//获取可变参数的起始地址
    int errorNum = errno;
    outputError(formate, argList, errorNum);
    va_end(argList);
}
开发者ID:Shaolw5261,项目名称:echo,代码行数:7,代码来源:myerror.c


示例5: sdLaMa091New

sdLaMa091_t* sdLaMa091New(void) {
  sdLaMa091_t* sdLaMa091 = (sdLaMa091_t*) malloc(sizeof(*sdLaMa091));

#ifdef DEFENSIVE_ALLOC
  if (sdLaMa091 == NULL) {
    outputError("Cannot allocate sdLaMa091 structure");
    return NULL;
  }
#endif

  sdLaMa091->imageType = UNKNOWN;

  sdLaMa091->width = 0;
  sdLaMa091->rgbWidth = 0;
  sdLaMa091->height = 0;
  sdLaMa091->stride = 0;
  sdLaMa091->numBytes = 0;
  sdLaMa091->unusedBytes = 0;
  sdLaMa091->rgbUnusedBytes = 0;

  sdLaMa091->N = DEFAULT_N;
  sdLaMa091->Vmin = DEFAULT_VMIN;
  sdLaMa091->Vmax = DEFAULT_VMAX;

  sdLaMa091->Mt = NULL;
  sdLaMa091->Ot = NULL;
  sdLaMa091->Vt = NULL;

  return sdLaMa091;
}
开发者ID:2php,项目名称:ShadowDetection,代码行数:30,代码来源:sdLaMa091.cpp


示例6: fatal

void fatal(const char *format, ...)
{
	va_list argList;
	va_start(argList, format);
	outputError(FALSE, 0, TRUE, format, argList);
	va_end(argList);
	terminate(TRUE);
}
开发者ID:solzy,项目名称:micro-chat,代码行数:8,代码来源:error_functions.c


示例7: errExitEN

void errExitEN(int errnum, const char *format, ...)
{
	va_list argList;
	va_start(argList, format);
	outputError(TRUE, errnum, TRUE, format, argList);
	va_end(argList);
	terminate(TRUE);
}
开发者ID:solzy,项目名称:micro-chat,代码行数:8,代码来源:error_functions.c


示例8: err_exit

void err_exit(const char *format, ...)
{
	va_list argList;
	va_start(argList, format);
	outputError(TRUE, errno, FALSE, format, argList);
	va_end(argList);
	terminate(FALSE);
}
开发者ID:solzy,项目名称:micro-chat,代码行数:8,代码来源:error_functions.c


示例9: errExitEN

void
errExitEN(int errnum, const char *format, ...)
{
    va_list argList;
    va_start(argList, format);
    outputError(1, errnum, 1, format, argList);
    va_end(argList);
   // terminate(1);
}
开发者ID:linuxmk,项目名称:experimentPosixThreads,代码行数:9,代码来源:main.c


示例10: fatal

void fatal(const char * format, ...)
{
    va_list argList;

    va_start(argList, format);
    outputError(false, 0, true, format, argList);
    va_end(argList);

    terminate(true);
}
开发者ID:ByXc01,项目名称:The-Linux-Programming-Interface,代码行数:10,代码来源:error_functions.c


示例11: err_exit

void err_exit(const char * format, ...)
{
    va_list argList;

    va_start(argList, format);
    outputError(true, errno, false, format, argList);
    va_end(argList);

    terminate(false);
}
开发者ID:ByXc01,项目名称:The-Linux-Programming-Interface,代码行数:10,代码来源:error_functions.c


示例12: sdLaMa091SetMaximalVariance

int32_t sdLaMa091SetMaximalVariance(sdLaMa091_t* sdLaMa091,
  const uint32_t maximalVariance) {
#ifdef DEFENSIVE_POINTER
  if (sdLaMa091 == NULL) {
    outputError("Cannot set a parameter of a NULL structure");
    return EXIT_FAILURE;
  }
#endif 

#ifdef DEFENSIVE_PARAM
  if (maximalVariance == 0) {
    outputError("Cannot set a parameter with a zero value");
    return EXIT_FAILURE;
  }
#endif 

  sdLaMa091->Vmax = maximalVariance;

  return EXIT_SUCCESS;
}
开发者ID:2php,项目名称:ShadowDetection,代码行数:20,代码来源:sdLaMa091.cpp


示例13: sdLaMa091SetAmplificationFactor

int32_t sdLaMa091SetAmplificationFactor(sdLaMa091_t* sdLaMa091,
  const uint32_t amplificationFactor) {
#ifdef DEFENSIVE_POINTER
  if (sdLaMa091 == NULL) {
    outputError("Cannot set a parameter of a NULL structure");
    return EXIT_FAILURE;
  }
#endif 

#ifdef DEFENSIVE_PARAM
  if (amplificationFactor == 0) {
    outputError("Cannot set a parameter with a zero value");
    return EXIT_FAILURE;
  }
#endif 

  sdLaMa091->N = amplificationFactor;

  return EXIT_SUCCESS;
}
开发者ID:2php,项目名称:ShadowDetection,代码行数:20,代码来源:sdLaMa091.cpp


示例14: errMsg

void errMsg(const char *format, ...)
{
	va_list argList;
	int savedErrno;
	savedErrno = errno;
	/* In case we change it here */
	va_start(argList, format);
	outputError(TRUE, errno, TRUE, format, argList);
	va_end(argList);
	errno = savedErrno;
}
开发者ID:solzy,项目名称:micro-chat,代码行数:11,代码来源:error_functions.c


示例15: sdLaMa091GetAmplificationFactor

uint32_t sdLaMa091GetAmplificationFactor(const sdLaMa091_t* sdLaMa091) {
#ifdef DEFENSIVE_POINTER
  if (sdLaMa091 == NULL) {
    outputError("Cannot get a parameter of a NULL structure");
    errno = ERROR_OCCURED;

    return EXIT_FAILURE;
  }
#endif 

  return sdLaMa091->N;
}
开发者ID:2php,项目名称:ShadowDetection,代码行数:12,代码来源:sdLaMa091.cpp


示例16: sdLaMa091GetMinimalVariance

uint32_t sdLaMa091GetMinimalVariance(const sdLaMa091_t* sdLaMa091) {
#ifdef DEFENSIVE_POINTER
  if (sdLaMa091 == NULL) {
    outputError("Cannot get a parameter of a NULL structure");
    errno = ERROR_OCCURED;

    return EXIT_FAILURE;
  }
#endif 

  return sdLaMa091->Vmin;
}
开发者ID:2php,项目名称:ShadowDetection,代码行数:12,代码来源:sdLaMa091.cpp


示例17: errMsg

void errMsg(const char * format, ...)
{
    va_list argList;
    int savedErrno;

    savedErrno = errno;

    va_start(argList, format);
    outputError(true, errno, true, format, argList);
    va_end(argList);

    errno = savedErrno;
}
开发者ID:ByXc01,项目名称:The-Linux-Programming-Interface,代码行数:13,代码来源:error_functions.c


示例18: errMsg

void errMsg(const char *format, ...)
{
	va_list argList;
	int savedErrno;

	savedErrno = errno;

	va_start(argList, format);
	outputError(TRUE, errno, TRUE, format, argList);
	va_end(argList);

	terminate(FALSE);
}
开发者ID:WnFg,项目名称:Linux-Unix,代码行数:13,代码来源:error_functions.c


示例19: sdLaMa091SetMinimalVariance

int32_t sdLaMa091SetMinimalVariance(sdLaMa091_t* sdLaMa091,
  const uint32_t minimalVariance) {
#ifdef DEFENSIVE_POINTER
  if (sdLaMa091 == NULL) {
    outputError("Cannot set a parameter of a NULL structure");
    return EXIT_FAILURE;
  }
#endif 

  sdLaMa091->Vmin = minimalVariance;

  return EXIT_SUCCESS;
}
开发者ID:2php,项目名称:ShadowDetection,代码行数:13,代码来源:sdLaMa091.cpp


示例20: exit

void
COSErr::
exit(const char *format, ...)
{
  va_list argList;

  va_start(argList, format);

  outputError(true, errno, true, format, argList);

  va_end(argList);

  terminate(true);
}
开发者ID:colinw7,项目名称:COS,代码行数:14,代码来源:COSErr.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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