can't set the scenenode's transform matrix?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
michael520
Posts: 230
Joined: Mon Oct 10, 2005 2:24 am

can't set the scenenode's transform matrix?

Post by michael520 »

iscenenode doesn't provide the interface to set its transform matrix using an calculated matrix...... :cry:
I can only use setRotation/Position/Scale.... ? :?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Well, there is getAbsoluteTransformation() which returns a reference to the nodes transformation matrix. You can assign to that. Unfortunately that won't help you a whole bunch because the scene node recalculates its own transformation in OnPostRender() which will overwrite anything you did by directly setting the transformation.
michael520
Posts: 230
Joined: Mon Oct 10, 2005 2:24 am

Post by michael520 »

I know this.
what I want is setting the scenenode's relativeTransformation, through passing a matrix to setRelativeTransformation, which is not provided.
I can only set a scenenode's transformations by setRotate/setScale/SetPosition!
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

If you want to set a relative transform, why not parent your scene node to a dummy scene node? You can set the relative transform for a dummy scene node.
michael520
Posts: 230
Joined: Mon Oct 10, 2005 2:24 am

Post by michael520 »

I mean I want to set transformation through node->SetTransformation(matrix4f mat)!
I think you misunderstood my words.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Dude, I totally understand what you want. I'm saying that you can't do it. Even if you were allowed to, there would be problems because there would be two ways to set the transform, one via setPosition(), setRotation(), setScale() and the other using your proposed setTransformation().

You can do exactly what you are asking by putting a single dummy scene node as the parent of your node. When you want to modify the transformation of your node, modify the transformation of the dummy scene node.

Also, just saying you want something doesn't make it magically appear exactly as you want it. I offer you a solution that you can use with the existing version of Irrlicht. If you don't want that solution, then get off yer ass and write one yourself.

Travis
michael520
Posts: 230
Joined: Mon Oct 10, 2005 2:24 am

Post by michael520 »

no, you really don't get what I mean and what I want! lol...

and, I don't get if what you provided could solve my problem...

:wink: :roll:
Post Reply