irrBullet and TerrainSceneNode
-
- Posts: 6
- Joined: Mon Sep 17, 2007 7:32 am
- Location: Morriset NSW Australia
irrBullet and TerrainSceneNode
Is there a way of extracting the IMesh reference from an Irrlicht TerrainSceneNode for the second parameter of irrBullet IBvhTriangleMeshShape to supply the collision mesh?
Using terrain->getMesh() for the IMesh parameter dies on the line createShape(collMesh); in the IBvhTriangleMeshShape ctor.
I have found a previous post on how to extract terrain triangles for Bullet using a btTriangleMesh but can't see a way to bend that to work with the irrBullet wrapper.
Using terrain->getMesh() for the IMesh parameter dies on the line createShape(collMesh); in the IBvhTriangleMeshShape ctor.
I have found a previous post on how to extract terrain triangles for Bullet using a btTriangleMesh but can't see a way to bend that to work with the irrBullet wrapper.
Dicko
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
-
- Posts: 6
- Joined: Mon Sep 17, 2007 7:32 am
- Location: Morriset NSW Australia
irrBullet and TerrainSceneNode
Thanks Radikalizm
I was intending to try using just the LOD 0 which was how the "pure" Bullet code in a previous post worked. Might just stay with Bullet rather than the irrBullet wrapper. It's for sample code in a games dev class, I was hoping to ease the pain a bit using a wrapper.
I was intending to try using just the LOD 0 which was how the "pure" Bullet code in a previous post worked. Might just stay with Bullet rather than the irrBullet wrapper. It's for sample code in a games dev class, I was hoping to ease the pain a bit using a wrapper.
Dicko
-
- Posts: 363
- Joined: Thu Dec 16, 2010 8:50 pm
- Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..
@Chris
i full heartedly suggest using pure bullet it might seem easier to use a wrapper. but once you become familiar with using pure bullet it is much easier and using a wrapper can be confusing, since its a whole different interface and you have to go through TWO layers of abstraction just to solve a problem that would have been easier to fix if you were using pure bullet.
i full heartedly suggest using pure bullet it might seem easier to use a wrapper. but once you become familiar with using pure bullet it is much easier and using a wrapper can be confusing, since its a whole different interface and you have to go through TWO layers of abstraction just to solve a problem that would have been easier to fix if you were using pure bullet.
ent1ty wrote: success is a matter of concentration and desire
at a cost measure in computer resourcesButler Lampson wrote: all problems in Computer Science can be solved by another level of indirection
I agree, I used irrbullet also irrBP myself tough they became a bit unneeded, because working with bullet itself is easy.ChaiRuiPeng wrote:@Chris
i full heartedly suggest using pure bullet it might seem easier to use a wrapper. but once you become familiar with using pure bullet it is much easier and using a wrapper can be confusing, since its a whole different interface and you have to go through TWO layers of abstraction just to solve a problem that would have been easier to fix if you were using pure bullet.
The second layer just makes it harder to use, like when you have to access stuff wrapper doesn't provide.
Working on game: Marrbles (Currently stopped).
-
- Posts: 363
- Joined: Thu Dec 16, 2010 8:50 pm
- Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..
you seem to be stressing importance of reading examples todayhybrid wrote:Accessing the underlying mesh is shown in the example. This holds for the non-LOD mesh only, though.
ent1ty wrote: success is a matter of concentration and desire
at a cost measure in computer resourcesButler Lampson wrote: all problems in Computer Science can be solved by another level of indirection
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
-
- Posts: 6
- Joined: Mon Sep 17, 2007 7:32 am
- Location: Morriset NSW Australia
irrBullet and TerrainSceneNode
Thanks for all the comments and yes we will stay with just bullet.
As far as the terrain example goes (I do always read the forums/samples/google before posting) it shows how to extract the terrain data with getMeshBufferForLOD etc but not how to take that data and build an IMesh reference as required by irrBullet which was the original post question.
As far as the terrain example goes (I do always read the forums/samples/google before posting) it shows how to extract the terrain data with getMeshBufferForLOD etc but not how to take that data and build an IMesh reference as required by irrBullet which was the original post question.
Dicko
That's why most wrappers (or at least mine) have functions in each class to get a pointer to what it wraps so that when you need to work more low-level you can.serengeor wrote:I agree, I used irrbullet also irrBP myself tough they became a bit unneeded, because working with bullet itself is easy.ChaiRuiPeng wrote:@Chris
i full heartedly suggest using pure bullet it might seem easier to use a wrapper. but once you become familiar with using pure bullet it is much easier and using a wrapper can be confusing, since its a whole different interface and you have to go through TWO layers of abstraction just to solve a problem that would have been easier to fix if you were using pure bullet.
The second layer just makes it harder to use, like when you have to access stuff wrapper doesn't provide.
Moreover, with my wrapper you can get irrBullet types from pure Bullet types with ease, so doing any pure Bullet work using irrBullet is very easy and even faster than doing it the other way.
Thats what I meant with the part "The second layer just makes it harder to use, like when you have to access stuff wrapper doesn't provide."cobra wrote:That's why most wrappers (or at least mine) have functions in each class to get a pointer to what it wraps so that when you need to work more low-level you can.serengeor wrote:I agree, I used irrbullet also irrBP myself tough they became a bit unneeded, because working with bullet itself is easy.ChaiRuiPeng wrote:@Chris
i full heartedly suggest using pure bullet it might seem easier to use a wrapper. but once you become familiar with using pure bullet it is much easier and using a wrapper can be confusing, since its a whole different interface and you have to go through TWO layers of abstraction just to solve a problem that would have been easier to fix if you were using pure bullet.
The second layer just makes it harder to use, like when you have to access stuff wrapper doesn't provide.
Moreover, with my wrapper you can get irrBullet types from pure Bullet types with ease, so doing any pure Bullet work using irrBullet is very easy and even faster than doing it the other way.
You can access what you need with pointers but it feels just not right.
Working on game: Marrbles (Currently stopped).
You just don't feel rightserengeor wrote: You can access what you need with pointers but it feels just not right.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
I do feel right.Sudi wrote:You just don't feel rightserengeor wrote: You can access what you need with pointers but it feels just not right.
Doing stuff with bullet is really easy, and doing it by digging trough additional layer is a bit weird. Unless doing some sandbox apps, then the wrapper makes it a bit easier, because it cleans up everything when you remove objects.
Working on game: Marrbles (Currently stopped).
-
- Posts: 363
- Joined: Thu Dec 16, 2010 8:50 pm
- Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..
you just feel serengeor does not feel rightSudi wrote:You just don't feel rightserengeor wrote: You can access what you need with pointers but it feels just not right.
and anyways. wrappers might be good for some people, bad for some. if all you want is just simple collision detection to control simple characters with pill shapes && and you dont want to read through the ton of bullet api, then a wrapper sounds good for you. however i am one of those people that need bullet in its purest form right now.
ent1ty wrote: success is a matter of concentration and desire
at a cost measure in computer resourcesButler Lampson wrote: all problems in Computer Science can be solved by another level of indirection
serengeor wrote:I do feel right.Sudi wrote:You just don't feel rightserengeor wrote: You can access what you need with pointers but it feels just not right.
Doing stuff with bullet is really easy, and doing it by digging trough additional layer is a bit weird. Unless doing some sandbox apps, then the wrapper makes it a bit easier, because it cleans up everything when you remove objects.
It's true that using pure Bullet for simple games is easy, but the reason I created irrBullet is because I need very advanced physics in my game, and the only way to do that in a logical manner is with a wrapper.