WRL

wrl檔案是一種虛擬現實文本格式檔案。也是VRML的場景模型檔案的擴展名。

基本介紹

  • 中文名:虛擬現實語言
  • 外文名:Virtual Reality Language
  • 舉例:#VRML V2.0 utf8
  • 舉例:translation 0 0 0
  • 舉例:rotation 90 0 0 0
  • 簡稱:WRL
定義,舉例,

定義

wrl檔案是純ASCII檔案,所以可以用文本編輯器打開和編輯。雖然這樣,但是對於大型的3D檔案。用純手工的方法是不可取的。應該選擇用三維軟體(maya,max等)進行場景建模和輸出。
它同樣可以用VRML瀏覽器打開。VRML瀏覽器通常是以外掛程式的形式附著在Web瀏覽器中,如IE,NetScape等Web瀏覽器都有自帶的VRML瀏覽器,但這些瀏覽器的功能有限,對VRML的支持不很充分;一些公司開發的VRML瀏覽器則通常功能強大,如SGI公司的Cosmo Player,SONY的Community Place Brower等等。

舉例

#VRML V2.0 utf8
# Produced by 3d Toolbox 1.0 (Pierre Alliez, CNET / DIH / HDM)
# Mesh : 2500 vertices, 4802 faces
DEF Mesh-ROOT Transform {
translation 0 0 0
rotation 90 0 0 0
scale 2 2 2
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0 0 0
}
}
geometry DEF Mesh-FACES IndexedFaceSet {
ccw TRUE
solid TRUE
coord DEF Mesh-COORD Coordinate { point [
-1 -0.0745098 -1,
-0.959184 -0.0411765 -1,
-0.918367 -0.00588234 -1,
-0.877551 -0.0313725 -1,
···········
1 -0.186275 1]
}
coordIndex [
1, 0, 51, -1,
51, 0, 50, -1,
2, 1, 52, -1,
52, 1, 51, -1,
3, 2, 53, -1,
··········
2498, 2447, 2497, -1,
2449, 2448, 2499, -1,
2499, 2448, 2498, -1]
}
}
]
}
其中# Mesh說明頂點數和三角面片數量,point數組存的是點的三維坐標,coordIndex數組存的是三角面片的三個頂點信息。

相關詞條

熱門詞條

聯絡我們