]> git.jsancho.org Git - c-irrlicht.git/commitdiff
addOctreeSceneNode for animated meshes
authorJavier Sancho <jsf@jsancho.org>
Sun, 20 Oct 2019 14:59:40 +0000 (16:59 +0200)
committerJavier Sancho <jsf@jsancho.org>
Sun, 20 Oct 2019 14:59:40 +0000 (16:59 +0200)
Makefile.am
include/IMeshSceneNode.h [new file with mode: 0644]
include/ISceneManager.h
include/cirrlicht.h
src/ISceneManager.cpp

index 336eacd32fdfd2841ee3d7ae81a7b566d0ace573..5131ea14486e0bd8783dcffa255fb81f5aade74a 100644 (file)
@@ -25,6 +25,7 @@ pkginclude_HEADERS = \
   include/IGUIElement.h \
   include/IGUIEnvironment.h \
   include/IGUIStaticText.h \
+  include/IMeshSceneNode.h \
   include/IrrlichtDevice.h \
   include/ISceneManager.h \
   include/ISceneNode.h \
diff --git a/include/IMeshSceneNode.h b/include/IMeshSceneNode.h
new file mode 100644 (file)
index 0000000..21e76e9
--- /dev/null
@@ -0,0 +1,27 @@
+/* c-irrlicht --- C bindings for Irrlicht Engine
+
+   Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+
+   This file is part of c-irrlicht.
+
+   c-irrlicht is free software; you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
+
+   c-irrlicht is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with guile-irrlicht.  If not, see
+   <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __C_I_MESH_SCENE_NODE_H_INCLUDED__
+#define __C_I_MESH_SCENE_NODE_H_INCLUDED__
+
+typedef void irr_scene_IMeshSceneNode;
+
+#endif
index 509836b2901b4fed42a67f229f97d6122c6860d9..6153726051257321062590945e8c159596eccb7f 100644 (file)
@@ -25,6 +25,7 @@
 #include "IAnimatedMesh.h"
 #include "IAnimatedMeshSceneNode.h"
 #include "ICameraSceneNode.h"
+#include "IMeshSceneNode.h"
 #include "ISceneNode.h"
 #include "vector3d.h"
 
@@ -52,6 +53,14 @@ extern "C" {
                                int id,
                                int makeActive);
 
+  irr_scene_IMeshSceneNode*
+  irr_scene_addOctreeSceneNodeAM(irr_scene_ISceneManager* smgr,
+                                 irr_scene_IAnimatedMesh* mesh,
+                                 irr_scene_ISceneNode* parent,
+                                 int id,
+                                 int minimalPolysPerNode,
+                                 int alsoAddIfMeshPointerZero);
+
   void
   irr_scene_drawAll(irr_scene_ISceneManager* smgr);
 
index 3901e083fdf5861cf378a39fe7c62916c89d7601..9846a48e4b88921b7c65d67f7611631f4c0dbf3a 100644 (file)
@@ -33,6 +33,7 @@
 #include "IGUIEnvironment.h"
 #include "IGUIElement.h"
 #include "IGUIStaticText.h"
+#include "IMeshSceneNode.h"
 #include "IrrlichtDevice.h"
 #include "ISceneManager.h"
 #include "ISceneNode.h"
index bef569bd9ea46e09e54ed4c76a65350c70bacb75..71d421f801944d3024483d19e85a5df3c60528e2 100644 (file)
@@ -86,6 +86,22 @@ extern "C" {
                            makeActive);
   }
 
+  irr_scene_IMeshSceneNode*
+  irr_scene_addOctreeSceneNodeAM(irr_scene_ISceneManager* smgr,
+                                 irr_scene_IAnimatedMesh* mesh,
+                                 irr_scene_ISceneNode* parent,
+                                 int id,
+                                 int minimalPolysPerNode,
+                                 int alsoAddIfMeshPointerZero)
+  {
+    return ((irr::scene::ISceneManager*)smgr)
+      ->addOctreeSceneNode((irr::scene::IAnimatedMesh*)mesh,
+                           (irr::scene::ISceneNode*)parent,
+                           id,
+                           minimalPolysPerNode,
+                           alsoAddIfMeshPointerZero);
+  }
+
   void
   irr_scene_drawAll(irr_scene_ISceneManager* smgr)
   {