The SceneGraph3D Description Language

Home About EaZD Deferred renderer API SceneGraph3D API SceneGraph3D scene description language

Index

| Scene file structure | camera | character | directory | eventmessage | group | input | light | linearmotion | material | node | object | proximitytrigger | skylight | spinner | surface | transformation | user | world |

transformation

Derived from: Geometry3D
Class name: Surface3D
Placement: Anywhere
Description: Creates and displays a mathematical surface. Its material attributes can be defined using a material node.
Special notes: -
Inherited attributes: name, active, visible
New attributes:
attribute type description
type OPTION
sphere
ellipsoid
hyperboloid_of_one_sheet
super_ellipsoid
super_hyperboloid_of_one_sheet
torus
super_toroid
Speciafies what surface equation to use for the primitive. The following equations are used for the generation of the primitives:
  • sphere (with 2^depth subdivisions):
    r2 = x2 + y2 + z2
  • ellipsoid (with 2^depth subdivisions):
    x = r cos(φ) cos(θ)
    y = r cos(φ) sin(θ)
    z = r sin(φ)
  • hyperboloid of one sheet (with 2^depth subdivisions):
    x = r cosh(φ) cos(θ)
    y = r cosh(φ) sin(θ)
    z = r sinh(φ)
  • super ellipsoid (with 2^depth subdivisions):
    x = r cos(φ)2 cos(θ)
    y = r cos(φ)2 sin(θ)
    z = r sin(φ)2
  • super hyperboloid of one sheet (with 2^depth subdivisions):
    x = r cosh(φ)3 cos(θ)2
    y = r cosh(φ)3 sin(θ)2
    z = r sinh(φ)3
  • torus (with 2^depth subdivisions):
    x = r (4 + 1.5cos(φ)) cos(θ)
    y = r (4 + 1.5cos(φ)) sin(θ)
    z = 1.5 r sin(φ)
  • super toroid (with 2^depth subdivisions):
    x = r (3 + 1.5cos(φ)3/2) cos(θ)1/2
    y = r (3 + 1.5cos(φ)3/2) sin(θ)1/2
    z = 1.5 r sin(φ)3/2
radius FLOAT A size parameter, whose interpretation depends on the specific primitive type.
depth FLOAT A detail parameter, whose interpretation depends on the specific primitive type.
Events:
event name condition
- -
Inherited events: -
New messages: -
Inherited messages: active, visible, hide, show, deactivate, enable, activate, disable
Redefined messages: -
Obsolete messages: -


Example

<world ambient_occlusion="ssao" bloom="yes" shadows="disk" 
       ao_radius="6" ambient="0.3 0.3 0.3" defocus="yes">
   
    <camera name="first_person" apperture="50.0" 
            focal_distance ="30.0" focal_range="30.0"
            near="2.0" far="1000" follow="Myself" primary="true">
    </camera> 

   
    <transformation translation="40 0 -100" rotation="90 1 0 0">
<material ambient="0.2 0.2 0.2" diffuse="1.0 0.5 0.0" specular="1.0 1.0 1.0"
emission="0.0 1.0 1.0" alpha="1" shininess="64"
which="0">
<surface name="torus" type="torus" radius="2.5" depth="5"/>
</material>
</transformation> <user name="Myself" control="navigate" speed="2.0" turn="0.5 freeroll="false" position="0,50,50" lookat="0,0,-10" input="Console"> </user> <input name="Console" type="mousekeyboard"> </input> </world>

Last update: 24 Feb. 2010