摘要: UITypeEditor用来标识一个类型在属性网格(PropertyGrid)中的编辑方式,通过实现自定义的UITypeEditor类,就可以用各种自定义的方式在属性网格中编辑对象属性了,比如自定义一个文件选择对话框,来选择游戏引擎的虚拟文件系统中的文件:using namespace System::ComponentModel;public ref class VirtualFileEditor : public UITypeEditor{protected: String^ m_Filter;public: VirtualFileEditor( void ) ... 阅读全文
posted @ 2012-08-31 22:43 秋天的栗树 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 实现方式和C#中一样,只是要改成C++/CLI的语法。控件的DragEnter事件处理代码:void Form1::Form1_DragEnter( System::Object^ sender, System::Windows::Forms::DragEventArgs^ e ){ if ( e->Data->GetDataPresent( DataFormats::FileDrop ) ) { Array^ files=(Array^)e->Data->GetData(DataFormats::FileDrop); System::String^ ... 阅读全文
posted @ 2012-08-30 16:06 秋天的栗树 阅读(361) 评论(0) 推荐(0) 编辑
摘要: thread_group是boost库中的线程池类,内部使用的是boost::thread。随着C++ 11标准的制定和各大编译器的新版本的推出(其实主要是VS2012的推出啦……),本着能用标准库就用标准库的指导原则,决定把项目中多线程相关的部分代码从boost::thread迁移到std::thread。thread的迁移本身很简单,毕竟stl的很多功能是直接从boost发展而来的,基本上就是改一下头文件和名称空间的问题,例外是thread_group,thread_group是boost的组件,但并不是标准库的组件,所以需要自己实现一下。说是自己实现,其实就是复制粘贴boost中的代码啦 阅读全文
posted @ 2012-08-28 21:14 秋天的栗树 阅读(2187) 评论(1) 推荐(0) 编辑
摘要: Assimp(Open Asset Import Library)是一个支持读取多种模型资源的开源库,当前最新的版本是3.0版,支持读取以下类型的3D模型:Collada ( .dae )Blender 3D ( .blend )3ds Max 3DS ( .3ds )3ds Max ASE ( .ase )Wavefront Object ( .obj )Industry Foundation Classes (IFC/Step) ( .ifc )XGL ( .xgl,.zgl )Stanford Polygon Library ( .ply )*AutoCAD DXF ( .dxf )Li 阅读全文
posted @ 2012-08-28 13:22 秋天的栗树 阅读(5898) 评论(2) 推荐(0) 编辑