WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-24-2003, 12:20 PM
david david is offline
Member
 
Join Date: Mar 2003
Posts: 23
Question Transform object & matrices

Hello everybody,

Is there any way to specify a transform object coefficient by coefficient? from what I have seen vizmat allows you to make only some special kinds of matrices. What if I want to reconstruct the perspective matrix that looks nothing like a rotation, translation or scaling?

David
(student at the MVL MIT)
Reply With Quote
  #2  
Old 03-24-2003, 12:49 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi David,

I'm not exactly sure what you want to do, but you can manually set each individual element of the 4x4 matrix. The transform object has a function called 'set' which takes 16 numbers.

import vizmat

tran = vizmat.Transform()
tran.set(1,2,3, ... , 16)

Is this what you were looking for?

-- Farshid
Reply With Quote
  #3  
Old 03-24-2003, 12:59 PM
david david is offline
Member
 
Join Date: Mar 2003
Posts: 23
thanks farshid

The method you mention is not in the vizard help (at least not the one I have), this is why I did not see it, but this is exactly what I was looking for.


David
Reply With Quote
  #4  
Old 03-24-2003, 01:09 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi David,

I noticed a small bug in the vizmat library that will give you errors when trying to use the 'set' function. It will be fixed by the next release, but for now, here's how you can fix it:

Go to the main Vizard directory on your computer and open up 'vizmat.py'

Line 119 will be:

transform.set(self,self.id,f1,f2,f3,f4,f5,f6,f7,f8 ,f9,f10,f11,f12,f13,f14,f15,f16)

You should change it to:

transform.set(self.id,f1,f2,f3,f4,f5,f6,f7,f8,f9,f 10,f11,f12,f13,f14,f15,f16)

Save the file and restart Vizard.

Sorry about that.

-- Farshid
Reply With Quote
  #5  
Old 03-27-2003, 10:18 AM
david david is offline
Member
 
Join Date: Mar 2003
Posts: 23
Thanks for the comment, this is going to spare me some real trouble
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:55 AM.


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