<<<<<<<<<<<<<<<<<

geometry(gert) Gert geometry(gert)

NAME

geometry

DESCRIPTION

Geometry is a subclass of assembly class. It is used in GERT (General Electric Ray Tracer) and provides functionality and data structure common to primitive geometry subclasses: sphere, block, cone, cylinder, etc.

SUPERCLASS

assembly

INSTANCE VARIABLES

bounding_volume_center is the bounding sphere center in global coordinate system.

bounding_volume_radius is the radius of bounding sphere.

bounding_volume_test is the Boolean variable for specification if bounding volume test should be performed (the default is false (0)).

components_number is the variable for specifying dimension of plane_normals vector. It should be multiple of 3.

inc_dot is the variable to store the scalar product of ray and surface normal vectors.

intersection is the intersection parameter value for the ray.

normal is the normal to geometry's surface at the ray- surface intersection point.

plane_normals is a pointer to plane normals for multislab. Multislabs are used in special fast processing of complex scenes with many geometries.

ray is a pointer to the ray intersecting the geometry.

reflective is a pointer to reflectivity of the surface.

refractive is a pointer to refractivity of the surface.

MESSAGES

add_reflected! forwards this message to instance properties.

add_refracted! forwards this message to instance properties.

bounding_volume_center? returns the bounding_volume_center value.

bounding_volume_radius? returns the bounding_volume_radius value.

bounding_volume_test=argument sets the bounding_volume_test value to argument, default is false (0).

bounding_volume_test? returns the bounding_volume_test value.

direction=argument sets the direction value.

direction? returns the direction value.

intensity=argument forwards this message to instance properties.

intensity? forwards this message to instance properties.

intersection? returns intersection value.

normal? returns normal to the surface.

plane_normals=argument sets the plane_normals to the argument. Default is (1,0,0,0,1,0,0,0,1) that corresponds to the coordinate axes x, y, and z.

plane_normals? returns plane_normals value.

ray! sets the instance variable ray to point to the class variable ray.

ray_origin=argument sets the value of ray_origin to the argument.

ray_origin? returns the value of ray_origin.

reflect! sends normal and inc_dot to instance's properties and then forwards the message to properties.

reflected_intensity=argument forwards the message to instance's properties.

refract! sends normal and inc_dot to instance's properties and then forwards the message to properties.

refracted_intensity=argument forwards the message to instance's properties.

row_products! is implemented in the subclasses.

shade! sends message "normal!" to itself, sends normal and ray-surface intersection to instance's properties, then forwards the message to properties.

transform_normal! transforms normal to the surface to global coordinate space and computes the inc_dot.

EXAMPLE

/* geometry is a mixin object it should not be created and used by itself. see examples in block, cone, cylinder and sphere. */

SEE ALSO

ray, block, cone, cylinder, sphere, properties


Please send comments and suggestions to
consult@rpi.edu