SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / Variable names and variable names!!!
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 28-01-2006, 06:57 PM   #1
Forlax
Subscriber
 
Forlax's Avatar
 
Join Date: Aug 2003
Location: Middlesbrough, UK
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default Variable names and variable names!!!

Ok,,

MEL doesn't allow arrays/matirces of more than two dimensions....

I need a 'matrix' with 3 dimensions.....which I can't have....that contains a reference to (any) number of objects, the number of vertices of that object and the (x,y,z) positions of the vertices.

I need this so I can loop over each object, get each vertex and ultimately it's position and store them all to refer to them later on.

I thought about two variables....one two store each object and a matrix to store the vertex and position data. How can I 'link' them together???? I mean.....how can I create the object variables in one loop and then refer to those names in another loop to get the vertex data????

Anyone got any idea?

Sorry if this question is convoluted.
__________________
Thanks,

Forlax.

I used to be indecisive, but now I'm not so sure.

AIM: tomohawkcg
MSN: marc_d_thompson@hotmail.com
Forlax is offline   Reply With Quote
Old 30-01-2006, 01:11 AM   #2
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

why can't you just format the matrice like this?

matrice vertice 2d -

|x, y, z| row 1 - vertice 1
|x, y, z| row 2 - vertice 2
|x, y, z| row 3 - vertice 3... etc
|x, y, z|
|x, y, z|
|x, y, z|

So far this has worked for me in c++ when working with my own 3d prog.

Works well when dealing with other such as rotation, translation, and scaling matrices.
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

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

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

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.