I'm new here, but I'm using this amazing game engine "Irrlicht" to visualize my 3D BIM Model into it
what I've done till now is export my model as collada file (.dae), then loaded into irrlicht using irrlicht source code.
Now I'm trying to distinguish each element of the model such as the wall, or the door but I can't find how to do this in irrlicht since loading the model is as the following:
I want someone to help me doing this in irrlicht and I'll be appreciated
Code: Select all
static void Main(string[] args)
{
DriverType driverType = DriverType.OpenGL;
IrrlichtDevice device = IrrlichtDevice.CreateDevice(driverType, new Dimension2Di(840, 680));
if (device == null)
return;
device.SetWindowCaption("Hello World! - Irrlicht Engine Demo");
VideoDriver driver = device.VideoDriver;
SceneManager smgr = device.SceneManager;
GUIEnvironment gui = device.GUIEnvironment;
gui.AddStaticText("Hello World! This is the Irrlicht Software renderer!",
new Recti(10, 10, 260, 22), true);
smgr.Attributes.SetValue(SceneParameters.COLLADA_CreateSceneInstances, true);
AnimatedMesh mesh = smgr.GetMesh("test.dae");
AnimatedMeshSceneNode node = smgr.AddAnimatedMeshSceneNode(mesh);
CameraSceneNode camera = smgr.AddCameraSceneNodeFPS(null, 100, .01f);
camera.Position = new Vector3Df(0, 2, 0);
camera.Target = new Vector3Df(-200f, 0f, -100f);
device.CursorControl.Visible = false;
int lastFPS = -1;
while (device.Run())
{
driver.BeginScene(true, true, new Color(100, 101, 140));
smgr.DrawAll();
gui.DrawAll();
driver.EndScene();
int fps = driver.FPS;
if (lastFPS != fps)
{
device.SetWindowCaption(String.Format(
"Movement example - Irrlicht Engine [{0}] fps: {1}",
driver.Name, fps));
lastFPS = fps;
}
}
device.Drop();
}