Thorben Linneweber wrote:Hi,
Again a problem with the .net wrapper. It seems that "addHillPlaneMesh" (which I wanted to create a watersurfacenode) is not implemented yet.
Do you have any idea for another method to get a mesh at runtime? (or any other solution for my problem?)
In c++ the code looks like this:
Code: Select all
mesh = smgr->addHillPlaneMesh("myHill",
core::dimension2d<f32>(20,20),
core::dimension2d<s32>(40,40), 0, 0,
core::dimension2d<f32>(0,0),
core::dimension2d<f32>(10,10));
node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);
Thorben
Why not add this 'feature' for .NET yourself

??
Add in Irrlicht.NET/ISceneManager.h the following code (after Niko's placeholder):
Code: Select all
//IAnimatedMesh* addHillPlaneMesh( c8* name,
// core::dimension2d<float>& tileSize, core::dimension2d<int>& tileCount,
// video::SMaterial* material = 0, float hillHeight = 0.0f,
// core::dimension2d<float>& countHills = core::dimension2d<float>(0.0f, 0.0f),
// core::dimension2d<float>& textureRepeatCount = core::dimension2d<float>(1.0f, 1.0f)) = 0;
IAnimatedMesh* AddHillPlaneMesh(System::String* name,
Core::Dimension2Df tileSize, Core::Dimension2D tileCount,
Video::Material material, float hillHeight,
Core::Dimension2Df countHills,
Core::Dimension2Df textureRepeatCount);
and in Irrlicht.NET/ISceneManager.cpp (after the function ISceneNode* ISceneManager::AddEmptySceneNode(ISceneNode* parent, int id){.......} the following code:
Code: Select all
IAnimatedMesh* ISceneManager::AddHillPlaneMesh(System::String* name,
Core::Dimension2Df tileSize, Core::Dimension2D tileCount,
Video::Material material, float hillHeight,
Core::Dimension2Df countHills,
Core::Dimension2Df textureRepeatCount)
{
char* strName = (char*)(void*)
System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(name);
irr::scene::IAnimatedMesh* a =
Manager->addHillPlaneMesh(strName, irr::NativeConverter::getNativeDim(tileSize),
irr::NativeConverter::getNativeDim(tileCount), &irr::NativeConverter::getNativeMaterial(material),
hillHeight, irr::NativeConverter::getNativeDim(countHills),
irr::NativeConverter::getNativeDim(textureRepeatCount));
if (!a)
return 0;
return new IAnimatedMesh(a);
}
Tested only on Irrlicht-0.10.0 (!!) - so plz don't flame me

if it doesn't work on 0.11.0, cause we have abandoned our .NET code in favor of using our own mixed mode (managed/unmanaged) Dll for .NET integration in our Project...
HTH,
Duncan
--
Tucan Entertainment