]> git.jsancho.org Git - c-irrlicht.git/commitdiff
ISceneNode
authorJavier Sancho <jsf@jsancho.org>
Sat, 12 Oct 2019 16:08:44 +0000 (18:08 +0200)
committerJavier Sancho <jsf@jsancho.org>
Sat, 12 Oct 2019 16:08:44 +0000 (18:08 +0200)
Makefile.am
include/EMaterialFlags.h [new file with mode: 0644]
include/ISceneNode.h [new file with mode: 0644]
include/ITexture.h [new file with mode: 0644]
include/cirrlicht.h
src/ISceneNode.cpp [new file with mode: 0644]

index 83bc545d92b16b53fbd8123701b6d96a203c17ca..9f632a38d2bc26a4ea23e93f0c773756e6473409 100644 (file)
@@ -3,19 +3,23 @@ lib_LTLIBRARIES = libCIrrlicht.la
 libCIrrlicht_la_SOURCES = \
   src/CIrrlicht.cpp \
   src/IGUIEnvironment.cpp \
+  src/IrrlichtDevice.cpp \
   src/ISceneManager.cpp \
-  src/IVideoDriver.cpp \
-  src/IrrlichtDevice.cpp
+  src/ISceneNode.cpp \
+  src/IVideoDriver.cpp
 libCIrrlicht_la_CPPFLAGS = -I$(top_srcdir)/include
 libCIrrlicht_la_LDFLAGS = -version-info 0:1
 include_HEADERS = \
+  include/cirrlicht.h \
+  include/dimension2d.h \
   include/EDriverTypes.h \
+  include/EMaterialFlags.h \
   include/IGUIEnvironment.h \
+  include/IrrlichtDevice.h \
   include/ISceneManager.h \
+  include/ISceneNode.h \
+  include/ITexture.h \
   include/IVideoDriver.h \
-  include/IrrlichtDevice.h \
-  include/SColor.h \
-  include/cirrlicht.h \
-  include/dimension2d.h \
   include/rect.h \
+  include/SColor.h \
   include/vector3d.h
diff --git a/include/EMaterialFlags.h b/include/EMaterialFlags.h
new file mode 100644 (file)
index 0000000..47f9b26
--- /dev/null
@@ -0,0 +1,49 @@
+/* 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_E_MATERIAL_FLAGS_H_INCLUDED__
+#define __C_E_MATERIAL_FLAGS_H_INCLUDED__
+
+enum irr_video_E_MATERIAL_FLAG
+  {
+   irr_video_EMF_WIREFRAME = 0x1,
+   irr_video_EMF_POINTCLOUD = 0x2,
+   irr_video_EMF_GOURAUD_SHADING = 0x4,
+   irr_video_EMF_LIGHTING = 0x8,
+   irr_video_EMF_ZBUFFER = 0x10,
+   irr_video_EMF_ZWRITE_ENABLE = 0x20,
+   irr_video_EMF_BACK_FACE_CULLING = 0x40,
+   irr_video_EMF_FRONT_FACE_CULLING = 0x80,
+   irr_video_EMF_BILINEAR_FILTER = 0x100,
+   irr_video_EMF_TRILINEAR_FILTER = 0x200,
+   irr_video_EMF_ANISOTROPIC_FILTER = 0x400,
+   irr_video_EMF_FOG_ENABLE = 0x800,
+   irr_video_EMF_NORMALIZE_NORMALS = 0x1000,
+   irr_video_EMF_TEXTURE_WRAP = 0x2000,
+   irr_video_EMF_ANTI_ALIASING = 0x4000,
+   irr_video_EMF_COLOR_MASK = 0x8000,
+   irr_video_EMF_COLOR_MATERIAL = 0x10000,
+   irr_video_EMF_USE_MIP_MAPS = 0x20000,
+   irr_video_EMF_BLEND_OPERATION = 0x40000,
+   irr_video_EMF_POLYGON_OFFSET = 0x80000
+  };
+
+#endif
diff --git a/include/ISceneNode.h b/include/ISceneNode.h
new file mode 100644 (file)
index 0000000..334c4e2
--- /dev/null
@@ -0,0 +1,48 @@
+/* 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_SCENE_NODE_H_INCLUDED__
+#define __C_SCENE_NODE_H_INCLUDED__
+
+#include "EMaterialFlags.h"
+#include "ITexture.h"
+
+typedef void irr_scene_ISceneNode;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  void
+  irr_scene_ISceneNode_setMaterialFlag(irr_scene_ISceneNode* node,
+                                       irr_video_E_MATERIAL_FLAG flag,
+                                       bool newvalue);
+
+  void
+  irr_scene_ISceneNode_setMaterialTexture(irr_scene_ISceneNode* node,
+                                          u_int32_t textureLayer,
+                                          irr_video_ITexture* texture);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/ITexture.h b/include/ITexture.h
new file mode 100644 (file)
index 0000000..50c2c76
--- /dev/null
@@ -0,0 +1,37 @@
+/* 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_TEXTURE_H_INCLUDED__
+#define __C_TEXTURE_H_INCLUDED__
+
+typedef void irr_video_ITexture;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  // TODO
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 95febb108eaa2b48531f2d306034b9542b2fa2cd..68beb1791973d810f3022ab1610a6354a9c36aef 100644 (file)
 
 #include "dimension2d.h"
 #include "EDriverTypes.h"
+#include "EMaterialFlags.h"
 #include "IGUIEnvironment.h"
 #include "IrrlichtDevice.h"
 #include "ISceneManager.h"
+#include "ISceneNode.h"
+#include "ITexture.h"
 #include "IVideoDriver.h"
 #include "rect.h"
 #include "SColor.h"
diff --git a/src/ISceneNode.cpp b/src/ISceneNode.cpp
new file mode 100644 (file)
index 0000000..635ba97
--- /dev/null
@@ -0,0 +1,43 @@
+/* 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/>.
+*/
+
+#include <irrlicht/irrlicht.h>
+#include "ISceneNode.h"
+
+extern "C" {
+  void
+  irr_scene_ISceneNode_setMaterialFlag(irr_scene_ISceneNode* node,
+                                       irr_video_E_MATERIAL_FLAG flag,
+                                       bool newvalue)
+  {
+    ((irr::scene::ISceneNode*)node)->setMaterialFlag((irr::video::E_MATERIAL_FLAG)flag,
+                                                     newvalue);
+  }
+
+  void
+  irr_scene_ISceneNode_setMaterialTexture(irr_scene_ISceneNode* node,
+                                          u_int32_t textureLayer,
+                                          irr_video_ITexture* texture)
+  {
+    ((irr::scene::ISceneNode*)node)->setMaterialTexture(textureLayer,
+                                                        (irr::video::ITexture*)texture);
+  }
+}