irrlicht

Install and compile irrlicht on windows (CLION)

你离开我真会死。 提交于 2021-02-11 12:31:58
问题 I'm a student developer and I've always dev on Linux. This is the first project I have to do crossplateform. So I installed Git Bash, Visual Studio Pro and CLion on Windows. Usually I compile with GCC and Makefiles. So on Linux I installed the lib run the examples of the lib and it work. But when I want to compile it on Windows, it gets complicated. I use the example files given by Irrlicht to make sure it doesn't come from the sources. Here is my CMakeLists.txt cmake_minimum_required(VERSION

irrlicht 游戏编程 有用的数学之faceTarget 旋转角色朝向目标

*爱你&永不变心* 提交于 2020-05-06 06:41:33
作用:旋转角色朝向目标。 比如玩家靠近怪物。。怪物还没有朝向玩家,怪物发现了玩家,怪物转身朝向玩家并追赶。 以前用小画家画的草图。 模拟怪物旋转Y轴朝向角色 下面用irrlicht引擎做代码演示。 //朝向目标.只旋转y轴 core::vector3df faceTarget(IAnimatedMeshSceneNode* playerNode,irr::core::vector3df targetpos,f32 fixrot) { vector3df nodepos=playerNode->getPosition(); core::vector3df posDiff = targetpos - nodepos; //向量.角色->目标 f32 degree = nodepos.Y; //keep current rotation if nothing to do posDiff.normalize(); //printf("dir %3.1f %3.1f %3.1f\n",posDiff.X,posDiff.Y,posDiff.Z); if (posDiff.X != 0.0f || posDiff.Z != 0.0f) degree = atan2(posDiff.X,posDiff.Z) * core::RADTODEG; playerNode->setRotation(

Irrlicht以及我的毕业设计

故事扮演 提交于 2020-03-15 01:52:26
鬼火引擎 因为临近毕业,毕业设计报的是一个3D有关一个设计,又因为平时都是在Linux上开发工作所以选了用C++实现的一个比较轻量级引擎。鬼火引擎学习成本不大,不过因为涉及不到高级操作,至于直接写矩阵变换,shader就比较困难了。引擎大部分代码结构都比较统一,可以看到关于场景的创建绘制都在 SceneManager 中,关于显存资源的管理都在 VideoDriver 中,gui在 GuiEnviroment 中,所以想要一个功能能够立马知道该从哪洗方面入手,降低了入门门槛。但是还是存在一些明显的不足,比如默认的阴影实现不是太完美,影子可以穿过墙壁,现在还没有找到比较好的解决方法。 如果想要制作一个3d程序,很自然而言的就需要场景编辑器,将模型摆放在指定位置然后程序直接读取配置文件完成预先定义场景,有个比较老解决方案是用 irrEdit ,不过一是这个项目已经很久没有更新了,官网上最后一次更新还是在2010年,二是这个程序目前只支持win,比较无语。不过因为irrlicht这几年也没有太大的更新,所以如果实在想用可以在win下用这款工具生成一个 .irr 的场景文件然后用 SceneManager::loadScene 加载。 如果初学鬼火引擎,一个建议是要使用一个可以自动补齐的IDE,用vim搭配插件的方式也可以。能够自动补齐 irrlicht

C++开源库

旧街凉风 提交于 2020-01-16 21:05:16
转:http://www.189works.com/article-40804-1.html 摘要 : C++在商业应用方面,曾经是天下第一的开发语言,但这一桂冠已经被java抢走多年。因为当今商业应用程序类型,已经从桌面应用迅速转移成Web应 用。当Java横行天下之后,MS又突然发力,搞出C#语言,有大片的曾经的C++程 ... C++在“商业应用”方面,曾经是天下第一的 开发语言 , 但这一桂冠已经被java抢走多年。因为当今商业应用程序类型,已经从桌面应用迅速转移成Web应 用。当Java横行天下之后,MS又突然发力,搞出C#语言,有大片的曾经的C++程序员,以为C++要就此沉沦,未料,这三年来,C++的生命力突然被 严重地增强了。主力原因就是开源的软件、基础软件(比如并发原生支持,比如 Android 必定要推出原生的SDK)、各种跨平台应用的出现。 开源C++库必须具有以下特点:必须是成熟的产品、跨平台的产品、相对通用的库。 一、通用标准类 STL:C++标准模板库,呵呵,它也是开源的嘛。 boost:C++准标准库,它是强大地,江湖称之“千锤百炼”。 -------若掌握,必横行世界。 deelx (轻量级的正则表达式解析类库,国产),boost里有强大的正则表达式解析库,但如果你只想要一个表达式解析,不想要拖上庞大的boost库时……支持一下国货。 iconv

C++ compile error when includeing Irrlicht static lib

跟風遠走 提交于 2019-12-23 09:52:17
问题 U have a compile error when trying to include the Irrlicht static libraries into my cmake project Compile error: max@max-MS-7369:~/Desktop/survival/build$ make Scanning dependencies of target survival [ 33%] Building CXX object src/CMakeFiles/survival.dir/technic.cpp.o [ 66%] Building CXX object src/CMakeFiles/survival.dir/render.cpp.o [100%] Building CXX object src/CMakeFiles/survival.dir/survival.cpp.o Linking CXX executable ../debug/survival /usr/bin/ld: ../../irrlicht/lib/Linux

irrlicht : undefined reference to `XFree'

淺唱寂寞╮ 提交于 2019-12-12 03:32:38
问题 i using code::blocks and irrlicht but when i run my code i get a list of errors i don't know why my code are right and i use the version 1.8.3 from the lib and i definded it in the code::blocks options ||=== Build: Debug in shit2 (compiler: GNU GCC Compiler) ===| ../../irrlicht-1.8.3/source/Irrlicht/libIrrlicht.a(CIrrDeviceLinux.o)||In function irr::CIrrDeviceLinux::~CIrrDeviceLinux()':| /home/shar/irrlicht-1.8.3/source/Irrlicht/CIrrDeviceLinux.cpp|138|undefined reference to XFree'| /home

Irrlicht嵌入QT widget中

十年热恋 提交于 2019-12-10 03:04:47
Irrlicht中默认的和一般的opengl程序一样都是控制台+一个绘图窗口的,在Irrrlicht中有一个例子是把irrlicht程序嵌入win32绘图窗口下。具体代码如下: HWND hIrrlichtWindow = CreateWindow("BUTTON", "", WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, 50, 80, 320, 220, hWnd, NULL, hInstance, NULL); irr::SIrrlichtCreationParameters param; param.WindowId = reinterpret_cast(hIrrlichtWindow); // hColorButton param.DriverType = video::EDT_OPENGL; irr::IrrlichtDevice* device = irr::createDeviceEx(param); 返回的device指针就是一个绘图设备了,其实思想很简单,就是创建一个窗体返回窗体句柄,这个句柄作为SIrrlichtCreationParameters的windowID即可;其实QT下面实现完全可以用这个方法,在QWidget类下有个成员函数 winId();所以在QT中可以创建一个QWidget类然后用这个函数返回win32的窗体句柄

Crystalspace vs. Irrlicht vs. …?

左心房为你撑大大i 提交于 2019-12-09 07:28:57
问题 So, I use Linux, and I've been trying to find the time to get into game programming. I started out with Panda3d and had some pretty decent results and got a feel for many of the concepts in game programming. Not too long after that, I decided to step it up a notch and go to something more powerful and C or C++ based. I'm probably just really dumb, but I could never really figure out how to use Crystalspace correctly. If somebody has any useful resources on how to use it, I would appreciate

Convert const char* to const wchar_t*

家住魔仙堡 提交于 2019-12-09 06:01:24
问题 I am trying to create a program with Irrlicht that loads certain things from a configuration file written in Lua, one of which is the window title. However, the lua_tostring function returns a const char* while the Irrlicht device's method setWindowCaption expects a const wchar_t* . How can I convert the string returned by lua_tostring ? 回答1: There are multiple questions on SO that address the problem on Windows. Sample posts: char* to const wchar_t * conversion conversion from unsigned char*

Crystalspace vs. Irrlicht vs. …?

你。 提交于 2019-12-03 08:36:59
So, I use Linux, and I've been trying to find the time to get into game programming. I started out with Panda3d and had some pretty decent results and got a feel for many of the concepts in game programming. Not too long after that, I decided to step it up a notch and go to something more powerful and C or C++ based. I'm probably just really dumb, but I could never really figure out how to use Crystalspace correctly. If somebody has any useful resources on how to use it, I would appreciate that. But in the meantime, I was messing around with Irrlicht and I like it, but I would like to know