旷野的呼声

路漫漫其修远兮 吾将上下而求索

常用链接

统计

最新评论

好贴,转了。
还是刚才那句话,没源码能让你发疯。
无论是kismet还是matinee还是材质编辑器,都非常牛叉。其实还有更多的资料没有公用许可,需要花美刀去购买的。其实Epic这么干无非是先让你尝鲜,然后再勾引你去买,这样的话他的目的就达到了,就像微软并没有真正意义上的变态的打击盗版一样。。。55555555555.。。楼主,以后多联系。。。不过很少上cppblog.祝你愉快。
光是UDK用起来还是没有有代码好,至少有代码上手比较快。当然有代码也有悲剧的时候,特别是遇到有的时候升级造成的难以察觉的Bug。我就遇到过Content浏览器的一个Bug,哎,悲剧~~
郁闷的是UDK都免费了,nFringe却收费了,郁闷啊,那该死的UDE也太难用了,还是VS用着爽。可惜可惜。
我是楼上。
悲剧啊,最新版的nfringe貌似收费了啊,郁闷。要在VS里面调试的话,还得用老版本,还好我有老版本可以用,要不然就彻底悲剧了。
我又回来了。
FStringNoInit
FName...
如果楼主能分享一下autoexp.dat就好了,哈哈。
谢谢楼主,哈哈。
re: 游戏中CPU使用率的控制 董波 2009-06-16 08:33
这个方法不佳。。。
谁有没有更好的方法提出来哈,呵呵。
6.2. Requirements for Call Wrapper Types
TR1 defines some additional terms that are used to describe requirements for callable types.

First, INVOKE(fn, t1, t2, ..., tN) describes the effect of calling a callable object fn with the arguments t1, t2, ..., tN. Naturally, the effect depends on the type of the callable object. INVOKE is defined as follows:

(t1.*fn)(t2, ..., tN) when fn is a pointer to a member function of a class T and t1 is an object of type T or a reference to an object of type T or a reference to an object of a type derived from T

((*t1).*fn)(t2, ..., tN) when fn is a pointer to a member function of a class T and t1 is not one of the types described in the previous item

t1.*fn when fn is a pointer to member data of a class T and t1 is an object of type T or a reference to an object of type T or a reference to an object of a type derived from T

(*t1).*fn when fn is a pointer to member data of a class T and t1 is not one of the types described in the previous item

fn(t1, t2, ..., tN) in all other cases

What this amounts to is that when the callable object is an ordinary function or a pointer to an ordinary function, INVOKE means to call that function, passing the rest of the arguments to the function call. When the callable object is a pointer to member, the next argument refers to the object that it should be applied to. That argument is the object itself, a reference to the object, a pointer to the object, or some kind of smart pointer that points to the object. The rest of the arguments are passed to the function call.

Second, INVOKE_R(fn, t1, t2, ..., tN, Ret) describes the effect of calling a callable object fn with an explicit return type, Ret. It is defined as INVOKE(fn, t1, t2, ..., tN) implicitly converted to Ret.[5]

[5] In the TR, this metafunction is named INVOKE; although I'm one of the people responsible for this name overloading, I've now concluded that it's too clever and shouldn't be used.

Third, some call wrapper types have a weak result type; this means that they have a nested member named result_type that names a type determined from the call wrapper's target type, Ty.

If Ty is a function, reference to function, pointer to function, or pointer to member function, result_type is a synonym for the return type of Ty

If Ty is a class type with a member type named result_type, result_type is a synonym for Ty::result_type

Otherwise, result_type is not defined[6]

[6] That is, not defined as a consequence of having a weak result type. Some call wrapper types have a weak result type in certain circumstances, have a specific type named result_type

A few examples will help clarify what this rather dense text means:

struct base {
void f();
int g(double);
int h(double,double);
};
struct derived : base {
};

base b;
derived d;
base& br = d;



With these definitions, rule 1 gives the following meanings to these uses of INVOKE .

Phrase
Meaning

INVOKE (&base::f, b)
(b.*f)()

INVOKE (&base::g, d, 1.0)
(d.*f)(1.0)

INVOKE (&base::h, br, 1.0, 2.0)
(br.*f)(1.0, 2.0)





That is, the pointer to member function is called on the object or reference named by t1:

derived *dp = new derived;
base *bp = dp;
shared_ptr<base> sp(bp);



With these additional definitions, rule 2 gives the following meanings to these uses of ( INVOKE):

Phrase
Meaning

INVOKE (&base::f, bp)
((*bp).*f)()

INVOKE (&base::g, dp, 1.0)
((*dp).*f)(1.0)

INVOKE (&base::h, sp, 1.0, 2.0)
((*sp).*f)(1.0, 2.0)





That is, the pointer to member function is called on the object that the argument t1 points to. Since it uniformly dereferences that argument, the rule works for any type whose operator* returns a reference to a suitable object. In particular, the rule works for shared_ptr objects.

Rules 3 and 4 give similar meanings to INVOKE uses that apply pointers to member data:

void func(base&);
struct fun_obj {
void operator()() const;
bool operator()(int) const;
};
fun_obj obj;



With these additional definitions, rule 5 gives the following meanings to these uses of INVOKE:

Phrase
Meaning

INVOKE (func, d)
func(d)

INVOKE (obj)
obj()

INVOKE (obj, 3)
obj(3)


@金庆
呵呵,我是说这个名字怎么这么面熟呢?
有时间把asio翻译翻译吧,哈哈。。。
我英语不是很好,简单点的还成,稍微复杂点的句子就迷糊了,呵呵。
asio东拼西凑的看了一些资料,由于没有完整的理解到所有的东西,所以用的时候总是畏首畏尾的,呵呵。
楼主,学习C++和Boost的时候看到了您的很多资料,非常感谢您的无私奉献!
现在大学要毕业了,以后可能没这么多时间像现在一样学习了,呵呵。
感谢楼主!感谢金庆。
您是google的boost翻译组的吗?我看到了您的一些贡献。
re: 一本好书[未登录] 董波 2009-05-24 19:55
《实时计算机图形学》第三版都出了,强烈期待中文翻译版本啊,英文我瞅不懂。
楼主好!