WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   multiplication on link position matrix (https://forum.worldviz.com/showthread.php?t=3831)

Chapre 07-07-2011 04:38 AM

multiplication on link position matrix
 
Hello;
I want to create an operator on a link (position) that should always half the first value of the input matrix (list) and leave the rest intact.

EX: imput matrix=[ a,b ,c ] * operator ------> output matrix=[ a/2 , b ,c ]

Jeff 07-07-2011 11:21 AM

The .preScale command will pre multiply the input matrix with the specified scale:
Code:

link.preScale([0.5,1,1],target=viz.LINK_POS_OP)

Chapre 07-08-2011 02:55 AM

Thank Jeff, that's exactly what I needed


All times are GMT -7. The time now is 03:34 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC