comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » objarr
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
objarr [message #16982] Thu, 02 September 1999 00:00 Go to previous message
bjackel is currently offline  bjackel
Messages: 10
Registered: September 1993
Junior Member
Say I have a single object called Vector3, that allows nice things like

mag= Vector3->magnitude()
dot= Vector3->dotproduct(secondvector)

and so on. Then assume I've got a whole pile of vectors

pile= OBJARR(100)
FOR indx=0,99 DO pile[i]= Vector3

and want to manipulate them all at once

magpile= pile->magnitude()
% Object reference must be scalar in this context: PILE
% Execution halted at: $MAIN$

One foremost advantages of IDL is that logical groups of
vector and matrix operations can be carried out with a
single command. Am I correct in fearing that the only
way to get what I want is with something like this?

magpile= DBLARR(N_ELEMENTS(pile))
FOR indx=0,N_ELEMENTS(pile)-1 DO magpile[indx]=
pile[indx]->magnitude()

Any comments or suggestions would be most welcome.

Brian Jackel
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: 3D irregular tetraedal grid generation
Next Topic: IDL 5.1.1: Going from True_Color to Pseudo_Color on one session

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 17:36:19 PDT 2025

Total time taken to generate the page: 1.60069 seconds