Irrlicht | Render preview -
kandi X-RAY | Irrlicht Summary
kandi X-RAY | Irrlicht Summary
Render preview
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Irrlicht
Irrlicht Key Features
Irrlicht Examples and Code Snippets
Community Discussions
Trending Discussions on Irrlicht
QUESTION
I am trying to pass a variable to a cmake script but it I am obviously not doing it correctly. I am trying to build a chrono project by following the tutorial. Tutorial I am following is here:
https://api.projectchrono.org/tutorial_install_project.html
the CMakeLists.txt is modified below to:
...ANSWER
Answered 2021-Feb-01 at 12:02Maybe you can try it:
QUESTION
I am building an application which uses tinyxml2
and few other dependencies (namely Irrlicht
and IrrKlang
) that I provide as .zip
files in the Dependency
subdirectory of my project:
ANSWER
Answered 2020-Oct-01 at 23:56I have played with both a solution suggested by @Mizux in their comment and had some success with two different approaches.
1. vcpkgThis is arguably the easier of the two. It requires vcpkg installed.
See this commit for example.
Create a manifest file, vcpkg.json
in the project root directory, listing all the dependencies used by the project:
QUESTION
I am trying to build a cross platform school project in C++ with CMake. My project requires the use of the Irrlicht library and must compile under Linux and Windows 10.
The project source path contains a lib
folder, containing the Irrlicht header (in an include
subfolder), an Irrlicht.dll
, an Irrlicht.lib
and a FindIrrlicht.cmake
module.
I set CMAKE_MODULE_PATH
to point to this directory, then call find_package(Irrlicht REQUIRED)
in my CMakeLists.txt
.
When I try to compile under Linux, everything works fine. However, when I try to run the configuration with CMake (using the CMake GUI) under Windows, the FindIrrlicht.cmake
module that I have does not work (it should, since it is provided by the school and they say it should, also I know other people had it work without modifications). I believe that I have identified the cause of the problem, but I do not understance why it occurs nor how to fix it.
FindIrrlicht.cmake
looks for the include
directory and the Irrlicht.lib
(or libIrrlicht.so
under Linux, using prefix/suffix options) in some standard Linux include/library path AND under CMAKE_MODULE_PATH
. When compiling on Windows, it should find everything in CMAKE_MODULE_PATH
.
It calls find_library
like this:
ANSWER
Answered 2020-Jun-03 at 21:41Well, I found my problem. I feel stupid for not thinking about this sooner...
The problem was in the pre/suffixes, with some debugging output I realised that they were set for Linux instead of Windows, hence not founding the library file.
The reason for that is that in the CMakeLists.txt, the call to find_package was done before the call to project(), thus the MSVC variables was not set during the call to find_package, which led the script to believe it was called under Linux.
QUESTION
I've been fighting with several libraries (irrlicht, Ogre3D etc) and falling between either too complex libraries or too complex installation guides. I'd appreciate some pointers to how to achieve what the title suggests.
Thanks
...ANSWER
Answered 2019-Jun-16 at 18:57If you're going for simplicity of setup and use, I'd recommend you Unreal Engine. It not only allows you to render both in 3D and 2D, but has a lot of other functionality including scripting in c++.
If you're looking for a more lightweight solution, though not as easy, you can try using OpenGL. It is quite easy to set up - just install Code::Blocks and start with their OpenGL template. Although it is much harder to learn and use, it is very developing.
If you don't really need to use c++, you can use Unity. Although its interface is exposed through c#, its not very hard to learn for a c++ programmer. I also find it easier to use than Unreal Engine.
I would also reccomend Vulkan, which would probably the most perforamant of all of them, but well, you wanted a "simple" solution.
QUESTION
I have got a complex code that is fully loaded with references to ISceneNode objects. I would like to enable shadows for these. However, the function that let us enable shadows is addShadowVolumeSceneNode(), which is only available for the class IMeshSceneNode.
My question is, how do I convert a ISceneNode into a IMeshSceneNode in order to apply shadows to it?
ps: I know it is not possible to apply shadows to a ISceneNode: http://irrlicht.sourceforge.net/forum/viewtopic.php?t=42174
...ANSWER
Answered 2018-Aug-31 at 10:01You can cast an ISceneNode
pointer to an IMeshSceneNode
pointer, if it actually points to an IMeshSceneNode object:
QUESTION
Is there a single command to flag/enable shadows to all nodes in a given scenery manager?
At the moment I can cast shadows from all nodes but I have to keep calling the same function addShadowVolumeSceneNode(); over and over again for each of the scene nodes. This is ok for a small toy code, but as your code increases in complexity and size, it may well not be ideal.
Here is the code I am playing with:
...ANSWER
Answered 2018-Aug-28 at 14:21Create a factory function:
QUESTION
Hello I have a question with Irrlicht library
I want to do a map with a floor I use createHillPlaneMesh.
I'm actually learning Irrlicht, I actually have a camera and cubes.
here is when I launch it :
...ANSWER
Answered 2018-May-26 at 08:38When you do:
QUESTION
So, I've got a c++ project where i want to visualize stuff (in realtime), so i was looking for a rendering engine, and found bgfx.
I don't write often c++ stuff, and using thirdparty projects seems unbelievable laborious, but maybe i just do everything wrong and hopefully you can push me into the right direction.
My first try was on linux, i cloned bgfx.cmake and followed the readme, then i
used make install
which installed the librarys to "/usr/local/include".
this seemed to work at first, because my IDE (CLion) recognized bgfx when using #import
.
Then i tried to make the HelloWorld example work. i ended up with copying the bgfx examples folder into my project under a subfolder "thirdparty", because all the examples make highly use of the "examples/common" folder.
and i think i made something wrong with my CMakeLists.txt because while my IDE can resolve and autocomplete everything i get a compiler error when I try to run the project:
Unresolved references 'entry::runApp(entry::AppI*, int, char**)'
on the line ENTRY_IMPLEMENT_MAIN(ExampleClass)
where ENTRY_IMPLEMENT_MAIN is a bgfx defined macro (here).
after a few annoying hours i decided to start from scratch:
i made a project "bgfx_test" with subfolder "thirdparty" in the thirdparty folder i cloned the bgfx.cmake project, and added add_subdirectory("thirdparty/bgfx.cmake")
into my CMakeLists.txt
i again made a main.cpp where i added the ExampleHelloWorld class from the bgfx examples.
i changed it to have a empty update() method, so i did not need the logo.h and screeshot.png file from the example. and i changed the includes to:
...ANSWER
Answered 2017-May-30 at 08:32it worked with this CMakeLists.txt:
QUESTION
After a few weeks struggle with integrate various projects, I still have no idea how to do it properly.
Note: the hyperlink, which I link for the example below, is the clone address for GIT/SVN
For example, I have Irrlict's demo project, and I wanna play sound in the project, so I choose USE_SDL_MIXER (I define that in Demo project), I clone SDL and SDL Mixer, then I realize that to build SDL Mixer, I have to intergrate SDL to SDL Mixer project - I don't know how. To use USE_SDL_MIXER define in Irrlict's demo, I have to integrate SDL and SDL Mixer to Irrlicht project - I'm so stuck here.
I found the doc of SDL Mixer said in 2.2 Compiling
To link with SDL_mixer you should use sdl-config to get the required SDL compilation options.
And I completely have no ideal what's that is.
In sum, I just want to know how to properly integrate project in Visual Studio - Please tell me in a step-by-step tutorial cause I'm not very smart. And if I create my new project, put in C:\MyProject\MyProject.sln, but the SDK (like Irrlict, SDL, SDL Mixer) put in D:\GitAndSvn\SDK. Do I need to copied these SDK to C:\MyProject so that I can link them?
...ANSWER
Answered 2017-Jul-30 at 15:00Project integrate
Example integrate: SDL, SDL Mixer, Irrlicht’s Demo project (Date clone these projects: 29/07/2017)
1. Take care of SDL: build SDL
1.1. Use CMake to generate project, and build project, I assume you know how to do this.
2. Take care of SDL Mixer: Integrate SDL to SDL Mixer
2.1. Open file SDL_mixer.sln with Visual Studio (mine is Visual Studio 2015)
2.2. Set Additional Include Directories for SDL include folder
2.2.1. Right click project SDL_mixer and choose Properties (Alt+Enter)
2.2.2. Choose C/C++ (Note: set Platform to All Platforms)
2.2.3. Choose Additional Include Directories
2.2.4. Add SDL include folder for Additional Include Directories (the include folder of SDL project)
2.2.5. Click Ok… – and now you successfully set Additional Include Directories. By now, the error like: [Cannot open include file: 'SDL_loadso.h': No such file or directory SDL2_mixer] should be gone. Build project SDL2_mixer and you should get the new error: [LNK1104 cannot open file 'SDL2.lib' SDL2_mixer], we gonna fix that in the next step.
2.3. Set Additional Library Directories for SDL output folder
2.3.1. In SDL2_mixer Properties dialog, choose Linker (Note: set Platform to All Platforms)
2.3.2. Choose Additional Library Directories
2.3.3. Add SDL output folder for Additional Library Directories (The folder contains the file SDL2.lib after you build the project SDL2)
2.3.4. Click Ok…
2.4. Now build other project in SDL_mixer solution (native_midi, timidity), with the experience from step 2.2, 2.3, you can build these projects just fine.
2.5. Build the project SDL_mixer again, you should build it successfully by now.
3. Take care of Irrlicht’s Demo project: Integrate SDL and SDL mixer into this Demo project
3.1. Open BuildAllExamples_vcXX.sln which contains Demo project (I use Visual Studio 2015 so I open the file ..\trunk\examples\BuildAllExamples_vc14.sln)
3.2. First thing first, build Irrlicht project.
3.3. Now your purpose is to play some sound in this Demo project, so uncomment the code: #define USE_SDL_MIXER in the file ..\trunk\examples\Demo\CDemo.h
3.4. Set Additional Include Directories for SDL include folder (refer step 2.2)
3.5. Build Demo project again, you may have the error like [cannot open source file "SDL/SDL.h" Demo], to fix this, in file CDemo.h change [# include and # include ] to [# include "SDL.h" and # include "SDL_mixer.h"]
3.6. Build Demo project again, you may have the error like [Error C2664 'SDL_RWops *SDL_RWFromFile(const char *,const char *)': cannot convert argument 1 from 'irr::core::string>' to 'const char *' Demo], to fix this, in file CDemo.cpp, change [ballSound = Mix_LoadWAV(mediaPath + "ball.wav"); and impactSound = Mix_LoadWAV(mediaPath + "impact.wav");] to [ballSound = Mix_LoadWAV((mediaPath + "ball.wav").c_str()); and impactSound = Mix_LoadWAV((mediaPath + "impact.wav").c_str());]
3.7. Build Demo project and you should have the error [Error LNK2019 unresolved external symbol _SDL_RWFromFile referenced in function "private: void __thiscall CDemo::startSound(void)" (?startSound@CDemo@@AAEXXZ) Demo] we fix these error in the next step
3.8. Set SDL2.lib and SDL2_mixer.lib for Additional Dependencies
3.8.1. Choose Linker > Input
3.8.2. Choose Additional Dependencies
3.8.3. Add SDL2.lib and SDL2_mixer.lib.
3.9. Create a folder called SDL_lib, and put the following files into this folder
• SDL2.lib
• SDL2_mixer.lib
3.10. Set Additional Library Directories for the SDL_lib folder you just created above.
3.11. Build the Demo project again, now you should build it successfully.
3.12. Hit F5 to run the Demo project, you should get the error like: The program can’t start because SDL2.dll is missing …ect… . Just copy the file SDL2.dll and SDL2_mixer.dll into the output directory of Demo project (where the file which is build named Demo.exe located, in my case: ..\trunk\bin\Win32-VisualStudio)
3.13. Hit F5 again, and enjoy.
Conclusion:
In this whole step by step tutorial, you only have to understand the steps: 2.2, 2.3, 3.8. These are the core of this whole thing. So the key words are: Additional Include Directories, Additional Library Directories, Additional Dependencies
Also, you can check this video if these text above bored you: https://youtu.be/0TlVpiQbFiE (video title SDL 2 Made Easy Tutorial 19 - Mixer [Sound & Music]), the video is not this tutorial, but you can see how to set Additional Library Directories, ect,…
PS: sorry, I did try to format the answer to make it easier to look at, but this is the best I can format the answer.
QUESTION
I would like to create a function to position a free-floating 2D raster image in space with the Irrlicht engine. The inspiration for this is the function rgl::show2d in the R package rgl. An example implementation in R can be found here.
The input data should be limited to the path to the image and a table with the four corner coordinates of the respective plot rectangle.
My first, pretty primitive and finally unsuccessful approach to realize this with irrlicht:
Create a cube:
...ANSWER
Answered 2017-Jul-16 at 12:17I've thought of two ways to do this; neither are very graceful - not helped by Irrlicht restricting us to spherical polars.
NB. the below assumes rcdf
is centered at the origin; this is to make the rotation calculation a bit more straightforward. Easy to fix though:
- Compute the center point (the translational offset) of
rcdf
- Subtract this from all the points of
rcdf
- Perform the procedures below
- Add the offset back to the result points.
Pre-requisite: scaling
This is easy; simply calculate the ratios of width and height in your rcdf
to your original image, then call setScaling
.
Method 1: matrix inversion
For this we need an external library which supports 3x3 matrices, since Irrlicht only has 4x4 (I believe).
We need to solve the matrix equation which rotates the image from X-Y to rcdf
. For this we need 3 points in each frame of reference. Two of these we can immediately set to adjacent corners of the image; the third must point out of the plane of the image (since we need data in all three dimensions to form a complete basis) - so to calculate it, simply multiply the normal of each image by some offset constant (say 1).
(Note the points on the original image have been scaled)
The equation to solve is therefore:
(Using column notation). The Eigen
library offers an implementation for 3x3 matrices and inverse.
Then convert this matrix to spherical polar angles: https://www.learnopencv.com/rotation-matrix-to-euler-angles/
Method 2:
To calculate the quaternion to rotate from direction vector A to B: Finding quaternion representing the rotation from one vector to another
Calculate the rotation from the original image's normal (i.e. the Z-axis) to
rcdf
's normal => quaternionP
.Take the midpoint of AB from the diagram in method 1, and rotate it with the quaternion
P
(http://www.geeks3d.com/20141201/how-to-rotate-a-vertex-by-a-quaternion-in-glsl/) => vectorU
.Calculate the rotation from
U
to the midpoint of DE => quaternionQ
Multiply in the order
Q * P
, and convert to Euler angles: https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
(Not sure if Irrlicht has support for quaternions)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Irrlicht
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page