+ virtual video::SMaterial& getMaterial (u32 i)
+ {
+ SCM material = scm_call_1 (scm_get_material, scm_from_uint32 (i));
+ return *((video::SMaterial*) scm_to_pointer (material));
+ }
+ };
+
+ CustomSceneNode* node =
+ new CustomSceneNode ((TParent) scm_to_pointer (parent),
+ (scene::ISceneManager*) scm_to_pointer (scene_manager),
+ scm_to_int32 (id),
+ scm_to_vector3df (position),
+ scm_to_vector3df (rotation),
+ scm_to_vector3df (scale),
+ proc_render,
+ proc_get_bounding_box,
+ proc_get_material_count,
+ proc_get_material);
+ return scm_from_pointer ((void*) node, NULL);
+}
+
+
+template <typename TParent, typename TMesh>
+SCM
+scene_ISceneManager_addOctreeSceneNode (SCM scene_manager,
+ SCM mesh,
+ SCM parent,
+ SCM id,
+ SCM minimal_polys_per_node,
+ SCM also_add_if_mesh_pointer_zero)
+{
+ scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager);
+ scene::IMeshSceneNode* node =
+ smgr->addOctreeSceneNode ((TMesh) scm_to_pointer (mesh),
+ (TParent) scm_to_pointer (parent),
+ scm_to_int32 (id),
+ scm_to_int32 (minimal_polys_per_node),
+ scm_to_bool (also_add_if_mesh_pointer_zero));
+ return scm_from_pointer ((void*) node, NULL);
+}
+
+
+template <typename TParent>
+SCM
+scene_ISceneManager_addSphereSceneNode (SCM scene_manager,
+ SCM radius,
+ SCM poly_count,
+ SCM parent,
+ SCM id,
+ SCM position,
+ SCM rotation,
+ SCM scale)
+{
+ scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager);
+ scene::IMeshSceneNode* node =
+ smgr->addSphereSceneNode (scm_to_double (radius),
+ scm_to_int32 (poly_count),
+ (TParent) scm_to_pointer (parent),
+ scm_to_int32 (id),
+ scm_to_vector3df (position),
+ scm_to_vector3df (rotation),
+ scm_to_vector3df (scale));
+ return scm_from_pointer ((void*) node, NULL);
+}
+
+
+SCM
+scene_ISceneManager_createFlyCircleAnimator (SCM scene_manager,
+ SCM center,
+ SCM radius,
+ SCM speed,
+ SCM direction,
+ SCM start_position,
+ SCM radius_ellipsoid)
+{
+ scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager);
+ scene::ISceneNodeAnimator* anim =
+ smgr->createFlyCircleAnimator (scm_to_vector3df (center),
+ scm_to_double (radius),
+ scm_to_double (speed),
+ scm_to_vector3df (direction),
+ scm_to_double (start_position),
+ scm_to_double (radius_ellipsoid));
+ return scm_from_pointer ((void*) anim, NULL);
+}
+
+
+SCM
+scene_ISceneManager_createFlyStraightAnimator (SCM scene_manager,
+ SCM start_point,
+ SCM end_point,
+ SCM time_for_way,
+ SCM loop,
+ SCM pingpong)
+{
+ scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_pointer (scene_manager);
+ scene::ISceneNodeAnimator* anim =
+ smgr->createFlyStraightAnimator (scm_to_vector3df (start_point),
+ scm_to_vector3df (end_point),
+ scm_to_uint32 (time_for_way),
+ scm_to_bool (loop),
+ scm_to_bool (pingpong));
+ return scm_from_pointer ((void*) anim, NULL);
+}