len3d

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

09 2005 档案

摘要://-------------------------------------------------// Smart Pointer//-------------------------------------------------#ifndef _SMART_POINTER_H#define _SMART_POINTER_Hextern std::li... 阅读全文
posted @ 2005-09-11 20:31 Len3d 阅读(475) 评论(0) 推荐(0)

摘要:eiBool eiTriangle::intersect(eiRay *ray, eiObject *po, eiFloat & oldt, eiPrimitive* & ret_pri, eiFloat *cust_data, HitParam *hparam){ if ( clip == EI_BSP_PRIMITIVE... 阅读全文
posted @ 2005-09-03 01:20 Len3d 阅读(416) 评论(0) 推荐(0)

摘要:最简单的例子:#define MAX(a,b) (((a)>(b))?(a):(b))如果写成:#define MAX(a,b) ((a>b)?a:b)语法上也正确,但是很容易造成隐藏的错误!因为如果当a或者b为表达式时,宏替换后的代码就跟程序员的本意不同了! 阅读全文
posted @ 2005-09-02 00:10 Len3d 阅读(277) 评论(0) 推荐(0)