Using Compose and Decompose in Math Package/Matrix Float Dat

Technical questions, etc..
Shell1850
Chief Petty Officer
Posts: 135
Joined: 21 May 2009, 21:44

Using Compose and Decompose in Math Package/Matrix Float Dat

Post by Shell1850 »

Can anyone explain the Compose and Decompose in the Matrix Float Data math package. Is it useful or needed? It uses a structure pcomponent and ppcomponent but I cannot find any information.

I am trying to write cheat sheets on the different objects in the Math Packages.
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: Using Compose and Decompose in Math Package/Matrix Float Dat

Post by froo »

Hey Shell.
I suspect the Decompose will provide you with individual items such as rotateX, rotateY, rotateZ, scaleX, scaleY, ... etc. from a transformation matrix.

Compose, I suspect, would do the opposite: construct a transformation matrix from inputted values.
Shell1850
Chief Petty Officer
Posts: 135
Joined: 21 May 2009, 21:44

Re: Using Compose and Decompose in Math Package/Matrix Float Dat

Post by Shell1850 »

I am trying to understand all the component in the Matrix Float Data. Every time I try using it, it locks up the truespace.

I am looking at Math Package/Transform Components.

I think I answered my question using the following script

function OnComputeOutputs(params)
{
var MatrixIn = params.ConValue('MatrixIn');

var MatrixOut = System.CreateDO('Math Package/Matrix Float Data');
var TTranformComponents = System.CreateDO('Math Package/Transform Components');


MatrixIn.Compose(TTranformComponents); // Correction July 30

params.ConValue('MatrixOut') = MatrixOut;
}

does this look OK?
Last edited by Shell1850 on 30 Jul 2012, 13:37, edited 2 times in total.
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Using Compose and Decompose in Math Package/Matrix Float Dat

Post by trueBlue »

See the Rotation Engine (script) in the Objects - Tutorial Objects library for an example.
Shell1850
Chief Petty Officer
Posts: 135
Joined: 21 May 2009, 21:44

Re: Using Compose and Decompose in Math Package/Matrix Float Dat

Post by Shell1850 »

Thanks trueBlue.

I tried using Math Package/Point Data. After a couple of days, got it to work. One does need to understand linear algebra to understand this stuff.
stan
Master Chief Petty Officer
Posts: 584
Joined: 21 May 2009, 17:20

Re: Using Compose and Decompose in Math Package/Matrix Float Dat

Post by stan »

you would need to give the transform data values like this:
transform.tx(10)
or get the values from one martrix and use in a new matrix
transform.tx()
Shell1850
Chief Petty Officer
Posts: 135
Joined: 21 May 2009, 21:44

Re: Using Compose and Decompose in Math Package/Matrix Float Dat

Post by Shell1850 »

This link describes the 4x4 matrix float data. This is for all of you when you were 4, took apart a drum (your mom gave you) so you could figure out where the sound came from.

Found this link http://www.youtube.com/watch?v=I8o4kK9Q ... re=related"
Shell1850
Chief Petty Officer
Posts: 135
Joined: 21 May 2009, 21:44

Re: Using Compose and Decompose in Math Package/Matrix Float Dat

Post by Shell1850 »

Return to “TechForum”