irrlicht-newton geometry
-
Guest
irrlicht-newton geometry
hi,
i'm using irrlicht with newton. i couldn't scale down the model using node->setScale because the newton still preserves the original geometry.
how'd i do this with newton?
thanks
i'm using irrlicht with newton. i couldn't scale down the model using node->setScale because the newton still preserves the original geometry.
how'd i do this with newton?
thanks
You have to create a new Newton body for the node...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
DarkScythe
- Posts: 11
- Joined: Mon Feb 20, 2006 3:50 am
- Contact:
not really you need a new body search about :
Code: Select all
NewtonCreateConvexHullModifierJust change the transformation matrix of the newton body...that will fix it!
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.
AFAIK the tranformation matrix just changes the position of the body, not the scale...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
Baal Cadar
- Posts: 377
- Joined: Fri Oct 28, 2005 10:28 am
- Contact:
-
Guest
from api:
sorry, how'd i scale it using createconvexhullmodifier?
Code: Select all
NewtonCollision* NewtonCreateConvexHullModifier(
const NewtonWorld* newtonWorld,
const NewtonCollision* convexHullCollision) -
DarkScythe
- Posts: 11
- Joined: Mon Feb 20, 2006 3:50 am
- Contact:
create sth. like this:
and modify like this:
Code: Select all
NewtonCollision* sphere = NewtonCreateSphere(nWorld, 30, 30, 30, NULL);
collision = NewtonCreateConvexHullModifier(nWorld,sphere);
NewtonReleaseCollision(nWorld,sphere);
body = NewtonCreateBody(nWorld,collision);
Code: Select all
dMatrix pmatrix;
NewtonConvexHullModifierGetMatrix(collision,&pmatrix[0][0]);
pmatrix.m_up.m_x *= 0.4;
pmatrix.m_up.m_y *= 2;
pmatrix.m_up.m_z *= 0.4;
NewtonConvexHullModifierSetMatrix(collision,&pmatrix[0][0]);
-
Baal Cadar
- Posts: 377
- Joined: Fri Oct 28, 2005 10:28 am
- Contact:
-
Guest
what member is dMatrix?DarkScythe wrote:create sth. like this:and modify like this:Code: Select all
NewtonCollision* sphere = NewtonCreateSphere(nWorld, 30, 30, 30, NULL); collision = NewtonCreateConvexHullModifier(nWorld,sphere); NewtonReleaseCollision(nWorld,sphere); body = NewtonCreateBody(nWorld,collision);Code: Select all
dMatrix pmatrix; NewtonConvexHullModifierGetMatrix(collision,&pmatrix[0][0]); pmatrix.m_up.m_x *= 0.4; pmatrix.m_up.m_y *= 2; pmatrix.m_up.m_z *= 0.4; NewtonConvexHullModifierSetMatrix(collision,&pmatrix[0][0]);
-
Guest
okay yea i got it all compiled now.
but it's still not scaling it.
this is what i have:
am i doing it right?
changing the numbers didn't seem to have any effects...
but it's still not scaling it.
this is what i have:
Code: Select all
NewtonCollision* myShape = NewtonCreateBox(nWorld, size2.X, size2.Y, size2.Z, NULL);
NewtonCollision* collision;
collision = NewtonCreateConvexHullModifier(nWorld,myShape);
dMatrix pMatrix;
NewtonConvexHullModifierGetMatrix(collision, &pMatrix[0][0]);
pMatrix.m_up.m_x *= 0.4;
pMatrix.m_up.m_y *= 2;
pMatrix.m_up.m_z *= 0.4;
NewtonConvexHullModifierSetMatrix(collision, &pMatrix[0][0]);changing the numbers didn't seem to have any effects...