VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time ]
Subject: (1)Create Graphic Objects - 2


Author:
R.D.
[ Next Thread | Previous Thread | Next Message | Previous Message ]
Date Posted: 02:08:20 03/26/02 Tue
In reply to: R.D. 's message, "Graphic Object 建立" on 05:31:06 03/18/02 Mon

;[part II]
myModel = OBJ_NEW('IDLgrModel')

以上為建立一個'IDLgrModel'的物件,其物件的參照我們命名為
'myModel',Model物件用於處理實際繪圖的元素(atom)其各項
旋轉(Rotate)、平移(translate)、或縮放(Scale)等動作。

如果與OpenGL的架構來比的話,相當於Modelview這個陣列所做
的事情,類似...


;[part III]
dd = 50
myShape = OBJ_NEW('IDLgrPolygon', $
Data=[[-dd,-dd],[+dd,-dd],[+dd,+dd],[-dd,+dd]])

這個部分,建立一個'IDLgrPolygon'物件,名為myShape。
'IDLgrPolygon'物件即為在空間中建立多邊形物件,此多邊行物件
可供在IDL Object Graphics中,組成各式3D物件。
這裡我們建立一個邊長為100個pixels,而中心在原點的正方形。
[注意]這裡的原點指的是對應在DRAW WIDGET中指定的
VIEWPLANE_RECT(繪圖區域)的座標原點。與下面我們將提到的
Trackball座標系統有所不同。

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Post a message:
This forum requires an account to post.
[ Create Account ]
[ Login ]
[ Contact Forum Admin ]


Forum timezone: GMT-8
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.