On-Line  www.XServer.ru - , , , ,  .
                                      
     XServer.ru






 

VRML 2.0.


VRML

.wrl, :
#VRML V2.0 utf8
vrml

() vrml - () ( , ), , . 0,0,0 vrml .

RGB ( ). 0 1. [0.5 1 0]

- , vrml , ..
:

SFBool - , - TRUE FALSE
SFColor/MFColor - , RGB ( ), SFColor foocolor [0 0.3 0.9] MFColor fooColor [ 1 0 0, 0 1 0, 0 0 1 ]
SFFloat/MFFloat - . SFFloat [1.238] MFFloat [0.235, 2.66, 55.7]
SFImage - 2- : _ _. : fooImage 1 2 2 0.5 0.6
SFInt32/MFInt32 - 32-
SFNode/MFNode -
SFRotation/MFRotation - . _X _Y _Z () [0 0 1 3.14] - Z 180
SFString/MFString -
[, , ]
SFTime/MFTime - 1 1970
SFVec2f/MFVec2f -
: [ , _S, _T]
0 0
[ 12 48, 55, 88]
SFVec3f/MFVec3f -
: [ , _X, _Y, _Z].
0 0 0
[ 12 48 99, 55, 88 12]

- vrml. .

Box, Cone, Cylinder, ElevationGrid, Extrusion, IndexedFaceSet, IndexedLineSet, PointSet, Sphere, Text , , , .

Color, Coordinate, Normal, TextureCoordinate.

ProximitySensor, VisibilitySensor, TouchSensor, CylinderSensor, PlaneSensor, SphereSensor. ,

Anchor, Billboard, Collision, Group, Transform. (child) . .

Appearance, FontStyle, ImageTexture, Material, MovieTexture, PixelTexture,TextureTransform

AudioClip, DirectionalLight, PointLight , Script, Shape, Sound,SpotLight, WorldInfo - , , JAVA , vrml-

- Box
Box {
field SFVec3f size 2 2 2 # (2 2 2 - )
}
size X Y Z

  • - Cylinder
    Cylinder {
    field SFBool bottom TRUE #
    field SFFloat height 2 # (2 - )
    field SFFloat radius 1 # (1 - )
    field SFBool side TRUE #
    field SFBool top TRUE #
    }
    . - bottom, side, top FALSE - .. ""

  • - Sphere
    Sphere {
    field SFFloat radius 1 # (1 - )
    }

  • - Cone
    Cone {
    field SFFloat bottomRadius 1 #
    field SFFloat height 2 #
    field SFBool side TRUE #
    field SFBool bottom TRUE #
    }

    - bottom, side FALSE - .. ""

  • - IndexedFaceSet
    IndexedFaceSet {
    eventIn MFInt32 set_colorIndex #
    eventIn MFInt32 set_coordIndex #
    eventIn MFInt32 set_normalIndex #
    eventIn MFInt32 set_texCoordIndex #
    exposedField SFNode color NULL # Color
    exposedField SFNode coord NULL # Coordinate
    exposedField SFNode normal NULL # Normal
    exposedField SFNode texCoord NULL # TextureCoordinate
    field SFBool ccw TRUE #
    field MFInt32 colorIndex [] #
    field SFBool colorPerVertex TRUE #
    field SFBool convex TRUE #
    field MFInt32 coordIndex [] #
    field SFFloat creaseAngle 0 #
    field MFInt32 normalIndex [] #
    field SFBool normalPerVertex TRUE #
    field SFBool solid TRUE #
    field MFInt32 texCoordIndex [] #
    }
    IndexedFaceSet - , , coord . coordIndex , -1 ( -1 ). [1 2 5 8 10 -1 3 4 6 7] ( 1 2 5 8 10), 0.
    colorPerVertex = FALSE,

    colorindex , colorindex , Color
    colorindex , Color, .. Color

    colorPerVertex = TRUE,

    colorindex , colorindex , Color
    colorindex , Color, .. Color

    Normal , creaseAngle .
    Normal normalIndex

    texCoordIndex texCoord texCoordIndex -1
    texCoordIndex texCoord

  • - IndexedLineSet
    IndexedLineSet {
    eventIn MFInt32 set_colorIndex
    eventIn MFInt32 set_coordIndex
    exposedField SFNode color NULL # Color
    exposedField SFNode coord NULL # Coordinate
    field MFInt32 colorIndex []
    field SFBool colorPerVertex TRUE
    field MFInt32 coordIndex []
    }
    IndexedLineSet - , , coord . coordIndex , -1 ( -1 ). [1 2 5 8 10 -1 3 4 6 7] ( 1 2 5 8 10), 0.
    colorPerVertex = FALSE,

    colorindex , colorindex , Color
    colorindex , Color, .. Color

    colorPerVertex = TRUE,

    colorindex , colorindex , Color
    colorindex , Color, .. Color

  • PointSet
    PointSet {
    exposedField SFNode color NULL # Color
    exposedField SFNode coord NULL # Coordinate
    }
    PointSet - , coord
    color
    color Material (. Shape)

  • - ElevationGrid
    ElevationGrid {
    eventIn MFFloat set_height
    exposedField SFNode color NULL
    exposedField SFNode normal NULL
    exposedField SFNode texCoord NULL
    field MFFloat height []
    field SFBool ccw TRUE
    field SFBool colorPerVertex TRUE
    field SFFloat creaseAngle 0
    field SFBool normalPerVertex TRUE
    field SFBool solid TRUE
    field SFInt32 xDimension 0
    field SFFloat xSpacing 0.0
    field SFInt32 zDimension 0
    field SFFloat zSpacing 0.0
    }
    ElevationGrid X-Z. ( Y). ,
    xDimension zDimension - X Z > 1
    xSpacing zSpacing - X Z
    height - ( Y) .

  • Extrusion {
    eventIn MFVec2f set_crossSection
    eventIn MFRotation set_orientation
    eventIn MFVec2f set_scale
    eventIn MFVec3f set_spine
    field SFBool beginCap TRUE
    field SFBool ccw TRUE
    field SFBool convex TRUE
    field SFFloat creaseAngle 0
    field MFVec2f crossSection [ 1 1, 1 -1, -1 -1, -1 1, 1 1 ]
    field SFBool endCap TRUE
    field MFRotation orientation 0 0 1 0
    field MFVec2f scale 1 1
    field SFBool solid TRUE
    field MFVec3f spine [ 0 0 0, 0 1 0 ]
    }

    - Color
    Color {
    exposedField MFColor color []
    }
    RGB, . IndexedFaceSet

    - Coordinate
    Coordinate {
    exposedField MFVec3f point []
    }
    - coord , IndexedFaceSet, IndexedLineSet, PointSet.

    - Normal

    Normal {
    exposedField MFVec3f vector []
    }
    - normal , IndexedFaceSet, ElevationGrid.

    TextureCoordinate
    TextureCoordinate {
    exposedField MFVec2f point []
    }
    , IndexedFaceSet, ElevationGrid .
    S T , 0.0 1.0.
    S - - T.


    Transform
    Transform {
    eventIn MFNode addChildren
    eventIn MFNode removeChildren
    exposedField SFVec3f center 0 0 0
    exposedField MFNode children []
    exposedField SFRotation rotation 0 0 1 0
    exposedField SFVec3f scale 1 1 1
    exposedField SFRotation scaleOrientation 0 0 1 0
    exposedField SFVec3f translation 0 0 0
    field SFVec3f bboxCenter 0 0 0
    field SFVec3f bboxSize -1 -1 -1
    }
    Transform - ,
    bboxCenter bboxSize , - ,
    center -
    rotation - , , ( 0 0 1 3.14 - Z 180 )
    scale - , ( 0) 0.5 0.5 1 - X Z , Z
    scaleOrientation - ( scale!!!) scale
    translation - , - X Y Z
    children [] - ( transform)




    Shape -
    Shape {
    exposedField SFNode appearance NULL
    exposedField SFNode geometry NULL
    }
    Shape : appearance geometry .
    appearance Appearance ,
    geometry geometry,


    Appearance -
    Appearance {
    exposedField SFNode material NULL
    exposedField SFNode texture NULL
    exposedField SFNode textureTransform NULL
    }
    Appearance , , . NULL, NULL .

    material Material. material NULL , 0 0 0 .
    texture of (ImageTexture, MovieTexture, PixelTexture). NULL .

    textureTransform TextureTransform . NULL , textureTransform NULL , textureTransform .

    Material -
    Material {
    exposedField SFFloat ambientIntensity 0.2
    exposedField SFColor diffuseColor 0.8 0.8 0.8
    exposedField SFColor emissiveColor 0 0 0
    exposedField SFFloat shininess 0.2
    exposedField SFColor specularColor 0 0 0
    exposedField SFFloat transparency 0
    }
    ambientIntensity -
    diffuseColor - ,
    emissiveColor - ( )
    shininess -
    specularColor - ( ) - shininess
    transparency - 1 - , 0 -

    ImageTexture -
    ImageTexture {
    exposedField MFString url []
    field SFBool repeatS TRUE
    field SFBool repeatT TRUE
    }
    url - url (JPEG, PNG, GIF)
    repeatS repeatT - 0-1

    TextureTransform -
    TextureTransform {
    exposedField SFVec2f center 0 0
    exposedField SFFloat rotation 0
    exposedField SFVec2f scale 1 1
    exposedField SFVec2f translation 0 0
    }
    center ( rotation)
    rotation
    scale S T
    translation 0 0



    VRML


     
     |   |   |   |   |