<< >> Up Title

Section object

This section defines the objects in the scene.

section_object = { . object . name . name_object . attrib_std . model . { . defobject . } . }

name_object = ident

attrib_std = { [ attrobj_material | attrobj_toll | attrobj_texture | attrobj_mapping ] }

attrobj_toll = toll . number_real . ;

attrobj_texture = texture . ident . ;

attrobj_mapping = mapping . { mapping . model . { name_mapping . defmapping } . }

name_mapping = ident

defmapping = { [ attrmap_center | attrmap_assx | attrmap_assy | attrmap_moltx | attrmap_molty ] }

attrmap_center = center . point . ;

attrmap_assx = assx . vector . ;

attrmap_assy = assy . vector . ;

attrmap_moltx = moltx . number_real . ;

attrmap_molty = molty . number_real . ;

defobject = [ defobj_sphere | defobj_box | defobj_brep | defobj_quad | defobj_csg ]

defobj_brep = brep . { [ defbrep_name | defbrep_costr ] }

defbrep_name = name . ident . ;

defbrep_costr = costr . number_real . ;

defobj_sphere = sphere . { [ defsphere_center | defsphere_radius ] }

defsphere_center = center . point . ;

defsphere_radius = radius . number_real . ;

defobj_box = box . { [ defbox_xmin | defbox_xmax | defbox_ymin | defbox_ymax |

defbox_zmin | defbox_zmax] }

defbox_xmin = xmin . number_real . ;

defbox_xmax = xmax . number_real . ;

defbox_ymin = ymin . number_real . ;

defbox_ymax = ymax . number_real . ;

defbox_zmin = zmin . number_real . ;

defbox_zmax = zmax . number_real . ;

defobj_quad = quad . { [ defquad_a | defquad_b | defquad_c | defquad_d | defquad_e

| defquad_f | defquad_g | defquad_h | defquad_i | defquad_j ] }

defquad_a = a . number_real . ;

defquad_b = b . number_real . ;

defquad_c = c . number_real . ;

defquad_d = d . number_real . ;

defquad_e = e . number_real . ;

defquad_f = f . number_real . ;

defquad_g = g . number_real . ;

defquad_h = h . number_real . ;

defquad_i = i . number_real . ;

defquad_j = j . number_real . ;

defobj_csg = [ intersect | union | subtract ] . { [defcsg_first | defcsg_second ] }

defcsg_first = first section_object [ ; | ]

defcsg_second = second section_object [ ; | ]

section_object

definition of an object.

name_object

name of the object. It must be unique.

attrobj_toll

value of tollerance for the intersection with the object.

attrobj_texture

name of the texture. The texture must be preload in a previous section texture. The object can ignore this value.

attrobj_mapping

mapping of the object. The object can ignore this value.

name_mapping

type of the mapping. The standard values are planar, cilindric, spherical.

defmapping

mapping characteristic, it define a reference system in the space.

attrmap_center

center of the reference system for mapping.

attrmap_assx

versor parallel to the x axis of the reference system of the mapping.

attrmap_assy

versor parallel to the y axis of the reference system of the mapping.

attrmap_moltx

scale factor for x axis of the mapping reference system.

attrmap_molty

scale factor for y axis of the mapping reference system.

defobject

definition of the object model.

defobj_brep

definition of a brep model.

defbrep_name

name of the file .brp which describes the geometric model of the object. The file .brp will have name defbrep_name + ".brp" and will be in the directory where are all the models.

defbrep_costr

value for the hierarchy of the object. If the value is equal to zero, no hierarchy will be used. Se the value is different from zero and a previus hierarchy of the object already exist, this will be used ( also if it has been created with a different value). If the hierarchy doesn' t exist, the program will create a new with compactness value equal to the value.

defobj_sphere

definition of a sphere.

defsphere_center

definition of the sphere center.

defsphere_radius

definition of the sphere ray.

defobj_box

definition of a box.

defbox_xmin

defbox_xmax

defbox_ymin

defbox_ymax

defbox_zmin

defbox_zmax

extreme values of a box oriented to the axes .

defobj_quad

definition of a quadric.

defquad_a

defquad_b

defquad_c

defquad_d

defquad_e

defquad_f

defquad_g

defquad_h

defquad_i

defquad_j

definition of the form of the quadric. The equation is

A*x^2+B*y^2+C*z^2+D*x*y+E*x*z+F*y*z+G*x+H*y+I*z+J=0

defobj_csg

definition of a csg node.

defcsg_first

first object which is in the csg node.

defcsg_second

second object which is in the csg node.

Example of a file .rt :

{ vrc

vrp ( 63.7424 , -77.0513 , 0 );

prp ( 0 , 0 , -100 );

vup ( 0 , 0 , 1 );

vpn ( -0.637424 , 0.770513 , 0 );

umax 6;

umin -6;

vmax 4.5;

vmin -4.5;

type 1;

f 1;

b 0;

fon 0;

bon 0;

}

{ param

toll 0.01;

mode 5;

shade phong;

anti_alias 1;

anti_al_toll 0.05;

dimx 1024;

dimy 768;

ambientcolor (1,1,1);

backcolor (0,0,0);

ambient_ni 1;

buildhier 1;

modifydef 1;

depthmax 64;

depthmin 48;

depthback 64;

}

{ texture

name wood ;

}

{ material

name mvetro;

model { phong

Ks 0.6;

Kt 0.8;

ni 1.2;

Ka 0.0;

Kd 0.4;

n 10;

Od (0.24,0.19,0.88);

Os (0.24,0.19,0.88);

}

}

{lamp

name lamp1;

model { pointlamp

pos ( 5 , 0 , 3 );

color (0.7,0.7,0.7);

}

}

{object

name watch1;

material mvetro;

toll 0.01;

model { brep

name watch1;

costr 1.1;

}

}

{object

name sph3;

material m3;

texture marple;

mapping { mapping

model { spherical

center ( 10 , 2 , 0 );

assx ( 1 , 0 , 0 );

assy ( 0 , 1 , 0 );

moltx 0.1;

molty 0.1;

}

}

toll 0.01;

model { sphere

center ( 10 , 2 , 0 );

radius 0.95;

}

}

{ object

name tcsg;

material m1;

model { intersect

first {object

name sph1;

material m1;

model { sphere

center ( 5 , 0.5 , 0 );

radius 0.95;

}

};

second {object

name sph1;

material m1;

model { sphere

center ( 5 , -0.5 , 0 );

radius 0.95;

}

};

}

}

{object

name box1;

material m1;

model { box

xmin 10;

xmax 12;

ymin -1;

ymax 1;

zmin -1;

zmax 1;

}

}

{object

name sph1;

material m1;

model { quad

a 10;

b -1;

c 2;

d 0;

e 0;

f 0;

g 0;

h 0;

i 0;

j -1;

}

}

.


<< >> Up Title