473,378 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Converting from arraylists to multi-dimensional arrays

I see that variations on this question have appeared before but I'm still completely stumped.

I'm developing an application with a fairly robust graphics component for 3D rendering. I've written all the 3D rendering scripts, but what's really hanging me up is how to I pass information from an one-dimensional arraylist to a two-dimensional array. Here's what I'm trying to do:

1) My program generates an arraylist called "mpoints" of 2D Points based on mouse-clicks, saving the x- and y-coordinate data.

2) I pass those "mpoints" values to another procedure which creates a user-defined class object called "Elevation". In creating that new object, the 2D points values from the "mpoints" arraylist are redefined as 3D points by adding a z-coordinate.

3) What I wind up with is an arraylist of 3D points called "melevationpoints"

All of that works fine. Where I run into trouble, however, is trying to pass the values from the one-dimensional arraylist "melevationspoints" into the following multi-dimensional array:

Dim pointsarray(,) as Double

For my code to work properly, the result should look something like this:

Dim pointsarray(,) as double = {{23,24,0}, {45,33,0}}

I do not have a lot of experience on working with multi-dimensional arrays so I'm not getting very far. I do have a lot of experience with arraylists, but I can't seem to solve this problem.

Any ideas?

--
James
--
James
Jul 21 '05 #1
0 1662

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Keith MacDonald | last post by:
Hello, Is there a portable (at least for VC.Net and g++) method to convert text between wchar_t and char, using the standard library? I may have missed something obvious, but the section on...
1
by: godsella | last post by:
First i have two stored procedures, i have passed the values of each one into two different arraylists of dates. how can i compare the two arraylists of dates? Thanks in advance
5
by: drdave | last post by:
I would like to have ten arraylists created within a loop.. is there a conversion or something I can do to acheive this.. pseudo: Dim counter As Integer = 0 Dim ArrName As ArrayList ...
4
by: Man-wai Chang | last post by:
Must I use CSS to layout the pages? -- .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Ubuntu 6.06) ...
0
by: steve | last post by:
I'm looking for a code example how to compare the values in a given record in different arraylists two arraylists, two fields in each record, both defined as string I'm thinking that it's...
4
by: Andy in S. Jersey | last post by:
I would like to create an unknown number of Arraylists, meaning, I don't know how many I should create until runtime. I will be reading a table, and 0,1,2, or more fields have to be put into...
2
by: Andy in S. Jersey | last post by:
I would like to create an unknown number of ArrayLists, that is I don't know that until runtime. Of course I can do this if I knew I needed two: ArrayList IntervalArray1 = new ArrayList();...
6
by: Razii | last post by:
What you need, instead of doubles and floats, is Multi-Precision Library. Too bad, as usual, it's not part of standard C++ library. Use GNU Bignum Library. All problems solved easily.
5
by: Robert Bravery | last post by:
HI all, Can someone point me in the right direction. I am looking for the fastet and simplest way of converting a vb6 project, written by someone else (I am takeing over the project) to VB.net,...
1
by: Toireasa | last post by:
Hi helpful people, I have a question, which I can't find the answer to anywhere and that worries me that it might not be possible. If anyone can help me, I hope you guys can! I set up a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.