504
GNU Goptical manual GNU Optical design and simulation library Alexandre Becoulet

Gop Ti Cal

Embed Size (px)

Citation preview

Page 1: Gop Ti Cal

GNU Goptical manualGNU Optical design and simulation library

Alexandre Becoulet

Page 2: Gop Ti Cal

This manual is for GNU Goptical. Copyright c© 2010-2011 Free Software Foundation, Inc

Copyright (C) 2010-2011 Free Software Foundation, Inc. Permission is grantedto copy, distribute and/or modify this document under the terms of the GNUFree Documentation License, Version 1.3 or any later version published by theFree Software Foundation; with no Invariant Sections, no Front-Cover Texts,and no Back-Cover Texts. A copy of the license is included in the sectionentitled “GNU Free Documentation License”.

Page 3: Gop Ti Cal

i

Table of Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Features list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.1 Coordinates system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Measurement units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.3 Object references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.1 A simple refractor design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.1.1 Building the optical system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.1.2 Performing light propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.1.3 Rendering optical layout and rays . . . . . . . . . . . . . . . . . . . . . . . . . 93.1.4 Performing a ray fan analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.2 A photo lens design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2.1 Using the Lens component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2.2 Adding multiple light sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.2.3 Plotting spot diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.2.4 Plotting ray fans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.3 System hierarchy and groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.3.1 The Lens component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.3.2 A newton telescope with corrector . . . . . . . . . . . . . . . . . . . . . . . . 19

3.4 A parameterizable segmented mirror model . . . . . . . . . . . . . . . . . . . . 233.4.1 Writing the component model class . . . . . . . . . . . . . . . . . . . . . . . 233.4.2 Using the model in Ritchey-Chretien design . . . . . . . . . . . . . . . 25

3.5 A custom surface curve model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.5.1 Writing the curve model class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.5.2 Using the new model in optical design . . . . . . . . . . . . . . . . . . . . 28

4 API documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.1 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.2 Namespaces list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.3 Classes list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.4 Main classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5 GNU Free Documentation License . . . . . . . . . 494

Page 4: Gop Ti Cal

Chapter 1: Introduction 1

1 Introduction

Goptical is a C++ optical design and simulation library. Goptical is free software and is partof the GNU project .

It provides model classes for optical components, surfaces and materials. It enablesbuilding optical systems by creating and placing various optical components in a 3d spaceand simulates light propagation through the system. Classical optical design analysis toolscan be used on optical systems.

It takes advantages of the C++ object model to allow building complex optical systemswith a few classes instanciations as optical components are represented by language objects.

1.1 Features list

• Goptical relies on an object oriented optical design approach. This allows design-ing optical component models and reuse them nested in other designs. Componentsare stored in herarchical form and live in a three-dimentional space with group (see[Sys Group class reference], page 409) local coordinates.

• Support for sequential and non-sequential ray-tracing.

• Available components include:

• Single optical surfaces (see [Sys OpticalSurface class reference], page 427)

• Lenses (see [Sys Lens class reference], page 416)

• Mirrors (see [Sys Mirror class reference], page 423),

• Point sources (see [Sys SourcePoint class reference], page 431) and

• Image (see [Sys Image class reference], page 413) planes.

Surface curve and material used by optical components are described using dedicatedmodels.

• Several surface curvature models are available:

• Conic (see [Curve Conic class reference], page 68) curves.

• Polynomial (see [Curve Polynomial class reference], page 85) curves.

• Rotationally symmetric (see [Curve Spline class reference], page 91) splines andGrid (see [Curve Grid class reference], page 79) splines.

• Zernike polynomials (see [Curve Zernike class reference], page 94).

• Foucault test (see [Curve Foucault class reference], page 74) curves.

• Composition (see [Curve Composer class reference], page 62) of other curve mod-els.

• Array (see [Curve Array class reference], page 56) of other curve models.

• User defined (see Section 3.5 [A custom surface curve model], page 27) curvemodels.

Most curve models can be described using model specific parameters or by best fittingany curve object.

• Several glass material models are available:

Page 5: Gop Ti Cal

Chapter 1: Introduction 2

• Interpolated dispersion (see [Material DispersionTable class reference], page 241)glass model

• Abbe number (see [Material Abbe class reference], page 224) and mil number (see[Material Mil class reference], page 252) model glass model.

• Sellmeier (see [Material Sellmeier class reference], page 261) glass model.

• Schott (see [Material Schott class reference], page 257) glass model.

• Conrady (see [Material Conrady class reference], page 237) glass model.

• Herzberger (see [Material Herzberger class reference], page 245) glass model.

• A simple reflective surfaces mirror (see [Material Mirror class reference], page 254)model.

• A more accurate metal (see [Material Metal class reference], page 249) materialmodel.

• Air (see [Material Air class reference], page 227) and vaccum (see[Material Vacuum class reference], page 269) models.

• Surfaces outline shapes are described by a set of model classes too:

• Disk (see [Shape Disk class reference], page 370) shapes model.

• Ring (see [Shape Ring class reference], page 393) shapes model.

• Ellipse (see [Shape Ellipse class reference], page 372) shapes model.

• Rectangle (see [Shape Rectangle class reference], page 385) shapes model.

• Regular polygon (see [Shape RegularPolygon class reference], page 389) and Userdefined polygon (see [Shape Polygon class reference], page 382) shapes models.

• Optical system analysis tools include:

• Layout and rays rendering in 2d and 3d,

• Best point of focus (see [Analysis Focus class reference], page 45) finding.

• Various ray fan (see [Analysis RayFan class reference], page 47) plots.

• Spot diagram (see [Analysis Spot class reference], page 51) plots.

• Several graphical output driver are available to render optical layouts and plots:

• output in Svg (see [Io RendererSvg class reference], page 186) vector format.

• output in bitmap format using the Gd (see [Io RendererGd class reference],page 177) library.

• output in Dxf (see [Io RendererDxf class reference], page 174) CAD format.

• output in various formats via the PlPlot (see [Io RendererPlplot class reference],page 183) library.

• X11 (see [Io RendererX11 class reference], page 189) display on UNIX boxes.

• 3d display using the OpenGL (see [Io RendererOpengl class reference], page 180)library.

• output in X3D (see [Io RendererX3d class reference], page 192), a standard 3dformat.

• Various optical design file formats can be read:

• Oslo glass catalog

• Zemax glass catalog and optical designs

Page 6: Gop Ti Cal

Chapter 2: Conventions 3

2 Conventions

2.1 Coordinates system

Each optical element in Goptical lives in its own coordinates system. It’s usually locatedat (0, 0, 0) with the Z axis being the local optical axis.

2.2 Measurement units

• Lengths are expressed using millimeter unit.

• Wavelengths are expressed in nanometer unit in vacuum.

• Absolute refractive indexes are used, with 1 being the refractive index of vacuum.

2.3 Object references

C++ objects are used to model optical elements, materials, curvatures, shapes and otherkinds of object Goptical deals with. As the optical system is being built, some objects keepreferences to other objects.

The ref smart pointer class is used to manage objects in a convenient way. Objects caneither be statically allocated or dynamically allocated. Both can then be passed to referenceholder objects in the same way but only dynamically allocated objects will be automaticallydeleted when not used anymore:

using namespace Goptical;

Sys::System sys;

// statically allocated object added to the system

Sys::SourceRays src1(Math::vector3_0);

sys.add(src1);

Page 7: Gop Ti Cal

Chapter 2: Conventions 4

// dynamically allocated object added to the system

ref<Sys::SourceRays> src2 = ref<Sys::SourceRays>::create(Math::vector3_0);

sys.add(src2);

Page 8: Gop Ti Cal

Chapter 3: Tutorial 5

3 Tutorial

This section contains some commented example of applications and codes which use theGoptical library to model optical systems.

Page 9: Gop Ti Cal

Chapter 3: Tutorial 6

3.1 A simple refractor design

3.1.1 Building the optical system

Unlike much optical design software which relies on a list of surfaces to sequentially propa-gate light through the system, Goptical uses an object representation of the optical systemin 3d space.

To model an optical system with Goptical, we just have to instantiate components andadd them to the system.

For this refractor example we first need to deal with glass materials used in the design.Our achromatic refractor design needs two lenses of different glass materials. In this examplewe choose to model Bk7 and F3 glasses with the Sellmeier model:

// code from examples/simple_refractor/refractor.cc:64

Material::Sellmeier bk7(1.03961212, 6.00069867e-3, 0.231792344,

2.00179144e-2, 1.01046945, 1.03560653e2);

Material::Sellmeier f3(8.23583145e-1, 6.41147253e-12, 7.11376975e-1,

3.07327658e-2, 3.12425113e-2, 4.02094988);

The Sys::OpticalSurface (see [Sys OpticalSurface class reference], page 427) class is usedto model a single optical surface.

The two lenses have the same disk outline shape, so we declare the shape model once:

Shape::Disk lens_shape(100); // lens diameter is 100mm

// 1st lens, left surface

Curve::Sphere curve1(2009.753); // spherical curve with given radius of curvature

Curve::Sphere curve2(-976.245);

Surface curves rely on dedicated models which are not dependent on optical componentbeing used. Here we need two simple spherical curves for the first lens.

The first lens component can then be instantiated. We need to specify its 3d position,thickness, shape model, curve models and material models. Material::none (see [ 528],page 223) will later be replaced by system environment material.

Sys::OpticalSurface s1(Math::Vector3(0, 0, 0), // position,

curve1, lens_shape, // curve & aperture shape

Material::none, bk7); // materials

// 1st lens, right surface

Sys::OpticalSurface s2(Math::Vector3(0, 0, 31.336),

curve2, lens_shape,

Page 10: Gop Ti Cal

Chapter 3: Tutorial 7

bk7, Material::none);

More convenient optical surface constructors are available for simple cases, with circularaperture and spherical curvature. They are used for the second lens:

// 2nd lens, left surface

Sys::OpticalSurface s3(Math::Vector3(0, 0, 37.765), // position,

-985.291, 100, // roc & circular aperture radius,

Material::none, f3); // materials

// 2nd lens, right surface

Sys::OpticalSurface s4(Math::Vector3(0, 0, 37.765+25.109),

-3636.839, 100,

f3, Material::none);

The Sys::Lens (see [Sys Lens class reference], page 416) class is more convenient to usefor most designs as it can handle a list of surfaces. In this example we choose to use theSys::OpticalSurface (see [Sys OpticalSurface class reference], page 427) class directly toshow how things work. The convenient method is used in the next example (see Section 3.2[A photo lens design], page 12).

We then create a point light source at infinite distance with a direction vector aimed atentry surface (left of first lens):

// light source

Sys::SourcePoint source(Sys::SourceAtInfinity,

Math::Vector3(0, 0, 1));

And we finally create an image plane near the expected focal point:

// image plane

Sys::Image image(Math::Vector3(0, 0, 3014.5), // position

60); // square size,

All these components need to be added to an optical system:

Sys::System sys;

// add components

sys.add(source);

sys.add(s1);

sys.add(s2);

sys.add(s3);

sys.add(s4);

sys.add(image);

This simple optical design is ready for ray tracing and analysis.

Page 11: Gop Ti Cal

Chapter 3: Tutorial 8

3.1.2 Performing light propagation

Light propagation through the optical system is performed by the Trace::Tracer (see[Trace Tracer class reference], page 486) class. There are several tracer parameters whichcan be tweaked before starting light propagation. Some default parameters can be set foran optical system instance; they will be used for each new tracer created for the system.

When light is propagated through the system, a tracer may be instructed to keep trackof rays hitting or generated by some of the components for further analysis.

Some analysis classes (see [Analysis namespace reference], page 44) are provided whichembed a tracer configured for a particular analysis, but it’s still possible to request a lightpropagation by directly instantiating a tracer object.

There are two major approaches to trace rays through an optical system:

• Sequential ray tracing: This requires an ordered list of surfaces to traverse. Rays aregenerated by the light source and propagated in the specified sequence order. Any lightray which doesn’t reach the next surface in order is lost.

• Non-sequential ray tracing: Rays are generated by the light source and each ray inter-acts with the first optical component found on its path. Rays are propagated this wayacross system components until they reach an image plane or get lost.

The default behavior in Goptical is to perform a non-sequential ray trace when nosequence is provided.

Non-sequential ray trace

A non-sequential ray trace needs the specification of an entrance pupil so that rays fromlight sources can be targeted at optical system entry.

Performing light propagation only needs instantiation of a Trace::Tracer (see[Trace Tracer class reference], page 486) object and invocation of its Trace::Tracer::trace(see [ 1425], page 487) function. Tracer parameters are inherited from system defaulttracer parameters:

sys.set_entrance_pupil(s1);

Trace::Tracer tracer(sys);

tracer.trace();

When performing a non-sequential ray trace, only optical components based onSys::Surface (see [Sys Surface class reference], page 463) will interact with light.

All enabled light sources which are part of the system are considered.

Sequential ray trace

Switching to a sequential ray trace is easy: The sequence is setup from components foundin the system, in order along the Z axis.

Trace::Sequence seq(sys);

sys.get_tracer_params().set_sequential_mode(seq);

More complicated sequences must be created empty and described explicitly using theTrace::Sequence::add (see [ 1410], page 484) function.

Page 12: Gop Ti Cal

Chapter 3: Tutorial 9

Optical system and sequence objects can be displayed using stl streams:

std::cout << "system:" << std::endl << sys;

std::cout << "sequence:" << std::endl << seq;

Ray tracing is then performed in the same way as for non-sequential ray traces:

Trace::Tracer tracer(sys);

tracer.trace();

When performing a sequential ray trace, all optical components can process incominglight rays.

A single light source must be present at the beginning of the sequence.

3.1.3 Rendering optical layout and rays

The result of ray tracing is stored in a Trace::Result (see [Trace Result class reference],page 478) object which stores information about generated and intercepted rays and involvedcomponents for each ray. Not all rays’ interactions are stored by default, and the resultobject must be first configured to specify which interactions should be stored for furtheranalysis.

Here we want to draw all rays which are traced through the system. We first have toinstruct our Trace::Result (see [Trace Result class reference], page 478) object to rememberwhich rays were generated by the source component in the system, so that it can used as astarting point for drawing subsequently scattered and reflected rays.

We use an Io::Renderer (see [Io Renderer class reference], page 171) based object whichis able to draw various things. We use it to draw system components as well as to recursivelydraw all rays generated by light sources.

Here is what we need to do in order:

• Instantiate a renderer object able to write graphics in some output format.

• Fit renderer viewport to optical system.

• Draw system components.

• Optionally change the ray distribution on entrance pupil so that only meridional raysare traced.

• Instruct the result object to keep track of rays generated by the source component.

• Perform the ray tracing.

• Draw traced rays.

Io::RendererSvg renderer("layout.svg", 1024, 100);

// draw 2d system layout

sys.draw_2d_fit(renderer);

sys.draw_2d(renderer);

Trace::Tracer tracer(sys);

// trace and draw rays from source

Page 13: Gop Ti Cal

Chapter 3: Tutorial 10

tracer.get_params().set_default_distribution(

Trace::Distribution(Trace::MeridionalDist, 5));

tracer.get_trace_result().set_generated_save_state(source);

tracer.trace();

tracer.get_trace_result().draw_2d(renderer);

3.1.4 Performing a ray fan analysis

The Analysis (see [Analysis namespace reference], page 44) namespace contains classesto perform some common analysis on optical systems. Analysis classes may embed aTrace::Tracer (see [Trace Tracer class reference], page 486) object if light propagation isneeded to perform analysis.

Ray fan plots can be computed using the Analysis::RayFan (see [Analysis RayFan class reference],page 47) class which is able to plot various ray measurements on both 2d plot axes.

The example below shows how to produce a transverse aberration plot by plotting en-trance ray height against transverse distance:

Io::RendererSvg renderer("fan.svg", 640, 480, Io::rgb_white);

Analysis::RayFan fan(sys);

// select light source wavelens

source.clear_spectrum();

source.add_spectral_line(Light::SpectralLine::C);

source.add_spectral_line(Light::SpectralLine::e);

source.add_spectral_line(Light::SpectralLine::F);

// get transverse aberration plot

ref<Data::Plot> fan_plot = fan.get_plot(Analysis::RayFan::EntranceHeight,

Analysis::RayFan::TransverseDistance);

fan_plot->draw(renderer);

Page 14: Gop Ti Cal

Chapter 3: Tutorial 11

Page 15: Gop Ti Cal

Chapter 3: Tutorial 12

3.2 A photo lens design

3.2.1 Using the Lens component

The Sys::Lens (see [Sys Lens class reference], page 416) class is a convenient way to modela list of optical surfaces. In this example we use it to model a Tessar photo lens by addingall optical surfaces to the lens object. Several functions are available to add surfaces to thelens; one of the simplest can create spherical surfaces with circular aperture for us. In thisexample, the glass material models used are created on the fly:

// code from examples/tessar_lens/tessar.cc:70

Sys::Lens lens(Math::Vector3(0, 0, 0));

// roc, ap.radius, thickness,

lens.add_surface(1/0.031186861, 14.934638, 4.627804137,

ref<Material::AbbeVd>::create(1.607170, 59.5002));

lens.add_surface(0, 14.934638, 5.417429465);

lens.add_surface(1/-0.014065441, 12.766446, 3.728230979,

ref<Material::AbbeVd>::create(1.575960, 41.2999));

lens.add_surface(1/0.034678487, 11.918098, 4.417903733);

lens.add_stop ( 12.066273, 2.288913925);

lens.add_surface(0, 12.372318, 1.499288597,

ref<Material::AbbeVd>::create(1.526480, 51.4000));

Page 16: Gop Ti Cal

Chapter 3: Tutorial 13

lens.add_surface(1/0.035104369, 14.642815, 7.996205852,

ref<Material::AbbeVd>::create(1.623770, 56.8998));

lens.add_surface(1/-0.021187519, 14.642815, 85.243965130);

sys.add(lens);

3.2.2 Adding multiple light sources

The Sys::SourcePoint (see [Sys SourcePoint class reference], page 431) class can be used tocreate a point light source suitable for analysis, but we sometimes want to trace custom rays.This can be achieved by using the Sys::SourceRays (see [Sys SourceRays class reference],page 435) component class.

In this example we add both source types to our system but enable a single one atthe same time. The Sys::SourceRays (see [Sys SourceRays class reference], page 435) isused to draw a 2d layout with chief and marginal rays whereas the Sys::SourcePoint (see[Sys SourcePoint class reference], page 431) source is used with multiple wavelengths forray fan and spot diagram analysis:

Sys::SourceRays source_rays(Math::Vector3(0, 27.5, -1000));

Sys::SourcePoint source_point(Sys::SourceAtFiniteDistance,

Math::Vector3(0, 27.5, -1000));

// add sources to system

sys.add(source_rays);

sys.add(source_point);

// configure sources

source_rays.add_chief_rays(sys);

source_rays.add_marginal_rays(sys, 14);

source_point.clear_spectrum();

source_point.add_spectral_line(Light::SpectralLine::C);

source_point.add_spectral_line(Light::SpectralLine::e);

source_point.add_spectral_line(Light::SpectralLine::F);

The object is located at -1000 on the Z axis and has a height of 27.5.

3.2.3 Plotting spot diagram

The Analysis::Spot (see [Analysis Spot class reference], page 51) class can be used to plotspot diagrams:

sys.enable_single<Sys::Source>(source_point);

sys.get_tracer_params().set_default_distribution(

Trace::Distribution(Trace::HexaPolarDist, 12));

Page 17: Gop Ti Cal

Chapter 3: Tutorial 14

Analysis::Spot spot(sys);

Io::RendererSvg renderer("spot.svg", 300, 300, Io::rgb_black);

spot.draw_diagram(renderer);

Io::RendererSvg renderer("spot_intensity.svg", 640, 480);

ref<Data::Plot> plot = spot.get_encircled_intensity_plot(50);

plot->draw(renderer);

Page 18: Gop Ti Cal

Chapter 3: Tutorial 15

3.2.4 Plotting ray fans

Various ray fan plots can be obtained by using the Analysis::RayFan (see[Analysis RayFan class reference], page 47) class:

sys.enable_single<Sys::Source>(source_point);

Analysis::RayFan fan(sys);

Io::RendererSvg renderer("opd_fan.svg", 640, 480);

ref<Data::Plot> fan_plot = fan.get_plot(Analysis::RayFan::EntranceHeight,

Analysis::RayFan::OpticalPathDiff);

fan_plot->draw(renderer);

Page 19: Gop Ti Cal

Chapter 3: Tutorial 16

Io::RendererSvg renderer("transverse_fan.svg", 640, 480);

ref<Data::Plot> fan_plot = fan.get_plot(Analysis::RayFan::EntranceHeight,

Analysis::RayFan::TransverseDistance);

fan_plot->draw(renderer);

Page 20: Gop Ti Cal

Chapter 3: Tutorial 17

Io::RendererSvg renderer("longitudinal_fan.svg", 640, 480);

ref<Data::Plot> fan_plot = fan.get_plot(Analysis::RayFan::EntranceHeight,

Analysis::RayFan::LongitudinalDistance);

fan_plot->draw(renderer);

Page 21: Gop Ti Cal

Chapter 3: Tutorial 18

Page 22: Gop Ti Cal

Chapter 3: Tutorial 19

3.3 System hierarchy and groups

Goptical allows arranging components of the optical system in a hierarchi-cal manner. Optical component classes all inherit from the Sys::Element (see[Sys Element class reference], page 448) class. Elements which inherit from the Sys::Group(see [Sys Group class reference], page 409) class can contain nested elements.

Each element has a local coordinate system and stores a Math::Transform (see[Math Transform 3 class reference], page 295)<3> object which describes its translationand rotation relative to the parent coordinate system.

3.3.1 The Lens component

The Sys::Lens (see [Sys Lens class reference], page 416) optical componentis a good example of group component. It is based on the Sys::Group(see [Sys Group class reference], page 409) class so that it can embedSys::OpticalSurface (see [Sys OpticalSurface class reference], page 427) andSys::Stop (see [Sys Stop class reference], page 459) elements.

When displaying the system and ray trace sequence of the tessar lens design describedin the previous section (see Section 3.2 [A photo lens design], page 12), we notice that thesystem hierarchy has been flattened in the sequence:

system:

[1]Goptical::Sys::Lens at [0, 0, 0]

[10]Goptical::Sys::Image at [0, 0, 125.596]

[11]Goptical::Sys::SourceRays at [0, 27.5, -1000]

[12]Goptical::Sys::SourcePoint at [0, 27.5, -1000]

sequence:

[11]Goptical::Sys::SourceRays at [0, 27.5, -1000]

[12]Goptical::Sys::SourcePoint at [0, 27.5, -1000]

[2]Goptical::Sys::OpticalSurface at [0, 0, 0]

[3]Goptical::Sys::OpticalSurface at [0, 0, 4.6278]

[4]Goptical::Sys::OpticalSurface at [0, 0, 10.0452]

[5]Goptical::Sys::OpticalSurface at [0, 0, 13.7735]

[6]Goptical::Sys::Stop at [0, 0, 18.1914]

[7]Goptical::Sys::OpticalSurface at [0, 0, 20.4803]

[8]Goptical::Sys::OpticalSurface at [0, 0, 21.9796]

[9]Goptical::Sys::OpticalSurface at [0, 0, 29.9758]

[10]Goptical::Sys::Image at [0, 0, 125.596]

Positions of optical surfaces are relative to the parent lens position.

3.3.2 A newton telescope with corrector

Object-oriented programming together with the hierarchical optical components organiza-tion in Goptical allows writing complex and dynamically parameterized optical componentmodels composed of simple components.

Using the telescope model

Usage of the newton telescope model class (see [Design Telescope Newton class reference],page 150) is presented here as an example of parameterized models which contain simple

Page 23: Gop Ti Cal

Chapter 3: Tutorial 20

components. The following example shows how to build an optical design composed of alight source, the newton telescope model, a corrector lens assembly and an image plane.

The model constructor is called with the basic newton telescope parameters and themodel internally computes other parameters of the telescope and instantiates internal opticalcomponents as needed.

// code from examples/hierarchical_design/newton.cc:61

Sys::System sys;

// light source

Sys::SourcePoint source(Sys::SourceAtInfinity, Math::vector3_001);

sys.add(source);

// Newton telescope

Design::Telescope::Newton newton(Math::vector3_0, // position

1494.567 / 2., // focal len

245.1); // aperture diameter

sys.add(newton);

We can query the telescope model to get the 3d position of the focal plane within parentcoordinates. This enables us to attach the image plane or next optical component at rightlocation without much calculation.

Adding a corrector

We choose to attach a Wynne 4 lens corrector to the telescope. As usual we describe thecorrector lens group using the Sys::Lens (see [Sys Lens class reference], page 416) compo-nent:

// Wynne 4 lens corrector for parabolic mirrors

Sys::Lens wynne(newton.get_focal_plane(),

-48.4585); // z offset of first surface

// roc ap.radius thickness material

wynne.add_surface(21.496, 23.2 / 2., 1.905, bk7);

wynne.add_surface(24.787, 22.5 / 2., 1.574 );

wynne.add_surface(55.890, 22.5 / 2., 1.270, bk7);

wynne.add_surface(45.164, 21.8 / 2., 18.504 );

wynne.add_surface(29.410, 14.7 / 2., 0.45, bk7);

wynne.add_surface(13.870, 14.1 / 2., 16.086 );

wynne.add_surface(23.617, 13.1 / 2., 1.805, bk7);

wynne.add_surface(0, 12.8 / 2., 9.003);

sys.add(wynne);

// image plane

Sys::Image image(wynne.get_exit_plane(), 15);

Page 24: Gop Ti Cal

Chapter 3: Tutorial 21

sys.add(image);

The first surface of the corrector is located relative to origin of the ‘wynne’ lens componentwith a Z offset of -48.4585 in the lens coordinate system but the whole lens is rotated andpositioned at the telescope focal plane in the parent coordinate system.

Finally an image plane is created and positioned according to the corrector position andlast surface thickness.

Querying model and rendering layouts

The model class may also provide access to some internal construction details:

std::cout << "unvignetted image diameter: "

<< newton.get_unvignetted_image_diameter() << std::endl;

std::cout << "secondary minor axis size: "

<< newton.get_secondary_minor_axis() << std::endl;

std::cout << "secondary offset: "

<< newton.get_secondary_offset() << std::endl;

std::cout << "field angle: "

<< newton.get_field_angle() << std::endl;

2d and 3d layouts of the whole system or groups can be rendered. The following codeuses paging to render two such different views of the system:

Io::RendererSvg svg_renderer("layout.svg", 640, 480);

Io::RendererViewport &renderer = svg_renderer;

// horizontal page layout

renderer.set_page_layout(1, 2);

// 3d system layout on 1st sub-page

renderer.set_page(0);

renderer.set_perspective();

sys.draw_3d_fit(renderer, 300);

sys.draw_3d(renderer);

tracer.get_trace_result().draw_3d(renderer);

// 2d Wynne corrector layout on 2nd sub-page

renderer.set_page(1);

wynne.draw_2d_fit(renderer);

wynne.draw_2d(renderer);

Page 25: Gop Ti Cal

Chapter 3: Tutorial 22

tracer.get_trace_result().draw_2d(renderer, false, &wynne);

Page 26: Gop Ti Cal

Chapter 3: Tutorial 23

3.4 A parameterizable segmented mirror model

This section shows how to take advantages of the hierarchical design (see Section 3.3 [Systemhierarchy and groups], page 19) feature of Goptical to write your own parameterizableoptical component models. The code of a segmented mirror component model is presentedand this new component is used as the primary mirror in a Ritchey-Chretien telescopedesign.

3.4.1 Writing the component model class

The segmented mirror model uses hexagonal segments and takes a surface curvemodel, an aperture shape model, segment size and segment separation as parameters.We start the definition of our model class which inherits from the Sys::Group (see[Sys Group class reference], page 409) class:

// code from examples/segmented_mirror/segmented.cc:62

class HexSegMirror : public Sys::Group

{

public:

HexSegMirror(const Math::VectorPair3 &pos,

const const_ref<Curve::Base> &curve,

const const_ref<Shape::Base> &shape,

Page 27: Gop Ti Cal

Chapter 3: Tutorial 24

double seg_radius, double separation)

: Sys::Group(pos)

{

When the model is instantiated, all hexagonal mirrors need to be created from theconstructor. We use two loops in order to build the hexagonal mirror tessellation:

if (seg_radius > separation)

throw(Error("overlapping segments"));

// sqrt(3)/2

static const double sqrt_3_2 = 0.86602540378443864676;

// hexagonal tessellation

int x_count = ceil(shape->max_radius() / (separation * 1.5));

int y_count = ceil(shape->max_radius() / (separation * 2 * sqrt_3_2));

for (int x = -x_count; x <= x_count ; x++)

{

for (int y = -y_count; y <= y_count ; y++)

{

// find segment mirror 2d position

double yoffset = x % 2 ? separation * sqrt_3_2 : 0;

Math::Vector2 p(x * separation * 1.5,

yoffset + y * separation * 2 * sqrt_3_2 );

The aperture shape is then used to check if a segment mirror must exist at each location:

// skip if segment center is outside main shape

if (!shape->inside(p))

continue;

The segment mirror curve must take into account the offset from the main mirrororigin. We also decide to subtract the sagitta offset from the segment curve and addit to its Z component position instead; this allows its origin to lie on the segment sur-face, which may be more convenient when tilting the segment. The Curve::Composer (see[Curve Composer class reference], page 62) class is used here to apply required transfor-mations to the model curve passed as a parameter:

// find curve z offset at segment center to shift both

// curve and segment in opposite directions.

double z_offset = curve->sagitta(p);

// create a composer curve for this segment and use it to translate main curve

ref<Curve::Composer> seg_curve = ref<Curve::Composer>::create();

seg_curve->add_curve(curve).xy_translate(-p).z_offset(-z_offset);

Page 28: Gop Ti Cal

Chapter 3: Tutorial 25

The segment mirror is then created and added to the model group:

// create a segment mirror with hexagonal shape and translated curve

ref<Sys::Mirror> seg = ref<Sys::Mirror>::create(Math::Vector3(p, z_offset), seg_curve,

ref<Shape::RegularPolygon>::create(seg_radius, 6));

// attach the new segment to our group component

add(seg);

We finally add some code to keep track of the segments so that they can be accessed(and modified) separately after model instantiation:

// keep a pointer to this new segment

_segments.push_back(seg.ptr());

}

}

}

size_t get_segments_count() const

{

return _segments.size();

}

Sys::Mirror & get_segment(size_t i) const

{

return *_segments.at(i);

}

private:

std::vector<Sys::Mirror *> _segments;

};

This model class is less than 70 lines long, including comments.

3.4.2 Using the model in Ritchey-Chretien design

Our new model can now be used like other component models in optical systems and groups.We use it here with a ring aperture shape and conic curvature to model the primary mirrorof a Ritchey-Chretien telescope:

Sys::System sys;

// Ring shaped segmented mirror with conic curve

HexSegMirror primary(Math::Vector3(0, 0, 800),

ref<Curve::Conic>::create(-1600, -1.0869),

ref<Shape::Ring>::create(300, 85),

28, 30);

sys.add(primary);

Sys::Mirror secondary(Math::VectorPair3(0, 0, 225, 0, 0, -1), 675, -5.0434, 100);

Page 29: Gop Ti Cal

Chapter 3: Tutorial 26

sys.add(secondary);

Sys::Image image(Math::VectorPair3(0, 0, 900), 15);

sys.add(image);

Sys::Stop stop(Math::vector3_0, 300);

sys.add(stop);

sys.set_entrance_pupil(stop);

Sys::SourcePoint source(Sys::SourceAtInfinity, Math::vector3_001);

sys.add(source);

Page 30: Gop Ti Cal

Chapter 3: Tutorial 27

3.5 A custom surface curve model

Common curve models are available in the Curve (see [Curve namespace reference],page 55) namespace but extending this set with user-defined models is easy, as explainedin this tutorial.

3.5.1 Writing the curve model class

In this example, we chose to model a rotationally symmetric catenary curve. This curvehas the following sagitta formula:

z = a cosh(ra

)− a

Our curve model needs to provide several functions in order to be useful to the raytracer.Fortunately there are base classes which provide default implementations for most curvemodel functions. This include differentiation functions and ray intersection functions.

The Curve::Rotational (see [Curve Rotational class reference], page 103) class allowsmodeling rotationally symmetric curves by only dealing with 2d formulas. Our model classjust has to inherit from this class and provide an implementation for the ‘sagitta’ function:

// code from examples/curve_model/usercurve.cc:56

class MyCatenaryCurve : public Curve::Rotational

{

public:

MyCatenaryCurve(double a)

: _a(a)

{

}

private:

double sagitta(double r) const

{

return _a * cosh(r / _a) - _a;

}

double _a;

};

The model can be improved by specifying the derivative function. This make calculationsmore efficient by avoiding use of the default numerical differentiation implementation:

double derivative(double r) const

{

return sinh(r / _a);

}

Although more functions from Curve::Base (see [Curve Base class reference], page 59)and Curve::Rotational (see [Curve Rotational class reference], page 103) can be reimple-mented to further improve model efficiency, this curve model can readily be used in anoptical design.

Page 31: Gop Ti Cal

Chapter 3: Tutorial 28

3.5.2 Using the new model in optical design

To check our model, we then use it in a simple optical system composed of a point source,a mirror and an image plane. The catenary mirror resemble a parabolic mirror as used ina newton telescope.

Sys::System sys;

// light source

Sys::SourcePoint source(Sys::SourceAtInfinity, Math::vector3_001);

sys.add(source);

// mirror

Shape::Disk shape(200);

MyCatenaryCurve curve(-3000);

Sys::Mirror primary(Math::Vector3(0, 0, 1500), curve, shape);

sys.add(primary);

// image plane

Sys::Image image(Math::vector3_0, 15);

sys.add(image);

The best point of focus is slightly offset from the parabola focal length. We use theAnalysis::Focus (see [Analysis Focus class reference], page 45) class to find the best pointof focus and move the image plane at this location:

Analysis::Focus focus(sys);

image.set_plane(focus.get_best_focus());

Finally we plot some spot diagrams using the Analysis::Spot (see [Analysis Spot class reference],page 51) class. The point light source is rotated for each diagram:

Io::RendererSvg renderer("spot.svg", 200 * 3, 200 * 2, Io::rgb_black);

renderer.set_margin_ratio(.35, .25, .1, .1);

renderer.set_page_layout(3, 2);

for (int i = 0; i < 6; i++)

{

Analysis::Spot spot(sys);

renderer.set_page(i);

spot.draw_diagram(renderer);

source.rotate(0, .1, 0);

}

Page 32: Gop Ti Cal

Chapter 3: Tutorial 29

Page 33: Gop Ti Cal

Chapter 4: API documentation 30

4 API documentation

4.1 Modules

Name DescriptionCore Goptical core classesDesign Parametrizable optical designs classes

4.2 Namespaces list

Name DescriptionAnalysis Optical systems analysis toolsCurve Surface curvature modelsData Numerical data interpolation and plottingDesign Design module classesIo Data input/output and graphical renderingLight Physical properties of lightMaterial Material models for optical componentsMath Mathematical tools and functionsShape 2d shapes used for surface contoursSys Optical system and componentsTrace Ray tracer and light propagation

4.3 Classes list

Name DescriptionAnalysis::Focus Best focus point analysisAnalysis::RayFan RayFan diagram analysisAnalysis::Spot Spot diagram analysisCurve::Array Enable definition of curve as square and hexagonal ar-

ray of an other curve

Curve::Base Base class for surface curvature modelsCurve::Composer Enable definition of curve as composition of other

curves

Curve::Composer::Attributes Curve::Composer base curve attributes.Curve::Conic General purpose conic curve modelCurve::Flat Flat curveCurve::Foucault Define surface curve from Foucault test data.Curve::Grid Define surface curve from interpolated grid data set.Curve::Parabola Parabola curve modelCurve::Polynomial Even and odd polynomial curve implementation.Curve::Sphere Spherical curve modelCurve::Spline Rotationally symmetric spline curve implementationCurve::Zernike Define surface curve from Zernike polynomials

Page 34: Gop Ti Cal

Chapter 4: API documentation 31

Curve::ConicBase Base class for conic family of curvesCurve::CurveRoc Base class for curves with a radius of curvatureCurve::Rotational Base class for rotationally symmetric curves.Data::DiscreteSet 1d numerical data set with interpolationData::Grid 2d numerical data set with interpolation.Data::Plot Data plots containerData::PlotData Data set plotData::SampleSet 1d fixed interval numerical data set with interpolationData::Set Base class for numerical data sets.Data::Set1d Base class for 1d y = f(x) numerical data setDesign::Telescope::Cassegrain Cassegrain telescopes modelDesign::Telescope::Newton Newton telescope optical designDesign::Telescope::Telescope Base class for telescope optical designsError Base class used for Goptical exceptions.Io::ImportOslo Oslo files loaderIo::ImportZemax Zemax files loader (experimental)Io::Renderer Base class for rendering driversIo::RendererDxf DXF rendering driver base (experimental)Io::RendererGd GD rendering driverIo::RendererOpengl OpenGL rendering driverIo::RendererPlplot Plplot rendering driverIo::RendererSvg SVG file rendering driverIo::RendererX11 X11 rendering driverIo::RendererX3d X3d rendering driver (experimental)Io::Export File export class interfaceIo::Import File import class interfaceIo::RendererAxes RendererAxes rendering descriptorIo::RendererViewport Base class for viewport based rendering driversIo::Rgb RGB color descriptorLight::Ray Describe a ray of lightLight::SpectralLine Describe a spectral lineMaterial::Abbe Abbe model for optical glass materialMaterial::Air Air optical material modelMaterial::Base Optical material base class.Material::Catalog Hold a glass material catalogMaterial::Conrady Conrady model for optical glass materialMaterial::DispersionTable Interpolated refractive index data set modelMaterial::Herzberger Herzberger model for optical glass materialMaterial::Metal Metal optical material model.Material::Mil Mil glass code material modelMaterial::Mirror Simple mirror optical material model.Material::Schott Schott model for optical glass materialMaterial::Sellmeier Sellmeier model for optical glass materialMaterial::SellmeierMod Modified sellmeier model for optical glass materialMaterial::Vacuum Vacuum optical material modelMaterial::Dielectric Dielectric optical material model base class.Material::Proxy Optical material proxy class.

Page 35: Gop Ti Cal

Chapter 4: API documentation 32

Material::Solid Solid optical material base class.Math::Matrix NxN square matrix class.Math::Quaternion Quaternion class.Math::Transform<3> 3d linear and affine transformation class.Math::Transform<2> 2d linear and affine transformation class.Math::Triangle N dimension triangle classMath::Triangle<3> 3d triangle classMath::Vector N dimension vector classMath::Vector<3, T> 3d vector classMath::Vector<2, T> 2d vector classMath::VectorPair Vector pair classMath::VectorPair<2> Vector pair classMath::VectorPair<3> Vector pair classShape::Base Base class for contour 2d shapesShape::Composer Enable definition of shape as composition ot other

shapes (experimental)

Shape::Composer::Attributes Enable definition of shape as composition ot othershapes (experimental)

Shape::Disk Disk shapeShape::Ellipse Ellipse shapeShape::EllipticalRing Elliptical ring shapeShape::Infinite Borderless shapeShape::Polygon Polygon shapeShape::Rectangle Rectangle and square shapeShape::RegularPolygon Regular Polygon shapeShape::Ring Ring shapeSys::Group Optical elements group elementSys::Image Image plane optical elementSys::Lens Lens optical elementSys::Mirror Reflecting optical surface elementSys::OpticalSurface Optical surface elementSys::SourcePoint Point light sourceSys::SourceRays Custom rays light sourceSys::System Optical systemSys::Container Base class for System and GroupSys::Element Optical element base classSys::Source Base class for light sourcesSys::Stop Aperture stop elementSys::Surface Base class for surfacesTrace::Distribution Ray distribution pattern descriptorTrace::Params Light propagation parameters descriptorTrace::Result Store light propagation resultTrace::Sequence Defines light propagation elemets order for sequential

light propagation

Trace::Tracer Light propagation algorithmsTrace::Ray Propagated light ray class

Page 36: Gop Ti Cal

Chapter 4: API documentation 33

4.4 Main classes

Sys namespace

Name DescriptionGroup Optical elements group elementImage Image plane optical elementLens Lens optical elementMirror Reflecting optical surface elementOpticalSurface Optical surface elementSourcePoint Point light sourceSourceRays Custom rays light sourceSystem Optical system

Trace namespace

Name DescriptionDistribution Ray distribution pattern descriptorParams Light propagation parameters descriptorResult Store light propagation resultSequence Defines light propagation elemets order for sequential light

propagation

Tracer Light propagation algorithms

Material namespace

Name DescriptionAbbe Abbe model for optical glass materialAir Air optical material modelBase Optical material base class.Catalog Hold a glass material catalogConrady Conrady model for optical glass materialDispersionTable Interpolated refractive index data set modelHerzberger Herzberger model for optical glass materialMetal Metal optical material model.Mil Mil glass code material modelMirror Simple mirror optical material model.Schott Schott model for optical glass materialSellmeier Sellmeier model for optical glass materialSellmeierMod Modified sellmeier model for optical glass materialVacuum Vacuum optical material model

Io namespace

Name DescriptionImportOslo Oslo files loader

Page 37: Gop Ti Cal

Chapter 4: API documentation 34

ImportZemax Zemax files loader (experimental)Renderer Base class for rendering driversRendererDxf DXF rendering driver base (experimental)RendererGd GD rendering driverRendererOpengl OpenGL rendering driverRendererPlplot Plplot rendering driverRendererSvg SVG file rendering driverRendererX11 X11 rendering driverRendererX3d X3d rendering driver (experimental)

Data namespace

Name DescriptionDiscreteSet 1d numerical data set with interpolationGrid 2d numerical data set with interpolation.Plot Data plots containerPlotData Data set plotSampleSet 1d fixed interval numerical data set with interpolation

Math namespace

Name DescriptionVector2Vector3VectorPair3

Shape namespace

Name DescriptionBase Base class for contour 2d shapesComposer Enable definition of shape as composition ot other shapes

(experimental)

Disk Disk shapeEllipse Ellipse shapeEllipticalRing Elliptical ring shapeInfinite Borderless shapePolygon Polygon shapeRectangle Rectangle and square shapeRegularPolygon Regular Polygon shapeRing Ring shape

Light namespace

Name DescriptionRay Describe a ray of light

Page 38: Gop Ti Cal

Chapter 4: API documentation 35

Curve namespace

Name DescriptionArray Enable definition of curve as square and hexagonal array of

an other curve

Base Base class for surface curvature modelsComposer Enable definition of curve as composition of other curvesConic General purpose conic curve modelFlat Flat curveFoucault Define surface curve from Foucault test data.Grid Define surface curve from interpolated grid data set.Parabola Parabola curve modelPolynomial Even and odd polynomial curve implementation.Sphere Spherical curve modelSpline Rotationally symmetric spline curve implementationZernike Define surface curve from Zernike polynomials

Analysis namespace

Name DescriptionFocus Best focus point analysisRayFan RayFan diagram analysisSpot Spot diagram analysis

Page 39: Gop Ti Cal

Chapter 4: API documentation 36

::Core module reference

Description

Classes from this module are located in the ‘goptical-core’ subpackage (‘goptical’ li-brary).

Members

Namespaces

• Goptical::Analysis

• Goptical::Curve

• Goptical::Data

• Goptical::Io

• Goptical::Light

• Goptical::Material

• Goptical::Math

• Goptical::Shape

• Goptical::Sys

• Goptical::Trace

Types

• template class Abbe

• template class Air

• class Array

• class Base

• class Base

• class Base

• class Catalog

• class Composer

• class Composer

• class Conic

• class Conrady

• class DiscreteSet

• class Disk

• class DispersionTable

• class Distribution

• class Ellipse

• class EllipticalRing

• class Flat

• class Focus

Page 40: Gop Ti Cal

Chapter 4: API documentation 37

• class Foucault

• class Grid

• class Grid

• class Group

• class Herzberger

• class Image

• class ImportOslo

• class ImportZemax

• class Infinite

• class Lens

• class Metal

• class Mil

• class Mirror

• class Mirror

• class OpticalSurface

• class Parabola

• class Params

• class Plot

• class PlotData

• class Polygon

• class Polynomial

• class Ray

• class RayFan

• class Rectangle

• class RegularPolygon

• class Renderer

• class RendererDxf

• class RendererGd

• class RendererOpengl

• class RendererPlplot

• class RendererSvg

• class RendererX11

• class RendererX3d

• class Result

• class Ring

• class SampleSet

• class Schott

• class Sellmeier

• template class SellmeierMod

Page 41: Gop Ti Cal

Chapter 4: API documentation 38

• class Sequence

• class SourcePoint

• class SourceRays

• class Sphere

• class Spline

• class Spot

• class System

• class Tracer

• class Vacuum

• typedef [...] Vector2

• typedef [...] Vector3

• typedef [...] VectorPair3

• class Zernike

• typedef [...] AbbeVd

• typedef [...] AbbeVe

• typedef [...] AirBirch94

• typedef [...] AirKohlrausch68

• class Attributes

• class Attributes

• class ConicBase

• class Container

• class CurveRoc

• class Dielectric

• class Element

• class Error

• class Export

• typedef [...] Handbook1

• typedef [...] Handbook2

• class Import

• template struct Matrix

• typedef [...] Matrix3x3

• class Proxy

• class Quaternion

• class Ray

• class RendererAxes

• class RendererViewport

• struct Rgb

• class Rotational

• typedef [...] SellmeierMod2

Page 42: Gop Ti Cal

Chapter 4: API documentation 39

• class Set

• class Set1d

• class Solid

• class Source

• class SpectralLine

• class Stop

• class Surface

• template class Transform<2>

• template class Transform<3>

• typedef [...] Transform2

• typedef [...] Transform3

• template struct Triangle

• template struct Triangle<3>

• template struct Vector

• template struct Vector<2, T>

• template struct Vector<3, T>

• template struct VectorPair

• template struct VectorPair<2>

• template struct VectorPair<3>

• typedef [...] VectorPair2

• typedef [...] range t

• typedef [...] rays queue t

Functions

• double degree2rad(double x)

• void get rotation matrix(Goptical::Math::Matrix<2> &m, unsigned int axis, doublerangle)

• void get rotation matrix(Goptical::Math::Matrix<3> &m, unsigned int axis, doublerangle)

• double lp floor(double x, double n)

• double lp mod(double x, double n)

• template std::ostream & operator<<(std::ostream &o, const Gopti-cal::Math::VectorBase<N, T> &v)

• template std::ostream & operator<<(std::ostream &o, const Gopti-cal::Math::VectorPairBase<N> &l)

• template std::ostream & operator<<(std::ostream &o, const Gopti-cal::Math::Matrix<N> &m)

• std::ostream & operator<<(std::ostream &o, const Goptical::Math::Quaternion &q)

• template std::ostream & operator<<(std::ostream &o, const Gopti-cal::Math::TransformBase<N> &t)

Page 43: Gop Ti Cal

Chapter 4: API documentation 40

• std::ostream & operator<<(std::ostream &o, const Goptical::Sys::Element &e)

• template std::ostream & operator<<(std::ostream &o, const Gopti-cal::Math::Triangle<N> &l)

• std::ostream & operator<<(std::ostream &o, const Goptical::Trace::Sequence &s)

• std::ostream & operator<<(std::ostream &o, const Goptical::Sys::Container &v)

• std::ostream & operator<<(std::ostream &o, const Goptical::Data::Set &s)

• double rad2degree(double x)

• double square(double x)

Constants

• const dpp::const ref<Goptical::Material::Base> none

• const Goptical::Io::Rgb rgb black

• const Goptical::Io::Rgb rgb blue

• const Goptical::Io::Rgb rgb cyan

• const Goptical::Io::Rgb rgb gray

• const Goptical::Io::Rgb rgb green

• const Goptical::Io::Rgb rgb magenta

• const Goptical::Io::Rgb rgb red

• const Goptical::Io::Rgb rgb table[]

• const size t rgb table size

• const Goptical::Io::Rgb rgb white

• const Goptical::Io::Rgb rgb yellow

• const Goptical::Material::AirBirch94 std air

• const Goptical::Math::Vector2 vector2 0

• const Goptical::Math::Vector2 vector2 01

• const Goptical::Math::Vector2 vector2 1

• const Goptical::Math::Vector2 vector2 10

• const Goptical::Math::VectorPair<2> vector2 pair 00

• const Goptical::Math::VectorPair<2> vector2 pair 01

• const Goptical::Math::Vector3 vector3 0

• const Goptical::Math::Vector3 vector3 001

• const Goptical::Math::Vector3 vector3 010

• const Goptical::Math::Vector3 vector3 1

• const Goptical::Math::Vector3 vector3 100

• const Goptical::Math::VectorPair<3> vector3 pair 00

• const Goptical::Math::VectorPair<3> vector3 pair 01

Page 44: Gop Ti Cal

Chapter 4: API documentation 41

Variables

• Goptical::Material::AirBirch94 air

• Goptical::Curve::Flat flat

• Goptical::Shape::Infinite infinite

• Goptical::Material::Mirror mirror

• Goptical::Material::Vacuum vacuum

Page 45: Gop Ti Cal

Chapter 4: API documentation 42

::Design module reference

Description

This module contains various optical design models.

Classes from this module are located in the ‘goptical-design’ subpackage(‘goptical_design’ library).

Members

Namespace

• Goptical::Design

Types

• template class Cassegrain

• class Newton

• class Telescope

Page 46: Gop Ti Cal

Chapter 4: API documentation 43

Goptical namespace reference

Description

Goptical library namespace

Members

Namespaces

• Analysis

• Curve

• Data

• Design

• Io

• Light

• Material

• Math

• Shape

• Sys

• Trace

Type

• class Error

Page 47: Gop Ti Cal

Chapter 4: API documentation 44

Analysis namespace reference

Description

Optical systems analysis tools

Members

Types

• class Focus

• class RayFan

• class Spot

Page 48: Gop Ti Cal

Chapter 4: API documentation 45

Analysis::Focus class reference

Declaration

#include <Goptical/Analysis/Focus>

namespace Goptical {

namespace Analysis {

class Focus;

};

};

This class is a member of the Analysis namespace.

Description

This class is designed to find the best point of focus of an optical system.

Members

See also the full member list (see [Analysis Focus class full member list], page 46) sectionfor this class.

Functions

• Focus(Sys::System &system)

• const Math::VectorPair3 & get best focus()

• Trace::Tracer & get tracer()

• const Trace::Tracer & get tracer() const

• virtual void invalidate()

• void set image(Sys::Image *image)

Members detail

Focus(Sys::System &system)

No documentation available

const Math::VectorPair3 & get best focus()

Get best point of focus in system global coordinates.

virtual void invalidate()

This virtual function implements the invalidate (see [_31], page 54) pure function de-clared in the PointImage base abstract class.

Documentation inherited from base class:

invalidate current analysis data

Page 49: Gop Ti Cal

Chapter 4: API documentation 46

Analysis::Focus class full member list

Functions

• Focus(Sys::System &system)

• const Math::VectorPair3 & get best focus()

• Trace::Tracer & get tracer()

• const Trace::Tracer & get tracer() const

• virtual void invalidate()

• void set image(Sys::Image *image)

Page 50: Gop Ti Cal

Chapter 4: API documentation 47

Analysis::RayFan class reference

Declaration

#include <Goptical/Analysis/RayFan>

namespace Goptical {

namespace Analysis {

class RayFan;

};

};

This class is a member of the Analysis namespace.

Description

This class is designed to compute various ray fan plots.

See also Performing a ray fan analysis (see Section 3.1.4 [Performing a ray fan analysis],page 10) section and Plotting ray fans (see Section 3.2.4 [Plotting ray fans], page 15) section.

Members

See also the full member list (see [Analysis RayFan class full member list], page 50) sectionfor this class.

Types

• enum rayfan plane e

• enum rayfan plot type e

Functions

• RayFan(const Sys::System &system, rayfan plane e plane = [...])

• Trace::Distribution & get distribution()

• ref<Data::Plot> get plot(rayfan plot type e x, rayfan plot type e y)

• void invalidate()

• void set aberration plane(rayfan plane e plane)

• void set entrance surface(const Sys::Surface &s)

• void set longitudinal reference(const Math::VectorPair3 &ref)

• void set plane(rayfan plane e plane)

• void set target surface(const Sys::Surface &s)

Members detail

RayFan(const Sys::System &system, rayfan plane e plane =TangentialAberration)

No documentation available

Trace::Distribution & get distribution()

Get internal distribution object

Page 51: Gop Ti Cal

Chapter 4: API documentation 48

ref <Data::Plot> get plot(rayfan plot type e x, rayfan plot type ey)

Get aberration plot, requested x value is plotted against requested y value.

void invalidate()

Invalidate current analysis data and raytrace again on next plot request

enum rayfan plane e

Specify aberration analysis plane on target surface

Identifier DescriptionSagittalAberrationTangentialAberration

enum rayfan plot type e

Specify ray aberration values to plot. Angle and Distance aberrations values are consid-ered in selected aberration plane. Entrance Height and Angle are considered in selecteddistribution plane.

Identifier DescriptionEntranceHeight Normalized ray height (radial distance) on entrance pupil

EntranceAngle Angle of ray on entrance pupil

TransverseDistance Distance on the surface from the intercept of the chief ray

LongitudinalDistance Distance along the chief ray from the surface to the measuredray.

ImageAngle Angle of ray striking the target surface

ExitAngle Angle of ray leaving (generated by) the target surface

OpticalPathDiff Optical path difference in waves

void set aberration plane(rayfan plane e plane)

Aberrations are considered in the given plane on the target surface. Default is to use thesame plane as entrance pupil ray distribution plane.

void set entrance surface(const Sys::Surface &s)

Specify entrance pupil surface to use for analysis, query system for entrance pupil if nonedefined here.

Page 52: Gop Ti Cal

Chapter 4: API documentation 49

void set longitudinal reference(const Math::VectorPair3 &ref)

Set longitudinal reference ray (local to target surface). Longitudinal aberration computesdistance between each rays and target surface plane along this reference vector. Defaultvalue is along the Z axis.

void set plane(rayfan plane e plane)

Set entrance pupil ray distribution plane.

void set target surface(const Sys::Surface &s)

Specify target surface (image or exit pupil) to use for analysis, query system for imagesurface if none defined here.

Page 53: Gop Ti Cal

Chapter 4: API documentation 50

Analysis::RayFan class full member list

Types

• enum rayfan plane e

• enum rayfan plot type e

Functions

• RayFan(const Sys::System &system, rayfan plane e plane = [...])

• Trace::Distribution & get distribution()

• ref<Data::Plot> get plot(rayfan plot type e x, rayfan plot type e y)

• void invalidate()

• void set aberration plane(rayfan plane e plane)

• void set entrance surface(const Sys::Surface &s)

• void set longitudinal reference(const Math::VectorPair3 &ref)

• void set plane(rayfan plane e plane)

• void set target surface(const Sys::Surface &s)

Page 54: Gop Ti Cal

Chapter 4: API documentation 51

Analysis::Spot class reference

Declaration

#include <Goptical/Analysis/Spot>

namespace Goptical {

namespace Analysis {

class Spot;

};

};

This class is a member of the Analysis namespace.

Description

This class is designed to plot spot diagram and perform related analysis.

See also Plotting spot diagram (see Section 3.2.3 [Plotting spot diagram], page 13) sectionand Using the new model in optical design (see Section 3.5.2 [Using the new model in opticaldesign], page 28) section.

Members

See also the full member list (see [Analysis Spot class full member list], page 53) sectionfor this class.

Functions

• Spot(Sys::System &system)

• void draw diagram(Io::RendererViewport &renderer, bool centroid origin = [...])

• void draw spot(Io::RendererViewport &renderer)

• Math::Vector3 get center()

• const Math::Vector3 & get centroid()

• Io::RendererAxes & get diagram axes()

• double get encircled intensity(double radius)

• ref<Data::Plot> get encircled intensity plot(int zones = [...])

• double get max radius()

• double get rms radius()

• double get total intensity()

• Trace::Tracer & get tracer()

• const Trace::Tracer & get tracer() const

• virtual void invalidate()

• void set image(Sys::Image *image)

• void set useful radius(double radius)

Members detail

Page 55: Gop Ti Cal

Chapter 4: API documentation 52

Spot(Sys::System &system)

No documentation available

void draw diagram(Io::RendererViewport &renderer, boolcentroid origin = true)

draw the spot diagram

void draw spot(Io::RendererViewport &renderer)

draw the rays intersection points only

Math::Vector3 get center()

Get spot window center

const Math::Vector3 & get centroid()

Get spot centroid

Io::RendererAxes & get diagram axes()

Get a reference to axes object rendered with spot diagram. Io::RendererAxes (see[Io RendererAxes class reference], page 199) coordinates are updated on ray trace.

double get encircled intensity(double radius)

Get amount of light intensity which falls in given radius from spot center

ref <Data::Plot> get encircled intensity plot(int zones = 100)

Get encircled energy plot

double get max radius()

Get spot maximum radius

double get rms radius()

Get spot root mean square radius

double get total intensity()

Get amount of light intensity in the whole spot

virtual void invalidate()

This virtual function implements the invalidate (see [_31], page 54) pure function de-clared in the PointImage base abstract class.

Documentation inherited from base class:

invalidate current analysis data

void set useful radius(double radius)

Set radius used for diagram drawing and encircled plots. Updated with spot max radius onray trace

Page 56: Gop Ti Cal

Chapter 4: API documentation 53

Analysis::Spot class full member list

Functions

• Spot(Sys::System &system)

• void draw diagram(Io::RendererViewport &renderer, bool centroid origin = [...])

• void draw spot(Io::RendererViewport &renderer)

• Math::Vector3 get center()

• const Math::Vector3 & get centroid()

• Io::RendererAxes & get diagram axes()

• double get encircled intensity(double radius)

• ref<Data::Plot> get encircled intensity plot(int zones = [...])

• double get max radius()

• double get rms radius()

• double get total intensity()

• Trace::Tracer & get tracer()

• const Trace::Tracer & get tracer() const

• virtual void invalidate()

• void set image(Sys::Image *image)

• void set useful radius(double radius)

Page 57: Gop Ti Cal

Chapter 4: API documentation 54

Analysis::PointImage internal class members

PointImage(Sys::System &system)

No documentation available

virtual ~PointImage()

No documentation available

Trace::Tracer & get tracer()

return tracer object used for ray tracing. This will invalidate current analysis data

const Trace::Tracer & get tracer() const

return tracer object used for ray tracing

virtual void invalidate() = 0;

invalidate current analysis data

void set image(Sys::Image *image)

set Image which collect rays for analysis

Page 58: Gop Ti Cal

Chapter 4: API documentation 55

Curve namespace reference

Description

Surface curvature models

Members

Types

• class Array

• class Base

• class Composer

• class Conic

• class Flat

• class Foucault

• class Grid

• class Parabola

• class Polynomial

• class Sphere

• class Spline

• class Zernike

• class ConicBase

• class CurveRoc

• class Rotational

Variable

• Flat flat

Members detail

Flat flat

Preallocated flat curve object

Page 59: Gop Ti Cal

Chapter 4: API documentation 56

Curve::Array class reference

Declaration

#include <Goptical/Curve/Array>

namespace Goptical {

namespace Curve {

class Array;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class provides a way to build an array of an other curve. It can be used to designlenses array.

Members

See also the full member list (see [Curve Array class full member list], page 58) section forthis class.

Inherited members

• 5 members inherited from Base (see [Curve Base class reference], page 59)

Type

• enum pattern e

Functions

• Array(const const ref<Base> &curve, double pitch, pattern e p = [...])

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double sagitta(const Math::Vector2 &xy) const

Members detail

Array(const const ref <Base> &curve, double pitch, pattern e p =Square)

No documentation available

virtual void derivative(const Math::Vector2 &xy, Math::Vector2&dxdy) const

This virtual function overrides the derivative (see [_39], page 59) virtual function de-fined in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve x and y derivative (gradient) at specified point

Page 60: Gop Ti Cal

Chapter 4: API documentation 57

enum pattern e

Specify tessellation pattern used by Array (see [Curve Array class reference], page 56) class

Identifier DescriptionSquareSquareCenterHexagonal

virtual double sagitta(const Math::Vector2 &xy) const

This virtual function implements the sagitta (see [_42], page 60) pure function de-clared in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve sagitta at specified point

Page 61: Gop Ti Cal

Chapter 4: API documentation 58

Curve::Array class full member list

Type

• enum pattern e

Functions

• Array(const const ref<Base> &curve, double pitch, pattern e p = [...])

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

Page 62: Gop Ti Cal

Chapter 4: API documentation 59

Curve::Base class reference

Declaration

#include <Goptical/Curve/Base>

namespace Goptical {

namespace Curve {

class Base;

};

};

This class is a member of the Curve namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This class defines an interface for surface curvature implementations. Curvature is definedas a surface curve in three dimensional space. It is mainly used by the Sys::Surface (see[Sys Surface class reference], page 463) class to describe optical surface curvature.

It provides access to sagitta (z) and gradient data on any curved surface point (x, y).Ability to find point of intersection between a given 3d ray and the curve is also provided.

See also A custom surface curve model (see Section 3.5 [A custom surface curve model],page 27) section.

Members

See also the full member list (see [Curve Base class full member list], page 61) section forthis class.

Functions

• virtual ~Base()

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const = 0;

Members detail

virtual ~Base()

No documentation available

virtual void derivative(const Math::Vector2 &xy, Math::Vector2&dxdy) const

Get curve x and y derivative (gradient) at specified point

Page 63: Gop Ti Cal

Chapter 4: API documentation 60

virtual bool intersect(Math::Vector3 &point, constMath::VectorPair3 &ray) const

Get intersection point between curve and 3d ray. Return false if no intersection occurred

virtual void normal(Math::Vector3 &normal, const Math::Vector3&point) const

Get normal to curve surface at specified point

virtual double sagitta(const Math::Vector2 &xy) const = 0;

Get curve sagitta at specified point

Page 64: Gop Ti Cal

Chapter 4: API documentation 61

Curve::Base class full member list

Functions

• virtual ~Base()

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const = 0;

Page 65: Gop Ti Cal

Chapter 4: API documentation 62

Curve::Composer class reference

Declaration

#include <Goptical/Curve/Composer>

namespace Goptical {

namespace Curve {

class Composer;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class allows definition of a surface curve using the sum of several base curves. Eachbase curve involved can be translated, rotated and scaled individually.

Members

See also the full member list (see [Curve Composer class full member list], page 64) sectionfor this class.

Inherited members

• 5 members inherited from Base (see [Curve Base class reference], page 59)

Type

• class Attributes

Functions

• Composer()

• Attributes & add curve(const const ref<Base> &curve)

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double sagitta(const Math::Vector2 &xy) const

Members detail

Composer()

No documentation available

Attributes & add curve(const const ref <Base> &curve)

Add a base curve to use for composition. The returned Composer::Attributes object maybe used to apply base curve transformations.

Page 66: Gop Ti Cal

Chapter 4: API documentation 63

virtual void derivative(const Math::Vector2 &xy, Math::Vector2&dxdy) const

This virtual function overrides the derivative (see [_39], page 59) virtual function de-fined in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve x and y derivative (gradient) at specified point

virtual double sagitta(const Math::Vector2 &xy) const

This virtual function implements the sagitta (see [_42], page 60) pure function de-clared in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve sagitta at specified point

Page 67: Gop Ti Cal

Chapter 4: API documentation 64

Curve::Composer class full member list

Type

• class Attributes

Functions

• Composer()

• Attributes & add curve(const const ref<Base> &curve)

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

Page 68: Gop Ti Cal

Chapter 4: API documentation 65

Curve::Composer::Attributes class reference

Declaration

#include <Goptical/Curve/Composer>

namespace Goptical {

namespace Curve {

class Composer {

class Attributes;

};

};

};

This class is a member of the Composer class.

Description

This class enables access to Composer base curve transformations. Sagitta (z) scaling and(x, y) affine transforms (translation, rotation, scaling) can be applied as needed in anyorder.

Members

See also the full member list (see [Curve Composer Attributes class full member list],page 67) section for this class.

Functions

• Attributes & rotate(double dangle)

• Attributes & xy scale(const Math::Vector2 &factor)

• Attributes & xy translate(const Math::Vector2 &offset)

• Attributes & z offset(double zoffset)

• Attributes & z scale(double zfactor)

Members detail

Attributes & rotate(double dangle)

Apply rotation affine transform. Angle is in degree.

Attributes & xy scale(const Math::Vector2 &factor)

Apply scaling affine transform using scale factors (xscale, yscale)

Attributes & xy translate(const Math::Vector2 &offset)

Apply translation transform

Attributes & z offset(double zoffset)

Apply sagitta (z) offset. default is 0

Page 69: Gop Ti Cal

Chapter 4: API documentation 66

Attributes & z scale(double zfactor)

Apply sagitta (z) scale factor. default is 1

Page 70: Gop Ti Cal

Chapter 4: API documentation 67

Curve::Composer::Attributes class full member list

Functions

• Attributes & rotate(double dangle)

• Attributes & xy scale(const Math::Vector2 &factor)

• Attributes & xy translate(const Math::Vector2 &offset)

• Attributes & z offset(double zoffset)

• Attributes & z scale(double zfactor)

Page 71: Gop Ti Cal

Chapter 4: API documentation 68

Curve::Conic class reference

Declaration

#include <Goptical/Curve/Conic>

namespace Goptical {

namespace Curve {

class Conic;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class models a rotationally symmetric conic curves with given radius of curvatureand deformation coefficient. The later can be provided either as Schwarzschild constant orEccentricity value.

Fitting can be used to find best fit conic of an other rotationally symmetric curve eitherwith fixed or free deformation parameter.

Sphere (see [Curve Sphere class reference], page 88) and Parabola (see[Curve Parabola class reference], page 82) offer optimized implementations for commonspecial cases.

Members

See also the full member list (see [Curve Conic class full member list], page 70) section forthis class.

Inherited members

• 13 members inherited from ConicBase (see [Curve ConicBase class reference], page 98)

Functions

• Conic(double roc, double sc)

• virtual double derivative(double r) const

• double fit(const Rotational &curve, double radius, unsigned int count)

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual double sagitta(double r) const

• void set eccentricity(double e)

• void set schwarzschild(double sc)

Members detail

Conic(double roc, double sc)

Creates a conic curve with given radius of curvature and Schwarzschild constant

Page 72: Gop Ti Cal

Chapter 4: API documentation 69

virtual double derivative(double r) const

This virtual function implements the derivative (see [_130], page 98) pure functiondeclared in the ConicBase (see [Curve_ConicBase_class_reference], page 98) baseabstract class.

Documentation inherited from base class:

Get curve derivative at specified distance from origin.

• r: distance from curve origin (0, 0)

double fit(const Rotational &curve, double radius, unsigned intcount)

Adjust radius of curvature and deformation to best fit given curve

Parameters list:

• curve: Curve to fit

• radius: Maximum radius used to get sample points

• count: Number of sample points to use

virtual bool intersect(Math::Vector3 &point, constMath::VectorPair3 &ray) const

This virtual function implements the intersect (see [_134], page 99) pure function de-clared in the ConicBase (see [Curve_ConicBase_class_reference], page 98) base ab-stract class.

Documentation inherited from base class:

Get intersection point between curve and 3d ray. Return false if no intersection occurred

virtual double sagitta(double r) const

This virtual function implements the sagitta (see [_135], page 99) pure function de-clared in the ConicBase (see [Curve_ConicBase_class_reference], page 98) base ab-stract class.

Documentation inherited from base class:

Get curve sagitta at specified distance from origin.

• r: distance from curve origin (0, 0)

void set eccentricity(double e)

Set eccentricity

void set schwarzschild(double sc)

Set Schwarzschild constant

Page 73: Gop Ti Cal

Chapter 4: API documentation 70

Curve::Conic class full member list

Functions

• Conic(double roc, double sc)

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double derivative(double r) const

• double fit(const Rotational &curve, double radius, unsigned int count)

• double fit roc(const Rotational &c, double radius, unsigned int count)

• double get eccentricity() const

• double get roc() const

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• double get schwarzschild() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

• virtual double sagitta(double r) const

• void set eccentricity(double e)

• void set roc(double roc)

• void set schwarzschild(double sc)

Page 74: Gop Ti Cal

Chapter 4: API documentation 71

Curve::Flat class reference

Declaration

#include <Goptical/Curve/Flat>

namespace Goptical {

namespace Curve {

class Flat;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

The global variable flat (see [ 33], page 55) provides an instance of this class.

Members

See also the full member list (see [Curve Flat class full member list], page 73) section forthis class.

Inherited members

• 9 members inherited from Rotational (see [Curve Rotational class reference], page 103)

Functions

• Flat()

• virtual double derivative(double r) const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(double r) const

Members detail

Flat()

Creates a flat curve

virtual double derivative(double r) const

This virtual function overrides the derivative (see [_139], page 103) virtual functiondefined in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get curve derivative at specified distance from origin.

• r: distance from curve origin (0, 0)

Page 75: Gop Ti Cal

Chapter 4: API documentation 72

virtual bool intersect(Math::Vector3 &point, constMath::VectorPair3 &ray) const

This virtual function overrides the intersect (see [_40], page 60) virtual function de-fined in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get intersection point between curve and 3d ray. Return false if no intersection occurred

virtual void normal(Math::Vector3 &normal, const Math::Vector3&point) const

This virtual function overrides the normal (see [_143], page 104) virtual function de-fined in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get normal to curve surface at specified point

virtual double sagitta(double r) const

This virtual function implements the sagitta (see [_144], page 104) pure function de-clared in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get curve sagitta at specified distance from origin.

• r: distance from curve origin (0, 0)

Page 76: Gop Ti Cal

Chapter 4: API documentation 73

Curve::Flat class full member list

Functions

• Flat()

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double derivative(double r) const

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

• virtual double sagitta(double r) const

Page 77: Gop Ti Cal

Chapter 4: API documentation 74

Curve::Foucault class reference

Declaration

#include <Goptical/Curve/Foucault>

namespace Goptical {

namespace Curve {

class Foucault;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class allows definition of a rotationally symmetric curve from a set of Foucault testdata. Fixed and moving light sources are supported.

Curve fitting can be used to find Foucault test readings from any other rotationallysymmetric curve.

Foucault test data are reduced using numerical integration of a differential equation tocompute sagitta from slopes.

Foucault data reduction algorithm based on "ATM Mirror Mathematics"http://home.earthlink.net/~burrjaw/atm/atm math.lwp/atm math.htm

Couder mask theory and formulas developed by Nils Olof Carlin http://www.atmsite.org/contrib/Carlin/couder/

Members

See also the full member list (see [Curve Foucault class full member list], page 78) sectionfor this class.

Inherited members

• 2 members inherited from CurveRoc (see [Curve CurveRoc class reference], page 101)

• 9 members inherited from Rotational (see [Curve Rotational class reference], page 103)

Functions

• Foucault(double roc)

• ~Foucault()

• unsigned int add couder zones(double hole radius, unsigned int count = [...],std::vector<double> *edge = [...])

• void add reading(double zone radius, double knife offset = [...])

• unsigned int add uniform zones(double hole radius, unsigned int count)

• void clear()

• virtual double derivative(double r) const

Page 78: Gop Ti Cal

Chapter 4: API documentation 75

• void fit(const Rotational &c)

• double get radius() const

• const std::pair<double, double> get reading(unsigned int zone number) const

• unsigned int get zones count() const

• virtual double sagitta(double r) const

• void set fixed source(double source to surface)

• void set knife offset(unsigned int zone number, double knife offset)

• void set moving source(double source offset = [...])

• void set ode stepsize(double step)

• void set radius(double radius)

Members detail

Foucault(double roc)

Create an empty foucault curve with no reading with the given radius of curvature

~Foucault()

No documentation available

unsigned int add couder zones(double hole radius, unsigned intcount = 0, std:: vector <double> *edge = 0)

Clear current zones and add zones readings to locations suited for testing with a coudermask (as described on Nils Olof Carlin page). Zone count may be guessed if zero, providedthat radius has been properly set before. Knife edge reading (offset from radius of curvature)is set to 0 for all zones.

• edge: Couder zones edges will be saved here if != NULL.

The return value is Zone count

void add reading(double zone radius, double knife offset = 0.0)

Define a new zone at given zone radius and update knife edge reading (offset from radiusof curvature)

unsigned int add uniform zones(double hole radius, unsigned intcount)

Clear current zones and add equally spaced zones readings. Knife edge reading (offset fromradius of curvature) is set to 0 for all zones.

The return value is New zones count

void clear()

Clear all readings and zones

Page 79: Gop Ti Cal

Chapter 4: API documentation 76

virtual double derivative(double r) const

This virtual function overrides the derivative (see [_139], page 103) virtual functiondefined in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get curve derivative at specified distance from origin.

• r: distance from curve origin (0, 0)

void fit(const Rotational &c)

Switch to moving source test and update knife edge readings of previously defined zoneto fit provided rotationally symmetric curve. This means simulating a foucault test of thegiven curve using existing zones.

double get radius() const

Get surface radius.

const std:: pair <double, double> get reading(unsigned intzone number) const

Get reading data for a given zone number.

The return value is std::pair with zone radius and knife offset

unsigned int get zones count() const

Get currently defined zones/readings count

virtual double sagitta(double r) const

This virtual function implements the sagitta (see [_144], page 104) pure function de-clared in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get curve sagitta at specified distance from origin.

• r: distance from curve origin (0, 0)

void set fixed source(double source to surface)

Set fixed light source foucault test. This clear all readings and zones.

• source to surface: Distance between surface and light source along the optical axis.

void set knife offset(unsigned int zone number, doubleknife offset)

Set knife edge reading of a previously defined zone

void set moving source(double source offset = 0.0)

Set moving light source foucault test. This clear all readings and zones.

• source offset: Distance between knife edge and light source along optical axis.

Page 80: Gop Ti Cal

Chapter 4: API documentation 77

void set ode stepsize(double step)

Set surface integration (ODE) algorithm step size, default is 1mm

void set radius(double radius)

Set surface radius. Effective surface radius must be known to let the surface integrationalgorithm run up to a given limit. Sagitta and gradient values above the define radius won’tbe accurate.

Radius is adjusted to max zone radius + 10% when adding readings.

Page 81: Gop Ti Cal

Chapter 4: API documentation 78

Curve::Foucault class full member list

Functions

• Foucault(double roc)

• ~Foucault()

• unsigned int add couder zones(double hole radius, unsigned int count = [...],std::vector<double> *edge = [...])

• void add reading(double zone radius, double knife offset = [...])

• unsigned int add uniform zones(double hole radius, unsigned int count)

• void clear()

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double derivative(double r) const

• void fit(const Rotational &c)

• double get radius() const

• const std::pair<double, double> get reading(unsigned int zone number) const

• double get roc() const

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• unsigned int get zones count() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

• virtual double sagitta(double r) const

• void set fixed source(double source to surface)

• void set knife offset(unsigned int zone number, double knife offset)

• void set moving source(double source offset = [...])

• void set ode stepsize(double step)

• void set radius(double radius)

• void set roc(double roc)

Page 82: Gop Ti Cal

Chapter 4: API documentation 79

Curve::Grid class reference

Declaration

#include <Goptical/Curve/Grid>

namespace Goptical {

namespace Curve {

class Grid;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class use the Data::Grid (see [Data Grid class reference], page 112) 2d data set con-tainer to define a 3d non-symmetric curve. Several data interpolation algorithms are avail-able allowing use of Data::Bicubic (see [ 146], page 106) spline interpolation with or withoutprescribed derivative/gradient data. .

The Spline (see [Curve Spline class reference], page 91) curve model is preferredwhen dealing with rotationally symmetric curves (see [Curve Rotational class reference],page 103).

See also Data::Grid (see [Data Grid class reference], page 112) class.

Members

See also the full member list (see [Curve Grid class full member list], page 81) section forthis class.

Inherited members

• 5 members inherited from Base (see [Curve Base class reference], page 59)

Functions

• Grid(unsigned int n, double radius)

• ~Grid()

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• void fit(const Base &c)

• const Data::Grid & get data() const

• Data::Grid & get data()

• virtual double sagitta(const Math::Vector2 &xy) const

Members detail

Grid(unsigned int n, double radius)

Creates a grid curve with n*n sample points defined over the given radius.

Page 83: Gop Ti Cal

Chapter 4: API documentation 80

~Grid()

No documentation available

virtual void derivative(const Math::Vector2 &xy, Math::Vector2&dxdy) const

This virtual function overrides the derivative (see [_39], page 59) virtual function de-fined in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve x and y derivative (gradient) at specified point

void fit(const Base &c)

Set grid values to best fit an other curve. Gradient data will be extracted only if theinterpolation have been set to Data::BicubicDeriv previously

const Data::Grid & get data() const

Get embedded sagitta/gradient data container

Data::Grid & get data()

Get embedded sagitta/gradient data container

virtual double sagitta(const Math::Vector2 &xy) const

This virtual function implements the sagitta (see [_42], page 60) pure function de-clared in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve sagitta at specified point

Page 84: Gop Ti Cal

Chapter 4: API documentation 81

Curve::Grid class full member list

Functions

• Grid(unsigned int n, double radius)

• ~Grid()

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• void fit(const Base &c)

• const Data::Grid & get data() const

• Data::Grid & get data()

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

Page 85: Gop Ti Cal

Chapter 4: API documentation 82

Curve::Parabola class reference

Declaration

#include <Goptical/Curve/Parabola>

namespace Goptical {

namespace Curve {

class Parabola;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class provides an efficient parabola curve implementation.

Members

See also the full member list (see [Curve Parabola class full member list], page 84) sectionfor this class.

Inherited members

• 13 members inherited from ConicBase (see [Curve ConicBase class reference], page 98)

Functions

• Parabola(double roc)

• virtual double derivative(double r) const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual double sagitta(double r) const

Members detail

Parabola(double roc)

Creates a parabola curve with given radius of curvature

virtual double derivative(double r) const

This virtual function implements the derivative (see [_130], page 98) pure functiondeclared in the ConicBase (see [Curve_ConicBase_class_reference], page 98) baseabstract class.

Documentation inherited from base class:

Get curve derivative at specified distance from origin.

• r: distance from curve origin (0, 0)

Page 86: Gop Ti Cal

Chapter 4: API documentation 83

virtual bool intersect(Math::Vector3 &point, constMath::VectorPair3 &ray) const

This virtual function implements the intersect (see [_134], page 99) pure function de-clared in the ConicBase (see [Curve_ConicBase_class_reference], page 98) base ab-stract class.

Documentation inherited from base class:

Get intersection point between curve and 3d ray. Return false if no intersection occurred

virtual double sagitta(double r) const

This virtual function implements the sagitta (see [_135], page 99) pure function de-clared in the ConicBase (see [Curve_ConicBase_class_reference], page 98) base ab-stract class.

Documentation inherited from base class:

Get curve sagitta at specified distance from origin.

• r: distance from curve origin (0, 0)

Page 87: Gop Ti Cal

Chapter 4: API documentation 84

Curve::Parabola class full member list

Functions

• Parabola(double roc)

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double derivative(double r) const

• double fit roc(const Rotational &c, double radius, unsigned int count)

• double get eccentricity() const

• double get roc() const

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• double get schwarzschild() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

• virtual double sagitta(double r) const

• void set roc(double roc)

Page 88: Gop Ti Cal

Chapter 4: API documentation 85

Curve::Polynomial class reference

Declaration

#include <Goptical/Curve/Polynomial>

namespace Goptical {

namespace Curve {

class Polynomial;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class allow definition of rotationally symmetric high order polynomial curves. Unlim-ited number of terms can be used.

Members

See also the full member list (see [Curve Polynomial class full member list], page 87) sec-tion for this class.

Inherited members

• 9 members inherited from Rotational (see [Curve Rotational class reference], page 103)

Functions

• Polynomial()

• Polynomial(unsigned int first term, unsigned int last term, ...)

• virtual double derivative(double r) const

• virtual double sagitta(double r) const

• void set(unsigned int first term, unsigned int last term, ...)

• void set even(unsigned int first term, unsigned int last term, ...)

• void set first term(unsigned int n)

• void set last term(unsigned int n)

• void set odd(unsigned int first term, unsigned int last term, ...)

• void set term factor(unsigned int n, double c)

Members detail

Polynomial()

Create a new zero polynomial

Polynomial(unsigned int first term, unsigned int last term, ...)

Create a new polynomial with given order and coefficients. Same syntax as set() function.

Page 89: Gop Ti Cal

Chapter 4: API documentation 86

virtual double derivative(double r) const

This virtual function overrides the derivative (see [_139], page 103) virtual functiondefined in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get curve derivative at specified distance from origin.

• r: distance from curve origin (0, 0)

virtual double sagitta(double r) const

This virtual function implements the sagitta (see [_144], page 104) pure function de-clared in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get curve sagitta at specified distance from origin.

• r: distance from curve origin (0, 0)

void set(unsigned int first term, unsigned int last term, ...)

Set polynomial order and coefficients.

• first term: order of first (lowest) term.

• last term: order of last (highest) term.

• ...: list of coefficient starting at lowest term

void set even(unsigned int first term, unsigned int last term, ...)

Set even polynomial order and coefficients.

• first term: order of first (lowest) term, must be even.

• last term: order of last (highest) term, must be even.

• ...: list of even coefficient starting at lowest term

void set first term(unsigned int n)

Set order of first (lowest) term. Polynomial may be truncated or extended with 0 coefficients.

void set last term(unsigned int n)

Set order of last (highest) term. Polynomial may be truncated or extended with 0 coeffi-cients.

void set odd(unsigned int first term, unsigned int last term, ...)

Set odd polynomial order and coefficients.

• first term: order of first (lowest) term, must be odd.

• last term: order of last (highest) term, must be odd.

• ...: list of odd coefficient starting at lowest term

void set term factor(unsigned int n, double c)

Adjust coefficient of a single term. Adujst polynomial length as needed, setting additionalcoefficients to 0.

Page 90: Gop Ti Cal

Chapter 4: API documentation 87

Curve::Polynomial class full member list

Functions

• Polynomial()

• Polynomial(unsigned int first term, unsigned int last term, ...)

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double derivative(double r) const

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

• virtual double sagitta(double r) const

• void set(unsigned int first term, unsigned int last term, ...)

• void set even(unsigned int first term, unsigned int last term, ...)

• void set first term(unsigned int n)

• void set last term(unsigned int n)

• void set odd(unsigned int first term, unsigned int last term, ...)

• void set term factor(unsigned int n, double c)

Page 91: Gop Ti Cal

Chapter 4: API documentation 88

Curve::Sphere class reference

Declaration

#include <Goptical/Curve/Sphere>

namespace Goptical {

namespace Curve {

class Sphere;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class provides an efficient spherical curve implementation.

Members

See also the full member list (see [Curve Sphere class full member list], page 90) sectionfor this class.

Inherited members

• 13 members inherited from ConicBase (see [Curve ConicBase class reference], page 98)

Functions

• Sphere(double roc)

• virtual double derivative(double r) const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(double r) const

Members detail

Sphere(double roc)

Creates a spherical curve with given radius of curvature

virtual double derivative(double r) const

This virtual function implements the derivative (see [_130], page 98) pure functiondeclared in the ConicBase (see [Curve_ConicBase_class_reference], page 98) baseabstract class.

Documentation inherited from base class:

Get curve derivative at specified distance from origin.

• r: distance from curve origin (0, 0)

Page 92: Gop Ti Cal

Chapter 4: API documentation 89

virtual bool intersect(Math::Vector3 &point, constMath::VectorPair3 &ray) const

This virtual function implements the intersect (see [_134], page 99) pure function de-clared in the ConicBase (see [Curve_ConicBase_class_reference], page 98) base ab-stract class.

Documentation inherited from base class:

Get intersection point between curve and 3d ray. Return false if no intersection occurred

virtual void normal(Math::Vector3 &normal, const Math::Vector3&point) const

This virtual function overrides the normal (see [_143], page 104) virtual function de-fined in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get normal to curve surface at specified point

virtual double sagitta(double r) const

This virtual function implements the sagitta (see [_135], page 99) pure function de-clared in the ConicBase (see [Curve_ConicBase_class_reference], page 98) base ab-stract class.

Documentation inherited from base class:

Get curve sagitta at specified distance from origin.

• r: distance from curve origin (0, 0)

Page 93: Gop Ti Cal

Chapter 4: API documentation 90

Curve::Sphere class full member list

Functions

• Sphere(double roc)

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double derivative(double r) const

• double fit roc(const Rotational &c, double radius, unsigned int count)

• double get eccentricity() const

• double get roc() const

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• double get schwarzschild() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

• virtual double sagitta(double r) const

• void set roc(double roc)

Page 94: Gop Ti Cal

Chapter 4: API documentation 91

Curve::Spline class reference

Declaration

#include <Goptical/Curve/Spline>

namespace Goptical {

namespace Curve {

class Spline;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class uses a 1d discrete data set to define a rotationally symmetric sagitta/gradientcurve. Several data interpolations algorithm are available allowing use of Smooth Cubicspline interpolation with or without prescribed derivative/gradient data.

See also Data::DiscreteSet (see [Data DiscreteSet class reference], page 109) class.

Members

See also the full member list (see [Curve Spline class full member list], page 93) sectionfor this class.

Inherited members

• 9 members inherited from Rotational (see [Curve Rotational class reference], page 103)

Functions

• Spline()

• ~Spline()

• virtual double derivative(double r) const

• void fit(const Rotational &c, double radius, unsigned int points)

• const Data::DiscreteSet & get data() const

• Data::DiscreteSet & get data()

• virtual double sagitta(double r) const

Members detail

Spline()

Create an empty spline curve with no defined point

~Spline()

No documentation available

Page 95: Gop Ti Cal

Chapter 4: API documentation 92

virtual double derivative(double r) const

This virtual function overrides the derivative (see [_139], page 103) virtual functiondefined in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get curve derivative at specified distance from origin.

• r: distance from curve origin (0, 0)

void fit(const Rotational &c, double radius, unsigned int points)

Clear all points and fit to an other rotationally symmetric curve.

• c: Curve to fit

• radius: Maximum radius where curve is defined

• points: Number of sample points

const Data::DiscreteSet & get data() const

Get sagitta/derivative data container

Data::DiscreteSet & get data()

get sagitta/derivative data container

virtual double sagitta(double r) const

This virtual function implements the sagitta (see [_144], page 104) pure function de-clared in the Rotational (see [Curve_Rotational_class_reference], page 103) baseabstract class.

Documentation inherited from base class:

Get curve sagitta at specified distance from origin.

• r: distance from curve origin (0, 0)

Page 96: Gop Ti Cal

Chapter 4: API documentation 93

Curve::Spline class full member list

Functions

• Spline()

• ~Spline()

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double derivative(double r) const

• void fit(const Rotational &c, double radius, unsigned int points)

• const Data::DiscreteSet & get data() const

• Data::DiscreteSet & get data()

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

• virtual double sagitta(double r) const

Page 97: Gop Ti Cal

Chapter 4: API documentation 94

Curve::Zernike class reference

Declaration

#include <Goptical/Curve/Zernike>

namespace Goptical {

namespace Curve {

class Zernike;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

This class enables use of zernikes polynomials to define a surface curve. Zernikes terms canbe enabled and disabled individually.

Fitting can be used to get best fit Zernike polynomials coefficients of an other curve.

This implementation uses Zernike polynomials set as described in ISO standard 10110-5.

Based on Zernikes pages by James CWyant and Michael Koch. http://www.optics.arizona.edu/jcwyant/Zernikes/ZernikePolynomials.htmand http://www.astro-electronic.de/faq2.htm

Members

See also the full member list (see [Curve Zernike class full member list], page 97) sectionfor this class.

Inherited members

• 5 members inherited from Base (see [Curve Base class reference], page 59)

Functions

• Zernike(double radius, double unit scale = [...])

• Zernike(double radius, double coefs[], unsigned int coefs count, double unit scale =[...])

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• double fit(const Base &c, const Trace::Distribution &d = [...])

• double get coefficient(unsigned int n) const

• double get radius() const

• bool get term state(unsigned int n)

• virtual double sagitta(const Math::Vector2 &xy) const

• void set coefficient(unsigned int n, double c)

• void set coefficients scale(double s)

• void set coefficients threshold(double t)

Page 98: Gop Ti Cal

Chapter 4: API documentation 95

• void set radius(double radius)

• void set term state(unsigned int n, bool enabled)

Static functions

• static double zernike poly(unsigned int n, const Math::Vector2 &xy)

• static void zernike poly d(unsigned int n, const Math::Vector2 &xy, Math::Vector2&dxdy)

Constant

• static const unsigned int term count

Members detail

Zernike(double radius, double unit scale = 1.0)

Create a Zernike curve defined over the given circle radius.

• radius: Zernike circle radius

• unit scale: Sagitta scale factor used to change units globally

Zernike(double radius, double coefs[], unsigned int coefs count,double unit scale = 1.0)

Create a Zernike curve defined over the given circle radius and initialize coefficients fromtable.

• radius: Zernike circle radius

• coefs: Table of Zernike coefficients starting with z0 (piston)

• coefs count: Number of coefficients available in the table

• unit scale: Sagitta scale factor used to change units globally

virtual void derivative(const Math::Vector2 &xy, Math::Vector2&dxdy) const

This virtual function overrides the derivative (see [_39], page 59) virtual function de-fined in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve x and y derivative (gradient) at specified point

double fit(const Base &c, const Trace::Distribution &d =default dist)

Compute all zernike coefficient to best fit the given curve. RMS difference is returned. Thespecified distribution is used to choose sampling points on curve. Terms state is adjustedaccording to current threshold

double get coefficient(unsigned int n) const

Get coefficient associated with zernike term n

double get radius() const

Get Zernike circle radius

Page 99: Gop Ti Cal

Chapter 4: API documentation 96

bool get term state(unsigned int n)

Get current term enable state

virtual double sagitta(const Math::Vector2 &xy) const

This virtual function implements the sagitta (see [_42], page 60) pure function de-clared in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve sagitta at specified point

void set coefficient(unsigned int n, double c)

Set coefficient associated with zernike term n and enable term according to current thresh-old. See set coefficients threshold()

void set coefficients scale(double s)

Set coefficients unit scale factor. default is 1 (1 mm).

void set coefficients threshold(double t)

Set new coefficient threshold and adjust all term states (enabled/disabled) depending onnew threshold. Term with coefficient absolute value below the specified threshold will bedisabled. Disabling useless terms improve performance. Default threshold is 10^-10.

void set radius(double radius)

Set Zernike circle radius

void set term state(unsigned int n, bool enabled)

This functions must be used to enable/disable a zernike term without changing its coefficient

static const unsigned int term count

Number of implemented zernike polynomials

static double zernike poly(unsigned int n, const Math::Vector2&xy)

Evaluate zernike polynomial n

static void zernike poly d(unsigned int n, const Math::Vector2&xy, Math::Vector2 &dxdy)

Evaluate x and y derivatives of zernike polynomial n

Page 100: Gop Ti Cal

Chapter 4: API documentation 97

Curve::Zernike class full member list

Functions

• Zernike(double radius, double unit scale = [...])

• Zernike(double radius, double coefs[], unsigned int coefs count, double unit scale =[...])

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• double fit(const Base &c, const Trace::Distribution &d = [...])

• double get coefficient(unsigned int n) const

• double get radius() const

• bool get term state(unsigned int n)

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

• void set coefficient(unsigned int n, double c)

• void set coefficients scale(double s)

• void set coefficients threshold(double t)

• void set radius(double radius)

• void set term state(unsigned int n, bool enabled)

Static functions

• static double zernike poly(unsigned int n, const Math::Vector2 &xy)

• static void zernike poly d(unsigned int n, const Math::Vector2 &xy, Math::Vector2&dxdy)

Constant

• static const unsigned int term count

Page 101: Gop Ti Cal

Chapter 4: API documentation 98

Curve::ConicBase class reference

Declaration

#include <Goptical/Curve/ConicBase>

namespace Goptical {

namespace Curve {

class ConicBase;

};

};

This class is a member of the Curve namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This base class defines common properties of rotationally symmetric conic curves. Thesecurves are all defined by a radius of curvature and deformation coefficient.

Fitting can be used to find best fit conic of an other rotationally symmetric curve eitherwith fixed or free deformation parameter.

Members

See also the full member list (see [Curve ConicBase class full member list], page 100) sec-tion for this class.

Inherited members

• 2 members inherited from CurveRoc (see [Curve CurveRoc class reference], page 101)

• 9 members inherited from Rotational (see [Curve Rotational class reference], page 103)

Functions

• virtual double derivative(double r) const = 0;

• double fit roc(const Rotational &c, double radius, unsigned int count)

• double get eccentricity() const

• double get schwarzschild() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const =0;

• virtual double sagitta(double r) const = 0;

Members detail

virtual double derivative(double r) const = 0;

This pure virtual function shadows the derivative (see [_139], page 103) virtual func-tion defined in the Rotational (see [Curve_Rotational_class_reference], page 103)

base abstract class.

Page 102: Gop Ti Cal

Chapter 4: API documentation 99

Documentation inherited from base class:

Get curve derivative at specified distance from origin.

• r: distance from curve origin (0, 0)

double fit roc(const Rotational &c, double radius, unsigned intcount)

Adjust radius of curvature to best fit given curve. Deformation Won’t be changed by thisfunction. See Conic::fit() to adjust deformation too.

Parameters list:

• curve: Curve to fit

• radius: Maximum radius used to get sample points

• count: Number of sample points to use

double get eccentricity() const

get eccentricity

double get schwarzschild() const

get Schwarzschild constant

virtual bool intersect(Math::Vector3 &point, constMath::VectorPair3 &ray) const = 0;

This pure virtual function shadows the intersect (see [_40], page 60) virtual functiondefined in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get intersection point between curve and 3d ray. Return false if no intersection occurred

virtual double sagitta(double r) const = 0;

This pure virtual function shadows the sagitta (see [_144], page 104) pure virtualfunction defined in the Rotational (see [Curve_Rotational_class_reference],

page 103) base abstract class.

Documentation inherited from base class:

Get curve sagitta at specified distance from origin.

• r: distance from curve origin (0, 0)

Page 103: Gop Ti Cal

Chapter 4: API documentation 100

Curve::ConicBase class full member list

Functions

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual double derivative(double r) const = 0;

• double fit roc(const Rotational &c, double radius, unsigned int count)

• double get eccentricity() const

• double get roc() const

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• double get schwarzschild() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const =0;

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(const Math::Vector2 &xy) const

• virtual double sagitta(double r) const = 0;

• void set roc(double roc)

Page 104: Gop Ti Cal

Chapter 4: API documentation 101

Curve::CurveRoc class reference

Declaration

#include <Goptical/Curve/CurveRoc>

namespace Goptical {

namespace Curve {

class CurveRoc;

};

};

This class is a member of the Curve namespace.

Inheritance

Description

Base class for curves with a radius of curvature

Members

See also the full member list (see [Curve CurveRoc class full member list], page 102) sec-tion for this class.

Functions

• double get roc() const

• void set roc(double roc)

Members detail

double get roc() const

Get the radius of curvature

void set roc(double roc)

Set the radius of curvature

Page 105: Gop Ti Cal

Chapter 4: API documentation 102

Curve::CurveRoc class full member list

Functions

• double get roc() const

• void set roc(double roc)

Page 106: Gop Ti Cal

Chapter 4: API documentation 103

Curve::Rotational class reference

Declaration

#include <Goptical/Curve/Rotational>

namespace Goptical {

namespace Curve {

class Rotational;

};

};

This class is a member of the Curve namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This class defines rotationally symmetric curve interface and provide default implementationas generic non symmetric curve.

Members

See also the full member list (see [Curve Rotational class full member list], page 105) sec-tion for this class.

Inherited members

• 5 members inherited from Base (see [Curve Base class reference], page 59)

Functions

• Rotational()

• virtual double derivative(double r) const

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(double r) const = 0;

• virtual double sagitta(const Math::Vector2 &xy) const

Members detail

Rotational()

No documentation available

virtual double derivative(double r) const

Get curve derivative at specified distance from origin.

• r: distance from curve origin (0, 0)

Page 107: Gop Ti Cal

Chapter 4: API documentation 104

virtual void derivative(const Math::Vector2 &xy, Math::Vector2&dxdy) const

This virtual function overrides the derivative (see [_39], page 59) virtual function de-fined in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve x and y derivative (gradient) at specified point

virtual void get sample(unsigned int index, double &r, double &z)const

Get a sample point on curve. (0,0) is not included.

virtual unsigned int get sample count() const

Get number of available sample points. Samples points may be used by curve fitting algo-rithms and are choosen to avoid using interpolated points. return 0 when not applicable.

virtual void normal(Math::Vector3 &normal, const Math::Vector3&point) const

This virtual function overrides the normal (see [_41], page 60) virtual function definedin the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get normal to curve surface at specified point

virtual double sagitta(double r) const = 0;

Get curve sagitta at specified distance from origin.

• r: distance from curve origin (0, 0)

virtual double sagitta(const Math::Vector2 &xy) const

This virtual function implements the sagitta (see [_42], page 60) pure function de-clared in the Base (see [Curve_Base_class_reference], page 59) base abstract class.

Documentation inherited from base class:

Get curve sagitta at specified point

Page 108: Gop Ti Cal

Chapter 4: API documentation 105

Curve::Rotational class full member list

Functions

• Rotational()

• virtual double derivative(double r) const

• virtual void derivative(const Math::Vector2 &xy, Math::Vector2 &dxdy) const

• virtual void get sample(unsigned int index, double &r, double &z) const

• virtual unsigned int get sample count() const

• virtual bool intersect(Math::Vector3 &point, const Math::VectorPair3 &ray) const

• virtual void normal(Math::Vector3 &normal, const Math::Vector3 &point) const

• virtual double sagitta(double r) const = 0;

• virtual double sagitta(const Math::Vector2 &xy) const

Page 109: Gop Ti Cal

Chapter 4: API documentation 106

Data namespace reference

Description

Numerical data interpolation and plotting

Members

Types

• class DiscreteSet

• class Grid

• class Plot

• class PlotData

• class SampleSet

• enum Interpolation

• enum PlotStyleMask

• class Set

• class Set1d

Functions

• PlotStyleMask operator&(PlotStyleMask a, PlotStyleMask b)

• std::ostream & operator<<(std::ostream &o, const Set &s)

• PlotStyleMask operator|(PlotStyleMask a, PlotStyleMask b)

• PlotStyleMask operator~(PlotStyleMask a)

Members detail

enum Interpolation

Specifies data interpolation methods. Availability depends on data container used.

Identifier DescriptionNearest 1d and 2d nearest interpolation

Linear 1d linear and 2d bilinear interpolations

Quadratic 1d quadratic interpolation

CubicSimple 1d cubic piecewise interpolation. It has continuous piecewisefirst derivative, non-continuous piecewise linear second deriva-tive. Use segments slope as first derivative. Less accuratethan other cubic interpolants but requires less computationon data set change.

Page 110: Gop Ti Cal

Chapter 4: API documentation 107

Cubic 1d cubic piecewise interpolation. It has smooth first derivativeand continuous piecewise linear second derivative. Deriva-tives for first and last entries are based on first and last seg-ments slope. It uses linear extrapolation (continuous but non-smooth first derivative on both ends).

Cubic2 Same interpolation as Cubic, with quadratic extrapolation(continous and smooth first derivative on both ends).

CubicDerivInit Same as Cubic with first derivative prescribed for first andlast entries only.

Cubic2DerivInit Same as Cubic2 with first derivative prescribed for first andlast entries only.

CubicDeriv 1d cubic piecewise interpolation. First derivatives must beprovided for all entries. It uses linear extrapolation.

Cubic2Deriv 1d cubic piecewise interpolation. First derivatives must beprovided for all entries. It uses quadratic extrapolation.

Bicubic 2d bicubic interpolation. Use smooth first derivative and con-tinuous piecewise linear second derivative. Use 1d cubic curveto extract gradients (smooth first derivative and continuouspiecewise linear second derivative). This is the best 2d inter-polation when derivatives are non-prescribed.

BicubicDiff 2d bicubic interpolation. Use numerical differencing to ex-tract gradients. Less accurate than Bicubic (see [ 146],page 106) but requires less computation on data set change.

BicubicDeriv 2d bicubic interpolation. x and y gradients must be provided.This is the best 2d interpolation when derivatives values areavailable.

enum PlotStyleMask

Specifies available styles for 2d and 3d plot data rendering

Identifier DescriptionLinePlot Draw lines between knots

PointPlot Draw points for each knot

InterpolatePlot Draw a smooth curve

Page 111: Gop Ti Cal

Chapter 4: API documentation 108

ValuePlot Print ploted values near knots

Filled Draw filled 3d surface

PlotStyleMask operator&(PlotStyleMask a, PlotStyleMask b)

Bitwise and operation for use on PlotStyleMask (see [ 147], page 107) enum.

std:: ostream & operator<<(std:: ostream &o, const Set &s)

No documentation available

PlotStyleMask operator|(PlotStyleMask a, PlotStyleMask b)

Bitwise or operation for use on PlotStyleMask (see [ 147], page 107) enum.

PlotStyleMask operator~(PlotStyleMask a)

Bitwise not operation for use on PlotStyleMask (see [ 147], page 107) enum.

Page 112: Gop Ti Cal

Chapter 4: API documentation 109

Data::DiscreteSet class reference

Declaration

#include <Goptical/Data/DiscreteSet>

namespace Goptical {

namespace Data {

class DiscreteSet;

};

};

This class is a member of the Data namespace.

Inheritance

Description

This class provides a numerical data container where value pairs can be defined at arbitrarypositions (x, y).

Severals interpolation algorithms are available to guess values between defined knots,see Interpolation (see [ 146], page 106).

See also SampleSet (see [Data SampleSet class reference], page 125) class.

Members

See also the full member list (see [Data DiscreteSet class full member list], page 111) sec-tion for this class.

Inherited members

• 19 members inherited from Set1d (see [Data Set1d class reference], page 133)

Functions

• DiscreteSet()

• void add data(double x, double y, double yp = [...])

• void clear()

• virtual unsigned int get count() const

• double get d value(unsigned int x) const

• double & get d value(unsigned int x)

• virtual Math::range t get x range() const

• virtual double get x value(unsigned int x) const

• virtual double get y value(unsigned int x) const

• virtual double & get y value(unsigned int x)

• virtual double interpolate(const double x) const

• virtual double interpolate(const double x, unsigned int deriv) const

• void reserve(size t n)

• virtual void set interpolation(Interpolation i)

Page 113: Gop Ti Cal

Chapter 4: API documentation 110

Members detail

DiscreteSet()

No documentation available

Page 114: Gop Ti Cal

Chapter 4: API documentation 111

Data::DiscreteSet class full member list

Functions

• DiscreteSet()

• void add data(double x, double y, double yp = [...])

• void clear()

• virtual unsigned int get count(unsigned int dim) const

• virtual unsigned int get count() const

• double get d value(unsigned int x) const

• double & get d value(unsigned int x)

• virtual unsigned int get dimensions() const

• Interpolation get interpolation()

• unsigned int get version() const

• virtual Math::range t get x range(unsigned int dimension) const

• virtual Math::range t get x range() const

• virtual double get x value(unsigned int n, unsigned int dim) const

• virtual double get x value(unsigned int x) const

• virtual Math::range t get y range() const

• virtual double get y value(const unsigned int x[]) const

• virtual double get y value(unsigned int x) const

• virtual double & get y value(unsigned int x)

• virtual double interpolate(const double x[]) const

• virtual double interpolate(const double x[], unsigned int deriv, unsigned int dimension)const

• virtual double interpolate(const double x) const

• virtual double interpolate(const double x, unsigned int deriv) const

• void reserve(size t n)

• virtual void set interpolation(Interpolation i)

Page 115: Gop Ti Cal

Chapter 4: API documentation 112

Data::Grid class reference

Declaration

#include <Goptical/Data/Grid>

namespace Goptical {

namespace Data {

class Grid;

};

};

This class is a member of the Data namespace.

Inheritance

Description

This class provides a numerical data container where data value can be defined for eachpoint of a 2d rectangular grid. The grid is defined by grid samples count (n1, n2), a 2dorigin vector and 2 steps values.

Severals interpolation algorithms are available to guess values between grid defined knots,see Interpolation (see [ 146], page 106).

Members

See also the full member list (see [Data Grid class full member list], page 117) section forthis class.

Inherited members

• 12 members inherited from Set (see [Data Set class reference], page 130)

Functions

• Grid(unsigned int n1, unsigned int n2, const Math::Vector2 &origin = [...], constMath::Vector2 &step = [...])

• ~Grid()

• virtual unsigned int get count(unsigned int dimension) const

• const Math::Vector2 & get d value(unsigned int n1, unsigned int n2) const

• Math::Vector2 & get d value(unsigned int n1, unsigned int n2)

• virtual unsigned int get dimensions() const

• const Math::Vector2 & get nearest d(const Math::Vector2 &v) const

• Math::Vector2 & get nearest d(const Math::Vector2 &v)

• double get nearest y(const Math::Vector2 &v) const

• double & get nearest y(const Math::Vector2 &v)

• const Math::Vector2 & get origin() const

• const Math::Vector2 & get step() const

Page 116: Gop Ti Cal

Chapter 4: API documentation 113

• virtual Math::range t get x range(unsigned int dimension) const

• virtual double get x value(unsigned int x, unsigned int dimension) const

• Math::Vector2 get x value i(unsigned int n1, unsigned int n2) const

• double get y value(unsigned int n1, unsigned int n2) const

• double & get y value(unsigned int n1, unsigned int n2)

• virtual double get y value(const unsigned int n[]) const

• double interpolate(const Math::Vector2 &v) const

• virtual double interpolate(const double x[]) const

• virtual double interpolate(const double x[], unsigned int deriv, unsigned int dimension)const

• Math::Vector2 interpolate deriv(const Math::Vector2 &v) const

• void resize(unsigned int n1, unsigned int n2)

• void set all d(const Math::Vector2 &deriv = [...])

• void set all y(double y = [...])

• virtual void set interpolation(Interpolation i)

• void set metrics(const Math::Vector2 &origin, const Math::Vector2 &step)

Members detail

Grid(unsigned int n1, unsigned int n2, const Math::Vector2&origin = Math::Vector2(0,0), const Math::Vector2 &step =Math::Vector2(1,1))

Create a Grid object with given sample counts and metrics.

• n1: Number of samples along the first dimension axis.

• n2: Number of samples along the second dimension axis.

• origin: Grid origin point

• step: Step values for each grid dimensions

~Grid()

No documentation available

virtual unsigned int get count(unsigned int dimension) const

This virtual function implements the get_count (see [_223], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Get total number of data stored for dimension n in data set

const Math::Vector2 & get d value(unsigned int n1, unsigned intn2) const

Get 1st derivative/gradient vector at sample point index (n1, n2). Only available whenData::BicubicDeriv interpolation is selected.

Page 117: Gop Ti Cal

Chapter 4: API documentation 114

Math::Vector2 & get d value(unsigned int n1, unsigned int n2)

Get modifiable reference to 1st derivative/gradient vector at sample point index (n1, n2).Only available when Data::BicubicDeriv interpolation is selected.

virtual unsigned int get dimensions() const

This virtual function implements the get_dimensions (see [_224], page 131) pure func-tion declared in the Set (see [Data_Set_class_reference], page 130) base abstractclass.

Documentation inherited from base class:

Get total number of dimensions

const Math::Vector2 & get nearest d(const Math::Vector2 &v)const

Get 1st derivative/gradient vector stored at nearest sample point from 2d vector on grid.Only available when Data::BicubicDeriv interpolation is selected.

Math::Vector2 & get nearest d(const Math::Vector2 &v)

Get modifiable reference to 1st derivative/gradient vector stored at nearest sample pointfrom 2d vector on grid. Only available when Data::BicubicDeriv interpolation is selected.

double get nearest y(const Math::Vector2 &v) const

Get value stored at nearest sample point from 2d vector on grid

double & get nearest y(const Math::Vector2 &v)

Get modifiable reference to value stored at nearest sample point from 2d vector on grid

const Math::Vector2 & get origin() const

Get origin vector

const Math::Vector2 & get step() const

Get step values vector

virtual Math::range t get x range(unsigned int dimension) const

This virtual function implements the get_x_range (see [_227], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Get minimal and maximal x values on dimension n found in data set

virtual double get x value(unsigned int x, unsigned int dimension)const

This virtual function implements the get_x_value (see [_228], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Get data stored at position n on dimension dim in data set

Page 118: Gop Ti Cal

Chapter 4: API documentation 115

Math::Vector2 get x value i(unsigned int n1, unsigned int n2)const

Get 2d vector on grid of the sample point at index (n1, n2)

double get y value(unsigned int n1, unsigned int n2) const

Get value stored at sample point index (n1, n2)

double & get y value(unsigned int n1, unsigned int n2)

Get modifiable reference to value stored at sample point index (n1, n2)

virtual double get y value(const unsigned int n[]) const

This virtual function implements the get_y_value (see [_230], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Get y data stored at position (x0, x1, ...) in data set

double interpolate(const Math::Vector2 &v) const

Interpolate data at given 2d vector point on grid using currently selected interpolationalgorithm

virtual double interpolate(const double x[]) const

This virtual function implements the interpolate (see [_231], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Interpolate y value corresponding to given x value(s) in data set.

virtual double interpolate(const double x[], unsigned int deriv,unsigned int dimension) const

This virtual function implements the interpolate (see [_232], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Interpolate y value corresponding to given x value in data set. Data may be differentiatedseveral times along the requested dimension.

• deriv: Differentiation count, 0 means y value, 1 means 1st derivative...

• dim: Differentiation dimension

Math::Vector2 interpolate deriv(const Math::Vector2 &v) const

Interpolate gradient at given 2d vector point on grid using currently selected interpolationalgorithm

void resize(unsigned int n1, unsigned int n2)

Change grid size by defining new sample counts for each dimensions

void set all d(const Math::Vector2 &deriv = Math::Vector2(0,0))

Change all grid points stored gradient. Only available when Data::BicubicDeriv interpola-tion is selected.

Page 119: Gop Ti Cal

Chapter 4: API documentation 116

void set all y(double y = 0.0)

Change all grid points stored values

virtual void set interpolation(Interpolation i)

This virtual function implements the set_interpolation (see [_233], page 131)

pure function declared in the Set (see [Data_Set_class_reference], page 130) baseabstract class.

Documentation inherited from base class:

Select interpolation method

void set metrics(const Math::Vector2 &origin, constMath::Vector2 &step)

Set grid origin 2d vector and step values

Page 120: Gop Ti Cal

Chapter 4: API documentation 117

Data::Grid class full member list

Functions

• Grid(unsigned int n1, unsigned int n2, const Math::Vector2 &origin = [...], constMath::Vector2 &step = [...])

• ~Grid()

• virtual unsigned int get count(unsigned int dimension) const

• const Math::Vector2 & get d value(unsigned int n1, unsigned int n2) const

• Math::Vector2 & get d value(unsigned int n1, unsigned int n2)

• virtual unsigned int get dimensions() const

• Interpolation get interpolation()

• const Math::Vector2 & get nearest d(const Math::Vector2 &v) const

• Math::Vector2 & get nearest d(const Math::Vector2 &v)

• double get nearest y(const Math::Vector2 &v) const

• double & get nearest y(const Math::Vector2 &v)

• const Math::Vector2 & get origin() const

• const Math::Vector2 & get step() const

• unsigned int get version() const

• virtual Math::range t get x range(unsigned int dimension) const

• virtual double get x value(unsigned int x, unsigned int dimension) const

• Math::Vector2 get x value i(unsigned int n1, unsigned int n2) const

• virtual Math::range t get y range() const

• double get y value(unsigned int n1, unsigned int n2) const

• double & get y value(unsigned int n1, unsigned int n2)

• virtual double get y value(const unsigned int n[]) const

• double interpolate(const Math::Vector2 &v) const

• virtual double interpolate(const double x[]) const

• virtual double interpolate(const double x[], unsigned int deriv, unsigned int dimension)const

• Math::Vector2 interpolate deriv(const Math::Vector2 &v) const

• void resize(unsigned int n1, unsigned int n2)

• void set all d(const Math::Vector2 &deriv = [...])

• void set all y(double y = [...])

• virtual void set interpolation(Interpolation i)

• void set metrics(const Math::Vector2 &origin, const Math::Vector2 &step)

Page 121: Gop Ti Cal

Chapter 4: API documentation 118

Data::Plot class reference

Declaration

#include <Goptical/Data/Plot>

namespace Goptical {

namespace Data {

class Plot;

};

};

This class is a member of the Data namespace.

Inheritance

Description

This class is used to describe a data plot. It contains a list of PlotData (see[Data PlotData class reference], page 122) objects and describes some plot properties(title, range, ...).

Plots can be built from data sets or obtained directly from variousanalysis functions. They can be rendered on a Io::RendererViewport (see[Io RendererViewport class reference], page 205) object with the draw (see [ 183],page 119) function.

Members

See also the full member list (see [Data Plot class full member list], page 121) section forthis class.

Functions

• Plot()

• PlotData & add plot data(const Set &data, const Io::Rgb &color = [...], conststd::string &label = [...], PlotStyleMask style = [...])

• void add plot data(PlotData &data)

• void draw(Io::RendererViewport &r)

• void erase plot data()

• void fit axes range()

• Io::RendererAxes & get axes()

• const Io::RendererAxes & get axes() const

• unsigned int get dimensions() const

• unsigned int get plot count() const

• PlotData & get plot data(unsigned int index)

• const PlotData & get plot data(unsigned int index) const

• const std::string & get title() const

Page 122: Gop Ti Cal

Chapter 4: API documentation 119

• Math::range t get x data range(unsigned int dimension = [...]) const

• bool get xy swap() const

• Math::range t get y data range() const

• void set color(const Io::Rgb &color)

• void set different colors()

• void set style(PlotStyleMask style)

• void set title(const std::string &title)

• void set xy swap(bool doswap)

Members detail

Plot()

Create a new empty plot

PlotData & add plot data(const Set &data, const Io::Rgb &color= Io::rgb red, const std:: string &label = "data", PlotStyleMaskstyle = InterpolatePlot|PointPlot)

Create and add plot data from specified data set.

void add plot data(PlotData &data)

Add plot data

void draw(Io::RendererViewport &r)

draw

void erase plot data()

Discard all plot data set

void fit axes range()

Set axis position to dataset range

Io::RendererAxes & get axes()

Get plot axes object

const Io::RendererAxes & get axes() const

Get plot axes object

unsigned int get dimensions() const

Get data sets dimensions, return 0 if inconsistent

unsigned int get plot count() const

Get plot data set count

PlotData & get plot data(unsigned int index)

Get plot data set at given index

Page 123: Gop Ti Cal

Chapter 4: API documentation 120

const PlotData & get plot data(unsigned int index) const

Get plot data set at given index

const std:: string & get title() const

Get plot main title

Math::range t get x data range(unsigned int dimension = 0)const

Get range of x data in sets

bool get xy swap() const

Get x and y axis swap state for 2d plots

Math::range t get y data range() const

Get range of y data in sets

void set color(const Io::Rgb &color)

Set color for all plots

void set different colors()

Automatically choose different colors for each plot

void set style(PlotStyleMask style)

Set plot style for all plot

void set title(const std:: string &title)

Set plot main title

void set xy swap(bool doswap)

Swap x and y axis for 2d plots

Page 124: Gop Ti Cal

Chapter 4: API documentation 121

Data::Plot class full member list

Functions

• Plot()

• PlotData & add plot data(const Set &data, const Io::Rgb &color = [...], conststd::string &label = [...], PlotStyleMask style = [...])

• void add plot data(PlotData &data)

• void draw(Io::RendererViewport &r)

• void erase plot data()

• void fit axes range()

• Io::RendererAxes & get axes()

• const Io::RendererAxes & get axes() const

• unsigned int get dimensions() const

• unsigned int get plot count() const

• PlotData & get plot data(unsigned int index)

• const PlotData & get plot data(unsigned int index) const

• const std::string & get title() const

• Math::range t get x data range(unsigned int dimension = [...]) const

• bool get xy swap() const

• Math::range t get y data range() const

• void set color(const Io::Rgb &color)

• void set different colors()

• void set style(PlotStyleMask style)

• void set title(const std::string &title)

• void set xy swap(bool doswap)

Page 125: Gop Ti Cal

Chapter 4: API documentation 122

Data::PlotData class reference

Declaration

#include <Goptical/Data/PlotData>

namespace Goptical {

namespace Data {

class PlotData;

};

};

This class is a member of the Data namespace.

Description

This class is used to describe a data set as part of a data plot. It contains a pointer to thedata set and plotting informations (title, color, ...)

Members

See also the full member list (see [Data PlotData class full member list], page 124) sectionfor this class.

Functions

• PlotData(const const ref<Set> &s)

• void disable style(PlotStyleMask style)

• void enable style(PlotStyleMask style)

• const Io::Rgb & get color() const

• const std::string & get label() const

• const Set & get set() const

• PlotStyleMask get style() const

• void set color(const Io::Rgb &color)

• void set label(const std::string &title)

• void set style(PlotStyleMask style)

Members detail

PlotData(const const ref <Set> &s)

Create a new data plot descriptor which describe the specified dataset.

void disable style(PlotStyleMask style)

Disable a plotting style

void enable style(PlotStyleMask style)

Enable a plotting style

Page 126: Gop Ti Cal

Chapter 4: API documentation 123

const Io::Rgb & get color() const

Set data set plotting color

const std:: string & get label() const

Get data set plotting label

const Set & get set() const

Get the described data set

PlotStyleMask get style() const

Get the plotting style mask

void set color(const Io::Rgb &color)

Set data set plotting color

void set label(const std:: string &title)

Set data set plotting label

void set style(PlotStyleMask style)

Set the plotting style mask

Page 127: Gop Ti Cal

Chapter 4: API documentation 124

Data::PlotData class full member list

Functions

• PlotData(const const ref<Set> &s)

• void disable style(PlotStyleMask style)

• void enable style(PlotStyleMask style)

• const Io::Rgb & get color() const

• const std::string & get label() const

• const Set & get set() const

• PlotStyleMask get style() const

• void set color(const Io::Rgb &color)

• void set label(const std::string &title)

• void set style(PlotStyleMask style)

Page 128: Gop Ti Cal

Chapter 4: API documentation 125

Data::SampleSet class reference

Declaration

#include <Goptical/Data/SampleSet>

namespace Goptical {

namespace Data {

class SampleSet;

};

};

This class is a member of the Data namespace.

Inheritance

Description

This class provides a numerical data container where sample values (y) are defined foruniformly distributed (x) values.

Severals interpolation algorithms are available to guess values between defined knots,see Interpolation (see [ 146], page 106).

See also DiscreteSet (see [Data DiscreteSet class reference], page 109) class.

Members

See also the full member list (see [Data SampleSet class full member list], page 127) sectionfor this class.

Inherited members

• 19 members inherited from Set1d (see [Data Set1d class reference], page 133)

Functions

• SampleSet()

• void clear()

• virtual unsigned int get count() const

• double get d value(unsigned int x) const

• double & get d value(unsigned int x)

• double get origin() const

• double get step() const

• virtual Math::range t get x range() const

• virtual double get x value(unsigned int x) const

• virtual double get y value(unsigned int x) const

• virtual double & get y value(unsigned int x)

• virtual double interpolate(const double x) const

• virtual double interpolate(const double x, unsigned int deriv) const

Page 129: Gop Ti Cal

Chapter 4: API documentation 126

• void resize(unsigned int n)

• virtual void set interpolation(Interpolation i)

• void set metrics(double origin, double step)

• void set value(unsigned int x, double y, double d = [...])

• void set value near(double x, double y, double d = [...])

Members detail

SampleSet()

No documentation available

Page 130: Gop Ti Cal

Chapter 4: API documentation 127

Data::SampleSet class full member list

Functions

• SampleSet()

• void clear()

• virtual unsigned int get count(unsigned int dim) const

• virtual unsigned int get count() const

• double get d value(unsigned int x) const

• double & get d value(unsigned int x)

• virtual unsigned int get dimensions() const

• Interpolation get interpolation()

• double get origin() const

• double get step() const

• unsigned int get version() const

• virtual Math::range t get x range(unsigned int dimension) const

• virtual Math::range t get x range() const

• virtual double get x value(unsigned int n, unsigned int dim) const

• virtual double get x value(unsigned int x) const

• virtual Math::range t get y range() const

• virtual double get y value(const unsigned int x[]) const

• virtual double get y value(unsigned int x) const

• virtual double & get y value(unsigned int x)

• virtual double interpolate(const double x[]) const

• virtual double interpolate(const double x[], unsigned int deriv, unsigned int dimension)const

• virtual double interpolate(const double x) const

• virtual double interpolate(const double x, unsigned int deriv) const

• void resize(unsigned int n)

• virtual void set interpolation(Interpolation i)

• void set metrics(double origin, double step)

• void set value(unsigned int x, double y, double d = [...])

• void set value near(double x, double y, double d = [...])

Page 131: Gop Ti Cal

Chapter 4: API documentation 128

Data::Interpolate1d<Data::DiscreteSetBase> internal classmembers

Interpolate1d()

No documentation available

virtual double interpolate(const double x) const

This virtual function implements the interpolate (see [_245], page 135) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

virtual double interpolate(const double x, unsigned int deriv)const

This virtual function implements the interpolate (see [_246], page 135) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

virtual void set interpolation(Interpolation i)

This virtual function implements the set_interpolation (see [_233], page 131)

pure function declared in the Set (see [Data_Set_class_reference], page 130) baseabstract class.

~Interpolate1d()

No documentation available

Page 132: Gop Ti Cal

Chapter 4: API documentation 129

Data::Interpolate1d<Data::SampleSetBase> internal classmembers

Interpolate1d()

No documentation available

virtual double interpolate(const double x) const

This virtual function implements the interpolate (see [_245], page 135) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

virtual double interpolate(const double x, unsigned int deriv)const

This virtual function implements the interpolate (see [_246], page 135) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

virtual void set interpolation(Interpolation i)

This virtual function implements the set_interpolation (see [_233], page 131)

pure function declared in the Set (see [Data_Set_class_reference], page 130) baseabstract class.

~Interpolate1d()

No documentation available

Page 133: Gop Ti Cal

Chapter 4: API documentation 130

Data::Set class reference

Declaration

#include <Goptical/Data/Set>

namespace Goptical {

namespace Data {

class Set;

};

};

This class is a member of the Data namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This class is a base class for all numerical data sets implementations. It defines an interfaceto access data in a way independent from data storage and dimensions count.

Each data set implementation may define a alternative specific interface to access theirdata.

Here x is seen as value used to access the container. Containers with more than onedimension will require x0, x1, ..., xn known parameters to access the stored y value.

Members

See also the full member list (see [Data Set class full member list], page 132) section forthis class.

Functions

• virtual ~Set()

• virtual unsigned int get count(unsigned int dim = [...]) const = 0;

• virtual unsigned int get dimensions() const = 0;

• Interpolation get interpolation()

• unsigned int get version() const

• virtual Math::range t get x range(unsigned int dim = [...]) const = 0;

• virtual double get x value(unsigned int n, unsigned int dim = [...]) const = 0;

• virtual Math::range t get y range() const

• virtual double get y value(const unsigned int x[]) const = 0;

• virtual double interpolate(const double x[]) const = 0;

• virtual double interpolate(const double x[], unsigned int deriv, unsigned int dim) const= 0;

• virtual void set interpolation(Interpolation i) = 0;

Page 134: Gop Ti Cal

Chapter 4: API documentation 131

Members detail

virtual ~Set()

No documentation available

virtual unsigned int get count(unsigned int dim = 0) const = 0;

Get total number of data stored for dimension n in data set

virtual unsigned int get dimensions() const = 0;

Get total number of dimensions

Interpolation get interpolation()

Get current interpolation method

unsigned int get version() const

Return version number which is incremented on each data set change/clear

virtual Math::range t get x range(unsigned int dim = 0) const =0;

Get minimal and maximal x values on dimension n found in data set

virtual double get x value(unsigned int n, unsigned int dim = 0)const = 0;

Get data stored at position n on dimension dim in data set

virtual Math::range t get y range() const

Get minimal and maximal y values found in data set

virtual double get y value(const unsigned int x[]) const = 0;

Get y data stored at position (x0, x1, ...) in data set

virtual double interpolate(const double x[]) const = 0;

Interpolate y value corresponding to given x value(s) in data set.

virtual double interpolate(const double x[], unsigned int deriv,unsigned int dim) const = 0;

Interpolate y value corresponding to given x value in data set. Data may be differentiatedseveral times along the requested dimension.

• deriv: Differentiation count, 0 means y value, 1 means 1st derivative...

• dim: Differentiation dimension

virtual void set interpolation(Interpolation i) = 0;

Select interpolation method

Page 135: Gop Ti Cal

Chapter 4: API documentation 132

Data::Set class full member list

Functions

• virtual ~Set()

• virtual unsigned int get count(unsigned int dim = [...]) const = 0;

• virtual unsigned int get dimensions() const = 0;

• Interpolation get interpolation()

• unsigned int get version() const

• virtual Math::range t get x range(unsigned int dim = [...]) const = 0;

• virtual double get x value(unsigned int n, unsigned int dim = [...]) const = 0;

• virtual Math::range t get y range() const

• virtual double get y value(const unsigned int x[]) const = 0;

• virtual double interpolate(const double x[]) const = 0;

• virtual double interpolate(const double x[], unsigned int deriv, unsigned int dim) const= 0;

• virtual void set interpolation(Interpolation i) = 0;

Page 136: Gop Ti Cal

Chapter 4: API documentation 133

Data::Set1d class reference

Declaration

#include <Goptical/Data/Set1d>

namespace Goptical {

namespace Data {

class Set1d;

};

};

This class is a member of the Data namespace.

This abstract class contains pure virtuals.

Inheritance

Description

Base class for 1d y = f(x) numerical data set

Members

See also the full member list (see [Data Set1d class full member list], page 136) section forthis class.

Inherited members

• 12 members inherited from Set (see [Data Set class reference], page 130)

Functions

• virtual ~Set1d()

• virtual unsigned int get count() const = 0;

• virtual unsigned int get count(unsigned int dim) const

• virtual unsigned int get dimensions() const

• virtual Math::range t get x range() const = 0;

• virtual Math::range t get x range(unsigned int dimension) const

• virtual double get x value(unsigned int n) const = 0;

• virtual double get x value(unsigned int n, unsigned int dim) const

• virtual double get y value(unsigned int n) const = 0;

• virtual double & get y value(unsigned int n) = 0;

• virtual double get y value(const unsigned int x[]) const

• virtual double interpolate(const double x) const = 0;

• virtual double interpolate(const double x, unsigned int deriv) const = 0;

• virtual double interpolate(const double x[]) const

• virtual double interpolate(const double x[], unsigned int deriv, unsigned int dimension)const

Page 137: Gop Ti Cal

Chapter 4: API documentation 134

Members detail

virtual ~Set1d()

No documentation available

virtual unsigned int get count() const = 0;

Get total number of data stored in data set

virtual unsigned int get count(unsigned int dim) const

This virtual function implements the get_count (see [_223], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Get total number of data stored for dimension n in data set

virtual unsigned int get dimensions() const

This virtual function implements the get_dimensions (see [_224], page 131) pure func-tion declared in the Set (see [Data_Set_class_reference], page 130) base abstractclass.

Documentation inherited from base class:

Get total number of dimensions

virtual Math::range t get x range() const = 0;

Get minimal and maximal x values on found in data set

virtual Math::range t get x range(unsigned int dimension) const

This virtual function implements the get_x_range (see [_227], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Get minimal and maximal x values on dimension n found in data set

virtual double get x value(unsigned int n) const = 0;

Get x data at index n in data set

virtual double get x value(unsigned int n, unsigned int dim) const

This virtual function implements the get_x_value (see [_228], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Get data stored at position n on dimension dim in data set

virtual double get y value(unsigned int n) const = 0;

Get y data stored at index n in data set

virtual double & get y value(unsigned int n) = 0;

Get modifiable reference to y data stored at index n in data set

Page 138: Gop Ti Cal

Chapter 4: API documentation 135

virtual double get y value(const unsigned int x[]) const

This virtual function implements the get_y_value (see [_230], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Get y data stored at position (x0, x1, ...) in data set

virtual double interpolate(const double x) const = 0;

Interpolate y value corresponding to given x value in data set.

virtual double interpolate(const double x, unsigned int deriv)const = 0;

Interpolate y value corresponding to given x value in data set. Data may be differentiatedseveral times.

• deriv: Differentiation count, 0 means y value, 1 means 1st derivative...

virtual double interpolate(const double x[]) const

This virtual function implements the interpolate (see [_231], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Interpolate y value corresponding to given x value(s) in data set.

virtual double interpolate(const double x[], unsigned int deriv,unsigned int dimension) const

This virtual function implements the interpolate (see [_232], page 131) pure functiondeclared in the Set (see [Data_Set_class_reference], page 130) base abstract class.

Documentation inherited from base class:

Interpolate y value corresponding to given x value in data set. Data may be differentiatedseveral times along the requested dimension.

• deriv: Differentiation count, 0 means y value, 1 means 1st derivative...

• dim: Differentiation dimension

Page 139: Gop Ti Cal

Chapter 4: API documentation 136

Data::Set1d class full member list

Functions

• virtual ~Set1d()

• virtual unsigned int get count() const = 0;

• virtual unsigned int get count(unsigned int dim) const

• virtual unsigned int get dimensions() const

• Interpolation get interpolation()

• unsigned int get version() const

• virtual Math::range t get x range() const = 0;

• virtual Math::range t get x range(unsigned int dimension) const

• virtual double get x value(unsigned int n) const = 0;

• virtual double get x value(unsigned int n, unsigned int dim) const

• virtual Math::range t get y range() const

• virtual double get y value(unsigned int n) const = 0;

• virtual double & get y value(unsigned int n) = 0;

• virtual double get y value(const unsigned int x[]) const

• virtual double interpolate(const double x) const = 0;

• virtual double interpolate(const double x, unsigned int deriv) const = 0;

• virtual double interpolate(const double x[]) const

• virtual double interpolate(const double x[], unsigned int deriv, unsigned int dimension)const

• virtual void set interpolation(Interpolation i) = 0;

Page 140: Gop Ti Cal

Chapter 4: API documentation 137

Data::DiscreteSetBase internal class members

DiscreteSetBase()

No documentation available

~DiscreteSetBase()

No documentation available

void add data(double x, double y, double yp = 0.0)

Insert data pair in data set. If a pair with the same x value exists, it will be replaced bythe new value. Derivative value may be provided as well.

void clear()

Clear all data

virtual unsigned int get count() const

This virtual function implements the get_count (see [_235], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get total number of data stored in data set

double get d value(unsigned int x) const

Get stored derivative value at index x

double & get d value(unsigned int x)

Get modifiable reference to stored derivative value at index x

virtual Math::range t get x range() const

This virtual function implements the get_x_range (see [_238], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get minimal and maximal x values on found in data set

virtual double get x value(unsigned int x) const

This virtual function implements the get_x_value (see [_240], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get x data at index n in data set

Page 141: Gop Ti Cal

Chapter 4: API documentation 138

virtual double get y value(unsigned int x) const

This virtual function implements the get_y_value (see [_242], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get y data stored at index n in data set

virtual double & get y value(unsigned int x)

This virtual function implements the get_y_value (see [_243], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get modifiable reference to y data stored at index n in data set

void reserve( size t n)

Reserve data entries

Page 142: Gop Ti Cal

Chapter 4: API documentation 139

Data::Interpolate1d internal class members

Interpolate1d()

No documentation available

~Interpolate1d()

No documentation available

double interpolate(const double x) const

No documentation available

double interpolate(const double x, unsigned int deriv) const

No documentation available

void set interpolation(Interpolation i)

No documentation available

Page 143: Gop Ti Cal

Chapter 4: API documentation 140

Data::SampleSetBase internal class members

SampleSetBase()

No documentation available

~SampleSetBase()

No documentation available

void clear()

Clear all data

virtual unsigned int get count() const

This virtual function implements the get_count (see [_235], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get total number of data stored in data set

double get d value(unsigned int x) const

Get stored derivative value at index x

double & get d value(unsigned int x)

Get modifiable reference to stored derivative value at index x

double get origin() const

Get x value of first sample

double get step() const

Get step size between consecutive x values

virtual Math::range t get x range() const

This virtual function implements the get_x_range (see [_238], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get minimal and maximal x values on found in data set

virtual double get x value(unsigned int x) const

This virtual function implements the get_x_value (see [_240], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get x data at index n in data set

Page 144: Gop Ti Cal

Chapter 4: API documentation 141

virtual double get y value(unsigned int x) const

This virtual function implements the get_y_value (see [_242], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get y data stored at index n in data set

virtual double & get y value(unsigned int x)

This virtual function implements the get_y_value (see [_243], page 134) pure functiondeclared in the Set1d (see [Data_Set1d_class_reference], page 133) base abstractclass.

Documentation inherited from base class:

Get modifiable reference to y data stored at index n in data set

void resize(unsigned int n)

Set number of samples

void set metrics(double origin, double step)

Set x origin and step values

void set value(unsigned int x, double y, double d = 0.0)

Set y value and its derivative at index x

void set value near(double x, double y, double d = 0.0)

Set y value and its derivative at nearest x value

Page 145: Gop Ti Cal

Chapter 4: API documentation 142

Design namespace reference

Description

Design module classes

Members

Namespace

• Telescope

Page 146: Gop Ti Cal

Chapter 4: API documentation 143

Design::Telescope namespace reference

Description

Telescope designs

Members

Types

• template class Cassegrain

• enum CassegrainType

• class Newton

• class Telescope

Members detail

enum CassegrainType

Specify Cassegrain telescope type

Identifier DescriptionClassicalCassegrainRitcheyChretienDallKirkhamPressmannCamichel

Page 147: Gop Ti Cal

Chapter 4: API documentation 144

Design::Telescope::Cassegrain class reference

Declaration

#include <Goptical/Design/Telescope/Cassegrain>

namespace Goptical {

namespace Design {

namespace Telescope {

template <CassegrainType type> class Cassegrain;

};

};

};

This class is a member of the Telescope namespace.

Inheritance

Description

This class is a group of optical elements forming a Cassegrain telescope. Optical elementsare adjusted as needed from prescribed telescope parameters.

The CassegrainType (see [ 282], page 143) enum specifies type of Cassegrain telescope.

Members

See also the full member list (see [Design Telescope Cassegrain class full member list],page 148) section for this class.

Inherited members

• 60 members inherited from Telescope (see [Design Telescope Telescope class reference],page 156)

Functions

• Cassegrain(const Math::VectorPair3 &p, double focal, double diameter, double magni-fication = [...], double bwd = [...], double field angle = [...])

• virtual double get bwd() const

• virtual double get diameter() const

• virtual double get field angle() const

• virtual double get focal() const

• virtual Math::VectorPair3 get focal plane() const

• double get magnification() const

• double get mirrors separation() const

• const Sys::Mirror & get primary() const

• Sys::Mirror & get primary()

• double get primary conic() const

Page 148: Gop Ti Cal

Chapter 4: API documentation 145

• const Sys::Mirror & get secondary() const

• Sys::Mirror & get secondary()

• double get secondary conic() const

• double get secondary diameter() const

• virtual double get unvignetted image diameter() const

• virtual void set bwd(double e)

• virtual void set diameter(double d1)

• virtual void set field angle(double fa)

• virtual void set focal(double f)

• void set magnification(double m)

• void set secondary diameter(double d2)

Members detail

Cassegrain(const Math::VectorPair3 &p, double focal, doublediameter, double magnification = 3., double bwd = 100, doublefield angle = 1.)

No documentation available

virtual double get bwd() const

This virtual function implements the get_bwd (see [_325], page 157) pure functiondeclared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Get telescope back working distance

virtual double get diameter() const

This virtual function implements the get_diameter (see [_326], page 157) pure func-tion declared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Get telescope primary mirror diameter

virtual double get field angle() const

This virtual function implements the get_field_angle (see [_327], page 157) purefunction declared in the Telescope (see [Design_Telescope_Telescope_class_

reference], page 156) base abstract class.

Documentation inherited from base class:

Get telescope field angle

Page 149: Gop Ti Cal

Chapter 4: API documentation 146

virtual double get focal() const

This virtual function implements the get_focal (see [_328], page 157) pure functiondeclared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Get telescope focal length

virtual Math::VectorPair3 get focal plane() const

This virtual function implements the get_focal_plane (see [_329], page 157) purefunction declared in the Telescope (see [Design_Telescope_Telescope_class_

reference], page 156) base abstract class.

Documentation inherited from base class:

Get telescope focal plane in parent coordinate system

double get magnification() const

Get telescope secondary mirror magnification

double get mirrors separation() const

Get distance between mirrors

const Sys::Mirror & get primary() const

Get telescope primary mirror component

Sys::Mirror & get primary()

Get telescope primary mirror component

double get primary conic() const

Get primary mirror schwarzschild constant

const Sys::Mirror & get secondary() const

Get telescope secondary mirror component

Sys::Mirror & get secondary()

Get telescope secondary mirror component

double get secondary conic() const

Get secondary mirror schwarzschild constant

double get secondary diameter() const

Get telescope secondary mirror diameter

virtual double get unvignetted image diameter() const

This virtual function implements the get_unvignetted_image_diameter (see [_330],

page 157) pure function declared in the Telescope (see [Design_Telescope_

Telescope_class_reference], page 156) base abstract class.

Page 150: Gop Ti Cal

Chapter 4: API documentation 147

Documentation inherited from base class:

Get diameter of unvignetted image on focal plane

virtual void set bwd(double e)

This virtual function implements the set_bwd (see [_331], page 157) pure functiondeclared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Set telescope back working distance

virtual void set diameter(double d1)

This virtual function implements the set_diameter (see [_332], page 157) pure func-tion declared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Set telescope primary mirror diameter

virtual void set field angle(double fa)

This virtual function implements the set_field_angle (see [_333], page 157) purefunction declared in the Telescope (see [Design_Telescope_Telescope_class_

reference], page 156) base abstract class.

Documentation inherited from base class:

Set telescope field angle

virtual void set focal(double f)

This virtual function implements the set_focal (see [_334], page 157) pure functiondeclared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Set telescope focal length

void set magnification(double m)

Set telescope secondary mirror magnification

void set secondary diameter(double d2)

Set telescope secondary mirror diameter

Page 151: Gop Ti Cal

Chapter 4: API documentation 148

Design::Telescope::Cassegrain class full member list

Types

• typedef [...] element list t

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Cassegrain(const Math::VectorPair3 &p, double focal, double diameter, double magni-fication = [...], double bwd = [...], double field angle = [...])

• void add(const ref<Sys::Element> &e)

• template bool contains(const X *x) const

• void draw 2d(Io::Renderer &r) const

• void draw 2d fit(Io::RendererViewport &r, bool keep aspect = [...]) const

• void draw 3d(Io::Renderer &r) const

• void draw 3d fit(Io::RendererViewport &r, double z offset = [...]) const

• template void enable single(const X &e)

• template X * find() const

• virtual Math::VectorPair3 get bounding box() const

• virtual double get bwd() const

• virtual double get diameter() const

• Math::Vector3 get direction(const Sys::Element &e) const

• Math::Vector3 get direction() const

• const Sys::Container::element list t & get element list() const

• template void get elements(const delegate<void(const X&)> &d) const

• template void get elements(const delegate<void(X&)> &d)

• virtual double get field angle() const

• virtual double get focal() const

• virtual Math::VectorPair3 get focal plane() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• double get magnification() const

• double get mirrors separation() const

• Sys::Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Sys::Element &e) const

Page 152: Gop Ti Cal

Chapter 4: API documentation 149

• Math::Vector3 get position(const Sys::Element &e) const

• Math::Vector3 get position() const

• const Sys::Mirror & get primary() const

• Sys::Mirror & get primary()

• double get primary conic() const

• const Sys::Mirror & get secondary() const

• Sys::Mirror & get secondary()

• double get secondary conic() const

• double get secondary diameter() const

• Sys::System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Sys::Element &e) const

• const Math::Transform<3> & get transform from(const Sys::Element *e) const

• const Math::Transform<3> & get transform to(const Sys::Element &e) const

• const Math::Transform<3> & get transform to(const Sys::Element *e) const

• virtual double get unvignetted image diameter() const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void remove(Sys::Element &e)

• void rotate(double x, double y, double z)

• virtual void set bwd(double e)

• virtual void set diameter(double d1)

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• virtual void set field angle(double fa)

• virtual void set focal(double f)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set magnification(double m)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set secondary diameter(double d2)

• void set transform(const Math::Transform<3> &t)

• void update version()

Page 153: Gop Ti Cal

Chapter 4: API documentation 150

Design::Telescope::Newton class reference

Declaration

#include <Goptical/Design/Telescope/Newton>

namespace Goptical {

namespace Design {

namespace Telescope {

class Newton;

};

};

};

This class is a member of the Telescope namespace.

Inheritance

Description

This class is a group of optical elements forming a Newton telescope. Optical elements areadjusted as needed from prescribed telescope parameters.

See also A newton telescope with corrector (see Section 3.3.2 [A newton telescope withcorrector], page 19) section.

Members

See also the full member list (see [Design Telescope Newton class full member list],page 154) section for this class.

Inherited members

• 60 members inherited from Telescope (see [Design Telescope Telescope class reference],page 156)

Functions

• Newton(const Math::VectorPair3 &p, double focal, double diameter, double bwd =[...], double field angle = [...])

• virtual double get bwd() const

• virtual double get diameter() const

• virtual double get field angle() const

• virtual double get focal() const

• virtual Math::VectorPair3 get focal plane() const

• Sys::Mirror & get primary()

• const Sys::Mirror & get primary() const

• Sys::Mirror & get secondary()

• const Sys::Mirror & get secondary() const

Page 154: Gop Ti Cal

Chapter 4: API documentation 151

• double get secondary major axis() const

• double get secondary minor axis() const

• double get secondary offset() const

• virtual double get unvignetted image diameter() const

• virtual void set bwd(double bwd)

• virtual void set diameter(double diameter)

• virtual void set field angle(double fa)

• virtual void set focal(double focal)

• void set secondary minor axis(double diameter)

Members detail

Newton(const Math::VectorPair3 &p, double focal, doublediameter, double bwd = 100, double field angle = 1.)

No documentation available

virtual double get bwd() const

This virtual function implements the get_bwd (see [_325], page 157) pure functiondeclared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Get telescope back working distance

virtual double get diameter() const

This virtual function implements the get_diameter (see [_326], page 157) pure func-tion declared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Get telescope primary mirror diameter

virtual double get field angle() const

This virtual function implements the get_field_angle (see [_327], page 157) purefunction declared in the Telescope (see [Design_Telescope_Telescope_class_

reference], page 156) base abstract class.

Documentation inherited from base class:

Get telescope field angle

virtual double get focal() const

This virtual function implements the get_focal (see [_328], page 157) pure functiondeclared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Get telescope focal length

Page 155: Gop Ti Cal

Chapter 4: API documentation 152

virtual Math::VectorPair3 get focal plane() const

This virtual function implements the get_focal_plane (see [_329], page 157) purefunction declared in the Telescope (see [Design_Telescope_Telescope_class_

reference], page 156) base abstract class.

Documentation inherited from base class:

Get telescope focal plane in parent coordinate system

Sys::Mirror & get primary()

Get telescope primary mirror component

const Sys::Mirror & get primary() const

Get telescope primary mirror component

Sys::Mirror & get secondary()

Get telescope secondary mirror component

const Sys::Mirror & get secondary() const

Get telescope secondary mirror component

double get secondary major axis() const

Get secondary mirror major axis length

double get secondary minor axis() const

Get secondary mirror minor axis length

double get secondary offset() const

Get secondary mirror offset

virtual double get unvignetted image diameter() const

This virtual function implements the get_unvignetted_image_diameter (see [_330],

page 157) pure function declared in the Telescope (see [Design_Telescope_

Telescope_class_reference], page 156) base abstract class.

Documentation inherited from base class:

Get diameter of unvignetted image on focal plane

virtual void set bwd(double bwd)

This virtual function implements the set_bwd (see [_331], page 157) pure functiondeclared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Set telescope back working distance

Page 156: Gop Ti Cal

Chapter 4: API documentation 153

virtual void set diameter(double diameter)

This virtual function implements the set_diameter (see [_332], page 157) pure func-tion declared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Set telescope primary mirror diameter

virtual void set field angle(double fa)

This virtual function implements the set_field_angle (see [_333], page 157) purefunction declared in the Telescope (see [Design_Telescope_Telescope_class_

reference], page 156) base abstract class.

Documentation inherited from base class:

Set telescope field angle

virtual void set focal(double focal)

This virtual function implements the set_focal (see [_334], page 157) pure functiondeclared in the Telescope (see [Design_Telescope_Telescope_class_reference],

page 156) base abstract class.

Documentation inherited from base class:

Set telescope focal length

void set secondary minor axis(double diameter)

Set telescope secondary mirror diameter

Page 157: Gop Ti Cal

Chapter 4: API documentation 154

Design::Telescope::Newton class full member list

Types

• typedef [...] element list t

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Newton(const Math::VectorPair3 &p, double focal, double diameter, double bwd =[...], double field angle = [...])

• void add(const ref<Sys::Element> &e)

• template bool contains(const X *x) const

• void draw 2d(Io::Renderer &r) const

• void draw 2d fit(Io::RendererViewport &r, bool keep aspect = [...]) const

• void draw 3d(Io::Renderer &r) const

• void draw 3d fit(Io::RendererViewport &r, double z offset = [...]) const

• template void enable single(const X &e)

• template X * find() const

• virtual Math::VectorPair3 get bounding box() const

• virtual double get bwd() const

• virtual double get diameter() const

• Math::Vector3 get direction(const Sys::Element &e) const

• Math::Vector3 get direction() const

• const Sys::Container::element list t & get element list() const

• template void get elements(const delegate<void(const X&)> &d) const

• template void get elements(const delegate<void(X&)> &d)

• virtual double get field angle() const

• virtual double get focal() const

• virtual Math::VectorPair3 get focal plane() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• Sys::Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Sys::Element &e) const

• Math::Vector3 get position(const Sys::Element &e) const

• Math::Vector3 get position() const

Page 158: Gop Ti Cal

Chapter 4: API documentation 155

• Sys::Mirror & get primary()

• const Sys::Mirror & get primary() const

• Sys::Mirror & get secondary()

• const Sys::Mirror & get secondary() const

• double get secondary major axis() const

• double get secondary minor axis() const

• double get secondary offset() const

• Sys::System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Sys::Element &e) const

• const Math::Transform<3> & get transform from(const Sys::Element *e) const

• const Math::Transform<3> & get transform to(const Sys::Element &e) const

• const Math::Transform<3> & get transform to(const Sys::Element *e) const

• virtual double get unvignetted image diameter() const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void remove(Sys::Element &e)

• void rotate(double x, double y, double z)

• virtual void set bwd(double bwd)

• virtual void set diameter(double diameter)

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• virtual void set field angle(double fa)

• virtual void set focal(double focal)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set secondary minor axis(double diameter)

• void set transform(const Math::Transform<3> &t)

• void update version()

Page 159: Gop Ti Cal

Chapter 4: API documentation 156

Design::Telescope::Telescope class reference

Declaration

#include <Goptical/Design/Telescope/Telescope>

namespace Goptical {

namespace Design {

namespace Telescope {

class Telescope;

};

};

};

This class is a member of the Telescope namespace.

This abstract class contains pure virtuals.

Inheritance

Description

Base class for telescope optical designs

Members

See also the full member list (see [Design Telescope Telescope class full member list],page 158) section for this class.

Inherited members

• 51 members inherited from Sys::Group (see [Sys Group class reference], page 409)

Functions

• Telescope(const Math::VectorPair3 &p)

• virtual double get bwd() const = 0;

• virtual double get diameter() const = 0;

• virtual double get field angle() const = 0;

• virtual double get focal() const = 0;

• virtual Math::VectorPair3 get focal plane() const = 0;

• virtual double get unvignetted image diameter() const = 0;

• virtual void set bwd(double bwd) = 0;

• virtual void set diameter(double diameter) = 0;

• virtual void set field angle(double bwd) = 0;

• virtual void set focal(double focal) = 0;

Members detail

Page 160: Gop Ti Cal

Chapter 4: API documentation 157

Telescope(const Math::VectorPair3 &p)

No documentation available

virtual double get bwd() const = 0;

Get telescope back working distance

virtual double get diameter() const = 0;

Get telescope primary mirror diameter

virtual double get field angle() const = 0;

Get telescope field angle

virtual double get focal() const = 0;

Get telescope focal length

virtual Math::VectorPair3 get focal plane() const = 0;

Get telescope focal plane in parent coordinate system

virtual double get unvignetted image diameter() const = 0;

Get diameter of unvignetted image on focal plane

virtual void set bwd(double bwd) = 0;

Set telescope back working distance

virtual void set diameter(double diameter) = 0;

Set telescope primary mirror diameter

virtual void set field angle(double bwd) = 0;

Set telescope field angle

virtual void set focal(double focal) = 0;

Set telescope focal length

Page 161: Gop Ti Cal

Chapter 4: API documentation 158

Design::Telescope::Telescope class full member list

Types

• typedef [...] element list t

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Telescope(const Math::VectorPair3 &p)

• void add(const ref<Sys::Element> &e)

• template bool contains(const X *x) const

• void draw 2d(Io::Renderer &r) const

• void draw 2d fit(Io::RendererViewport &r, bool keep aspect = [...]) const

• void draw 3d(Io::Renderer &r) const

• void draw 3d fit(Io::RendererViewport &r, double z offset = [...]) const

• template void enable single(const X &e)

• template X * find() const

• virtual Math::VectorPair3 get bounding box() const

• virtual double get bwd() const = 0;

• virtual double get diameter() const = 0;

• Math::Vector3 get direction(const Sys::Element &e) const

• Math::Vector3 get direction() const

• const Sys::Container::element list t & get element list() const

• template void get elements(const delegate<void(const X&)> &d) const

• template void get elements(const delegate<void(X&)> &d)

• virtual double get field angle() const = 0;

• virtual double get focal() const = 0;

• virtual Math::VectorPair3 get focal plane() const = 0;

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• Sys::Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Sys::Element &e) const

• Math::Vector3 get position(const Sys::Element &e) const

• Math::Vector3 get position() const

• Sys::System * get system() const

Page 162: Gop Ti Cal

Chapter 4: API documentation 159

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Sys::Element &e) const

• const Math::Transform<3> & get transform from(const Sys::Element *e) const

• const Math::Transform<3> & get transform to(const Sys::Element &e) const

• const Math::Transform<3> & get transform to(const Sys::Element *e) const

• virtual double get unvignetted image diameter() const = 0;

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void remove(Sys::Element &e)

• void rotate(double x, double y, double z)

• virtual void set bwd(double bwd) = 0;

• virtual void set diameter(double diameter) = 0;

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• virtual void set field angle(double bwd) = 0;

• virtual void set focal(double focal) = 0;

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set transform(const Math::Transform<3> &t)

• void update version()

Page 163: Gop Ti Cal

Chapter 4: API documentation 160

Error class reference

Declaration

#include <Goptical/Error>

namespace Goptical {

class Error;

};

This class is a member of the Goptical namespace.

Inheritance

Description

Base class used for Goptical exceptions.

Members

See also the full member list (see [Error class full member list], page 161) section for thisclass.

Function

• Error(const std::string &msg = [...])

Members detail

Error(const std:: string &msg = "")

No documentation available

Page 164: Gop Ti Cal

Chapter 4: API documentation 161

Error class full member list

Function

• Error(const std::string &msg = [...])

Page 165: Gop Ti Cal

Chapter 4: API documentation 162

Io namespace reference

Description

Data input/output and graphical rendering

Members

Types

• class ImportOslo

• class ImportZemax

• class Renderer

• class RendererDxf

• class RendererGd

• class RendererOpengl

• class RendererPlplot

• class RendererSvg

• class RendererX11

• class RendererX3d

• class Export

• class Import

• enum IntensityMode

• enum PointStyle

• enum RayColorMode

• class RendererAxes

• class RendererViewport

• struct Rgb

• enum Style

• enum TextAlignMask

Functions

• TextAlignMask operator&(TextAlignMask a, TextAlignMask b)

• TextAlignMask operator|(TextAlignMask a, TextAlignMask b)

• TextAlignMask operator~(TextAlignMask a)

Constants

• const Rgb rgb black

• const Rgb rgb blue

• const Rgb rgb cyan

• const Rgb rgb gray

• const Rgb rgb green

Page 166: Gop Ti Cal

Chapter 4: API documentation 163

• const Rgb rgb magenta

• const Rgb rgb red

• const Rgb rgb table[]

• const size t rgb table size

• const Rgb rgb white

• const Rgb rgb yellow

Members detail

enum IntensityMode

Specifies light ray intensity rendering mode

Identifier DescriptionIntensityIgnore Light ray intensity is ignored, no blending is performed while

rendering ray

IntensityShade Light ray intensity is used to blend rendered ray

IntensityLogShade Light ray intensity logarithm is used to blend rendered ray.This enable faint rays to remain visible.

enum PointStyle

Identifier DescriptionPointStyleDotPointStyleCrossPointStyleRoundPointStyleSquarePointStyleTriangle

enum RayColorMode

Specifies light ray color rendering

Identifier DescriptionRayColorWavelen Compute ray color from its wavelength

RayColorFixed Use fixed ray color

enum Style

Specifies rendering elements which can have modified colors and style

Identifier DescriptionStyleBackground

Page 167: Gop Ti Cal

Chapter 4: API documentation 164

StyleForegroundStyleRayStyleSurfaceStyleGlassStyleLast

enum TextAlignMask

Specifies rendered text alignment

Identifier DescriptionTextAlignCenter Vertically centered

TextAlignLeftTextAlignRightTextAlignTopTextAlignBottomTextAlignMiddle Horizontally centered

TextAlignMask operator&(TextAlignMask a, TextAlignMask b)

Bitwise and operation for use on TextAlignMask (see [ 340], page 164) enum.

TextAlignMask operator|(TextAlignMask a, TextAlignMask b)

Bitwise or operation for use on TextAlignMask (see [ 340], page 164) enum.

TextAlignMask operator~(TextAlignMask a)

Bitwise not operation for use on TextAlignMask (see [ 340], page 164) enum.

const Rgb rgb black

No documentation available

const Rgb rgb blue

No documentation available

const Rgb rgb cyan

No documentation available

const Rgb rgb gray

No documentation available

const Rgb rgb green

No documentation available

const Rgb rgb magenta

No documentation available

Page 168: Gop Ti Cal

Chapter 4: API documentation 165

const Rgb rgb red

No documentation available

const Rgb rgb table[]

This table contains some common colors.

See also rgb table size (see [ 352], page 165) variable.

const size t rgb table size = 9

This constant specifies the number of entries in rgb table (see [ 351], page 165).

const Rgb rgb white

No documentation available

const Rgb rgb yellow

No documentation available

Page 169: Gop Ti Cal

Chapter 4: API documentation 166

Io::ImportOslo class reference

Declaration

#include <Goptical/Io/ImportOslo>

namespace Goptical {

namespace Io {

class ImportOslo;

};

};

This class is a member of the Io namespace.

Description

This class implements an Oslo glass catalog loader.

Members

See also the full member list (see [Io ImportOslo class full member list], page 167) sectionfor this class.

Static function

• static Material::Catalog & import catalog(const std::string &filename)

Members detail

static Material::Catalog & import catalog(const std:: string&filename)

import Oslo glass catalog file (.glc)

Page 170: Gop Ti Cal

Chapter 4: API documentation 167

Io::ImportOslo class full member list

Static function

• static Material::Catalog & import catalog(const std::string &filename)

Page 171: Gop Ti Cal

Chapter 4: API documentation 168

Io::ImportZemax class reference

Declaration

This class is flagged as experimental.

#include <Goptical/Io/ImportZemax>

namespace Goptical {

namespace Io {

class ImportZemax;

};

};

This class is a member of the Io namespace.

Description

This class implements a zemax optical design file and glass catalog loader.

Members

See also the full member list (see [Io ImportZemax class full member list], page 170) sec-tion for this class.

Functions

• ref<Material::Catalog> get catalog(const std::string &name)

• ref<Material::Catalog> import catalog(const std::string &name)

• ref<Material::Catalog> import catalog(const std::string &path, const std::string&name)

• ref<Material::Catalog> import catalog file(const std::string &path)

• ref<Sys::System> import design(const std::string &filename)

• ref<Material::Dielectric> import table glass(const std::string &filename)

• void set catalog path(const std::string &path)

Members detail

ref <Material::Catalog> get catalog(const std:: string &name)

This function is flagged as experimental.

Get already imported catalog

ref <Material::Catalog> import catalog(const std:: string &name)

This function is flagged as experimental.

Import Zemax ascii glass catalog, guess filename from default path and name

ref <Material::Catalog> import catalog(const std:: string &path,const std:: string &name)

This function is flagged as experimental.

Import Zemax ascii glass catalog file (‘.agf)’

Page 172: Gop Ti Cal

Chapter 4: API documentation 169

ref <Material::Catalog> import catalog file(const std:: string&path)

This function is flagged as experimental.

Import Zemax ascii glass catalog file (‘.agf).’ Guess catalog name from file name

ref <Sys::System> import design(const std:: string &filename)

This function is flagged as experimental.

ref <Material::Dielectric> import table glass(const std:: string&filename)

This function is flagged as experimental.

Import Zemax table glass material file (‘.ztg)’

void set catalog path(const std:: string &path)

This function is flagged as experimental.

Set glass catalogs default path

Page 173: Gop Ti Cal

Chapter 4: API documentation 170

Io::ImportZemax class full member list

Functions

• ref<Material::Catalog> get catalog(const std::string &name)

• ref<Material::Catalog> import catalog(const std::string &name)

• ref<Material::Catalog> import catalog(const std::string &path, const std::string&name)

• ref<Material::Catalog> import catalog file(const std::string &path)

• ref<Sys::System> import design(const std::string &filename)

• ref<Material::Dielectric> import table glass(const std::string &filename)

• void set catalog path(const std::string &path)

Page 174: Gop Ti Cal

Chapter 4: API documentation 171

Io::Renderer class reference

Declaration

#include <Goptical/Io/Renderer>

namespace Goptical {

namespace Io {

class Renderer;

};

};

This class is a member of the Io namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This class define the interface for graphical rendering drivers and provide a default imple-mentation for some functions.

Members

See also the full member list (see [Io Renderer class full member list], page 173) sectionfor this class.

Functions

• Renderer()

• virtual ~Renderer()

• double get feature size() const

• const Rgb & get style color(Style s) const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• void set feature size(double feature size)

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

Members detail

Renderer()

No documentation available

virtual ~Renderer()

No documentation available

Page 175: Gop Ti Cal

Chapter 4: API documentation 172

double get feature size() const

Get size of lines and triangles used to render curved shapes..

See also set feature size (see [ 369], page 172) function.

const Rgb & get style color(Style s) const

Get rgb color from style specifier

const Rgb & rgb background() const

Get foreground rgb color

const Rgb & rgb foreground() const

Get foreground rgb color

void set feature size(double feature size)

Set size of lines and triangles used to render curved shapes..

See also get feature size (see [ 365], page 172) function.

void set ray color mode(RayColorMode m)

Set color mode for light ray drawing. Default is RayColorWavelen (see [ 338], page 163).

void set ray intensity mode(IntensityMode m)

Set light ray intensity display mode

void set style color(Style s, const Rgb &rgb)

Set rgb color for given style specifier.

Some drivers do not support changing background color after initialization.

Page 176: Gop Ti Cal

Chapter 4: API documentation 173

Io::Renderer class full member list

Functions

• Renderer()

• virtual ~Renderer()

• double get feature size() const

• const Rgb & get style color(Style s) const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• void set feature size(double feature size)

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

Page 177: Gop Ti Cal

Chapter 4: API documentation 174

Io::RendererDxf class reference

Declaration

This class is flagged as experimental.

#include <Goptical/Io/RendererDxf>

namespace Goptical {

namespace Io {

class RendererDxf;

};

};

This class is a member of the Io namespace.

Inheritance

Description

This class implements a 2d and 3d Dxf CAD format output driver. It requires the Dimelibrary to compile.

Members

See also the full member list (see [Io RendererDxf class full member list], page 176) sectionfor this class.

Inherited members

• 10 members inherited from Renderer (see [Io Renderer class reference], page 171)

Functions

• RendererDxf()

• RendererDxf(const char *filename)

• ~RendererDxf()

• unsigned int add layer(std::string name)

• void use layer(unsigned int id)

• void write(const std::string &filename)

Members detail

RendererDxf()

This constructor is flagged as experimental.

Create a DXF renderer

RendererDxf(const char *filename)

This constructor is flagged as experimental.

Create a DXF renderer, output will be written to given filename when the renderer isdestroyed.

Page 178: Gop Ti Cal

Chapter 4: API documentation 175

~RendererDxf()

This destructor is flagged as experimental.

unsigned int add layer(std:: string name)

This function is flagged as experimental.

Add a new layer in dxf file and return its index

void use layer(unsigned int id)

This function is flagged as experimental.

Set current layer

void write(const std:: string &filename)

This function is flagged as experimental.

Save output to a DXF file

Page 179: Gop Ti Cal

Chapter 4: API documentation 176

Io::RendererDxf class full member list

Functions

• RendererDxf()

• RendererDxf(const char *filename)

• ~RendererDxf()

• unsigned int add layer(std::string name)

• double get feature size() const

• const Rgb & get style color(Style s) const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• void set feature size(double feature size)

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

• void use layer(unsigned int id)

• void write(const std::string &filename)

Page 180: Gop Ti Cal

Chapter 4: API documentation 177

Io::RendererGd class reference

Declaration

#include <Goptical/Io/RendererGd>

namespace Goptical {

namespace Io {

class RendererGd;

};

};

This class is a member of the Io namespace.

Inheritance

Description

This class implements a Gd graphic output driver. It needs the gd library to compile.

Members

See also the full member list (see [Io RendererGd class full member list], page 179) sectionfor this class.

Inherited members

• 31 members inherited from RendererViewport (see [Io RendererViewport class reference],page 205)

Functions

• RendererGd(gdImagePtr im, const Rgb &background = [...], gdFontPtr font = [...],const char *TFfontlist = [...])

• RendererGd(const char *filename, unsigned int width = [...], unsigned int height =[...], const Rgb &background = [...], const char *TFfontlist = [...])

• RendererGd(unsigned int width = [...], unsigned int height = [...], const Rgb &back-ground = [...], const char *TFfontlist = [...])

• ~RendererGd()

• virtual void clear()

• void set brush thickness(unsigned int t)

• void write(const std::string &filename)

Members detail

RendererGd(gdImagePtr im, const Rgb &background =rgb white, gdFontPtr font = 0, const char *TFfontlist = 0)

Create a new gd renderer using specified gd resources

Page 181: Gop Ti Cal

Chapter 4: API documentation 178

RendererGd(const char *filename, unsigned int width = 800,unsigned int height = 600, const Rgb &background = rgb white,const char *TFfontlist = 0)

Create a new gd renderer with given resolution, png output will be written to file on rendererdestruction.

RendererGd(unsigned int width = 800, unsigned int height = 600,const Rgb &background = rgb white, const char *TFfontlist = 0)

Create a new gd renderer with given resolution

~RendererGd()

No documentation available

virtual void clear()

This virtual function overrides the clear virtual function defined in the RendererViewport(see [Io_RendererViewport_class_reference], page 205) base abstract class for inter-nal purposes.

Clear current image buffer

void set brush thickness(unsigned int t)

No documentation available

void write(const std:: string &filename)

Write image to file in png format

Page 182: Gop Ti Cal

Chapter 4: API documentation 179

Io::RendererGd class full member list

Functions

• RendererGd(gdImagePtr im, const Rgb &background = [...], gdFontPtr font = [...],const char *TFfontlist = [...])

• RendererGd(const char *filename, unsigned int width = [...], unsigned int height =[...], const Rgb &background = [...], const char *TFfontlist = [...])

• RendererGd(unsigned int width = [...], unsigned int height = [...], const Rgb &back-ground = [...], const char *TFfontlist = [...])

• ~RendererGd()

• virtual void clear()

• virtual void draw pages grid(const Rgb &rgb = [...])

• double get feature size() const

• double get fov() const

• const Rgb & get style color(Style s) const

• const Math::VectorPair2 & get window() const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• void set brush thickness(unsigned int t)

• void set camera direction(const Math::Vector3 &dir)

• void set camera position(const Math::Vector3 &pos)

• void set feature size(double feature size)

• void set fov(double fov)

• void set margin(double left, double bottom, double right, double top)

• void set margin(double width, double height)

• void set margin output(double left, double bottom, double right, double top)

• void set margin output(double width, double height)

• void set margin ratio(double left, double bottom, double right, double top)

• void set margin ratio(double width, double height)

• void set numeric format(std::ios base::fmtflags format, unsigned int precision)

• virtual void set page(unsigned int page)

• virtual void set page layout(unsigned int cols, unsigned int rows)

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

• virtual void set window(const Math::Vector2 &center, const Math::Vector2 &size, boolkeep aspect = [...])

• void set window(const Math::VectorPair2 &window, bool keep aspect = [...])

• void set window(const Math::Vector2 &center, double radius, bool keep aspect = [...])

• void write(const std::string &filename)

Page 183: Gop Ti Cal

Chapter 4: API documentation 180

Io::RendererOpengl class reference

Declaration

#include <Goptical/Io/RendererOpengl>

namespace Goptical {

namespace Io {

class RendererOpengl;

};

};

This class is a member of the Io namespace.

Inheritance

Description

This class implements an Opengl graphic output driver. It needs the opengl library tocompile.

Members

See also the full member list (see [Io RendererOpengl class full member list], page 182)section for this class.

Inherited members

• 31 members inherited from RendererViewport (see [Io RendererViewport class reference],page 205)

Functions

• RendererOpengl(double near, double far, double width = [...], double height = [...],const Rgb &background = [...])

• void set z range(double near, double far)

Static functions

• static void apply transform(const Math::Transform<3> &t)

• static void get transform(GLenum name, Math::Transform<3> &t)

• static void glColor(const Rgb &rgb)

• static void glNormal(const Math::Vector3 &v)

• static void glVertex(const Math::Vector2 &v)

• static void glVertex(const Math::Vector3 &v)

Members detail

RendererOpengl(double near, double far, double width = 800,double height = 600, const Rgb &background = rgb black)

No documentation available

Page 184: Gop Ti Cal

Chapter 4: API documentation 181

static void apply transform(const Math::Transform<3> &t)

No documentation available

static void get transform(GLenum name, Math::Transform<3> &t)

No documentation available

static void glColor(const Rgb &rgb)

No documentation available

static void glNormal(const Math::Vector3 &v)

No documentation available

static void glVertex(const Math::Vector2 &v)

No documentation available

static void glVertex(const Math::Vector3 &v)

No documentation available

void set z range(double near, double far)

No documentation available

Page 185: Gop Ti Cal

Chapter 4: API documentation 182

Io::RendererOpengl class full member list

Functions

• RendererOpengl(double near, double far, double width = [...], double height = [...],const Rgb &background = [...])

• virtual void draw pages grid(const Rgb &rgb = [...])

• double get feature size() const

• double get fov() const

• const Rgb & get style color(Style s) const

• const Math::VectorPair2 & get window() const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• void set camera direction(const Math::Vector3 &dir)

• void set camera position(const Math::Vector3 &pos)

• void set feature size(double feature size)

• void set fov(double fov)

• void set margin(double left, double bottom, double right, double top)

• void set margin(double width, double height)

• void set margin output(double left, double bottom, double right, double top)

• void set margin output(double width, double height)

• void set margin ratio(double left, double bottom, double right, double top)

• void set margin ratio(double width, double height)

• void set numeric format(std::ios base::fmtflags format, unsigned int precision)

• virtual void set page(unsigned int page)

• virtual void set page layout(unsigned int cols, unsigned int rows)

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

• virtual void set window(const Math::Vector2 &center, const Math::Vector2 &size, boolkeep aspect = [...])

• void set window(const Math::VectorPair2 &window, bool keep aspect = [...])

• void set window(const Math::Vector2 &center, double radius, bool keep aspect = [...])

• void set z range(double near, double far)

Static functions

• static void apply transform(const Math::Transform<3> &t)

• static void get transform(GLenum name, Math::Transform<3> &t)

• static void glColor(const Rgb &rgb)

• static void glNormal(const Math::Vector3 &v)

• static void glVertex(const Math::Vector2 &v)

• static void glVertex(const Math::Vector3 &v)

Page 186: Gop Ti Cal

Chapter 4: API documentation 183

Io::RendererPlplot class reference

Declaration

#include <Goptical/Io/RendererPlplot>

namespace Goptical {

namespace Io {

class RendererPlplot;

};

};

This class is a member of the Io namespace.

Inheritance

Description

This class implements a Plplot graphic output driver. It needs the plplot library to compile.

Members

See also the full member list (see [Io RendererPlplot class full member list], page 185)section for this class.

Inherited members

• 31 members inherited from RendererViewport (see [Io RendererViewport class reference],page 205)

Functions

• RendererPlplot(plstream *pls)

• RendererPlplot(const char *device, const char *filename, unsigned int width = [...],unsigned int height = [...], const Rgb &background = [...])

• ~RendererPlplot()

• plstream * get pls()

• virtual void set page(unsigned int page)

• virtual void set page layout(unsigned int cols, unsigned int rows)

Members detail

RendererPlplot(plstream *pls)

Initialize renderer from existing plplot context

RendererPlplot(const char *device, const char *filename,unsigned int width = 800, unsigned int height = 600, const Rgb&background = rgb white)

Create a plplot renderer with specified output size

Page 187: Gop Ti Cal

Chapter 4: API documentation 184

~RendererPlplot()

No documentation available

plstream * get pls()

get plplot context object

virtual void set page(unsigned int page)

This virtual function overrides the set_page (see [_475], page 207) virtual functiondefined in the RendererViewport (see [Io_RendererViewport_class_reference],

page 205) base abstract class.

Documentation inherited from base class:

Select current page when multiple pages layout is in use.

See also set page layout (see [ 476], page 207) function.

virtual void set page layout(unsigned int cols, unsigned int rows)

This virtual function overrides the set_page_layout (see [_476], page 207) virtualfunction defined in the RendererViewport (see [Io_RendererViewport_class_

reference], page 205) base abstract class.

Documentation inherited from base class:

This function can be used to setup a pages grid. Current output page must be selectedwith set page (see [ 475], page 207).

Page 188: Gop Ti Cal

Chapter 4: API documentation 185

Io::RendererPlplot class full member list

Functions

• RendererPlplot(plstream *pls)

• RendererPlplot(const char *device, const char *filename, unsigned int width = [...],unsigned int height = [...], const Rgb &background = [...])

• ~RendererPlplot()

• virtual void draw pages grid(const Rgb &rgb = [...])

• double get feature size() const

• double get fov() const

• plstream * get pls()

• const Rgb & get style color(Style s) const

• const Math::VectorPair2 & get window() const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• void set camera direction(const Math::Vector3 &dir)

• void set camera position(const Math::Vector3 &pos)

• void set feature size(double feature size)

• void set fov(double fov)

• void set margin(double left, double bottom, double right, double top)

• void set margin(double width, double height)

• void set margin output(double left, double bottom, double right, double top)

• void set margin output(double width, double height)

• void set margin ratio(double left, double bottom, double right, double top)

• void set margin ratio(double width, double height)

• void set numeric format(std::ios base::fmtflags format, unsigned int precision)

• virtual void set page(unsigned int page)

• virtual void set page layout(unsigned int cols, unsigned int rows)

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

• virtual void set window(const Math::Vector2 &center, const Math::Vector2 &size, boolkeep aspect = [...])

• void set window(const Math::VectorPair2 &window, bool keep aspect = [...])

• void set window(const Math::Vector2 &center, double radius, bool keep aspect = [...])

Page 189: Gop Ti Cal

Chapter 4: API documentation 186

Io::RendererSvg class reference

Declaration

#include <Goptical/Io/RendererSvg>

namespace Goptical {

namespace Io {

class RendererSvg;

};

};

This class is a member of the Io namespace.

Inheritance

Description

This class implements a SVG graphic output driver.

Members

See also the full member list (see [Io RendererSvg class full member list], page 188) sectionfor this class.

Inherited members

• 31 members inherited from RendererViewport (see [Io RendererViewport class reference],page 205)

Functions

• RendererSvg(double width = [...], double height = [...], const Rgb &background =[...])

• RendererSvg(const char *filename, double width = [...], double height = [...], constRgb &background = [...])

• ~RendererSvg()

• void write(std::ostream &s)

Members detail

RendererSvg(double width = 800, double height = 600, const Rgb&background = rgb white)

Create a new svg renderer with given resolution. The write (see [ 403], page 187) functionmust be used to write svg to output stream.

RendererSvg(const char *filename, double width = 800, doubleheight = 600, const Rgb &background = rgb white)

Create a new svg renderer with given resolution and viewport window. Svg output will bewritten to given filename when the renderer object is destroyed.

Page 190: Gop Ti Cal

Chapter 4: API documentation 187

~RendererSvg()

No documentation available

void write(std:: ostream &s)

Write svg output to given stream.

Page 191: Gop Ti Cal

Chapter 4: API documentation 188

Io::RendererSvg class full member list

Functions

• RendererSvg(double width = [...], double height = [...], const Rgb &background =[...])

• RendererSvg(const char *filename, double width = [...], double height = [...], constRgb &background = [...])

• ~RendererSvg()

• virtual void draw pages grid(const Rgb &rgb = [...])

• double get feature size() const

• double get fov() const

• const Rgb & get style color(Style s) const

• const Math::VectorPair2 & get window() const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• virtual void set 2d size(double width, double height)

• void set camera direction(const Math::Vector3 &dir)

• void set camera position(const Math::Vector3 &pos)

• void set feature size(double feature size)

• void set fov(double fov)

• void set margin(double left, double bottom, double right, double top)

• void set margin(double width, double height)

• void set margin output(double left, double bottom, double right, double top)

• void set margin output(double width, double height)

• void set margin ratio(double left, double bottom, double right, double top)

• void set margin ratio(double width, double height)

• void set numeric format(std::ios base::fmtflags format, unsigned int precision)

• virtual void set page(unsigned int page)

• virtual void set page layout(unsigned int cols, unsigned int rows)

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

• virtual void set window(const Math::Vector2 &center, const Math::Vector2 &size, boolkeep aspect = [...])

• void set window(const Math::VectorPair2 &window, bool keep aspect = [...])

• void set window(const Math::Vector2 &center, double radius, bool keep aspect = [...])

• void write(std::ostream &s)

Page 192: Gop Ti Cal

Chapter 4: API documentation 189

Io::RendererX11 class reference

Declaration

#include <Goptical/Io/RendererX11>

namespace Goptical {

namespace Io {

class RendererX11;

};

};

This class is a member of the Io namespace.

Inheritance

Description

This class implements a X11 graphic output driver.

Members

See also the full member list (see [Io RendererX11 class full member list], page 191) sectionfor this class.

Inherited members

• 31 members inherited from RendererViewport (see [Io RendererViewport class reference],page 205)

Functions

• RendererX11(unsigned int width = [...], unsigned int height = [...], const Rgb &back-ground = [...], Display *disp = [...], int src = [...], Window win = [...], GC gc =[...])

• ~RendererX11()

• Display * get disp() const

• GC get gc() const

• int get scr() const

• Window get win() const

Members detail

RendererX11(unsigned int width = 800, unsigned int height =600, const Rgb &background = rgb white, Display *disp = 0, intsrc = -1, Window win = -1, GC gc = 0)

No documentation available

~RendererX11()

No documentation available

Page 193: Gop Ti Cal

Chapter 4: API documentation 190

Display * get disp() const

Get X11 display.

See also set disp.

GC get gc() const

Get X11 graphics context.

See also set gc.

int get scr() const

Get X11 screen.

See also set scr.

Window get win() const

Get X11 window.

See also set win.

Page 194: Gop Ti Cal

Chapter 4: API documentation 191

Io::RendererX11 class full member list

Functions

• RendererX11(unsigned int width = [...], unsigned int height = [...], const Rgb &back-ground = [...], Display *disp = [...], int src = [...], Window win = [...], GC gc =[...])

• ~RendererX11()

• virtual void draw pages grid(const Rgb &rgb = [...])

• Display * get disp() const

• double get feature size() const

• double get fov() const

• GC get gc() const

• int get scr() const

• const Rgb & get style color(Style s) const

• Window get win() const

• const Math::VectorPair2 & get window() const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• virtual void set 2d size(double width, double height)

• void set camera direction(const Math::Vector3 &dir)

• void set camera position(const Math::Vector3 &pos)

• void set feature size(double feature size)

• void set fov(double fov)

• void set margin(double left, double bottom, double right, double top)

• void set margin(double width, double height)

• void set margin output(double left, double bottom, double right, double top)

• void set margin output(double width, double height)

• void set margin ratio(double left, double bottom, double right, double top)

• void set margin ratio(double width, double height)

• void set numeric format(std::ios base::fmtflags format, unsigned int precision)

• virtual void set page(unsigned int page)

• virtual void set page layout(unsigned int cols, unsigned int rows)

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

• virtual void set window(const Math::Vector2 &center, const Math::Vector2 &size, boolkeep aspect = [...])

• void set window(const Math::VectorPair2 &window, bool keep aspect = [...])

• void set window(const Math::Vector2 &center, double radius, bool keep aspect = [...])

Page 195: Gop Ti Cal

Chapter 4: API documentation 192

Io::RendererX3d class reference

Declaration

This class is flagged as experimental.

#include <Goptical/Io/RendererX3d>

namespace Goptical {

namespace Io {

class RendererX3d;

};

};

This class is a member of the Io namespace.

Inheritance

Description

This class implements an X3d graphic output driver.

Members

See also the full member list (see [Io RendererX3d class full member list], page 194) sectionfor this class.

Inherited members

• 10 members inherited from Renderer (see [Io Renderer class reference], page 171)

Functions

• RendererX3d(const Rgb &background = [...])

• RendererX3d(const char *filename, const Rgb &background = [...])

• ~RendererX3d()

• void clear()

• void flush()

• void write(std::ostream &s)

Members detail

RendererX3d(const Rgb &background = rgb white)

This constructor is flagged as experimental.

Create a new X3d renderer. The write (see [ 415], page 193) function must be used towrite x3d to output stream.

RendererX3d(const char *filename, const Rgb &background =rgb white)

This constructor is flagged as experimental.

Page 196: Gop Ti Cal

Chapter 4: API documentation 193

Create a new X3d renderer. X3d output will be written to given filename when therenderer object is destroyed.

~RendererX3d()

This destructor is flagged as experimental.

void clear()

This function is flagged as experimental.

void flush()

This function is flagged as experimental.

void write(std:: ostream &s)

This function is flagged as experimental.

Write svg output to given stream.

Page 197: Gop Ti Cal

Chapter 4: API documentation 194

Io::RendererX3d class full member list

Functions

• RendererX3d(const Rgb &background = [...])

• RendererX3d(const char *filename, const Rgb &background = [...])

• ~RendererX3d()

• void clear()

• void flush()

• double get feature size() const

• const Rgb & get style color(Style s) const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• void set feature size(double feature size)

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

• void write(std::ostream &s)

Page 198: Gop Ti Cal

Chapter 4: API documentation 195

Io::Export class reference

Declaration

#include <Goptical/Io/Export>

namespace Goptical {

namespace Io {

class Export;

};

};

This class is a member of the Io namespace.

This abstract class contains pure virtuals.

Description

File export class interface

Members

See also the full member list (see [Io Export class full member list], page 196) section forthis class.

Functions

• virtual void export catalog(const Material::Catalog &catalog, const std::string &file-name) = 0;

• virtual void export design(const Sys::System &sys, const std::string &filename) = 0;

Members detail

virtual void export catalog(const Material::Catalog &catalog,const std:: string &filename) = 0;

Export material catalog to file

virtual void export design(const Sys::System &sys, const std::string &filename) = 0;

Export optical design to file

Page 199: Gop Ti Cal

Chapter 4: API documentation 196

Io::Export class full member list

Functions

• virtual void export catalog(const Material::Catalog &catalog, const std::string &file-name) = 0;

• virtual void export design(const Sys::System &sys, const std::string &filename) = 0;

Page 200: Gop Ti Cal

Chapter 4: API documentation 197

Io::Import class reference

Declaration

#include <Goptical/Io/Import>

namespace Goptical {

namespace Io {

class Import;

};

};

This class is a member of the Io namespace.

This abstract class contains pure virtuals.

Description

File import class interface

Members

See also the full member list (see [Io Import class full member list], page 198) section forthis class.

Functions

• virtual Material::Catalog & import catalog(const std::string &filename) = 0;

• virtual Set & import dataset(const std::string &filename) = 0;

• virtual Sys::System & import design(const std::string &filename) = 0;

Members detail

virtual Material::Catalog & import catalog(const std:: string&filename) = 0;

Import material catalog from file

virtual Set & import dataset(const std:: string &filename) = 0;

Import dataset from file

virtual Sys::System & import design(const std:: string &filename)= 0;

Import optical design from file

Page 201: Gop Ti Cal

Chapter 4: API documentation 198

Io::Import class full member list

Functions

• virtual Material::Catalog & import catalog(const std::string &filename) = 0;

• virtual Set & import dataset(const std::string &filename) = 0;

• virtual Sys::System & import design(const std::string &filename) = 0;

Page 202: Gop Ti Cal

Chapter 4: API documentation 199

Io::RendererAxes class reference

Declaration

#include <Goptical/Io/RendererAxes>

namespace Goptical {

namespace Io {

class RendererAxes;

};

};

This class is a member of the Io namespace.

Description

This class describe how axes must be rendered on graphical output.

Members

See also the full member list (see [Io RendererAxes class full member list], page 203) sec-tion for this class.

Type

• enum AxisMask

Functions

• RendererAxes()

• const std::string & get label(unsigned int axis) const

• const Math::Vector3 & get origin() const

• const Math::Vector3 & get position() const

• bool get show axes(unsigned int axis) const

• bool get show frame() const

• bool get show grid() const

• bool get show tics(unsigned int axis) const

• bool get show values(unsigned int axis) const

• double get tics step(int index, const Math::range t &r) const

• void set label(const std::string &label, AxisMask a = [...])

• void set origin(const Math::Vector3 &origin)

• void set position(const Math::Vector3 &position)

• void set range(const Math::range t &r, AxisMask a = [...])

• void set show axes(bool show = [...], AxisMask a = [...])

• void set show frame(bool show = [...])

• void set show grid(bool show = [...])

• void set show tics(bool show = [...], AxisMask a = [...])

Page 203: Gop Ti Cal

Chapter 4: API documentation 200

• void set show values(bool show = [...], AxisMask a = [...])

• void set tics base(unsigned int min count = [...], double base = [...], AxisMask a =[...])

• void set tics count(unsigned int count, AxisMask a = [...])

• void set tics step(double step, AxisMask a = [...])

• void set unit(const std::string &unit, bool pow10 scale = [...], bool si prefix = [...], intsi pow10 = [...], AxisMask a = [...])

Members detail

RendererAxes()

No documentation available

enum AxisMask

Specify axes

Identifier DescriptionXYZXYYZXZXYZ

const std:: string & get label(unsigned int axis) const

Get axis label

const Math::Vector3 & get origin() const

This function returns axes tics values origin.

const Math::Vector3 & get position() const

This function returns axis position

bool get show axes(unsigned int axis) const

See set show axes (see [ 436], page 201) function.

bool get show frame() const

See set show frame (see [ 437], page 201) function.

bool get show grid() const

See set show grid (see [ 438], page 201) function.

bool get show tics(unsigned int axis) const

See set show tics (see [ 439], page 201) function.

Page 204: Gop Ti Cal

Chapter 4: API documentation 201

bool get show values(unsigned int axis) const

See set show values (see [ 440], page 201) function.

double get tics step(int index, const Math::range t &r) const

get distance between axis tics

void set label(const std:: string &label, AxisMask a = XYZ)

This function set axis label

void set origin(const Math::Vector3 &origin)

This function sets axis tics values origin.

void set position(const Math::Vector3 &position)

This function returns axis position

void set range(const Math::range t &r, AxisMask a = XYZ)

Set value range for given axis. Default range is [0,0] which means automatic range.

void set show axes(bool show = true, AxisMask a = XYZ)

This function sets axes visibility.

void set show frame(bool show = true)

This function sets frame visibility.

void set show grid(bool show = true)

This function sets grid visibility. Grid points use tic step.

void set show tics(bool show = true, AxisMask a = XYZ)

This function sets tics visibility. Tics are located on axes and frame.

See also set show axes (see [ 436], page 201) function and set show frame (see [ 437],page 201) function.

void set show values(bool show = true, AxisMask a = XYZ)

This function sets tics value visibility. When frame is visible, tics value is located on frametics instead of axes tics.

See also set show axes (see [ 436], page 201) function and set show frame (see [ 437],page 201) function.

void set tics base(unsigned int min count = 5, double base =10.0, AxisMask a = XYZ)

This function sets distance between axis tics to best fit power of specified base divided bysufficient factor of 2 and 5 to have at least ‘min_count’ tics.

See also set tics step (see [ 443], page 202) function and set tics count (see [ 442],page 202) function.

Page 205: Gop Ti Cal

Chapter 4: API documentation 202

void set tics count(unsigned int count, AxisMask a = XYZ)

This function sets tics count.

See also set tics step (see [ 443], page 202) function and set tics base (see [ 441],page 201) function.

void set tics step(double step, AxisMask a = XYZ)

This function sets distance between axis tics to specified value.

See also set tics count (see [ 442], page 202) function and set tics base (see [ 441],page 201) function.

void set unit(const std:: string &unit, bool pow10 scale = true,bool si prefix = true, int si pow10 = 0, AxisMask a = XYZ)

This function sets axis unit.

When ‘pow10_scale’ is set, value will be scaled to shorten their length and appropriatepower of 10 factor will be displayed in axis label.

If ‘si_prefix’ is set, SI letter decimal prefix is used and the ‘pow10’ parameter can beused to scale base unit by power of ten (useful when input data use scaled SI base unit).

Page 206: Gop Ti Cal

Chapter 4: API documentation 203

Io::RendererAxes class full member list

Type

• enum AxisMask

Functions

• RendererAxes()

• const std::string & get label(unsigned int axis) const

• const Math::Vector3 & get origin() const

• const Math::Vector3 & get position() const

• bool get show axes(unsigned int axis) const

• bool get show frame() const

• bool get show grid() const

• bool get show tics(unsigned int axis) const

• bool get show values(unsigned int axis) const

• double get tics step(int index, const Math::range t &r) const

• void set label(const std::string &label, AxisMask a = [...])

• void set origin(const Math::Vector3 &origin)

• void set position(const Math::Vector3 &position)

• void set range(const Math::range t &r, AxisMask a = [...])

• void set show axes(bool show = [...], AxisMask a = [...])

• void set show frame(bool show = [...])

• void set show grid(bool show = [...])

• void set show tics(bool show = [...], AxisMask a = [...])

• void set show values(bool show = [...], AxisMask a = [...])

• void set tics base(unsigned int min count = [...], double base = [...], AxisMask a =[...])

• void set tics count(unsigned int count, AxisMask a = [...])

• void set tics step(double step, AxisMask a = [...])

• void set unit(const std::string &unit, bool pow10 scale = [...], bool si prefix = [...], intsi pow10 = [...], AxisMask a = [...])

Page 207: Gop Ti Cal

Chapter 4: API documentation 204

Io::RendererAxes::Axis internal struct members

Axis()

No documentation available

bool axis

No documentation available

unsigned int count

No documentation available

std:: string label

No documentation available

int pow10

No documentation available

bool pow10 scale

No documentation available

Math::range t range

No documentation available

bool si prefix

No documentation available

double step base

No documentation available

step mode e step mode

No documentation available

bool tics

No documentation available

std:: string unit

No documentation available

bool values

No documentation available

Page 208: Gop Ti Cal

Chapter 4: API documentation 205

Io::RendererViewport class reference

Declaration

#include <Goptical/Io/RendererViewport>

namespace Goptical {

namespace Io {

class RendererViewport;

};

};

This class is a member of the Io namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This class defines an interface for rendering drivers which rely on viewport windows, scalingand 2d projection operations. It’s designed to be used as a base class for such renderers;this mainly includes pixel based output renderers.

Renderers which write output in vector format in world coordinates directly do not needthis class as base.

Members

See also the full member list (see [Io RendererViewport class full member list], page 209)section for this class.

Inherited members

• 10 members inherited from Renderer (see [Io Renderer class reference], page 171)

Functions

• RendererViewport()

• virtual void draw pages grid(const Rgb &rgb = [...])

• virtual Math::Transform<3> get camera transform() const = 0;

• double get fov() const

• const Math::VectorPair2 & get window() const

• virtual void set 2d size(double width, double height)

• void set camera direction(const Math::Vector3 &dir)

• void set camera position(const Math::Vector3 &pos)

• virtual void set camera transform(const Math::Transform<3> &t) = 0;

• void set fov(double fov)

• void set margin(double left, double bottom, double right, double top)

• void set margin(double width, double height)

Page 209: Gop Ti Cal

Chapter 4: API documentation 206

• void set margin output(double left, double bottom, double right, double top)

• void set margin output(double width, double height)

• void set margin ratio(double left, double bottom, double right, double top)

• void set margin ratio(double width, double height)

• void set numeric format(std::ios base::fmtflags format, unsigned int precision)

• virtual void set page(unsigned int page)

• virtual void set page layout(unsigned int cols, unsigned int rows)

• virtual void set perspective() = 0;

• virtual void set window(const Math::Vector2 &center, const Math::Vector2 &size, boolkeep aspect = [...])

• void set window(const Math::VectorPair2 &window, bool keep aspect = [...])

• void set window(const Math::Vector2 &center, double radius, bool keep aspect = [...])

Members detail

RendererViewport()

No documentation available

virtual void draw pages grid(const Rgb &rgb = rgb gray)

Draw separations between pages, output window must have been setup before.

virtual Math::Transform<3> get camera transform() const = 0;

Get reference to 3d camera transform

double get fov() const

Get field of view in degrees.

See also set fov (see [ 467], page 207) function.

const Math::VectorPair2 & get window() const

Get current viewport window

virtual void set 2d size(double width, double height)

Update 2d output size, not all drivers support this

void set camera direction(const Math::Vector3 &dir)

Set 3d camera rotation from direction vector

void set camera position(const Math::Vector3 &pos)

Set 3d camera rotation from direction vector

virtual void set camera transform(const Math::Transform<3> &t)= 0;

Get modifiable reference to 3d camera transform

Page 210: Gop Ti Cal

Chapter 4: API documentation 207

void set fov(double fov)

Set field of view in degrees.

See also get fov (see [ 461], page 206) function.

void set margin(double left, double bottom, double right, doubletop)

Set amount of 2d margin space for set window (see [ 478], page 208) operation in worldcoordinates units.

void set margin(double width, double height)

See set margin (see [ 468], page 207) function.

void set margin output(double left, double bottom, double right,double top)

Set amount of 2d margin space for set window (see [ 478], page 208) operation in outputsize units (usually pixels).

void set margin output(double width, double height)

See set margin output (see [ 470], page 207) function.

void set margin ratio(double left, double bottom, double right,double top)

Set amount of 2d margin space for set window (see [ 478], page 208) operation as ratio ofwindow.

void set margin ratio(double width, double height)

See set margin ratio (see [ 472], page 207) function.

void set numeric format(std::ios base:: fmtflags format, unsignedint precision)

Set format used to print numeric values

virtual void set page(unsigned int page)

Select current page when multiple pages layout is in use.

See also set page layout (see [ 476], page 207) function.

virtual void set page layout(unsigned int cols, unsigned int rows)

This function can be used to setup a pages grid. Current output page must be selectedwith set page (see [ 475], page 207).

virtual void set perspective() = 0;

Set 3d perspective projection mode. This function reset the viewport window to (-1,1).

See also set window (see [ 478], page 208) function and set fov (see [ 467], page 207)function.

Page 211: Gop Ti Cal

Chapter 4: API documentation 208

virtual void set window(const Math::Vector2 &center, constMath::Vector2 &size, bool keep aspect = true)

Set 2d viewport window. This function set 3d projection to orthographic.

void set window(const Math::VectorPair2 &window, boolkeep aspect = true)

Set 2d viewport window. This function set 3d projection to orthographic.

void set window(const Math::Vector2 &center, double radius, boolkeep aspect = true)

Set 2d viewport window. This function set 3d projection to orthographic.

Page 212: Gop Ti Cal

Chapter 4: API documentation 209

Io::RendererViewport class full member list

Functions

• RendererViewport()

• virtual void draw pages grid(const Rgb &rgb = [...])

• virtual Math::Transform<3> get camera transform() const = 0;

• double get feature size() const

• double get fov() const

• const Rgb & get style color(Style s) const

• const Math::VectorPair2 & get window() const

• const Rgb & rgb background() const

• const Rgb & rgb foreground() const

• virtual void set 2d size(double width, double height)

• void set camera direction(const Math::Vector3 &dir)

• void set camera position(const Math::Vector3 &pos)

• virtual void set camera transform(const Math::Transform<3> &t) = 0;

• void set feature size(double feature size)

• void set fov(double fov)

• void set margin(double left, double bottom, double right, double top)

• void set margin(double width, double height)

• void set margin output(double left, double bottom, double right, double top)

• void set margin output(double width, double height)

• void set margin ratio(double left, double bottom, double right, double top)

• void set margin ratio(double width, double height)

• void set numeric format(std::ios base::fmtflags format, unsigned int precision)

• virtual void set page(unsigned int page)

• virtual void set page layout(unsigned int cols, unsigned int rows)

• virtual void set perspective() = 0;

• void set ray color mode(RayColorMode m)

• void set ray intensity mode(IntensityMode m)

• void set style color(Style s, const Rgb &rgb)

• virtual void set window(const Math::Vector2 &center, const Math::Vector2 &size, boolkeep aspect = [...])

• void set window(const Math::VectorPair2 &window, bool keep aspect = [...])

• void set window(const Math::Vector2 &center, double radius, bool keep aspect = [...])

Page 213: Gop Ti Cal

Chapter 4: API documentation 210

Io::Rgb struct reference

Declaration

#include <Goptical/Io/Rgb>

namespace Goptical {

namespace Io {

struct Rgb;

};

};

This struct is a member of the Io namespace.

Description

RGB color descriptor

Members

See also the full member list (see [Io Rgb struct full member list], page 212) section forthis struct.

Functions

• Rgb()

• Rgb(float red, float green, float blue, float alpha = [...])

• bool operator<(const Rgb &rgb) const

• Rgb operator~() const

Fields

• float a

• float b

• float g

• float r

Members detail

Rgb()

No documentation available

Rgb(float red, float green, float blue, float alpha = 1.0)

No documentation available

float a

No documentation available

float b

No documentation available

Page 214: Gop Ti Cal

Chapter 4: API documentation 211

float g

No documentation available

bool operator<(const Rgb &rgb) const

No documentation available

Rgb operator~() const

No documentation available

float r

No documentation available

Page 215: Gop Ti Cal

Chapter 4: API documentation 212

Io::Rgb struct full member list

Functions

• Rgb()

• Rgb(float red, float green, float blue, float alpha = [...])

• bool operator<(const Rgb &rgb) const

• Rgb operator~() const

Fields

• float a

• float b

• float g

• float r

Page 216: Gop Ti Cal

Chapter 4: API documentation 213

Light namespace reference

Description

Physical properties of light

Members

Types

• class Ray

• class SpectralLine

Page 217: Gop Ti Cal

Chapter 4: API documentation 214

Light::Ray class reference

Declaration

#include <Goptical/Light/Ray>

namespace Goptical {

namespace Light {

class Ray;

};

};

This class is a member of the Light namespace.

Inheritance

Description

This class is used to describe a ray of light. It contains geometrical and physical informationsabout a light ray.

Members

See also the full member list (see [Light Ray class full member list], page 216) section forthis class.

Inherited members

• 34 members inherited fromMath::VectorPair (see [Math VectorPair 3 struct reference],page 340)<3>

Functions

• Ray()

• Ray(const Math::VectorPair3 &ray, double intensity = [...], double wavelen = [...])

• double get intensity() const

• double get wavelen() const

• void set intensity(double intensity)

• void set wavelen(double wavelen)

Members detail

Ray()

No documentation available

Ray(const Math::VectorPair3 &ray, double intensity = 1, doublewavelen = 550)

Create a ray of light with specified properties

double get intensity() const

Get light ray intensity

Page 218: Gop Ti Cal

Chapter 4: API documentation 215

double get wavelen() const

Set light ray wavelen

void set intensity(double intensity)

Set light ray intensity

void set wavelen(double wavelen)

Get light ray wavelen

Page 219: Gop Ti Cal

Chapter 4: API documentation 216

Light::Ray class full member list

Functions

• Ray()

• Ray(const Math::VectorPair3 &ray, double intensity = [...], double wavelen = [...])

• Math::Vector<N> & direction()

• const Math::Vector<N> & direction() const

• double get intensity() const

• double get wavelen() const

• Math::Vector<3> ln ln clst pt(const Math::VectorPair<3> &line) const

• double ln ln clst pt scale(const Math::VectorPair<3> &line) const

• Math::Vector<N> ln pt clst pt(const Math::Vector<N> &point) const

• double ln pt clst pt scale(const Math::Vector<N> &point) const

• Math::Vector<N> & normal()

• const Math::Vector<N> & normal() const

• Math::VectorPairBase<3> operator*(double factor)

• const Math::VectorPairBase<3> & operator+=(const Math::VectorPairBase<3> &p)

• const Math::Vector<N> & operator[](int n) const

• Math::Vector<N> & operator[](int n)

• Math::Vector<N> & origin()

• const Math::Vector<N> & origin() const

• Math::Vector<3> pl ln intersect(const Math::VectorPair<3> &line) const

• double pl ln intersect scale(const Math::VectorPair<3> &line) const

• Math::Vector<N> seg pt clst pt(const Math::Vector<N> &point) const

• double seg pt clst pt scale(const Math::Vector<N> &point) const

• void set intensity(double intensity)

• void set wavelen(double wavelen)

• double x0() const

• double & x0()

• double x1() const

• double & x1()

• double y0() const

• double & y0()

• double y1() const

• double & y1()

• double z0() const

• double & z0()

• double z1() const

• double & z1()

Page 220: Gop Ti Cal

Chapter 4: API documentation 217

Light::SpectralLine class reference

Declaration

#include <Goptical/Light/SpectralLine>

namespace Goptical {

namespace Light {

class SpectralLine;

};

};

This class is a member of the Light namespace.

Description

This class can be used to describe a spectral line. It contains constants for wave length ofstandard rays

Members

See also the full member list (see [Light SpectralLine class full member list], page 220)section for this class.

Functions

• SpectralLine(double wavelen, double intensity = [...])

• Io::Rgb get color() const

• double get intensity() const

• double get wavelen() const

Static function

• static Io::Rgb get wavelen color(double wl)

Constants

• static const double C

• static const double C

• static const double D

• static const double F

• static const double F

• static const double blue

• static const double d

• static const double e

• static const double g

• static const double green

• static const double h

• static const double i

Page 221: Gop Ti Cal

Chapter 4: API documentation 218

• static const double r

• static const double red

• static const double s

• static const double t

Members detail

SpectralLine(double wavelen, double intensity = 1.0)

Create a spectral line with specified wavelen and intensity.

static const double C

red hydrogen line at 656.2725nm

static const double C

red cadmium line at 643.8469nm

static const double D

yellow sodium line at 589.2938nm

static const double F

blue hydrogen line at 486.1327nm

static const double F

blue cadmium line at 479.9914nm

static const double blue

blue colored line at 440nm

static const double d

yellow helium line at 587.5618nm

static const double e

green mercury line at 546.074nm

static const double g

blue mercury line at 435.8343nm

Io::Rgb get color() const

get rgb color associated spectral line, ignore intensity

double get intensity() const

get spectral line intensity

double get wavelen() const

get spectral line wavelen

Page 222: Gop Ti Cal

Chapter 4: API documentation 219

static Io::Rgb get wavelen color(double wl)

get rgb color associated with wavelen

static const double green

green colored line at 510nm

static const double h

violet mercury line at 404.6561nm

static const double i

ultraviolet mercury line at 365.0146nm

static const double r

red helium line at 706.5188nm

static const double red

red colored line at 645nm

static const double s

infrared cesium line at 852.11nm

static const double t

infrared mercury line at 1013.98nm

Page 223: Gop Ti Cal

Chapter 4: API documentation 220

Light::SpectralLine class full member list

Functions

• SpectralLine(double wavelen, double intensity = [...])

• Io::Rgb get color() const

• double get intensity() const

• double get wavelen() const

Static function

• static Io::Rgb get wavelen color(double wl)

Constants

• static const double C

• static const double C

• static const double D

• static const double F

• static const double F

• static const double blue

• static const double d

• static const double e

• static const double g

• static const double green

• static const double h

• static const double i

• static const double r

• static const double red

• static const double s

• static const double t

Page 224: Gop Ti Cal

Chapter 4: API documentation 221

Material namespace reference

Description

Material models for optical components

Members

Types

• template class Abbe

• template class Air

• class Base

• class Catalog

• class Conrady

• class DispersionTable

• class Herzberger

• class Metal

• class Mil

• class Mirror

• class Schott

• class Sellmeier

• template class SellmeierMod

• class Vacuum

• enum AbbeFormula

• typedef [...] AbbeVd

• typedef [...] AbbeVe

• typedef [...] AirBirch94

• enum AirFormula

• typedef [...] AirKohlrausch68

• class Dielectric

• typedef [...] Handbook1

• typedef [...] Handbook2

• class Proxy

• typedef [...] SellmeierMod2

• enum SellmeierModFormula

• class Solid

Constants

• const const ref<Base> none

• const AirBirch94 std air

Page 225: Gop Ti Cal

Chapter 4: API documentation 222

Variables

• AirBirch94 air

• Mirror mirror

• Vacuum vacuum

Members detail

enum AbbeFormula

Specify Abbe number type used by the Abbe (see [Material Abbe class reference], page 224)class

Identifier DescriptionAbbeVdFormula Abbe number of Fraunhofer d line

AbbeVeFormula Abbe number of Fraunhofer e line

typedef Abbe<AbbeVdFormula> AbbeVd

See Abbe (see [Material Abbe class reference], page 224) class.

typedef Abbe<AbbeVeFormula> AbbeVe

See Abbe (see [Material Abbe class reference], page 224) class.

typedef Air<AirBirch94Formula> AirBirch94

See Air (see [Material Air class reference], page 227) class.

enum AirFormula

Specify air refractive index model used by Air (see [Material Air class reference], page 227)class.

Identifier DescriptionAirBirch94Formula Birch, Metrologia, 1994, 31, 315

AirKohlrausch68Formula F. Kohlrausch, Praktische Physik, 1968, 1, 408

typedef Air<AirKohlrausch68Formula> AirKohlrausch68

See Air (see [Material Air class reference], page 227) class.

typedef SellmeierMod<Handbook1Formula> Handbook1

See SellmeierMod (see [Material SellmeierMod class reference], page 265) class.

typedef SellmeierMod<Handbook2Formula> Handbook2

See SellmeierMod (see [Material SellmeierMod class reference], page 265) class.

Page 226: Gop Ti Cal

Chapter 4: API documentation 223

typedef SellmeierMod<SellmeierMod2Formula> SellmeierMod2

See SellmeierMod (see [Material SellmeierMod class reference], page 265) class.

enum SellmeierModFormula

Specify Sellmeier variation used by the SellmeierMod (see [Material SellmeierMod class reference],page 265) class

Identifier DescriptionSellmeierMod2FormulaHandbook1FormulaHandbook2Formula

AirBirch94 air

A global instance of AirBirch94 (see [ 519], page 222) material.

Mirror mirror

A global instance of Material::Mirror material.

const const ref <Base> none

Material null pointer

const AirBirch94 std air

A global read only instance of AirBirch94 (see [ 519], page 222) material with standardparameters.

Vacuum vacuum

A global instance of Material::Vacuum material.

Page 227: Gop Ti Cal

Chapter 4: API documentation 224

Material::Abbe class reference

Declaration

#include <Goptical/Material/Abbe>

namespace Goptical {

namespace Material {

template <enum AbbeFormula m> class Abbe;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of glass materials using known refractive index value,Abbe number and partial dispersion deviation (dpgF).

AbbeVd (see [ 517], page 222) and AbbeVe (see [ 518], page 222) template instances areavailable for d and e line definitions of Abbe number.

The following formula is used to determine refractive index at any wavelen in visiblespectrum:

nλ = nd +(nd−1)

vd×(c1 + a× c0 +

c3+a×c2λ

+ c5+a×c4λ2 + c7+a×c6

λ3

)with a = a1 × vd + a0 +ΔPg,F and λ the micrometer wavelength.

a0 and a1 values are given in Schott "TIE-29: Refractive Index and Dispersion" tech-nical information document.

c0 to c7 values were determined using least square fitting on indexes obtained usingSellmeier data from 118 glass materials from the Schott catalog for 360 wavelengths between390nm and 750nm. Two different coefficients sets are used for nd/vd and ne/ve pairs.

Mean error is less than 0.00002 from Sellmeier indexes and largest error found acrossfitted glasses and wavelengths is 0.0008. When dpgF is set to 0, mean error becomes 0.0001and largest error is close to 0.006.

Members

See also the full member list (see [Material Abbe class full member list], page 226) sectionfor this class.

Inherited members

• 36 members inherited from Dielectric (see [Material Dielectric class reference],page 272)

Functions

• Abbe(double n, double v, double dpgF = [...])

• virtual double get measurement index(double wavelen) const

Page 228: Gop Ti Cal

Chapter 4: API documentation 225

Members detail

Abbe(double n, double v, double dpgF = 0.)

Create an abbe glass model

virtual double get measurement index(double wavelen) const

This virtual function implements the get_measurement_index (see [_617], page 274)

pure function declared in the Dielectric (see [Material_Dielectric_class_

reference], page 272) base abstract class.

Documentation inherited from base class:

Get material relative refractive index in measurment medium at specified wavelen in nm.

Page 229: Gop Ti Cal

Chapter 4: API documentation 226

Material::Abbe class full member list

Functions

• Abbe(double n, double v, double dpgF = [...])

• void clear internal transmittance()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get measurement index(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get poisson ratio() const

• double get principal dispersion() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• Data::DiscreteSet & get transmittance dataset()

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set density(double density)

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set wavelen range(double low, double high)

• void set young modulus(double young modulus)

Page 230: Gop Ti Cal

Chapter 4: API documentation 227

Material::Air class reference

Declaration

#include <Goptical/Material/Air>

namespace Goptical {

namespace Material {

template <enum AirFormula M> class Air;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of air. Refractive index of air depends on temperatureand pressure.

This class provides different formulas:

• AirBirch94 (see [ 519], page 222) : described in "Birch, Metrologia, 1994, 31, 315".

• AirKohlrausch68 (see [ 521], page 222) : described in "F. Kohlrausch, PraktischePhysik, 1968, 1, 408".

Global variables air (see [ 526], page 223) and std air (see [ 529], page 223) are availablewith default parameters and Birch model.

Members

See also the full member list (see [Material Air class full member list], page 230) sectionfor this class.

Inherited members

• 14 members inherited from Base (see [Material Base class reference], page 231)

Functions

• Air(double pressure = [...])

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get pressure() const

• virtual double get refractive index(double wavelen) const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set pressure(double pressure)

Constant

• static const double std pressure

Page 231: Gop Ti Cal

Chapter 4: API documentation 228

Members detail

Air(double pressure = std pressure)

Create a new air material model with 101325 Pa pressure.

virtual double get extinction coef(double wavelen) const

This virtual function overrides the get_extinction_coef (see [_545], page 232) virtualfunction defined in the Base (see [Material_Base_class_reference], page 231) baseabstract class.

Documentation inherited from base class:

Get extinction coefficient. Subclasses must provide this function or theget internal transmittance() function.

virtual double get internal transmittance(double wavelen, doublethickness) const

This virtual function overrides the get_internal_transmittance (see [_546],

page 232) virtual function defined in the Base (see [Material_Base_class_

reference], page 231) base abstract class.

Documentation inherited from base class:

Get material internal transmittance for thickness in mm. Subclasses must provide thisfunction or the get extinction coef() function.

double get pressure() const

Get relative air pressure in Pa.

See also set pressure (see [ 540], page 229) function and std pressure (see [ 541],page 229) variable.

virtual double get refractive index(double wavelen) const

This virtual function implements the get_refractive_index (see [_550], page 232)

pure function declared in the Base (see [Material_Base_class_reference], page 231)

base abstract class.

Documentation inherited from base class:

Get material absolute refractive index at specified wavelen in nm.

virtual bool is opaque() const

This virtual function implements the is_opaque (see [_553], page 232) pure functiondeclared in the Base (see [Material_Base_class_reference], page 231) base abstractclass.

Documentation inherited from base class:

Return true if material must be considered opaque for ray tracing

virtual bool is reflecting() const

This virtual function implements the is_reflecting (see [_554], page 232) pure func-tion declared in the Base (see [Material_Base_class_reference], page 231) base ab-stract class.

Page 232: Gop Ti Cal

Chapter 4: API documentation 229

Documentation inherited from base class:

Return true if material may reflect most of the light and must be considered as a mirrorwhen ignoring ray intensity computation during ray tracing.

void set pressure(double pressure)

Set relative air pressure in Pa.

See also get pressure (see [ 536], page 228) function and std pressure (see [ 541],page 229) variable.

static const double std pressure

Standard air pressure is 101325 Pa

Page 233: Gop Ti Cal

Chapter 4: API documentation 230

Material::Air class full member list

Functions

• Air(double pressure = [...])

• virtual Io::Rgb get color() const

• virtual double get extinction coef(double wavelen) const

• double get internal transmittance(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get pressure() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set pressure(double pressure)

• void set temperature(double temp)

Constant

• static const double std pressure

Page 234: Gop Ti Cal

Chapter 4: API documentation 231

Material::Base class reference

Declaration

#include <Goptical/Material/Base>

namespace Goptical {

namespace Material {

class Base;

};

};

This class is a member of the Material namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This class is the base class for all material classes. It desrcibes physical properties ofmaterials which interact with light.

Members

See also the full member list (see [Material Base class full member list], page 233) sectionfor this class.

Functions

• Base()

• virtual ~Base()

• virtual Io::Rgb get color() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• virtual double get refractive index(double wavelen) const = 0;

• double get refractive index(double wavelen, const Base &env) const

• virtual double get temperature() const

• virtual bool is opaque() const = 0;

• virtual bool is reflecting() const = 0;

• void set temperature(double temp)

Members detail

Base()

Material base constuctor. Set material temperature to 20.

Page 235: Gop Ti Cal

Chapter 4: API documentation 232

virtual ~Base()

No documentation available

virtual Io::Rgb get color() const

Get material color and alpha

virtual double get extinction coef(double wavelen) const

Get extinction coefficient. Subclasses must provide this function or theget internal transmittance() function.

virtual double get internal transmittance(double wavelen, doublethickness) const

Get material internal transmittance for thickness in mm. Subclasses must provide thisfunction or the get extinction coef() function.

double get internal transmittance(double wavelen) const

Get material internal transmittance for 1mm thickness.

virtual double get normal reflectance(const Base *from, doublewavelen) const

Get reflectance at normal incidence

virtual double get normal transmittance(const Base *from, doublewavelen) const

Get transmittance at normal incidence

virtual double get refractive index(double wavelen) const = 0;

Get material absolute refractive index at specified wavelen in nm.

double get refractive index(double wavelen, const Base &env)const

Get material relative refractive index in given medium at specified wavelen in nm.

virtual double get temperature() const

Get material temperature in celcius

virtual bool is opaque() const = 0;

Return true if material must be considered opaque for ray tracing

virtual bool is reflecting() const = 0;

Return true if material may reflect most of the light and must be considered as a mirrorwhen ignoring ray intensity computation during ray tracing.

void set temperature(double temp)

Set material temperature in celcius

Page 236: Gop Ti Cal

Chapter 4: API documentation 233

Material::Base class full member list

Functions

• Base()

• virtual ~Base()

• virtual Io::Rgb get color() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• virtual double get refractive index(double wavelen) const = 0;

• double get refractive index(double wavelen, const Base &env) const

• virtual double get temperature() const

• virtual bool is opaque() const = 0;

• virtual bool is reflecting() const = 0;

• void set temperature(double temp)

Page 237: Gop Ti Cal

Chapter 4: API documentation 234

Material::Catalog class reference

Declaration

#include <Goptical/Material/Catalog>

namespace Goptical {

namespace Material {

class Catalog;

};

};

This class is a member of the Material namespace.

Inheritance

Description

Hold a glass material catalog

Members

See also the full member list (see [Material Catalog class full member list], page 236) sec-tion for this class.

Functions

• Catalog(const std::string &name = [...])

• void add material(const std::string &material name, const const ref<Base> &material)

• void del material(const std::string &material name)

• const Base & get material(const std::string &material name)

• const std::string & get name() const

• void set name(const std::string &name)

Members detail

Catalog(const std:: string &name = "")

Create a catalog with given name

void add material(const std:: string &material name, constconst ref <Base> &material)

Add a material to catalog. material object will be deleted on catalog destruction if owneris set.

void del material(const std:: string &material name)

Remove a material from catalog

const Base & get material(const std:: string &material name)

Get material with given name

Page 238: Gop Ti Cal

Chapter 4: API documentation 235

const std:: string & get name() const

Get catalog name

void set name(const std:: string &name)

Set catalog name

Page 239: Gop Ti Cal

Chapter 4: API documentation 236

Material::Catalog class full member list

Functions

• Catalog(const std::string &name = [...])

• void add material(const std::string &material name, const const ref<Base> &material)

• void del material(const std::string &material name)

• const Base & get material(const std::string &material name)

• const std::string & get name() const

• void set name(const std::string &name)

Page 240: Gop Ti Cal

Chapter 4: API documentation 237

Material::Conrady class reference

Declaration

#include <Goptical/Material/Conrady>

namespace Goptical {

namespace Material {

class Conrady;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of dielectric materials with conrady refractive indexdispersion formula.

Refractive index formula is:

nλ = A+ Bλ+ C

λ3.5

with λ the micrometer wavelength.

Members

See also the full member list (see [Material Conrady class full member list], page 239)section for this class.

Inherited members

• 36 members inherited from Dielectric (see [Material Dielectric class reference],page 272)

Functions

• Conrady()

• Conrady(double A, double B, double C)

• virtual double get measurement index(double wavelen) const

• void set coefficients(double A, double B, double C)

Members detail

Conrady()

Create an empty conrady model

Conrady(double A, double B, double C)

Create an conrady model with given coefficients

Page 241: Gop Ti Cal

Chapter 4: API documentation 238

virtual double get measurement index(double wavelen) const

This virtual function implements the get_measurement_index (see [_617], page 274)

pure function declared in the Dielectric (see [Material_Dielectric_class_

reference], page 272) base abstract class.

Documentation inherited from base class:

Get material relative refractive index in measurment medium at specified wavelen in nm.

void set coefficients(double A, double B, double C)

Change conrady constant term

Page 242: Gop Ti Cal

Chapter 4: API documentation 239

Material::Conrady class full member list

Functions

• Conrady()

• Conrady(double A, double B, double C)

• void clear internal transmittance()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get measurement index(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get poisson ratio() const

• double get principal dispersion() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• Data::DiscreteSet & get transmittance dataset()

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set coefficients(double A, double B, double C)

• void set density(double density)

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

Page 243: Gop Ti Cal

Chapter 4: API documentation 240

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set wavelen range(double low, double high)

• void set young modulus(double young modulus)

Page 244: Gop Ti Cal

Chapter 4: API documentation 241

Material::DispersionTable class reference

Declaration

#include <Goptical/Material/DispersionTable>

namespace Goptical {

namespace Material {

class DispersionTable;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models refractive index of optical material using user provided data table.

Known refractive index values are stored and interpolated by a Data::DiscreteSet (see[Data DiscreteSet class reference], page 109) object. Default interpolation is Data::Cubic(see [ 146], page 106).

Members

See also the full member list (see [Material DispersionTable class full member list],page 243) section for this class.

Inherited members

• 36 members inherited from Dielectric (see [Material Dielectric class reference],page 272)

Functions

• DispersionTable()

• void clear refractive index table()

• virtual double get measurement index(double wavelen) const

• Data::DiscreteSet & get refractive index dataset()

• void set refractive index(double wavelen, double index)

Members detail

DispersionTable()

No documentation available

void clear refractive index table()

Clear all refractive index data

Page 245: Gop Ti Cal

Chapter 4: API documentation 242

virtual double get measurement index(double wavelen) const

This virtual function implements the get_measurement_index (see [_617], page 274)

pure function declared in the Dielectric (see [Material_Dielectric_class_

reference], page 272) base abstract class.

Documentation inherited from base class:

Get material relative refractive index in measurment medium at specified wavelen in nm.

Data::DiscreteSet & get refractive index dataset()

Get refractive index dataset object

void set refractive index(double wavelen, double index)

Add refractive index data

Page 246: Gop Ti Cal

Chapter 4: API documentation 243

Material::DispersionTable class full member list

Functions

• DispersionTable()

• void clear internal transmittance()

• void clear refractive index table()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get measurement index(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get poisson ratio() const

• double get principal dispersion() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• Data::DiscreteSet & get refractive index dataset()

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• Data::DiscreteSet & get transmittance dataset()

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set density(double density)

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set poisson ratio(double poisson ratio)

• void set refractive index(double wavelen, double index)

• void set temperature(double temp)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

Page 247: Gop Ti Cal

Chapter 4: API documentation 244

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set wavelen range(double low, double high)

• void set young modulus(double young modulus)

Page 248: Gop Ti Cal

Chapter 4: API documentation 245

Material::Herzberger class reference

Declaration

#include <Goptical/Material/Herzberger>

namespace Goptical {

namespace Material {

class Herzberger;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of dielectric materials with Herzberger refractive indexdispersion formula:

nλ = A+B × λ2 + C × λ4 +D × λ6 + Eλ2−0.028

+ F(λ2−0.028)2

with λ the micrometer wavelength.

Members

See also the full member list (see [Material Herzberger class full member list], page 247)section for this class.

Inherited members

• 36 members inherited from Dielectric (see [Material Dielectric class reference],page 272)

Functions

• Herzberger()

• Herzberger(double A, double B, double C, double D, double E, double F)

• virtual double get measurement index(double wavelen) const

• void set coefficients(double A, double B, double C, double D, double E, double F)

Members detail

Herzberger()

Create an empty herzberger model

Herzberger(double A, double B, double C, double D, double E,double F)

Create an herzberger model with given coefficients

Page 249: Gop Ti Cal

Chapter 4: API documentation 246

virtual double get measurement index(double wavelen) const

This virtual function implements the get_measurement_index (see [_617], page 274)

pure function declared in the Dielectric (see [Material_Dielectric_class_

reference], page 272) base abstract class.

Documentation inherited from base class:

Get material relative refractive index in measurment medium at specified wavelen in nm.

void set coefficients(double A, double B, double C, double D,double E, double F)

Change herzberger constant term

Page 250: Gop Ti Cal

Chapter 4: API documentation 247

Material::Herzberger class full member list

Functions

• Herzberger()

• Herzberger(double A, double B, double C, double D, double E, double F)

• void clear internal transmittance()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get measurement index(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get poisson ratio() const

• double get principal dispersion() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• Data::DiscreteSet & get transmittance dataset()

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set coefficients(double A, double B, double C, double D, double E, double F)

• void set density(double density)

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

Page 251: Gop Ti Cal

Chapter 4: API documentation 248

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set wavelen range(double low, double high)

• void set young modulus(double young modulus)

Page 252: Gop Ti Cal

Chapter 4: API documentation 249

Material::Metal class reference

Declaration

#include <Goptical/Material/Metal>

namespace Goptical {

namespace Material {

class Metal;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of metal materials. Extinction and refractive index arestored as interpolated data sets.

Members

See also the full member list (see [Material Metal class full member list], page 251) sectionfor this class.

Inherited members

• 23 members inherited from Solid (see [Material Solid class reference], page 281)

Functions

• Metal()

• double get absolute refractive index(double wavelen) const

• virtual double get extinction coef(double wavelen) const

• Data::DiscreteSet & get extinction coef dataset()

• virtual double get refractive index(double wavelen) const

• Data::DiscreteSet & get refractive index dataset()

• virtual bool is opaque() const

• virtual bool is reflecting() const

Members detail

Metal()

No documentation available

double get absolute refractive index(double wavelen) const

No documentation available

Page 253: Gop Ti Cal

Chapter 4: API documentation 250

virtual double get extinction coef(double wavelen) const

This virtual function overrides the get_extinction_coef (see [_545], page 232) virtualfunction defined in the Base (see [Material_Base_class_reference], page 231) baseabstract class.

Documentation inherited from base class:

Get extinction coefficient. Subclasses must provide this function or theget internal transmittance() function.

Data::DiscreteSet & get extinction coef dataset()

Get extinction dataset object

virtual double get refractive index(double wavelen) const

This virtual function implements the get_refractive_index (see [_550], page 232)

pure function declared in the Base (see [Material_Base_class_reference], page 231)

base abstract class.

Documentation inherited from base class:

Get material absolute refractive index at specified wavelen in nm.

Data::DiscreteSet & get refractive index dataset()

Get refractive index dataset object

virtual bool is opaque() const

This virtual function implements the is_opaque (see [_553], page 232) pure functiondeclared in the Base (see [Material_Base_class_reference], page 231) base abstractclass.

Documentation inherited from base class:

Return true if material must be considered opaque for ray tracing

virtual bool is reflecting() const

This virtual function implements the is_reflecting (see [_554], page 232) pure func-tion declared in the Base (see [Material_Base_class_reference], page 231) base ab-stract class.

Documentation inherited from base class:

Return true if material may reflect most of the light and must be considered as a mirrorwhen ignoring ray intensity computation during ray tracing.

Page 254: Gop Ti Cal

Chapter 4: API documentation 251

Material::Metal class full member list

Functions

• Metal()

• double get absolute refractive index(double wavelen) const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• Data::DiscreteSet & get extinction coef dataset()

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get poisson ratio() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• Data::DiscreteSet & get refractive index dataset()

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set density(double density)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set young modulus(double young modulus)

Page 255: Gop Ti Cal

Chapter 4: API documentation 252

Material::Mil class reference

Declaration

#include <Goptical/Material/Mil>

namespace Goptical {

namespace Material {

class Mil;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class is able to extract nd index and vd Abbe number values from glass code in orderto model mil glass material. Glass code format is described in "MIL-G-174B" standard.

See also Abbe (see [Material Abbe class reference], page 224) class.

Members

See also the full member list (see [Material Mil class full member list], page 253) sectionfor this class.

Inherited members

• 36 members inherited from Abbe (see [Material Abbe class reference],page 224)<AbbeVdFormula>

Function

• Mil(unsigned int code)

Members detail

Mil(unsigned int code)

Create a glass model based on glass code with "nnnnvvv" format.

Page 256: Gop Ti Cal

Chapter 4: API documentation 253

Material::Mil class full member list

Functions

• Mil(unsigned int code)

• void clear internal transmittance()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get measurement index(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get poisson ratio() const

• double get principal dispersion() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• Data::DiscreteSet & get transmittance dataset()

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set density(double density)

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set wavelen range(double low, double high)

• void set young modulus(double young modulus)

Page 257: Gop Ti Cal

Chapter 4: API documentation 254

Material::Mirror class reference

Declaration

#include <Goptical/Material/Mirror>

namespace Goptical {

namespace Material {

class Mirror;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of a perfect reflecting material.

A global mirror (see [ 527], page 223) variable is available.

Members

See also the full member list (see [Material Mirror class full member list], page 256) sectionfor this class.

Inherited members

• 14 members inherited from Base (see [Material Base class reference], page 231)

Functions

• Mirror()

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• virtual double get refractive index(double wavelen) const

• virtual bool is opaque() const

• virtual bool is reflecting() const

Members detail

Mirror()

No documentation available

virtual double get extinction coef(double wavelen) const

This virtual function overrides the get_extinction_coef (see [_545], page 232) virtualfunction defined in the Base (see [Material_Base_class_reference], page 231) baseabstract class.

Documentation inherited from base class:

Page 258: Gop Ti Cal

Chapter 4: API documentation 255

Get extinction coefficient. Subclasses must provide this function or theget internal transmittance() function.

virtual double get internal transmittance(double wavelen, doublethickness) const

This virtual function overrides the get_internal_transmittance (see [_546],

page 232) virtual function defined in the Base (see [Material_Base_class_

reference], page 231) base abstract class.

Documentation inherited from base class:

Get material internal transmittance for thickness in mm. Subclasses must provide thisfunction or the get extinction coef() function.

virtual double get refractive index(double wavelen) const

This virtual function implements the get_refractive_index (see [_550], page 232)

pure function declared in the Base (see [Material_Base_class_reference], page 231)

base abstract class.

Documentation inherited from base class:

Get material absolute refractive index at specified wavelen in nm.

virtual bool is opaque() const

This virtual function implements the is_opaque (see [_553], page 232) pure functiondeclared in the Base (see [Material_Base_class_reference], page 231) base abstractclass.

Documentation inherited from base class:

Return true if material must be considered opaque for ray tracing

virtual bool is reflecting() const

This virtual function implements the is_reflecting (see [_554], page 232) pure func-tion declared in the Base (see [Material_Base_class_reference], page 231) base ab-stract class.

Documentation inherited from base class:

Return true if material may reflect most of the light and must be considered as a mirrorwhen ignoring ray intensity computation during ray tracing.

Page 259: Gop Ti Cal

Chapter 4: API documentation 256

Material::Mirror class full member list

Functions

• Mirror()

• virtual Io::Rgb get color() const

• virtual double get extinction coef(double wavelen) const

• double get internal transmittance(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set temperature(double temp)

Page 260: Gop Ti Cal

Chapter 4: API documentation 257

Material::Schott class reference

Declaration

#include <Goptical/Material/Schott>

namespace Goptical {

namespace Material {

class Schott;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of dielectric materials with Schott refractive indexdispersion formula:

nλ =√∑

iAi × λ2i

with λ the micrometer wavelength.

Members

See also the full member list (see [Material Schott class full member list], page 259) sectionfor this class.

Inherited members

• 36 members inherited from Dielectric (see [Material Dielectric class reference],page 272)

Functions

• Schott()

• Schott(double A, double B, double C, double D, double E, double F)

• void set term(int term, double K)

• void set terms range(int first, int last)

Members detail

Schott()

Create an empty schott model

Schott(double A, double B, double C, double D, double E, doubleF)

Create a schott model with [-8,2] exponents range:

nλ =√A+B × λ2 + C

λ2 + Dλ4 + E

λ6 + Fλ8

Page 261: Gop Ti Cal

Chapter 4: API documentation 258

void set term(int term, double K)

Set term coefficient, ‘term’ must be a multiple of 2.

void set terms range(int first, int last)

Set exponents range, must be multiples of 2

Page 262: Gop Ti Cal

Chapter 4: API documentation 259

Material::Schott class full member list

Functions

• Schott()

• Schott(double A, double B, double C, double D, double E, double F)

• void clear internal transmittance()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get poisson ratio() const

• double get principal dispersion() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• Data::DiscreteSet & get transmittance dataset()

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set density(double density)

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

• void set term(int term, double K)

• void set terms range(int first, int last)

Page 263: Gop Ti Cal

Chapter 4: API documentation 260

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set wavelen range(double low, double high)

• void set young modulus(double young modulus)

Page 264: Gop Ti Cal

Chapter 4: API documentation 261

Material::Sellmeier class reference

Declaration

#include <Goptical/Material/Sellmeier>

namespace Goptical {

namespace Material {

class Sellmeier;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of dielectric materials using Sellmeier refractive indexdispersion formula:

nλ =√A+

∑i

Bi×λ2

λ2−Ci

with λ the micrometer wavelength.

See also SellmeierMod (see [Material SellmeierMod class reference], page 265) class.

Members

See also the full member list (see [Material Sellmeier class full member list], page 263)section for this class.

Inherited members

• 36 members inherited from Dielectric (see [Material Dielectric class reference],page 272)

Functions

• Sellmeier()

• Sellmeier(double K1, double L1, double K2, double L2, double K3, double L3)

• virtual double get measurement index(double wavelen) const

• void set contant term(double A)

• void set term(unsigned int i, double B, double C)

• void set terms count(unsigned int c)

Members detail

Sellmeier()

Create an empty sellmeier model

Page 265: Gop Ti Cal

Chapter 4: API documentation 262

Sellmeier(double K1, double L1, double K2, double L2, double K3,double L3)

Create an 3rd order sellmeier model with given coefficients and 1.0 constant

virtual double get measurement index(double wavelen) const

This virtual function implements the get_measurement_index (see [_617], page 274)

pure function declared in the Dielectric (see [Material_Dielectric_class_

reference], page 272) base abstract class.

Documentation inherited from base class:

Get material relative refractive index in measurment medium at specified wavelen in nm.

void set contant term(double A)

Change sellmeier constant term

void set term(unsigned int i, double B, double C)

Set term coefficients

void set terms count(unsigned int c)

Set terms count

Page 266: Gop Ti Cal

Chapter 4: API documentation 263

Material::Sellmeier class full member list

Functions

• Sellmeier()

• Sellmeier(double K1, double L1, double K2, double L2, double K3, double L3)

• void clear internal transmittance()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get measurement index(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get poisson ratio() const

• double get principal dispersion() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• Data::DiscreteSet & get transmittance dataset()

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set contant term(double A)

• void set density(double density)

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

Page 267: Gop Ti Cal

Chapter 4: API documentation 264

• void set term(unsigned int i, double B, double C)

• void set terms count(unsigned int c)

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set wavelen range(double low, double high)

• void set young modulus(double young modulus)

Page 268: Gop Ti Cal

Chapter 4: API documentation 265

Material::SellmeierMod class reference

Declaration

#include <Goptical/Material/SellmeierMod>

namespace Goptical {

namespace Material {

template <enum SellmeierModFormula m> class SellmeierMod;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of dielectric materials with various modified Sellmeierformulas:

• SellmeierMod2 (see [ 524], page 223) : nλ =√A+ B×λ2

λ2−C2 + Dλ2−E2

• Handbook1 (see [ 522], page 222) : nλ =√A+B × λ2 + C

λ2−D

• Handbook2 (see [ 523], page 222) : nλ =√A+B × λ2 + C×λ2

λ2−D

with λ the micrometer wavelength.

See also Sellmeier (see [Material Sellmeier class reference], page 261) class.

Members

See also the full member list (see [Material SellmeierMod class full member list], page 267)section for this class.

Inherited members

• 36 members inherited from Dielectric (see [Material Dielectric class reference],page 272)

Functions

• SellmeierMod()

• SellmeierMod(double A, double B, double C, double D, double E = [...])

• virtual double get measurement index(double wavelen) const

• void set coefficients(double A, double B, double C, double D, double E = [...])

Members detail

SellmeierMod()

Create an empty modified sellmeier model

Page 269: Gop Ti Cal

Chapter 4: API documentation 266

SellmeierMod(double A, double B, double C, double D, double E= 0.0)

Create a modified sellmeier model with given coefficients

virtual double get measurement index(double wavelen) const

This virtual function implements the get_measurement_index (see [_617], page 274)

pure function declared in the Dielectric (see [Material_Dielectric_class_

reference], page 272) base abstract class.

Documentation inherited from base class:

Get material relative refractive index in measurment medium at specified wavelen in nm.

void set coefficients(double A, double B, double C, double D,double E = 0.0)

Change coefficients

Page 270: Gop Ti Cal

Chapter 4: API documentation 267

Material::SellmeierMod class full member list

Functions

• SellmeierMod()

• SellmeierMod(double A, double B, double C, double D, double E = [...])

• void clear internal transmittance()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get measurement index(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get poisson ratio() const

• double get principal dispersion() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• Data::DiscreteSet & get transmittance dataset()

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set coefficients(double A, double B, double C, double D, double E = [...])

• void set density(double density)

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

Page 271: Gop Ti Cal

Chapter 4: API documentation 268

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set wavelen range(double low, double high)

• void set young modulus(double young modulus)

Page 272: Gop Ti Cal

Chapter 4: API documentation 269

Material::Vacuum class reference

Declaration

#include <Goptical/Material/Vacuum>

namespace Goptical {

namespace Material {

class Vacuum;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class models optical properties of vacuum. A global variable vacuum (see [ 530],page 223) is available.

Members

See also the full member list (see [Material Vacuum class full member list], page 271) sec-tion for this class.

Inherited members

• 14 members inherited from Base (see [Material Base class reference], page 231)

Functions

• Vacuum()

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• virtual double get refractive index(double wavelen) const

• virtual bool is opaque() const

• virtual bool is reflecting() const

Members detail

Vacuum()

No documentation available

virtual double get extinction coef(double wavelen) const

This virtual function overrides the get_extinction_coef (see [_545], page 232) virtualfunction defined in the Base (see [Material_Base_class_reference], page 231) baseabstract class.

Documentation inherited from base class:

Page 273: Gop Ti Cal

Chapter 4: API documentation 270

Get extinction coefficient. Subclasses must provide this function or theget internal transmittance() function.

virtual double get internal transmittance(double wavelen, doublethickness) const

This virtual function overrides the get_internal_transmittance (see [_546],

page 232) virtual function defined in the Base (see [Material_Base_class_

reference], page 231) base abstract class.

Documentation inherited from base class:

Get material internal transmittance for thickness in mm. Subclasses must provide thisfunction or the get extinction coef() function.

virtual double get refractive index(double wavelen) const

This virtual function implements the get_refractive_index (see [_550], page 232)

pure function declared in the Base (see [Material_Base_class_reference], page 231)

base abstract class.

Documentation inherited from base class:

Get material absolute refractive index at specified wavelen in nm.

virtual bool is opaque() const

This virtual function implements the is_opaque (see [_553], page 232) pure functiondeclared in the Base (see [Material_Base_class_reference], page 231) base abstractclass.

Documentation inherited from base class:

Return true if material must be considered opaque for ray tracing

virtual bool is reflecting() const

This virtual function implements the is_reflecting (see [_554], page 232) pure func-tion declared in the Base (see [Material_Base_class_reference], page 231) base ab-stract class.

Documentation inherited from base class:

Return true if material may reflect most of the light and must be considered as a mirrorwhen ignoring ray intensity computation during ray tracing.

Page 274: Gop Ti Cal

Chapter 4: API documentation 271

Material::Vacuum class full member list

Functions

• Vacuum()

• virtual Io::Rgb get color() const

• virtual double get extinction coef(double wavelen) const

• double get internal transmittance(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set temperature(double temp)

Page 275: Gop Ti Cal

Chapter 4: API documentation 272

Material::Dielectric class reference

Declaration

#include <Goptical/Material/Dielectric>

namespace Goptical {

namespace Material {

class Dielectric;

};

};

This class is a member of the Material namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This class models optical properties of dielectric materials. Transmittance values are storedin an Data::Set (see [Data Set class reference], page 130) object with Data::Cubic (see[ 146], page 106) interpolation enabled.

Child class has to implement the get measurement index (see [ 617], page 274) func-tion which must return relative refractive index as measured in medium material set byset measurement medium (see [ 625], page 275) function. Default measurement medium isstd air (see [ 529], page 223).

The relative refractive index together with the absolute refractive index of measurementmedium are used to compute absolute refractive index of dielectric material at referencetemperature. This is the value returned by the get refractive index (see [ 620], page 274)function when no temperature model is in use.

Temperature coeffiecients can be defined to take current material temperature into ac-count when computing absolute refractive index:

• The set temperature dndt (see [ 626], page 275) function enables use of refractive indextemperature deviation factor.

• The set temperature schott (see [ 627], page 275) function enables Schott temperaturemodel as described in Schott "TIE-19: Temperature Coefficient of the Refractive Index"technical information document. It uses the following formula:

nt =n2−1.0

2×n ×Δt×(

∆t×E1+E0

λ2−λtk2 +D2 ×Δt2 +D1 ×Δt+D0

)with Δt = t− tref and λ the micrometer wavelength.

Members

See also the full member list (see [Material Dielectric class full member list], page 276)section for this class.

Inherited members

• 23 members inherited from Solid (see [Material Solid class reference], page 281)

Page 276: Gop Ti Cal

Chapter 4: API documentation 273

Functions

• Dielectric()

• void clear internal transmittance()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get measurement index(double wavelen) const = 0;

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get principal dispersion() const

• virtual double get refractive index(double wavelen) const

• Data::DiscreteSet & get transmittance dataset()

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

• void set wavelen range(double low, double high)

Members detail

Dielectric()

No documentation available

void clear internal transmittance()

Clear all transmittance data. Returned transmittance value is always 1.0 when the data setis empty.

See also get transmittance dataset (see [ 621], page 274) function.

void disable temperature coeff()

Disable use of temperature coefficients

double get abbe vd() const

Compute glass Abbe number from refractive index model. Use d spectral line. Wavelen isin nm

double get abbe ve() const

Compute glass Abbe number from refractive index model. Use d spectral line. Wavelen isin nm

Page 277: Gop Ti Cal

Chapter 4: API documentation 274

virtual double get internal transmittance(double wavelen, doublethickness) const

This virtual function overrides the get_internal_transmittance (see [_546],

page 232) virtual function defined in the Base (see [Material_Base_class_

reference], page 231) base abstract class.

Documentation inherited from base class:

Get material internal transmittance for thickness in mm. Subclasses must provide thisfunction or the get extinction coef() function.

double get internal transmittance(double wavelen) const

This function shadows the get_internal_transmittance (see [_547], page 232) func-tion defined in the Base (see [Material_Base_class_reference], page 231) base ab-stract class.

Documentation inherited from base class:

Get material internal transmittance for 1mm thickness.

virtual double get measurement index(double wavelen) const = 0;

Get material relative refractive index in measurment medium at specified wavelen in nm.

double get partial dispersion(double wavelen1, double wavelen2)const

Compute glass partial dispersion between two wavelen in nm

double get principal dispersion() const

Compute glass principal dispersion.

virtual double get refractive index(double wavelen) const

This virtual function implements the get_refractive_index (see [_550], page 232)

pure function declared in the Base (see [Material_Base_class_reference], page 231)

base abstract class.

Documentation inherited from base class:

Get material absolute refractive index at specified wavelen in nm.

Data::DiscreteSet & get transmittance dataset()

Get internal tranmittance dataset object.

See also clear internal transmittance (see [ 611], page 273) function.

virtual bool is opaque() const

This virtual function implements the is_opaque (see [_553], page 232) pure functiondeclared in the Base (see [Material_Base_class_reference], page 231) base abstractclass.

Documentation inherited from base class:

Return true if material must be considered opaque for ray tracing

Page 278: Gop Ti Cal

Chapter 4: API documentation 275

virtual bool is reflecting() const

This virtual function implements the is_reflecting (see [_554], page 232) pure func-tion declared in the Base (see [Material_Base_class_reference], page 231) base ab-stract class.

Documentation inherited from base class:

Return true if material may reflect most of the light and must be considered as a mirrorwhen ignoring ray intensity computation during ray tracing.

void set internal transmittance(double wavelen, double thickness,double transmittance)

Add transmittance data, wavelen in nm

void set measurement medium(const const ref <Base> &medium)

Set glass measurement medium material.

void set temperature dndt(double dndt)

Set and enable dn/dt thermal coefficient.

void set temperature schott(double d0, double d1, double d2,double e0, double e1, double wl tk)

Set and enable Schott thermal coefficients. wl tk in um.

void set wavelen range(double low, double high)

Set wavelen validity range in nm

Page 279: Gop Ti Cal

Chapter 4: API documentation 276

Material::Dielectric class full member list

Functions

• Dielectric()

• void clear internal transmittance()

• void disable temperature coeff()

• double get abbe vd() const

• double get abbe ve() const

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get measurement index(double wavelen) const = 0;

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get partial dispersion(double wavelen1, double wavelen2) const

• double get poisson ratio() const

• double get principal dispersion() const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• Data::DiscreteSet & get transmittance dataset()

• double get young modulus() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set density(double density)

• void set internal transmittance(double wavelen, double thickness, double transmit-tance)

• void set measurement medium(const const ref<Base> &medium)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set temperature dndt(double dndt)

• void set temperature schott(double d0, double d1, double d2, double e0, double e1,double wl tk)

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set wavelen range(double low, double high)

• void set young modulus(double young modulus)

Page 280: Gop Ti Cal

Chapter 4: API documentation 277

Material::Proxy class reference

Declaration

#include <Goptical/Material/Proxy>

namespace Goptical {

namespace Material {

class Proxy;

};

};

This class is a member of the Material namespace.

Inheritance

Description

Optical material proxy class.

Members

See also the full member list (see [Material Proxy class full member list], page 280) sectionfor this class.

Inherited members

• 14 members inherited from Base (see [Material Base class reference], page 231)

Functions

• Proxy(const const ref<Base> &m)

• virtual Io::Rgb get color() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• const Base & get material() const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set material(const const ref<Base> &m)

Members detail

Proxy(const const ref <Base> &m)

No documentation available

Page 281: Gop Ti Cal

Chapter 4: API documentation 278

virtual Io::Rgb get color() const

This virtual function overrides the get_color (see [_544], page 232) virtual functiondefined in the Base (see [Material_Base_class_reference], page 231) base abstractclass.

Documentation inherited from base class:

Get material color and alpha

virtual double get extinction coef(double wavelen) const

This virtual function overrides the get_extinction_coef (see [_545], page 232) virtualfunction defined in the Base (see [Material_Base_class_reference], page 231) baseabstract class.

Documentation inherited from base class:

Get extinction coefficient. Subclasses must provide this function or theget internal transmittance() function.

virtual double get internal transmittance(double wavelen, doublethickness) const

This virtual function overrides the get_internal_transmittance (see [_546],

page 232) virtual function defined in the Base (see [Material_Base_class_

reference], page 231) base abstract class.

Documentation inherited from base class:

Get material internal transmittance for thickness in mm. Subclasses must provide thisfunction or the get extinction coef() function.

const Base & get material() const

No documentation available

virtual double get normal reflectance(const Base *from, doublewavelen) const

This virtual function overrides the get_normal_reflectance (see [_548], page 232)

virtual function defined in the Base (see [Material_Base_class_reference],

page 231) base abstract class.

Documentation inherited from base class:

Get reflectance at normal incidence

virtual double get normal transmittance(const Base *from, doublewavelen) const

This virtual function overrides the get_normal_transmittance (see [_549], page 232)

virtual function defined in the Base (see [Material_Base_class_reference],

page 231) base abstract class.

Documentation inherited from base class:

Get transmittance at normal incidence

Page 282: Gop Ti Cal

Chapter 4: API documentation 279

virtual double get refractive index(double wavelen) const

This virtual function implements the get_refractive_index (see [_550], page 232)

pure function declared in the Base (see [Material_Base_class_reference], page 231)

base abstract class.

Documentation inherited from base class:

Get material absolute refractive index at specified wavelen in nm.

virtual double get temperature() const

This virtual function overrides the get_temperature (see [_552], page 232) virtualfunction defined in the Base (see [Material_Base_class_reference], page 231) baseabstract class.

Documentation inherited from base class:

Get material temperature in celcius

virtual bool is opaque() const

This virtual function implements the is_opaque (see [_553], page 232) pure functiondeclared in the Base (see [Material_Base_class_reference], page 231) base abstractclass.

Documentation inherited from base class:

Return true if material must be considered opaque for ray tracing

virtual bool is reflecting() const

This virtual function implements the is_reflecting (see [_554], page 232) pure func-tion declared in the Base (see [Material_Base_class_reference], page 231) base ab-stract class.

Documentation inherited from base class:

Return true if material may reflect most of the light and must be considered as a mirrorwhen ignoring ray intensity computation during ray tracing.

void set material(const const ref <Base> &m)

No documentation available

Page 283: Gop Ti Cal

Chapter 4: API documentation 280

Material::Proxy class full member list

Functions

• Proxy(const const ref<Base> &m)

• virtual Io::Rgb get color() const

• virtual double get extinction coef(double wavelen) const

• double get internal transmittance(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• const Base & get material() const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get refractive index(double wavelen, const Base &env) const

• virtual double get refractive index(double wavelen) const

• virtual double get temperature() const

• virtual bool is opaque() const

• virtual bool is reflecting() const

• void set material(const const ref<Base> &m)

• void set temperature(double temp)

Page 284: Gop Ti Cal

Chapter 4: API documentation 281

Material::Solid class reference

Declaration

#include <Goptical/Material/Solid>

namespace Goptical {

namespace Material {

class Solid;

};

};

This class is a member of the Material namespace.

Inheritance

Description

This class is the base class for all solid material models.

Members

See also the full member list (see [Material Solid class full member list], page 283) sectionfor this class.

Inherited members

• 14 members inherited from Base (see [Material Base class reference], page 231)

Functions

• Solid()

• double get density() const

• double get poisson ratio() const

• double get thermal conductivity() const

• double get thermal expansion() const

• double get young modulus() const

• void set density(double density)

• void set poisson ratio(double poisson ratio)

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set young modulus(double young modulus)

Members detail

Solid()

No documentation available

Page 285: Gop Ti Cal

Chapter 4: API documentation 282

double get density() const

Get material density in g/cm^3.

See also set density (see [ 647], page 282) function.

double get poisson ratio() const

Get material poisson ratio.

See also set poisson ratio (see [ 648], page 282) function.

double get thermal conductivity() const

Get Set material thermal conductivity in W/m.K.

See also set thermal conductivity (see [ 649], page 282) function.

double get thermal expansion() const

Get material thermal expansion coefficient.

See also set thermal expansion (see [ 650], page 282) function.

double get young modulus() const

Get material young modulus.

See also set young modulus (see [ 651], page 282) function.

void set density(double density)

Set material density in g/cm^3.

See also get density (see [ 642], page 282) function.

void set poisson ratio(double poisson ratio)

Set material poisson ratio.

See also get poisson ratio (see [ 643], page 282) function.

void set thermal conductivity(double thermal conductivity)

Set Set material thermal conductivity in W/m.K.

See also get thermal conductivity (see [ 644], page 282) function.

void set thermal expansion(double thermal expansion)

Set material thermal expansion coefficient.

See also get thermal expansion (see [ 645], page 282) function.

void set young modulus(double young modulus)

Set material young modulus.

See also get young modulus (see [ 646], page 282) function.

Page 286: Gop Ti Cal

Chapter 4: API documentation 283

Material::Solid class full member list

Functions

• Solid()

• virtual Io::Rgb get color() const

• double get density() const

• virtual double get extinction coef(double wavelen) const

• virtual double get internal transmittance(double wavelen, double thickness) const

• double get internal transmittance(double wavelen) const

• virtual double get normal reflectance(const Base *from, double wavelen) const

• virtual double get normal transmittance(const Base *from, double wavelen) const

• double get poisson ratio() const

• virtual double get refractive index(double wavelen) const = 0;

• double get refractive index(double wavelen, const Base &env) const

• virtual double get temperature() const

• double get thermal conductivity() const

• double get thermal expansion() const

• double get young modulus() const

• virtual bool is opaque() const = 0;

• virtual bool is reflecting() const = 0;

• void set density(double density)

• void set poisson ratio(double poisson ratio)

• void set temperature(double temp)

• void set thermal conductivity(double thermal conductivity)

• void set thermal expansion(double thermal expansion)

• void set young modulus(double young modulus)

Page 287: Gop Ti Cal

Chapter 4: API documentation 284

Math namespace reference

Description

Mathematical tools and functions

Members

Types

• typedef [...] Vector2

• typedef [...] Vector3

• typedef [...] VectorPair3

• template struct Matrix

• typedef [...] Matrix3x3

• class Quaternion

• template class Transform<3>

• template class Transform<2>

• typedef [...] Transform2

• typedef [...] Transform3

• template struct Triangle

• template struct Triangle<3>

• template struct Vector

• template struct Vector<3, T>

• template struct Vector<2, T>

• template struct VectorPair

• template struct VectorPair<2>

• template struct VectorPair<3>

• typedef [...] VectorPair2

• typedef [...] range t

Functions

• double degree2rad(double x)

• void get rotation matrix(Matrix<2> &m, unsigned int axis, double rangle)

• void get rotation matrix(Matrix<3> &m, unsigned int axis, double rangle)

• double lp floor(double x, double n)

• double lp mod(double x, double n)

• template std::ostream & operator<<(std::ostream &o, const VectorBase<N, T> &v)

• template std::ostream & operator<<(std::ostream &o, const VectorPairBase<N> &l)

• template std::ostream & operator<<(std::ostream &o, const Matrix<N> &m)

• std::ostream & operator<<(std::ostream &o, const Quaternion &q)

• template std::ostream & operator<<(std::ostream &o, const TransformBase<N> &t)

Page 288: Gop Ti Cal

Chapter 4: API documentation 285

• template std::ostream & operator<<(std::ostream &o, const Triangle<N> &l)

• double rad2degree(double x)

• double square(double x)

Constants

• const Vector2 vector2 0

• const Vector2 vector2 01

• const Vector2 vector2 1

• const Vector2 vector2 10

• const VectorPair<2> vector2 pair 00

• const VectorPair<2> vector2 pair 01

• const Vector3 vector3 0

• const Vector3 vector3 001

• const Vector3 vector3 010

• const Vector3 vector3 1

• const Vector3 vector3 100

• const VectorPair<3> vector3 pair 00

• const VectorPair<3> vector3 pair 01

Members detail

typedef Vector<2, double> Vector2

See Vector (see [Math Vector 2 T struct reference], page 322)<2, T> struct.

typedef Vector<3, double> Vector3

See Vector (see [Math Vector 3 T struct reference], page 317)<3, T> struct.

typedef VectorPair<3> VectorPair3

See VectorPair (see [Math VectorPair 3 struct reference], page 340)<3> struct.

typedef Matrix<3> Matrix3x3

No documentation available

typedef Transform<2> Transform2

See Transform (see [Math Transform 2 class reference], page 299)<2> class.

typedef Transform<3> Transform3

See Transform (see [Math Transform 3 class reference], page 295)<3> class.

typedef VectorPair<2> VectorPair2

See VectorPair (see [Math VectorPair 2 struct reference], page 336)<2> struct.

double degree2rad(double x)

Convert from degrees to radians

Page 289: Gop Ti Cal

Chapter 4: API documentation 286

void get rotation matrix(Matrix<2> &m, unsigned int axis, doublerangle)

Setup a 2d rotation matrix with specified angle in radian. axis parameter must be 0.

void get rotation matrix(Matrix<3> &m, unsigned int axis, doublerangle)

Setup a 3d rotation matrix with specified angle in radian. axis parameter can be 0, 1 or 2for x, y and z axes.

double lp floor(double x, double n)

No documentation available

double lp mod(double x, double n)

No documentation available

template <int N, typename T> std:: ostream & operator<<(std::ostream &o, const VectorBase<N, T> &v)

No documentation available

template <int N> std:: ostream & operator<<(std:: ostream &o,const VectorPairBase<N> &l)

No documentation available

template <int N> std:: ostream & operator<<(std:: ostream &o,const Matrix<N> &m)

No documentation available

std:: ostream & operator<<(std:: ostream &o, const Quaternion&q)

No documentation available

template <int N> std:: ostream & operator<<(std:: ostream &o,const TransformBase<N> &t)

No documentation available

template <int N> std:: ostream & operator<<(std:: ostream &o,const Triangle<N> &l)

No documentation available

double rad2degree(double x)

Convert from radians to degrees

typedef std:: pair <double, double> range t

No documentation available

double square(double x)

Compute square

Page 290: Gop Ti Cal

Chapter 4: API documentation 287

const Vector2 vector2 0 = Vector2(0.0,0.0)

Commonly used vector constant

const Vector2 vector2 01

Commonly used vector constant

const Vector2 vector2 1

Commonly used vector constant

const Vector2 vector2 10

Commonly used vector constant

const VectorPair<2> vector2 pair 00

No documentation available

const VectorPair<2> vector2 pair 01

No documentation available

const Vector3 vector3 0

Commonly used vector constant

const Vector3 vector3 001

Commonly used vector constant

const Vector3 vector3 010

Commonly used vector constant

const Vector3 vector3 1

Commonly used vector constant

const Vector3 vector3 100

Commonly used vector constant

const VectorPair<3> vector3 pair 00

No documentation available

const VectorPair<3> vector3 pair 01

No documentation available

Page 291: Gop Ti Cal

Chapter 4: API documentation 288

Math::Matrix struct reference

Declaration

#include <Goptical/Math/Matrix>

namespace Goptical {

namespace Math {

template <int N> struct Matrix;

};

};

This struct is a member of the Math namespace.

Description

NxN square matrix class.

Members

See also the full member list (see [Math Matrix struct full member list], page 291) sectionfor this struct.

Functions

• void adjugate(Matrix &result) const

• Matrix adjugate() const

• double determinant() const

• void inverse(Matrix &result) const

• Matrix inverse() const

• Matrix operator*(double scale) const

• Matrix operator*(const Matrix &m) const

• Vector<N> operator*(const Vector<N> &v) const

• Matrix operator+(const Matrix &m) const

• Matrix operator-(const Matrix &m) const

• Matrix operator/(double scale) const

• Matrix & set(double value = [...])

• Matrix & set col(int col, double value)

• Matrix & set col(int col, const Vector<N> &v)

• Matrix & set diag(double value = [...])

• Matrix & set diag(const Vector<N> &v)

• Matrix & set id()

• Matrix & set row(int row, double value)

• Matrix & set row(int row, const Vector<N> &v)

• void transpose(Matrix &result) const

Page 292: Gop Ti Cal

Chapter 4: API documentation 289

• Matrix transpose() const

• double value(int x, int y) const

• double & value(int x, int y)

Members detail

void adjugate(Matrix &result) const

replace matrix by the adjugate matrix

Matrix adjugate() const

Get the adjugate matrix

double determinant() const

compute matrix determinant

void inverse(Matrix &result) const

replace matrix by the inverse matrix

Matrix inverse() const

Get the inverse matrix

Matrix operator*(double scale) const

Scale matrix

Matrix operator*(const Matrix &m) const

Multiply matrix

Vector<N> operator*(const Vector<N> &v) const

Multiply matrix with vector. See Vector class for vector/matrix multiplication.

Matrix operator+(const Matrix &m) const

Add matrix

Matrix operator-(const Matrix &m) const

Subtract matrix

Matrix operator/(double scale) const

Scale matrix

Matrix & set(double value = 0)

Set whole matrix to specified value.

Matrix & set col(int col, double value)

Set whole matrix column to specified value.

Page 293: Gop Ti Cal

Chapter 4: API documentation 290

Matrix & set col(int col, const Vector<N> &v)

Set matrix column to specified vector.

Matrix & set diag(double value = 1)

Set matrix diagonal to specified value.

Matrix & set diag(const Vector<N> &v)

Set matrix diagonal to specified value.

Matrix & set id()

Setup an identity matrix.

Matrix & set row(int row, double value)

Set whole matrix row to specified value.

Matrix & set row(int row, const Vector<N> &v)

Set matrix row to specified vector.

void transpose(Matrix &result) const

replace matrix by the transposed matrix

Matrix transpose() const

Get the transposed matrix

double value(int x, int y) const

Get value at x row and y column

double & value(int x, int y)

Get modifiable reference to value at x row and y column

Page 294: Gop Ti Cal

Chapter 4: API documentation 291

Math::Matrix struct full member list

Functions

• void adjugate(Matrix &result) const

• Matrix adjugate() const

• double determinant() const

• void inverse(Matrix &result) const

• Matrix inverse() const

• Matrix operator*(double scale) const

• Matrix operator*(const Matrix &m) const

• Vector<N> operator*(const Vector<N> &v) const

• Matrix operator+(const Matrix &m) const

• Matrix operator-(const Matrix &m) const

• Matrix operator/(double scale) const

• Matrix & set(double value = [...])

• Matrix & set col(int col, double value)

• Matrix & set col(int col, const Vector<N> &v)

• Matrix & set diag(double value = [...])

• Matrix & set diag(const Vector<N> &v)

• Matrix & set id()

• Matrix & set row(int row, double value)

• Matrix & set row(int row, const Vector<N> &v)

• void transpose(Matrix &result) const

• Matrix transpose() const

• double value(int x, int y) const

• double & value(int x, int y)

Page 295: Gop Ti Cal

Chapter 4: API documentation 292

Math::Quaternion class reference

Declaration

#include <Goptical/Math/Quaternion>

namespace Goptical {

namespace Math {

class Quaternion;

};

};

This class is a member of the Math namespace.

Description

This class describe a quaternion object. Useful for 3d rotations.

Members

See also the full member list (see [Math Quaternion class full member list], page 294) sec-tion for this class.

Functions

• Quaternion()

• Quaternion(double x, double y, double z, double w)

• Quaternion(const Vector3 &a, const Vector3 &b)

• double norm() const

• const Quaternion & normalize()

• Quaternion operator*(const Quaternion &q) const

• double w() const

• double & w()

• double x() const

• double & x()

• double y() const

• double & y()

• double z() const

• double & z()

Static functions

• static Quaternion angle(const Vector3 &v, double angle)

• static Quaternion angle rad(const Vector3 &v, double angle)

Members detail

Quaternion()

No documentation available

Page 296: Gop Ti Cal

Chapter 4: API documentation 293

Quaternion(double x, double y, double z, double w)

Create a Quaternion from its real values

Quaternion(const Vector3 &a, const Vector3 &b)

Create a Quaternion as rotation between two unit vectors

static Quaternion angle(const Vector3 &v, double angle)

Create a Quaternion with given rotation angle along a 3d vector

static Quaternion angle rad(const Vector3 &v, double angle)

Create a Quaternion with given rotation angle in radian along a 3d vector

double norm() const

Adjust vector length

const Quaternion & normalize()

Normalize vector length

Quaternion operator*(const Quaternion &q) const

Multiply with an other quaternion

double w() const

Get quaterion w value

double & w()

Get reference to quaterion w value

double x() const

Get quaterion x value

double & x()

Get reference to quaterion x value

double y() const

Get quaterion y value

double & y()

Get reference to quaterion y value

double z() const

Get quaterion z value

double & z()

Get reference to quaterion z value

Page 297: Gop Ti Cal

Chapter 4: API documentation 294

Math::Quaternion class full member list

Functions

• Quaternion()

• Quaternion(double x, double y, double z, double w)

• Quaternion(const Vector3 &a, const Vector3 &b)

• double norm() const

• const Quaternion & normalize()

• Quaternion operator*(const Quaternion &q) const

• double w() const

• double & w()

• double x() const

• double & x()

• double y() const

• double & y()

• double z() const

• double & z()

Static functions

• static Quaternion angle(const Vector3 &v, double angle)

• static Quaternion angle rad(const Vector3 &v, double angle)

Page 298: Gop Ti Cal

Chapter 4: API documentation 295

Math::Transform<3> class reference

Declaration

#include <Goptical/Math/Transform>

namespace Goptical {

namespace Math {

template <> class Transform<3>;

};

};

This class is a member of the Math namespace.

This class is a specialization of Transform.

Description

This class describes linear and affine transformations in 3d space. It contains a 3x3 trans-formation matrix and a 3d translation vector. It can be used for translation and rotationin 3d.

See also Transform3 (see [ 657], page 285) typedef.

Members

See also the full member list (see [Math Transform 3 class full member list], page 298)section for this class.

Functions

• Transform()

• Transform(const TransformBase<3> &t)

• Transform(const Quaternion &q, const Vector3 &v)

• TransformBase<3> & affine rotation(unsigned int axis, double dangle)

• Transform<3> & affine rotation(const Vector3 &rangles)

• TransformBase<3> & affine rotation rad(unsigned int axis, double rangle)

• Transform<3> & affine rotation rad(const Vector3 &rangles)

• TransformBase<3> & affine scaling(const Vector<N> &v)

• TransformBase<3> & affine scaling(double s)

• TransformBase<3> & apply translation(const Vector<N> &v)

• void compose(const TransformBase<N> &t)

• const Matrix<N> & get linear() const

• Matrix<N> & get linear()

• const Vector<N> & get translation() const

• Vector<N> & get translation()

• TransformBase<3> inverse() const

• void linear reset()

Page 299: Gop Ti Cal

Chapter 4: API documentation 296

• TransformBase<3> & linear rotation(unsigned int axis, double dangle)

• Transform<3> & linear rotation(const Vector3 &dangles)

• TransformBase<3> & linear rotation rad(unsigned int axis, double rangle)

• Transform<3> & linear rotation rad(const Vector3 &rangles)

• TransformBase<3> & linear scaling(const Vector<N> &v)

• TransformBase<3> & linear scaling(double s)

• void reset()

• void set direction(const Vector3 &d)

• void set rotation(const Quaternion &q)

• void set translation(const Vector<N> &v)

• Vector<N> transform(const Vector<N> &v) const

• VectorPair<N> transform line(const VectorPair<N> &v) const

• Vector<N> transform linear(const Vector<N> &v) const

• VectorPair<N> transform pair(const VectorPair<N> &p) const

• Vector<N> transform translate(const Vector<N> &v) const

• void translation reset()

Members detail

Transform()

No documentation available

Transform(const TransformBase<3> &t)

No documentation available

Transform(const Quaternion &q, const Vector3 &v)

Create a transform from rotation quaternion and translation vector

Transform<3> & affine rotation(const Vector3 &rangles)

apply rotation to current transform (degree)

Transform<3> & affine rotation rad(const Vector3 &rangles)

apply rotation to current transform (radian)

Transform<3> & linear rotation(const Vector3 &dangles)

apply rotation to current transform (degree) (does not transform translation vector)

Transform<3> & linear rotation rad(const Vector3 &rangles)

apply rotation to current transform (radian) (does not transform translation vector)

void set direction(const Vector3 &d)

set rotation from given direction vector

Page 300: Gop Ti Cal

Chapter 4: API documentation 297

void set rotation(const Quaternion &q)

set rotation from given quaternion

Page 301: Gop Ti Cal

Chapter 4: API documentation 298

Math::Transform<3> class full member list

Functions

• Transform()

• Transform(const TransformBase<3> &t)

• Transform(const Quaternion &q, const Vector3 &v)

• TransformBase<3> & affine rotation(unsigned int axis, double dangle)

• Transform<3> & affine rotation(const Vector3 &rangles)

• TransformBase<3> & affine rotation rad(unsigned int axis, double rangle)

• Transform<3> & affine rotation rad(const Vector3 &rangles)

• TransformBase<3> & affine scaling(const Vector<N> &v)

• TransformBase<3> & affine scaling(double s)

• TransformBase<3> & apply translation(const Vector<N> &v)

• void compose(const TransformBase<N> &t)

• const Matrix<N> & get linear() const

• Matrix<N> & get linear()

• const Vector<N> & get translation() const

• Vector<N> & get translation()

• TransformBase<3> inverse() const

• void linear reset()

• TransformBase<3> & linear rotation(unsigned int axis, double dangle)

• Transform<3> & linear rotation(const Vector3 &dangles)

• TransformBase<3> & linear rotation rad(unsigned int axis, double rangle)

• Transform<3> & linear rotation rad(const Vector3 &rangles)

• TransformBase<3> & linear scaling(const Vector<N> &v)

• TransformBase<3> & linear scaling(double s)

• void reset()

• void set direction(const Vector3 &d)

• void set rotation(const Quaternion &q)

• void set translation(const Vector<N> &v)

• Vector<N> transform(const Vector<N> &v) const

• VectorPair<N> transform line(const VectorPair<N> &v) const

• Vector<N> transform linear(const Vector<N> &v) const

• VectorPair<N> transform pair(const VectorPair<N> &p) const

• Vector<N> transform translate(const Vector<N> &v) const

• void translation reset()

Page 302: Gop Ti Cal

Chapter 4: API documentation 299

Math::Transform<2> class reference

Declaration

#include <Goptical/Math/Transform>

namespace Goptical {

namespace Math {

template <> class Transform<2>;

};

};

This class is a member of the Math namespace.

This class is a specialization of Transform.

Description

This class describes linear and affine transformations in 2d space. It contains a 2x2 trans-formation matrix and a 2d translation vector. It can be used for translation and rotationin 2d.

See also Transform2 (see [ 656], page 285) typedef.

Members

See also the full member list (see [Math Transform 2 class full member list], page 301)section for this class.

Functions

• Transform()

• Transform(const TransformBase<2> &t)

• TransformBase<2> & affine rotation(unsigned int axis, double dangle)

• TransformBase<2> & affine rotation rad(unsigned int axis, double rangle)

• TransformBase<2> & affine scaling(const Vector<N> &v)

• TransformBase<2> & affine scaling(double s)

• TransformBase<2> & apply translation(const Vector<N> &v)

• void compose(const TransformBase<N> &t)

• const Matrix<N> & get linear() const

• Matrix<N> & get linear()

• const Vector<N> & get translation() const

• Vector<N> & get translation()

• TransformBase<2> inverse() const

• void linear reset()

• TransformBase<2> & linear rotation(unsigned int axis, double dangle)

• TransformBase<2> & linear rotation rad(unsigned int axis, double rangle)

• TransformBase<2> & linear scaling(const Vector<N> &v)

Page 303: Gop Ti Cal

Chapter 4: API documentation 300

• TransformBase<2> & linear scaling(double s)

• void reset()

• void set translation(const Vector<N> &v)

• Vector<N> transform(const Vector<N> &v) const

• VectorPair<N> transform line(const VectorPair<N> &v) const

• Vector<N> transform linear(const Vector<N> &v) const

• VectorPair<N> transform pair(const VectorPair<N> &p) const

• Vector<N> transform translate(const Vector<N> &v) const

• void translation reset()

Members detail

Transform()

No documentation available

Transform(const TransformBase<2> &t)

No documentation available

Page 304: Gop Ti Cal

Chapter 4: API documentation 301

Math::Transform<2> class full member list

Functions

• Transform()

• Transform(const TransformBase<2> &t)

• TransformBase<2> & affine rotation(unsigned int axis, double dangle)

• TransformBase<2> & affine rotation rad(unsigned int axis, double rangle)

• TransformBase<2> & affine scaling(const Vector<N> &v)

• TransformBase<2> & affine scaling(double s)

• TransformBase<2> & apply translation(const Vector<N> &v)

• void compose(const TransformBase<N> &t)

• const Matrix<N> & get linear() const

• Matrix<N> & get linear()

• const Vector<N> & get translation() const

• Vector<N> & get translation()

• TransformBase<2> inverse() const

• void linear reset()

• TransformBase<2> & linear rotation(unsigned int axis, double dangle)

• TransformBase<2> & linear rotation rad(unsigned int axis, double rangle)

• TransformBase<2> & linear scaling(const Vector<N> &v)

• TransformBase<2> & linear scaling(double s)

• void reset()

• void set translation(const Vector<N> &v)

• Vector<N> transform(const Vector<N> &v) const

• VectorPair<N> transform line(const VectorPair<N> &v) const

• Vector<N> transform linear(const Vector<N> &v) const

• VectorPair<N> transform pair(const VectorPair<N> &p) const

• Vector<N> transform translate(const Vector<N> &v) const

• void translation reset()

Page 305: Gop Ti Cal

Chapter 4: API documentation 302

Math::TransformBase<2> internal class members

TransformBase()

No documentation available

TransformBase<2> & affine rotation(unsigned int axis, doubledangle)

apply rotation to current transform (degree)

TransformBase<2> & affine rotation rad(unsigned int axis, doublerangle)

apply rotation to current transform (radian)

TransformBase<2> & affine scaling(const Vector<N> &v)

apply scaling to current transform

TransformBase<2> & affine scaling(double s)

apply scaling to current transform

TransformBase<2> & apply translation(const Vector<N> &v)

apply translation to current transform

void compose(const TransformBase<N> &t)

compose with t. new transform is equivalent to applying t then this transform

const Matrix<N> & get linear() const

get linear transform matrix

Matrix<N> & get linear()

get linear transform matrix

const Vector<N> & get translation() const

get translation vector

Vector<N> & get translation()

get translation vector

TransformBase<2> inverse() const

get inverse transformation

void linear reset()

reset linear transform to identity

TransformBase<2> & linear rotation(unsigned int axis, doubledangle)

apply rotation to current transform (degree) (does not transform translation vector)

Page 306: Gop Ti Cal

Chapter 4: API documentation 303

TransformBase<2> & linear rotation rad(unsigned int axis, doublerangle)

apply rotation to current transform (radian) (does not transform translation vector)

TransformBase<2> & linear scaling(const Vector<N> &v)

apply linear scaling to current transform (does not transform translation vector)

TransformBase<2> & linear scaling(double s)

apply scaling to current transform (does not transform translation vector)

void reset()

reset linear transform to identity and translation to zero

void set translation(const Vector<N> &v)

set current translation

Vector<N> transform(const Vector<N> &v) const

apply affine transform (translation and linear) to vector

VectorPair<N> transform line(const VectorPair<N> &v) const

apply affine transform to line origin and linear to direction

Vector<N> transform linear(const Vector<N> &v) const

apply linear transform to vector

VectorPair<N> transform pair(const VectorPair<N> &p) const

apply affine transform to both vectors in pair

Vector<N> transform translate(const Vector<N> &v) const

apply translation to vector

void translation reset()

reset translation to zero

virtual ~TransformBase()

No documentation available

Page 307: Gop Ti Cal

Chapter 4: API documentation 304

Math::TransformBase<3> internal class members

TransformBase()

No documentation available

TransformBase<3> & affine rotation(unsigned int axis, doubledangle)

apply rotation to current transform (degree)

TransformBase<3> & affine rotation rad(unsigned int axis, doublerangle)

apply rotation to current transform (radian)

TransformBase<3> & affine scaling(const Vector<N> &v)

apply scaling to current transform

TransformBase<3> & affine scaling(double s)

apply scaling to current transform

TransformBase<3> & apply translation(const Vector<N> &v)

apply translation to current transform

void compose(const TransformBase<N> &t)

compose with t. new transform is equivalent to applying t then this transform

const Matrix<N> & get linear() const

get linear transform matrix

Matrix<N> & get linear()

get linear transform matrix

const Vector<N> & get translation() const

get translation vector

Vector<N> & get translation()

get translation vector

TransformBase<3> inverse() const

get inverse transformation

void linear reset()

reset linear transform to identity

TransformBase<3> & linear rotation(unsigned int axis, doubledangle)

apply rotation to current transform (degree) (does not transform translation vector)

Page 308: Gop Ti Cal

Chapter 4: API documentation 305

TransformBase<3> & linear rotation rad(unsigned int axis, doublerangle)

apply rotation to current transform (radian) (does not transform translation vector)

TransformBase<3> & linear scaling(const Vector<N> &v)

apply linear scaling to current transform (does not transform translation vector)

TransformBase<3> & linear scaling(double s)

apply scaling to current transform (does not transform translation vector)

void reset()

reset linear transform to identity and translation to zero

void set translation(const Vector<N> &v)

set current translation

Vector<N> transform(const Vector<N> &v) const

apply affine transform (translation and linear) to vector

VectorPair<N> transform line(const VectorPair<N> &v) const

apply affine transform to line origin and linear to direction

Vector<N> transform linear(const Vector<N> &v) const

apply linear transform to vector

VectorPair<N> transform pair(const VectorPair<N> &p) const

apply affine transform to both vectors in pair

Vector<N> transform translate(const Vector<N> &v) const

apply translation to vector

void translation reset()

reset translation to zero

virtual ~TransformBase()

No documentation available

Page 309: Gop Ti Cal

Chapter 4: API documentation 306

Math::Triangle struct reference

Declaration

#include <Goptical/Math/Triangle>

namespace Goptical {

namespace Math {

template <int N> struct Triangle;

};

};

This struct is a member of the Math namespace.

Description

This class is the general purpose N dimensions triangles class.

Class specializations

Name DescriptionTriangle<3> 3d triangle class

Members

See also the full member list (see [Math Triangle struct full member list], page 307) sectionfor this struct.

Type

• typedef [...] put delegate t

Functions

• Triangle()

• Triangle(const Vector<N> &a, const Vector<N> &b, const Vector<N> &c)

• Vector<N> get centroid() const

• const Vector<N> & operator[](int n) const

• Vector<N> & operator[](int n)

Members detail

Triangle()

No documentation available

Triangle(const Vector<N> &a, const Vector<N> &b, constVector<N> &c)

Create a triangle from 3 points

typedef delegate <void(const Math::Triangle<N>&)> put delegate t

No documentation available

Page 310: Gop Ti Cal

Chapter 4: API documentation 307

Math::Triangle struct full member list

Type

• typedef [...] put delegate t

Functions

• Triangle()

• Triangle(const Vector<N> &a, const Vector<N> &b, const Vector<N> &c)

• Vector<N> get centroid() const

• const Vector<N> & operator[](int n) const

• Vector<N> & operator[](int n)

Page 311: Gop Ti Cal

Chapter 4: API documentation 308

Math::Triangle<3> struct reference

Declaration

#include <Goptical/Math/Triangle>

namespace Goptical {

namespace Math {

template <> struct Triangle<3>;

};

};

This struct is a member of the Math namespace.

This struct is a specialization of Triangle (see [Math Triangle struct reference],page 306).

Description

This class is the 3d triangles class.

Members

See also the full member list (see [Math Triangle 3 struct full member list], page 310)section for this struct.

Type

• typedef [...] put delegate t

Functions

• Triangle()

• Triangle(const Vector3 &a, const Vector3 &b, const Vector3 &c)

• Vector<N> get centroid() const

• Vector3 normal() const

• const Vector<N> & operator[](int n) const

• Vector<N> & operator[](int n)

Members detail

Triangle()

No documentation available

Triangle(const Vector3 &a, const Vector3 &b, const Vector3 &c)

Create a triangle from 3 points

Vector3 normal() const

Get triangle normal

Page 312: Gop Ti Cal

Chapter 4: API documentation 309

typedef delegate <void(const Math::Triangle<3>&)> put delegate t

No documentation available

Page 313: Gop Ti Cal

Chapter 4: API documentation 310

Math::Triangle<3> struct full member list

Type

• typedef [...] put delegate t

Functions

• Triangle()

• Triangle(const Vector3 &a, const Vector3 &b, const Vector3 &c)

• Vector<N> get centroid() const

• Vector3 normal() const

• const Vector<N> & operator[](int n) const

• Vector<N> & operator[](int n)

Page 314: Gop Ti Cal

Chapter 4: API documentation 311

Math::Triangle<2> internal struct members

Triangle()

No documentation available

Triangle(const Vector<N> &a, const Vector<N> &b, constVector<N> &c)

Create a triangle from 3 points

typedef delegate <void(const Math::Triangle<N>&)> put delegate t

No documentation available

Page 315: Gop Ti Cal

Chapter 4: API documentation 312

Math::TriangleBase<N> internal struct members

TriangleBase()

No documentation available

TriangleBase(const Vector<N> &a, const Vector<N> &b, constVector<N> &c)

Create a triangle from 3 points

Vector<N> get centroid() const

Get triangle centroid

const Vector<N> & operator[](int n) const

Get point n of the triangle

Vector<N> & operator[](int n)

Get reference to point n of the triangle

Page 316: Gop Ti Cal

Chapter 4: API documentation 313

Math::TriangleBase<3> internal struct members

TriangleBase()

No documentation available

TriangleBase(const Vector<N> &a, const Vector<N> &b, constVector<N> &c)

Create a triangle from 3 points

Vector<N> get centroid() const

Get triangle centroid

const Vector<N> & operator[](int n) const

Get point n of the triangle

Vector<N> & operator[](int n)

Get reference to point n of the triangle

Page 317: Gop Ti Cal

Chapter 4: API documentation 314

Math::Vector struct reference

Declaration

#include <Goptical/Math/Vector>

namespace Goptical {

namespace Math {

template <int N, typename T = double> struct Vector;

};

};

This struct is a member of the Math namespace.

Description

This class is the general purpose N dimensions vector class.

Class specializations

Name DescriptionVector<3, T> 3d vector classVector<2, T> 2d vector class

Members

See also the full member list (see [Math Vector struct full member list], page 316) sectionfor this struct.

Functions

• Vector()

• Vector(const VectorBase<N, T> &v)

• Vector(T v)

• bool close to(const VectorBase<N, T> &m, T error = [...])

• T len() const

• VectorBase<N, T> magnitude(T newlen) const

• VectorBase<N, T> mul(const VectorBase<N, T> &v) const

• VectorBase<N, T> & neg()

• const VectorBase<N, T> & normalize()

• VectorBase<N, T> normalized() const

• T operator*(const VectorBase<N, T> &v) const

• VectorBase<N, T> operator*(T scale) const

• VectorBase<N, T> operator*(const Matrix<N> &m)

• const VectorBase<N, T> & operator*=(T scale)

• VectorBase<N, T> operator+(const VectorBase<N, T> &v) const

Page 318: Gop Ti Cal

Chapter 4: API documentation 315

• const VectorBase<N, T> & operator+=(const VectorBase<N, T> &v)

• VectorBase<N, T> operator-(const VectorBase<N, T> &v) const

• VectorBase<N, T> operator-() const

• const VectorBase<N, T> & operator-=(const VectorBase<N, T> &v)

• VectorBase<N, T> operator/(T scale) const

• VectorBase<N, T> operator/(const VectorBase<N, T> &v) const

• const VectorBase<N, T> & operator/=(T scale)

• bool operator==(const VectorBase<N, T> &m) const

• T operator[](int n) const

• T & operator[](int n)

• template VectorBase<M, T> select(unsigned int bitmask, const VectorBase<M, T> &v)const

• void set(T value)

Members detail

Vector()

No documentation available

Vector(const VectorBase<N, T> &v)

No documentation available

Vector(T v)

Create a 2d vector with same value for all components

Page 319: Gop Ti Cal

Chapter 4: API documentation 316

Math::Vector struct full member list

Functions

• Vector()

• Vector(const VectorBase<N, T> &v)

• Vector(T v)

• bool close to(const VectorBase<N, T> &m, T error = [...])

• T len() const

• VectorBase<N, T> magnitude(T newlen) const

• VectorBase<N, T> mul(const VectorBase<N, T> &v) const

• VectorBase<N, T> & neg()

• const VectorBase<N, T> & normalize()

• VectorBase<N, T> normalized() const

• T operator*(const VectorBase<N, T> &v) const

• VectorBase<N, T> operator*(T scale) const

• VectorBase<N, T> operator*(const Matrix<N> &m)

• const VectorBase<N, T> & operator*=(T scale)

• VectorBase<N, T> operator+(const VectorBase<N, T> &v) const

• const VectorBase<N, T> & operator+=(const VectorBase<N, T> &v)

• VectorBase<N, T> operator-(const VectorBase<N, T> &v) const

• VectorBase<N, T> operator-() const

• const VectorBase<N, T> & operator-=(const VectorBase<N, T> &v)

• VectorBase<N, T> operator/(T scale) const

• VectorBase<N, T> operator/(const VectorBase<N, T> &v) const

• const VectorBase<N, T> & operator/=(T scale)

• bool operator==(const VectorBase<N, T> &m) const

• T operator[](int n) const

• T & operator[](int n)

• template VectorBase<M, T> select(unsigned int bitmask, const VectorBase<M, T> &v)const

• void set(T value)

Page 320: Gop Ti Cal

Chapter 4: API documentation 317

Math::Vector<3,T> struct reference

Declaration

#include <Goptical/Math/Vector>

namespace Goptical {

namespace Math {

template <typename T> struct Vector<3, T>;

};

};

This struct is a member of the Math namespace.

This template struct is a specialization of Vector (see [Math Vector struct reference],page 314).

Description

This class implements 3d vectors.

The Math (see [Math namespace reference], page 284) namespace contains some com-monly used constant vector objects.

Members

See also the full member list (see [Math Vector 3 T struct full member list], page 320)section for this struct.

Types

• typedef [...] base

• typedef [...] put delegate t

Functions

• Vector()

• Vector(const VectorBase<3, T> &v)

• template Vector(const VectorBase<M, T> &v, T p)

• Vector(T v)

• Vector(T x, T y, T z)

• bool close to(const VectorBase<3, T> &m, T error = [...])

• Vector cross product(const Vector<3, T> &v) const

• T len() const

• VectorBase<3, T> magnitude(T newlen) const

• VectorBase<3, T> mul(const VectorBase<3, T> &v) const

• VectorBase<3, T> & neg()

• const VectorBase<3, T> & normalize()

• VectorBase<3, T> normalized() const

Page 321: Gop Ti Cal

Chapter 4: API documentation 318

• T operator*(const VectorBase<3, T> &v) const

• VectorBase<3, T> operator*(T scale) const

• VectorBase<3, T> operator*(const Matrix<N> &m)

• const VectorBase<3, T> & operator*=(T scale)

• VectorBase<3, T> operator+(const VectorBase<3, T> &v) const

• const VectorBase<3, T> & operator+=(const VectorBase<3, T> &v)

• VectorBase<3, T> operator-(const VectorBase<3, T> &v) const

• VectorBase<3, T> operator-() const

• const VectorBase<3, T> & operator-=(const VectorBase<3, T> &v)

• VectorBase<3, T> operator/(T scale) const

• VectorBase<3, T> operator/(const VectorBase<3, T> &v) const

• const VectorBase<3, T> & operator/=(T scale)

• bool operator==(const VectorBase<3, T> &m) const

• T operator[](int n) const

• T & operator[](int n)

• Vector<2, T> project xy() const

• Vector<2, T> project zy() const

• template VectorBase<M, T> select(unsigned int bitmask, const VectorBase<M, T> &v)const

• void set(T value)

• T & x()

• T x() const

• T & y()

• T y() const

• T & z()

• T z() const

Members detail

Vector()

No documentation available

Vector(const VectorBase<3, T> &v)

Copy constructor

template <int M> Vector(const VectorBase<M, T> &v, T p)

Create a 3d vector from 2d vector and given z value.

Vector(T v)

Create a 2d vector with same value for all components

Page 322: Gop Ti Cal

Chapter 4: API documentation 319

Vector(T x, T y, T z)

Create a 3d vector from x, y and z values

typedef VectorBase<3, T> base

No documentation available

Vector cross product(const Vector<3, T> &v) const

Compute vectors cross product

Vector<2, T> project xy() const

Get a 2d vector formed x and y values.

Vector<2, T> project zy() const

Get a 2d vector formed z and y values.

typedef delegate <void(const Vector<3,T>&)> put delegate t

No documentation available

T & x()

Get reference to vector x value

T x() const

Get vector x value

T & y()

Get reference to vector y value

T y() const

Get vector y value

T & z()

Get reference to vector z value

T z() const

Get vector z value

Page 323: Gop Ti Cal

Chapter 4: API documentation 320

Math::Vector<3,T> struct full member list

Types

• typedef [...] base

• typedef [...] put delegate t

Functions

• Vector()

• Vector(const VectorBase<3, T> &v)

• template Vector(const VectorBase<M, T> &v, T p)

• Vector(T v)

• Vector(T x, T y, T z)

• bool close to(const VectorBase<3, T> &m, T error = [...])

• Vector cross product(const Vector<3, T> &v) const

• T len() const

• VectorBase<3, T> magnitude(T newlen) const

• VectorBase<3, T> mul(const VectorBase<3, T> &v) const

• VectorBase<3, T> & neg()

• const VectorBase<3, T> & normalize()

• VectorBase<3, T> normalized() const

• T operator*(const VectorBase<3, T> &v) const

• VectorBase<3, T> operator*(T scale) const

• VectorBase<3, T> operator*(const Matrix<N> &m)

• const VectorBase<3, T> & operator*=(T scale)

• VectorBase<3, T> operator+(const VectorBase<3, T> &v) const

• const VectorBase<3, T> & operator+=(const VectorBase<3, T> &v)

• VectorBase<3, T> operator-(const VectorBase<3, T> &v) const

• VectorBase<3, T> operator-() const

• const VectorBase<3, T> & operator-=(const VectorBase<3, T> &v)

• VectorBase<3, T> operator/(T scale) const

• VectorBase<3, T> operator/(const VectorBase<3, T> &v) const

• const VectorBase<3, T> & operator/=(T scale)

• bool operator==(const VectorBase<3, T> &m) const

• T operator[](int n) const

• T & operator[](int n)

• Vector<2, T> project xy() const

• Vector<2, T> project zy() const

• template VectorBase<M, T> select(unsigned int bitmask, const VectorBase<M, T> &v)const

Page 324: Gop Ti Cal

Chapter 4: API documentation 321

• void set(T value)

• T & x()

• T x() const

• T & y()

• T y() const

• T & z()

• T z() const

Page 325: Gop Ti Cal

Chapter 4: API documentation 322

Math::Vector<2,T> struct reference

Declaration

#include <Goptical/Math/Vector>

namespace Goptical {

namespace Math {

template <typename T> struct Vector<2, T>;

};

};

This struct is a member of the Math namespace.

This template struct is a specialization of Vector (see [Math Vector struct reference],page 314).

Description

This class implements 2d vectors.

The Math (see [Math namespace reference], page 284) namespace contains some com-monly used constant vector objects.

Members

See also the full member list (see [Math Vector 2 T struct full member list], page 325)section for this struct.

Types

• typedef [...] base

• typedef [...] put delegate t

Functions

• Vector()

• Vector(const VectorBase<2, T> &v)

• template Vector(const VectorBase<M, T> &v, T p)

• Vector(T v)

• Vector(T x, T y)

• template Vector(const VectorBase<N, T> &v, unsigned int c0, unsigned int c1)

• bool close to(const VectorBase<2, T> &m, T error = [...])

• T cross product(const Vector<2, T> &v) const

• T len() const

• VectorBase<2, T> magnitude(T newlen) const

• VectorBase<2, T> mul(const VectorBase<2, T> &v) const

• VectorBase<2, T> & neg()

• const VectorBase<2, T> & normalize()

Page 326: Gop Ti Cal

Chapter 4: API documentation 323

• VectorBase<2, T> normalized() const

• T operator*(const VectorBase<2, T> &v) const

• VectorBase<2, T> operator*(T scale) const

• VectorBase<2, T> operator*(const Matrix<N> &m)

• const VectorBase<2, T> & operator*=(T scale)

• VectorBase<2, T> operator+(const VectorBase<2, T> &v) const

• const VectorBase<2, T> & operator+=(const VectorBase<2, T> &v)

• VectorBase<2, T> operator-(const VectorBase<2, T> &v) const

• VectorBase<2, T> operator-() const

• const VectorBase<2, T> & operator-=(const VectorBase<2, T> &v)

• VectorBase<2, T> operator/(T scale) const

• VectorBase<2, T> operator/(const VectorBase<2, T> &v) const

• const VectorBase<2, T> & operator/=(T scale)

• bool operator==(const VectorBase<2, T> &m) const

• T operator[](int n) const

• T & operator[](int n)

• template VectorBase<M, T> select(unsigned int bitmask, const VectorBase<M, T> &v)const

• void set(T value)

• T & x()

• T x() const

• T & y()

• T y() const

Members detail

Vector()

No documentation available

Vector(const VectorBase<2, T> &v)

No documentation available

template <int M> Vector(const VectorBase<M, T> &v, T p)

No documentation available

Vector(T v)

Create a 2d vector with same value for all components

Vector(T x, T y)

Create a 2d vector from x and y z values

Page 327: Gop Ti Cal

Chapter 4: API documentation 324

template <int N> Vector(const VectorBase<N, T> &v, unsigned intc0, unsigned int c1)

Create a 2d vector and initialize from specified components of an other vector

typedef VectorBase<2, T> base

No documentation available

T cross product(const Vector<2, T> &v) const

No documentation available

typedef delegate <void(const Math::Vector2&)> put delegate t

No documentation available

T & x()

Get reference to vector x value

T x() const

Get vector x value

T & y()

Get reference to vector y value

T y() const

Get vector y value

Page 328: Gop Ti Cal

Chapter 4: API documentation 325

Math::Vector<2,T> struct full member list

Types

• typedef [...] base

• typedef [...] put delegate t

Functions

• Vector()

• Vector(const VectorBase<2, T> &v)

• template Vector(const VectorBase<M, T> &v, T p)

• Vector(T v)

• Vector(T x, T y)

• template Vector(const VectorBase<N, T> &v, unsigned int c0, unsigned int c1)

• bool close to(const VectorBase<2, T> &m, T error = [...])

• T cross product(const Vector<2, T> &v) const

• T len() const

• VectorBase<2, T> magnitude(T newlen) const

• VectorBase<2, T> mul(const VectorBase<2, T> &v) const

• VectorBase<2, T> & neg()

• const VectorBase<2, T> & normalize()

• VectorBase<2, T> normalized() const

• T operator*(const VectorBase<2, T> &v) const

• VectorBase<2, T> operator*(T scale) const

• VectorBase<2, T> operator*(const Matrix<N> &m)

• const VectorBase<2, T> & operator*=(T scale)

• VectorBase<2, T> operator+(const VectorBase<2, T> &v) const

• const VectorBase<2, T> & operator+=(const VectorBase<2, T> &v)

• VectorBase<2, T> operator-(const VectorBase<2, T> &v) const

• VectorBase<2, T> operator-() const

• const VectorBase<2, T> & operator-=(const VectorBase<2, T> &v)

• VectorBase<2, T> operator/(T scale) const

• VectorBase<2, T> operator/(const VectorBase<2, T> &v) const

• const VectorBase<2, T> & operator/=(T scale)

• bool operator==(const VectorBase<2, T> &m) const

• T operator[](int n) const

• T & operator[](int n)

• template VectorBase<M, T> select(unsigned int bitmask, const VectorBase<M, T> &v)const

• void set(T value)

Page 329: Gop Ti Cal

Chapter 4: API documentation 326

• T & x()

• T x() const

• T & y()

• T y() const

Page 330: Gop Ti Cal

Chapter 4: API documentation 327

Math::VectorBase<N,Math::Vector::T> internal structmembers

bool close to(const VectorBase<N, T> &m, T error = 1 e-8)

compare two almost equal vectors

T len() const

Compute vector length

VectorBase<N, T> magnitude(T newlen) const

Adjust vector length

VectorBase<N, T> mul(const VectorBase<N, T> &v) const

Vector values multiply

VectorBase<N, T> & neg()

Negate vector

const VectorBase<N, T> & normalize()

Normalize vector length

See also normalized (see [ 1036], page 354) function.

VectorBase<N, T> normalized() const

Get normalized vector

See also normalize (see [ 1035], page 354) function.

T operator*(const VectorBase<N, T> &v) const

Vector dot product

VectorBase<N, T> operator*(T scale) const

Scale vector

VectorBase<N, T> operator*(const Matrix<N> &m)

Multiply vector with matrix. See Vector class for matrix/vector multiplication.

const VectorBase<N, T> & operator*=(T scale)

Multiply by a vector

VectorBase<N, T> operator+(const VectorBase<N, T> &v) const

Add two vectors

const VectorBase<N, T> & operator+=(const VectorBase<N, T>&v)

Add a vector

Page 331: Gop Ti Cal

Chapter 4: API documentation 328

VectorBase<N, T> operator-(const VectorBase<N, T> &v) const

Subtract two vectors

VectorBase<N, T> operator-() const

Get negated vector

const VectorBase<N, T> & operator-=(const VectorBase<N, T>&v)

Sutract a vector

VectorBase<N, T> operator/(T scale) const

Scale vector

VectorBase<N, T> operator/(const VectorBase<N, T> &v) const

Vector division

const VectorBase<N, T> & operator/=(T scale)

Divide by a vector

bool operator==(const VectorBase<N, T> &m) const

compare two vectors for equality

T operator[](int n) const

Get value at specified index

T & operator[](int n)

Get reference to value at specified index

template <int M> VectorBase<M, T> select(unsigned int bitmask,const VectorBase<M, T> &v) const

Select components from two vectors. Components which have their corresponding bit setin the mask are extracted from this vector and other components are taken from passedvector.

void set(T value)

Set the whole vector to the specified value

Page 332: Gop Ti Cal

Chapter 4: API documentation 329

Math::VectorBase<2,Math::Vector<2,T>::T> internal structmembers

bool close to(const VectorBase<2, T> &m, T error = 1 e-8)

compare two almost equal vectors

T len() const

Compute vector length

VectorBase<2, T> magnitude(T newlen) const

Adjust vector length

VectorBase<2, T> mul(const VectorBase<2, T> &v) const

Vector values multiply

VectorBase<2, T> & neg()

Negate vector

const VectorBase<2, T> & normalize()

Normalize vector length

See also normalized (see [ 1036], page 354) function.

VectorBase<2, T> normalized() const

Get normalized vector

See also normalize (see [ 1035], page 354) function.

T operator*(const VectorBase<2, T> &v) const

Vector dot product

VectorBase<2, T> operator*(T scale) const

Scale vector

VectorBase<2, T> operator*(const Matrix<N> &m)

Multiply vector with matrix. See Vector class for matrix/vector multiplication.

const VectorBase<2, T> & operator*=(T scale)

Multiply by a vector

VectorBase<2, T> operator+(const VectorBase<2, T> &v) const

Add two vectors

const VectorBase<2, T> & operator+=(const VectorBase<2, T>&v)

Add a vector

Page 333: Gop Ti Cal

Chapter 4: API documentation 330

VectorBase<2, T> operator-(const VectorBase<2, T> &v) const

Subtract two vectors

VectorBase<2, T> operator-() const

Get negated vector

const VectorBase<2, T> & operator-=(const VectorBase<2, T> &v)

Sutract a vector

VectorBase<2, T> operator/(T scale) const

Scale vector

VectorBase<2, T> operator/(const VectorBase<2, T> &v) const

Vector division

const VectorBase<2, T> & operator/=(T scale)

Divide by a vector

bool operator==(const VectorBase<2, T> &m) const

compare two vectors for equality

T operator[](int n) const

Get value at specified index

T & operator[](int n)

Get reference to value at specified index

template <int M> VectorBase<M, T> select(unsigned int bitmask,const VectorBase<M, T> &v) const

Select components from two vectors. Components which have their corresponding bit setin the mask are extracted from this vector and other components are taken from passedvector.

void set(T value)

Set the whole vector to the specified value

Page 334: Gop Ti Cal

Chapter 4: API documentation 331

Math::VectorBase<3,Math::Vector<3,T>::T> internal structmembers

bool close to(const VectorBase<3, T> &m, T error = 1 e-8)

compare two almost equal vectors

T len() const

Compute vector length

VectorBase<3, T> magnitude(T newlen) const

Adjust vector length

VectorBase<3, T> mul(const VectorBase<3, T> &v) const

Vector values multiply

VectorBase<3, T> & neg()

Negate vector

const VectorBase<3, T> & normalize()

Normalize vector length

See also normalized (see [ 1036], page 354) function.

VectorBase<3, T> normalized() const

Get normalized vector

See also normalize (see [ 1035], page 354) function.

T operator*(const VectorBase<3, T> &v) const

Vector dot product

VectorBase<3, T> operator*(T scale) const

Scale vector

VectorBase<3, T> operator*(const Matrix<N> &m)

Multiply vector with matrix. See Vector class for matrix/vector multiplication.

const VectorBase<3, T> & operator*=(T scale)

Multiply by a vector

VectorBase<3, T> operator+(const VectorBase<3, T> &v) const

Add two vectors

const VectorBase<3, T> & operator+=(const VectorBase<3, T>&v)

Add a vector

Page 335: Gop Ti Cal

Chapter 4: API documentation 332

VectorBase<3, T> operator-(const VectorBase<3, T> &v) const

Subtract two vectors

VectorBase<3, T> operator-() const

Get negated vector

const VectorBase<3, T> & operator-=(const VectorBase<3, T> &v)

Sutract a vector

VectorBase<3, T> operator/(T scale) const

Scale vector

VectorBase<3, T> operator/(const VectorBase<3, T> &v) const

Vector division

const VectorBase<3, T> & operator/=(T scale)

Divide by a vector

bool operator==(const VectorBase<3, T> &m) const

compare two vectors for equality

T operator[](int n) const

Get value at specified index

T & operator[](int n)

Get reference to value at specified index

template <int M> VectorBase<M, T> select(unsigned int bitmask,const VectorBase<M, T> &v) const

Select components from two vectors. Components which have their corresponding bit setin the mask are extracted from this vector and other components are taken from passedvector.

void set(T value)

Set the whole vector to the specified value

Page 336: Gop Ti Cal

Chapter 4: API documentation 333

Math::VectorPair struct reference

Declaration

#include <Goptical/Math/VectorPair>

namespace Goptical {

namespace Math {

template <int N> struct VectorPair;

};

};

This struct is a member of the Math namespace.

Description

This class hold two N dimensions vectors.

Class specializations

Name DescriptionVectorPair<2> Vector pair classVectorPair<3> Vector pair class

Members

See also the full member list (see [Math VectorPair struct full member list], page 335)section for this struct.

Functions

• VectorPair()

• VectorPair(const VectorPairBase<N> &vp)

• VectorPair(const Vector<N> &a, const Vector<N> &b)

• Vector<N> & direction()

• const Vector<N> & direction() const

• Vector<N> ln pt clst pt(const Vector<N> &point) const

• double ln pt clst pt scale(const Vector<N> &point) const

• Vector<N> & normal()

• const Vector<N> & normal() const

• VectorPairBase<N> operator*(double factor)

• const VectorPairBase<N> & operator+=(const VectorPairBase<N> &p)

• const Vector<N> & operator[](int n) const

• Vector<N> & operator[](int n)

• Vector<N> & origin()

• const Vector<N> & origin() const

Page 337: Gop Ti Cal

Chapter 4: API documentation 334

• Vector<N> seg pt clst pt(const Vector<N> &point) const

• double seg pt clst pt scale(const Vector<N> &point) const

Members detail

VectorPair()

No documentation available

VectorPair(const VectorPairBase<N> &vp)

No documentation available

VectorPair(const Vector<N> &a, const Vector<N> &b)

No documentation available

Page 338: Gop Ti Cal

Chapter 4: API documentation 335

Math::VectorPair struct full member list

Functions

• VectorPair()

• VectorPair(const VectorPairBase<N> &vp)

• VectorPair(const Vector<N> &a, const Vector<N> &b)

• Vector<N> & direction()

• const Vector<N> & direction() const

• Vector<N> ln pt clst pt(const Vector<N> &point) const

• double ln pt clst pt scale(const Vector<N> &point) const

• Vector<N> & normal()

• const Vector<N> & normal() const

• VectorPairBase<N> operator*(double factor)

• const VectorPairBase<N> & operator+=(const VectorPairBase<N> &p)

• const Vector<N> & operator[](int n) const

• Vector<N> & operator[](int n)

• Vector<N> & origin()

• const Vector<N> & origin() const

• Vector<N> seg pt clst pt(const Vector<N> &point) const

• double seg pt clst pt scale(const Vector<N> &point) const

Page 339: Gop Ti Cal

Chapter 4: API documentation 336

Math::VectorPair<2> struct reference

Declaration

#include <Goptical/Math/VectorPair>

namespace Goptical {

namespace Math {

template <> struct VectorPair<2>;

};

};

This struct is a member of the Math namespace.

This struct is a specialization of VectorPair (see [Math VectorPair struct reference],page 333).

Description

This class hold two 2d vectors.

See also VectorPair2 (see [ 658], page 285) typedef.

Members

See also the full member list (see [Math VectorPair 2 struct full member list], page 339)section for this struct.

Functions

• VectorPair()

• VectorPair(const VectorPairBase<2> &vp)

• VectorPair(const Vector<2> &a, const Vector<2> &b)

• VectorPair(double ax, double ay, double bx, double by)

• template VectorPair(const VectorPairBase<N> &v, unsigned int c0, unsigned int c1)

• Vector<N> & direction()

• const Vector<N> & direction() const

• Vector<2> ln intersect ln(const VectorPair<2> &line) const

• double ln intersect ln scale(const VectorPair<2> &line) const

• Vector<N> ln pt clst pt(const Vector<N> &point) const

• double ln pt clst pt scale(const Vector<N> &point) const

• Vector<N> & normal()

• const Vector<N> & normal() const

• VectorPairBase<2> operator*(double factor)

• const VectorPairBase<2> & operator+=(const VectorPairBase<2> &p)

• const Vector<N> & operator[](int n) const

• Vector<N> & operator[](int n)

• Vector<N> & origin()

Page 340: Gop Ti Cal

Chapter 4: API documentation 337

• const Vector<N> & origin() const

• template Vector<2> seg intersect seg(const VectorPair<2> &segment) const

• Vector<N> seg pt clst pt(const Vector<N> &point) const

• double seg pt clst pt scale(const Vector<N> &point) const

• double x0() const

• double & x0()

• double x1() const

• double & x1()

• double y0() const

• double & y0()

• double y1() const

• double & y1()

Members detail

VectorPair()

No documentation available

VectorPair(const VectorPairBase<2> &vp)

No documentation available

VectorPair(const Vector<2> &a, const Vector<2> &b)

No documentation available

VectorPair(double ax, double ay, double bx, double by)

No documentation available

template <int N> VectorPair(const VectorPairBase<N> &v,unsigned int c0, unsigned int c1)

Create a 2d vector pair and initialize vectors from specified components of vectors from another pair.

Vector<2> ln intersect ln(const VectorPair<2> &line) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the intersection point with an other line.

The return value is position of the intersection point. this function throws if lines arealmost parallel.

See also ln intersect ln scale (see [ 921], page 337) function.

double ln intersect ln scale(const VectorPair<2> &line) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the intersection point with an other line.

The return value is scale factor of the direction vector from line origin. this functionthrows if lines are almost parallel.

Page 341: Gop Ti Cal

Chapter 4: API documentation 338

See also ln intersect ln (see [ 920], page 337) function.

template <bool infinite 1st, bool infinite 2nd> Vector<2>seg intersect seg(const VectorPair<2> &segment) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a segmentwith two point vectors and find the intersection point with an other segment.

The return value is position of the intersection point.

The ‘infinite_1st’ and ‘infinite_2nd’ template parameters can be used to disablepoint-in-segment tests for each segments. this template function throws if lines are almostparallel or if intersection point lies outside segment and associated test is enabled.

double x0() const

Get vector pair component

double & x0()

Get vector pair component

double x1() const

Get vector pair component

double & x1()

Get vector pair component

double y0() const

Get vector pair component

double & y0()

Get vector pair component

double y1() const

Get vector pair component

double & y1()

Get vector pair component

Page 342: Gop Ti Cal

Chapter 4: API documentation 339

Math::VectorPair<2> struct full member list

Functions

• VectorPair()

• VectorPair(const VectorPairBase<2> &vp)

• VectorPair(const Vector<2> &a, const Vector<2> &b)

• VectorPair(double ax, double ay, double bx, double by)

• template VectorPair(const VectorPairBase<N> &v, unsigned int c0, unsigned int c1)

• Vector<N> & direction()

• const Vector<N> & direction() const

• Vector<2> ln intersect ln(const VectorPair<2> &line) const

• double ln intersect ln scale(const VectorPair<2> &line) const

• Vector<N> ln pt clst pt(const Vector<N> &point) const

• double ln pt clst pt scale(const Vector<N> &point) const

• Vector<N> & normal()

• const Vector<N> & normal() const

• VectorPairBase<2> operator*(double factor)

• const VectorPairBase<2> & operator+=(const VectorPairBase<2> &p)

• const Vector<N> & operator[](int n) const

• Vector<N> & operator[](int n)

• Vector<N> & origin()

• const Vector<N> & origin() const

• template Vector<2> seg intersect seg(const VectorPair<2> &segment) const

• Vector<N> seg pt clst pt(const Vector<N> &point) const

• double seg pt clst pt scale(const Vector<N> &point) const

• double x0() const

• double & x0()

• double x1() const

• double & x1()

• double y0() const

• double & y0()

• double y1() const

• double & y1()

Page 343: Gop Ti Cal

Chapter 4: API documentation 340

Math::VectorPair<3> struct reference

Declaration

#include <Goptical/Math/VectorPair>

namespace Goptical {

namespace Math {

template <> struct VectorPair<3>;

};

};

This struct is a member of the Math namespace.

This struct is a specialization of VectorPair (see [Math VectorPair struct reference],page 333).

Inheritance

Description

This class hold two 3d vectors.

See also VectorPair3 (see [ 654], page 285) typedef.

Members

See also the full member list (see [Math VectorPair 3 struct full member list], page 344)section for this struct.

Functions

• VectorPair()

• VectorPair(const VectorPairBase<3> &vp)

• VectorPair(const Vector<3> &a, const Vector<3> &b = [...])

• VectorPair(double ax, double ay, double az, double bx = [...], double by = [...], doublebz = [...])

• Vector<N> & direction()

• const Vector<N> & direction() const

• Vector<3> ln ln clst pt(const VectorPair<3> &line) const

• double ln ln clst pt scale(const VectorPair<3> &line) const

• Vector<N> ln pt clst pt(const Vector<N> &point) const

• double ln pt clst pt scale(const Vector<N> &point) const

• Vector<N> & normal()

• const Vector<N> & normal() const

• VectorPairBase<3> operator*(double factor)

• const VectorPairBase<3> & operator+=(const VectorPairBase<3> &p)

• const Vector<N> & operator[](int n) const

Page 344: Gop Ti Cal

Chapter 4: API documentation 341

• Vector<N> & operator[](int n)

• Vector<N> & origin()

• const Vector<N> & origin() const

• Vector<3> pl ln intersect(const VectorPair<3> &line) const

• double pl ln intersect scale(const VectorPair<3> &line) const

• Vector<N> seg pt clst pt(const Vector<N> &point) const

• double seg pt clst pt scale(const Vector<N> &point) const

• double x0() const

• double & x0()

• double x1() const

• double & x1()

• double y0() const

• double & y0()

• double y1() const

• double & y1()

• double z0() const

• double & z0()

• double z1() const

• double & z1()

Members detail

VectorPair()

No documentation available

VectorPair(const VectorPairBase<3> &vp)

No documentation available

VectorPair(const Vector<3> &a, const Vector<3> &b =vector3 001)

No documentation available

VectorPair(double ax, double ay, double az, double bx = 0.0,double by = 0.0, double bz = 1.0)

No documentation available

Vector<3> ln ln clst pt(const VectorPair<3> &line) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to an other line.

The return value is position of the closest point on the line. this function throws if linesare almost parallel.

See also ln ln clst pt scale (see [ 936], page 342) function.

Page 345: Gop Ti Cal

Chapter 4: API documentation 342

double ln ln clst pt scale(const VectorPair<3> &line) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to an other line.

The return value is scale factor of the direction vector from origin. this function throwsif lines are almost parallel.

See also ln ln clst pt (see [ 935], page 341) function.

Vector<3> pl ln intersect(const VectorPair<3> &line) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a plane andfind intersection point with a line. Plane is defined by origin and normal vectors and lineis defined by origin and direction vectors.

The return value is position of the intersection point on the line.

See also pl ln intersect scale (see [ 938], page 342) function.

double pl ln intersect scale(const VectorPair<3> &line) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a plane andfind intersection point with a line. Plane is defined by origin and normal vectors and lineis defined by origin and direction vectors.

The return value is scale factor of the line direction vector from line origin.

See also pl ln intersect (see [ 937], page 342) function.

double x0() const

Get vector pair component

double & x0()

Get vector pair component

double x1() const

Get vector pair component

double & x1()

Get vector pair component

double y0() const

Get vector pair component

double & y0()

Get vector pair component

double y1() const

Get vector pair component

double & y1()

Get vector pair component

Page 346: Gop Ti Cal

Chapter 4: API documentation 343

double z0() const

Get vector pair component

double & z0()

Get vector pair component

double z1() const

Get vector pair component

double & z1()

Get vector pair component

Page 347: Gop Ti Cal

Chapter 4: API documentation 344

Math::VectorPair<3> struct full member list

Functions

• VectorPair()

• VectorPair(const VectorPairBase<3> &vp)

• VectorPair(const Vector<3> &a, const Vector<3> &b = [...])

• VectorPair(double ax, double ay, double az, double bx = [...], double by = [...], doublebz = [...])

• Vector<N> & direction()

• const Vector<N> & direction() const

• Vector<3> ln ln clst pt(const VectorPair<3> &line) const

• double ln ln clst pt scale(const VectorPair<3> &line) const

• Vector<N> ln pt clst pt(const Vector<N> &point) const

• double ln pt clst pt scale(const Vector<N> &point) const

• Vector<N> & normal()

• const Vector<N> & normal() const

• VectorPairBase<3> operator*(double factor)

• const VectorPairBase<3> & operator+=(const VectorPairBase<3> &p)

• const Vector<N> & operator[](int n) const

• Vector<N> & operator[](int n)

• Vector<N> & origin()

• const Vector<N> & origin() const

• Vector<3> pl ln intersect(const VectorPair<3> &line) const

• double pl ln intersect scale(const VectorPair<3> &line) const

• Vector<N> seg pt clst pt(const Vector<N> &point) const

• double seg pt clst pt scale(const Vector<N> &point) const

• double x0() const

• double & x0()

• double x1() const

• double & x1()

• double y0() const

• double & y0()

• double y1() const

• double & y1()

• double z0() const

• double & z0()

• double z1() const

• double & z1()

Page 348: Gop Ti Cal

Chapter 4: API documentation 345

Math::VectorPairBase<N> internal struct members

VectorPairBase()

No documentation available

VectorPairBase(const Vector<N> &a, const Vector<N> &b)

No documentation available

Vector<N> & direction()

Get reference to second vector

const Vector<N> & direction() const

Get reference to second vector

Vector<N> ln pt clst pt(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to a point.

The return value is position of the closest point on the line.

See also ln pt clst pt scale (see [ 1059], page 356) function.

double ln pt clst pt scale(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to an other line.

The return value is scale factor of the direction vector from origin.

See also ln pt clst pt (see [ 1058], page 356) function.

Vector<N> & normal()

Get reference to second vector

const Vector<N> & normal() const

Get reference to second vector

VectorPairBase<N> operator*(double factor)

No documentation available

const VectorPairBase<N> & operator+=(const VectorPairBase<N>&p)

No documentation available

const Vector<N> & operator[](int n) const

Get a reference to a vector stored in the pair

Vector<N> & operator[](int n)

Get a reference to a vector stored in the pair

Page 349: Gop Ti Cal

Chapter 4: API documentation 346

Vector<N> & origin()

Get reference to first vector

const Vector<N> & origin() const

Get reference to first vector

Vector<N> seg pt clst pt(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a segmentwith two point vectors and find the closest point on this segment to a point in space.

The return value is position of the closest point on segment.

See also seg pt clst pt scale (see [ 1069], page 357) function.

double seg pt clst pt scale(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a segmentwith two point vectors and find the closest point on this segment to a point in space.

The return value is position on segment, value is in [0, 1] range if on segment.

See also seg pt clst pt (see [ 1068], page 357) function.

Page 350: Gop Ti Cal

Chapter 4: API documentation 347

Math::VectorPairBase<2> internal struct members

VectorPairBase()

No documentation available

VectorPairBase(const Vector<N> &a, const Vector<N> &b)

No documentation available

Vector<N> & direction()

Get reference to second vector

const Vector<N> & direction() const

Get reference to second vector

Vector<N> ln pt clst pt(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to a point.

The return value is position of the closest point on the line.

See also ln pt clst pt scale (see [ 1059], page 356) function.

double ln pt clst pt scale(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to an other line.

The return value is scale factor of the direction vector from origin.

See also ln pt clst pt (see [ 1058], page 356) function.

Vector<N> & normal()

Get reference to second vector

const Vector<N> & normal() const

Get reference to second vector

VectorPairBase<2> operator*(double factor)

No documentation available

const VectorPairBase<2> & operator+=(const VectorPairBase<2>&p)

No documentation available

const Vector<N> & operator[](int n) const

Get a reference to a vector stored in the pair

Vector<N> & operator[](int n)

Get a reference to a vector stored in the pair

Page 351: Gop Ti Cal

Chapter 4: API documentation 348

Vector<N> & origin()

Get reference to first vector

const Vector<N> & origin() const

Get reference to first vector

Vector<N> seg pt clst pt(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a segmentwith two point vectors and find the closest point on this segment to a point in space.

The return value is position of the closest point on segment.

See also seg pt clst pt scale (see [ 1069], page 357) function.

double seg pt clst pt scale(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a segmentwith two point vectors and find the closest point on this segment to a point in space.

The return value is position on segment, value is in [0, 1] range if on segment.

See also seg pt clst pt (see [ 1068], page 357) function.

Page 352: Gop Ti Cal

Chapter 4: API documentation 349

Math::VectorPairBase<3> internal struct members

VectorPairBase()

No documentation available

VectorPairBase(const Vector<N> &a, const Vector<N> &b)

No documentation available

Vector<N> & direction()

Get reference to second vector

const Vector<N> & direction() const

Get reference to second vector

Vector<N> ln pt clst pt(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to a point.

The return value is position of the closest point on the line.

See also ln pt clst pt scale (see [ 1059], page 356) function.

double ln pt clst pt scale(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to an other line.

The return value is scale factor of the direction vector from origin.

See also ln pt clst pt (see [ 1058], page 356) function.

Vector<N> & normal()

Get reference to second vector

const Vector<N> & normal() const

Get reference to second vector

VectorPairBase<3> operator*(double factor)

No documentation available

const VectorPairBase<3> & operator+=(const VectorPairBase<3>&p)

No documentation available

const Vector<N> & operator[](int n) const

Get a reference to a vector stored in the pair

Vector<N> & operator[](int n)

Get a reference to a vector stored in the pair

Page 353: Gop Ti Cal

Chapter 4: API documentation 350

Vector<N> & origin()

Get reference to first vector

const Vector<N> & origin() const

Get reference to first vector

Vector<N> seg pt clst pt(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a segmentwith two point vectors and find the closest point on this segment to a point in space.

The return value is position of the closest point on segment.

See also seg pt clst pt scale (see [ 1069], page 357) function.

double seg pt clst pt scale(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a segmentwith two point vectors and find the closest point on this segment to a point in space.

The return value is position on segment, value is in [0, 1] range if on segment.

See also seg pt clst pt (see [ 1068], page 357) function.

Page 354: Gop Ti Cal

Chapter 4: API documentation 351

Math::TransformBase internal class members

TransformBase()

No documentation available

virtual ~TransformBase()

No documentation available

TransformBase & affine rotation(unsigned int axis, double dangle)

apply rotation to current transform (degree)

TransformBase & affine rotation rad(unsigned int axis, doublerangle)

apply rotation to current transform (radian)

TransformBase & affine scaling(const Vector<N> &v)

apply scaling to current transform

TransformBase & affine scaling(double s)

apply scaling to current transform

TransformBase & apply translation(const Vector<N> &v)

apply translation to current transform

void compose(const TransformBase<N> &t)

compose with t. new transform is equivalent to applying t then this transform

const Matrix<N> & get linear() const

get linear transform matrix

Matrix<N> & get linear()

get linear transform matrix

const Vector<N> & get translation() const

get translation vector

Vector<N> & get translation()

get translation vector

TransformBase inverse() const

get inverse transformation

void linear reset()

reset linear transform to identity

Page 355: Gop Ti Cal

Chapter 4: API documentation 352

TransformBase & linear rotation(unsigned int axis, double dangle)

apply rotation to current transform (degree) (does not transform translation vector)

TransformBase & linear rotation rad(unsigned int axis, doublerangle)

apply rotation to current transform (radian) (does not transform translation vector)

TransformBase & linear scaling(const Vector<N> &v)

apply linear scaling to current transform (does not transform translation vector)

TransformBase & linear scaling(double s)

apply scaling to current transform (does not transform translation vector)

void reset()

reset linear transform to identity and translation to zero

void set translation(const Vector<N> &v)

set current translation

Vector<N> transform(const Vector<N> &v) const

apply affine transform (translation and linear) to vector

VectorPair<N> transform line(const VectorPair<N> &v) const

apply affine transform to line origin and linear to direction

Vector<N> transform linear(const Vector<N> &v) const

apply linear transform to vector

VectorPair<N> transform pair(const VectorPair<N> &p) const

apply affine transform to both vectors in pair

Vector<N> transform translate(const Vector<N> &v) const

apply translation to vector

void translation reset()

reset translation to zero

Page 356: Gop Ti Cal

Chapter 4: API documentation 353

Math::TriangleBase internal struct members

TriangleBase()

No documentation available

TriangleBase(const Vector<N> &a, const Vector<N> &b, constVector<N> &c)

Create a triangle from 3 points

Vector<N> get centroid() const

Get triangle centroid

const Vector<N> & operator[](int n) const

Get point n of the triangle

Vector<N> & operator[](int n)

Get reference to point n of the triangle

Page 357: Gop Ti Cal

Chapter 4: API documentation 354

Math::VectorBase internal struct members

bool close to(const VectorBase &m, T error = 1 e-8)

compare two almost equal vectors

T len() const

Compute vector length

VectorBase magnitude(T newlen) const

Adjust vector length

VectorBase mul(const VectorBase &v) const

Vector values multiply

VectorBase & neg()

Negate vector

const VectorBase & normalize()

Normalize vector length

See also normalized (see [ 1036], page 354) function.

VectorBase normalized() const

Get normalized vector

See also normalize (see [ 1035], page 354) function.

T operator*(const VectorBase &v) const

Vector dot product

VectorBase operator*(T scale) const

Scale vector

VectorBase operator*(const Matrix<N> &m)

Multiply vector with matrix. See Vector class for matrix/vector multiplication.

const VectorBase & operator*=(T scale)

Multiply by a vector

VectorBase operator+(const VectorBase &v) const

Add two vectors

const VectorBase & operator+=(const VectorBase &v)

Add a vector

VectorBase operator-(const VectorBase &v) const

Subtract two vectors

Page 358: Gop Ti Cal

Chapter 4: API documentation 355

VectorBase operator-() const

Get negated vector

const VectorBase & operator-=(const VectorBase &v)

Sutract a vector

VectorBase operator/(T scale) const

Scale vector

VectorBase operator/(const VectorBase &v) const

Vector division

const VectorBase & operator/=(T scale)

Divide by a vector

bool operator==(const VectorBase &m) const

compare two vectors for equality

T operator[](int n) const

Get value at specified index

T & operator[](int n)

Get reference to value at specified index

template <int M> VectorBase<M, T> select(unsigned int bitmask,const VectorBase<M, T> &v) const

Select components from two vectors. Components which have their corresponding bit setin the mask are extracted from this vector and other components are taken from passedvector.

void set(T value)

Set the whole vector to the specified value

Page 359: Gop Ti Cal

Chapter 4: API documentation 356

Math::VectorPairBase internal struct members

VectorPairBase()

No documentation available

VectorPairBase(const Vector<N> &a, const Vector<N> &b)

No documentation available

Vector<N> & direction()

Get reference to second vector

const Vector<N> & direction() const

Get reference to second vector

Vector<N> ln pt clst pt(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to a point.

The return value is position of the closest point on the line.

See also ln pt clst pt scale (see [ 1059], page 356) function.

double ln pt clst pt scale(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a line withorigin and direction vectors and find the closest point on this line to an other line.

The return value is scale factor of the direction vector from origin.

See also ln pt clst pt (see [ 1058], page 356) function.

Vector<N> & normal()

Get reference to second vector

const Vector<N> & normal() const

Get reference to second vector

VectorPairBase operator*(double factor)

No documentation available

const VectorPairBase & operator+=(const VectorPairBase &p)

No documentation available

const Vector<N> & operator[](int n) const

Get a reference to a vector stored in the pair

Vector<N> & operator[](int n)

Get a reference to a vector stored in the pair

Page 360: Gop Ti Cal

Chapter 4: API documentation 357

Vector<N> & origin()

Get reference to first vector

const Vector<N> & origin() const

Get reference to first vector

Vector<N> seg pt clst pt(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a segmentwith two point vectors and find the closest point on this segment to a point in space.

The return value is position of the closest point on segment.

See also seg pt clst pt scale (see [ 1069], page 357) function.

double seg pt clst pt scale(const Vector<N> &point) const

Consider the VectorPair (see [Math VectorPair struct reference], page 333) as a segmentwith two point vectors and find the closest point on this segment to a point in space.

The return value is position on segment, value is in [0, 1] range if on segment.

See also seg pt clst pt (see [ 1068], page 357) function.

Page 361: Gop Ti Cal

Chapter 4: API documentation 358

Shape namespace reference

Description

2d shapes used for surface contours

Members

Types

• class Base

• class Composer

• class Disk

• class Ellipse

• class EllipticalRing

• class Infinite

• class Polygon

• class Rectangle

• class RegularPolygon

• class Ring

Variable

• Infinite infinite

Members detail

Infinite infinite

No documentation available

Page 362: Gop Ti Cal

Chapter 4: API documentation 359

Shape::Base class reference

Declaration

#include <Goptical/Shape/Base>

namespace Goptical {

namespace Shape {

class Base;

};

};

This class is a member of the Shape namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This class defines an interface for all 2d shape implementations. It is mainly used to describe2d contours of optical surfaces and provides distribution pattern for ray tracing.

Members

See also the full member list (see [Shape Base class full member list], page 361) section forthis class.

Functions

• Base()

• virtual ~Base()

• virtual Math::VectorPair2 get bounding box() const = 0;

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const = 0;

• virtual unsigned int get contour count() const = 0;

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const = 0;

• virtual void get pattern(const Math::Vector2::put delegate t &f, constTrace::Distribution &d, bool unobstructed = [...]) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const = 0;

• virtual bool inside(const Math::Vector2 &point) const = 0;

• virtual double max radius() const = 0;

• virtual double min radius() const = 0;

Members detail

Page 363: Gop Ti Cal

Chapter 4: API documentation 360

Base()

No documentation available

virtual ~Base()

No documentation available

virtual Math::VectorPair2 get bounding box() const = 0;

Get shape bounding box

virtual void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution) const = 0;

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get contour count (see [ 1075], page 360) function.

virtual unsigned int get contour count() const = 0;

Get number of contours polygones. This function returns value is greater than 1 if shapehas hole(s).

See also get contour (see [ 1074], page 360) function.

virtual double get hole radius(const Math::Vector2 &dir) const

Get distance between origin and nearest shape outter edge in specified direction

virtual double get outter radius(const Math::Vector2 &dir) const= 0;

Get distance between origin and farthest shape edge in specified direction

virtual void get pattern(const Math::Vector2::put delegate t &f,const Trace::Distribution &d, bool unobstructed = false) const

Get points distributed on shape area with given pattern

virtual void get triangles(const Math::Triangle<2>::put delegate t&f, double resolution) const = 0;

Get shape teselation triangles

virtual bool inside(const Math::Vector2 &point) const = 0;

Check if the (x,y) 2d point is inside 2d shape area

virtual double max radius() const = 0;

Get distance between origin and farthest shape edge

virtual double min radius() const = 0;

Get distance between origin and nearest shape outter edge

Page 364: Gop Ti Cal

Chapter 4: API documentation 361

Shape::Base class full member list

Functions

• Base()

• virtual ~Base()

• virtual Math::VectorPair2 get bounding box() const = 0;

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const = 0;

• virtual unsigned int get contour count() const = 0;

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const = 0;

• virtual void get pattern(const Math::Vector2::put delegate t &f, constTrace::Distribution &d, bool unobstructed = [...]) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const = 0;

• virtual bool inside(const Math::Vector2 &point) const = 0;

• virtual double max radius() const = 0;

• virtual double min radius() const = 0;

Page 365: Gop Ti Cal

Chapter 4: API documentation 362

Shape::Composer class reference

Declaration

This class is flagged as experimental.

#include <Goptical/Shape/Composer>

namespace Goptical {

namespace Shape {

class Composer;

};

};

This class is a member of the Shape namespace.

Inheritance

Description

This class allows definition of a shape by composition of other shape models. Coordinatetransforms and boolean operations can be performed on shapes.

This class is still experimental, 2d contour and 3d tessellation code doesn’t give propserresults.

Members

See also the full member list (see [Shape Composer class full member list], page 366) sec-tion for this class.

Inherited members

• 12 members inherited from Base (see [Shape Base class reference], page 359)

Type

• class Attributes

Functions

• Composer()

• Attributes & add shape(const const ref<Base> &shape)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &f, constTrace::Distribution &d, bool unobstructed) const

Page 366: Gop Ti Cal

Chapter 4: API documentation 363

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

• void use global distribution(bool use global)

Members detail

Composer()

This constructor is flagged as experimental.

Attributes & add shape(const const ref <Base> &shape)

This function is flagged as experimental.

Add a new shape to shape composer.

This function returns a reference to an Attributes (see [Shape Composer Attributes class reference],page 367) object which may be modified to set shape transform and boolean operations.

The composed shape is the union between all shapes added with this function.

virtual Math::VectorPair2 get bounding box() const

This virtual function is flagged as experimental.

This virtual function implements the get_bounding_box (see [_1073], page 360)

pure function declared in the Base (see [Shape_Base_class_reference], page 359)

base abstract class.

Documentation inherited from base class:

Get shape bounding box

virtual void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution) const

This virtual function is flagged as experimental.

This virtual function implements the get_contour (see [_1074], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) baseabstract class.

Documentation inherited from base class:

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get contour count (see [ 1075], page 360) function.

virtual unsigned int get contour count() const

This virtual function is flagged as experimental.

This virtual function implements the get_contour_count (see [_1075], page 360)

pure function declared in the Base (see [Shape_Base_class_reference], page 359)

base abstract class.

Documentation inherited from base class:

Page 367: Gop Ti Cal

Chapter 4: API documentation 364

Get number of contours polygones. This function returns value is greater than 1 if shapehas hole(s).

See also get contour (see [ 1074], page 360) function.

virtual double get hole radius(const Math::Vector2 &dir) const

This virtual function is flagged as experimental.

This virtual function overrides the get_hole_radius (see [_1076], page 360) virtualfunction defined in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge in specified direction

virtual double get outter radius(const Math::Vector2 &dir) const

This virtual function is flagged as experimental.

This virtual function implements the get_outter_radius (see [_1077], page 360)

pure function declared in the Base (see [Shape_Base_class_reference], page 359)

base abstract class.

Documentation inherited from base class:

Get distance between origin and farthest shape edge in specified direction

virtual void get pattern(const Math::Vector2::put delegate t &f,const Trace::Distribution &d, bool unobstructed) const

This virtual function is flagged as experimental.

This virtual function overrides the get_pattern (see [_1078], page 360) virtual func-tion defined in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get points distributed on shape area with given pattern

virtual void get triangles(const Math::Triangle<2>::put delegate t&f, double resolution) const

This virtual function is flagged as experimental.

This virtual function implements the get_triangles (see [_1079], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get shape teselation triangles

virtual bool inside(const Math::Vector2 &point) const

This virtual function is flagged as experimental.

This virtual function implements the inside (see [_1080], page 360) pure functiondeclared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Page 368: Gop Ti Cal

Chapter 4: API documentation 365

Documentation inherited from base class:

Check if the (x,y) 2d point is inside 2d shape area

virtual double max radius() const

This virtual function is flagged as experimental.

This virtual function implements the max_radius (see [_1081], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and farthest shape edge

virtual double min radius() const

This virtual function is flagged as experimental.

This virtual function implements the min_radius (see [_1082], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge

void use global distribution(bool use global)

This function is flagged as experimental.

Set ray distribution behavior. Default is to perform individual ray distribution on eachcomposer shape.

Global mode distributes rays over a circle with maximum shape radius, it may be usedto ensure ray density is the same on each shape. Unobstructed ray tracing require globaldistribution too.

Page 369: Gop Ti Cal

Chapter 4: API documentation 366

Shape::Composer class full member list

Type

• class Attributes

Functions

• Composer()

• Attributes & add shape(const const ref<Base> &shape)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &f, constTrace::Distribution &d, bool unobstructed) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

• void use global distribution(bool use global)

Page 370: Gop Ti Cal

Chapter 4: API documentation 367

Shape::Composer::Attributes class reference

Declaration

This class is flagged as experimental.

#include <Goptical/Shape/Composer>

namespace Goptical {

namespace Shape {

class Composer {

class Attributes;

};

};

};

This class is a member of the Composer class.

Description

This class contains child shape transform and boolean operations for the Composer (see[Shape Composer class reference], page 362) shape class.

Members

See also the full member list (see [Shape Composer Attributes class full member list],page 369) section for this class.

Functions

• Attributes & exclude(const const ref<Base> &shape)

• Attributes & include(const const ref<Base> &shape)

• Attributes & rotate(double dangle)

• Attributes & scale(const Math::Vector2 &factor)

• Attributes & translate(const Math::Vector2 &offset)

Members detail

Attributes & exclude(const const ref <Base> &shape)

This function is flagged as experimental.

Peform boolean ’and not’ with the given shape

Attributes & include(const const ref <Base> &shape)

This function is flagged as experimental.

Peform boolean ’and’ with the given shape

Attributes & rotate(double dangle)

This function is flagged as experimental.

Apply rotation affine transform. Angle is in degree.

Page 371: Gop Ti Cal

Chapter 4: API documentation 368

Attributes & scale(const Math::Vector2 &factor)

This function is flagged as experimental.

Apply scaling affine transform using scale factors (xscale, yscale)

Attributes & translate(const Math::Vector2 &offset)

This function is flagged as experimental.

Apply translation transform

Page 372: Gop Ti Cal

Chapter 4: API documentation 369

Shape::Composer::Attributes class full member list

Functions

• Attributes & exclude(const const ref<Base> &shape)

• Attributes & include(const const ref<Base> &shape)

• Attributes & rotate(double dangle)

• Attributes & scale(const Math::Vector2 &factor)

• Attributes & translate(const Math::Vector2 &offset)

Page 373: Gop Ti Cal

Chapter 4: API documentation 370

Shape::Disk class reference

Declaration

#include <Goptical/Shape/Disk>

namespace Goptical {

namespace Shape {

class Disk;

};

};

This class is a member of the Shape namespace.

Inheritance

Description

This is the most common lens shape.

Members

See also the full member list (see [Shape Disk class full member list], page 371) section forthis class.

Inherited members

• 12 members inherited from Base (see [Shape Base class reference], page 359)

Functions

• Disk(double radius)

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• double get radius(void ) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• void set radius(double r)

Members detail

Disk(double radius)

Create a new disk with given radius

Page 374: Gop Ti Cal

Chapter 4: API documentation 371

Shape::Disk class full member list

Functions

• Disk(double radius)

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• double get radius(void ) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• void set radius(double r)

Page 375: Gop Ti Cal

Chapter 4: API documentation 372

Shape::Ellipse class reference

Declaration

#include <Goptical/Shape/Ellipse>

namespace Goptical {

namespace Shape {

class Ellipse;

};

};

This class is a member of the Shape namespace.

Inheritance

Description

Ellipse shape

Members

See also the full member list (see [Shape Ellipse class full member list], page 374) sectionfor this class.

Inherited members

• 12 members inherited from Base (see [Shape Base class reference], page 359)

Functions

• Ellipse(double x radius, double y radius)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• double get x radius(void ) const

• double get y radius(void ) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

• void set radius(double xr, double yr)

Page 376: Gop Ti Cal

Chapter 4: API documentation 373

Members detail

Ellipse(double x radius, double y radius)

Create a new ellipse with given radius

Page 377: Gop Ti Cal

Chapter 4: API documentation 374

Shape::Ellipse class full member list

Functions

• Ellipse(double x radius, double y radius)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• double get x radius(void ) const

• double get y radius(void ) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

• void set radius(double xr, double yr)

Page 378: Gop Ti Cal

Chapter 4: API documentation 375

Shape::EllipticalRing class reference

Declaration

#include <Goptical/Shape/EllipticalRing>

namespace Goptical {

namespace Shape {

class EllipticalRing;

};

};

This class is a member of the Shape namespace.

Inheritance

Description

This is an ellipse shape with a hole in center.

Members

See also the full member list (see [Shape EllipticalRing class full member list], page 377)section for this class.

Inherited members

• 12 members inherited from Base (see [Shape Base class reference], page 359)

Functions

• EllipticalRing(double x radius, double y radius, double x hole radius)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• double get x hole radius(void ) const

• double get x radius(void ) const

• double get y hole radius(void ) const

• double get y radius(void ) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

Page 379: Gop Ti Cal

Chapter 4: API documentation 376

• virtual double min radius() const

• void set radius(double x radius, double y radius, double x hole radius)

Members detail

EllipticalRing(double x radius, double y radius, doublex hole radius)

Create a new elliptical ring with given external ring radius along the x and y axes and holeradius along the x axis.

Page 380: Gop Ti Cal

Chapter 4: API documentation 377

Shape::EllipticalRing class full member list

Functions

• EllipticalRing(double x radius, double y radius, double x hole radius)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• double get x hole radius(void ) const

• double get x radius(void ) const

• double get y hole radius(void ) const

• double get y radius(void ) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

• void set radius(double x radius, double y radius, double x hole radius)

Page 381: Gop Ti Cal

Chapter 4: API documentation 378

Shape::Infinite class reference

Declaration

#include <Goptical/Shape/Infinite>

namespace Goptical {

namespace Shape {

class Infinite;

};

};

This class is a member of the Shape namespace.

Inheritance

Description

This class implements an infinite shape with no edge. Any 2d points is located inside theshape. It is useful to describe unbounded image plane for instance.

The global variable infinite (see [ 1070], page 358) provides an instance of this class.

Members

See also the full member list (see [Shape Infinite class full member list], page 381) sectionfor this class.

Inherited members

• 12 members inherited from Base (see [Shape Base class reference], page 359)

Functions

• Infinite()

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

Members detail

Page 382: Gop Ti Cal

Chapter 4: API documentation 379

Infinite()

Create an infinite shape

virtual Math::VectorPair2 get bounding box() const

This virtual function implements the get_bounding_box (see [_1073], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get shape bounding box

virtual void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution) const

This virtual function implements the get_contour (see [_1074], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get contour count (see [ 1075], page 360) function.

virtual unsigned int get contour count() const

This virtual function implements the get_contour_count (see [_1075], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get number of contours polygones. This function returns value is greater than 1 if shapehas hole(s).

See also get contour (see [ 1074], page 360) function.

virtual double get outter radius(const Math::Vector2 &dir) const

This virtual function implements the get_outter_radius (see [_1077], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get distance between origin and farthest shape edge in specified direction

virtual void get pattern(const Math::Vector2::put delegate t &v,const Trace::Distribution &d, bool unobstructed) const

This virtual function overrides the get_pattern (see [_1078], page 360) virtual functiondefined in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Get points distributed on shape area with given pattern

Page 383: Gop Ti Cal

Chapter 4: API documentation 380

virtual void get triangles(const Math::Triangle<2>::put delegate t&f, double resolution) const

This virtual function implements the get_triangles (see [_1079], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get shape teselation triangles

virtual bool inside(const Math::Vector2 &point) const

This virtual function implements the inside (see [_1080], page 360) pure function de-clared in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Check if the (x,y) 2d point is inside 2d shape area

virtual double max radius() const

This virtual function implements the max_radius (see [_1081], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and farthest shape edge

virtual double min radius() const

This virtual function implements the min_radius (see [_1082], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge

Page 384: Gop Ti Cal

Chapter 4: API documentation 381

Shape::Infinite class full member list

Functions

• Infinite()

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

Page 385: Gop Ti Cal

Chapter 4: API documentation 382

Shape::Polygon class reference

Declaration

#include <Goptical/Shape/Polygon>

namespace Goptical {

namespace Shape {

class Polygon;

};

};

This class is a member of the Shape namespace.

Inheritance

Description

This class implements the polygon shape.

Triangle tessellation required for proper 3d display only works with convex polygons yet.

See also RegularPolygon (see [Shape RegularPolygon class reference], page 389) class.

Members

See also the full member list (see [Shape Polygon class full member list], page 384) sectionfor this class.

Inherited members

• 12 members inherited from Base (see [Shape Base class reference], page 359)

Functions

• Polygon()

• unsigned int add vertex(const Math::Vector2 &v)

• void delete vertex(unsigned int id)

• const Math::Vector2 & get vertex(unsigned int id)

• unsigned int get vertices count() const

• void insert vertex(const Math::Vector2 &v, unsigned int id)

Members detail

Polygon()

Create a polygon with given radius and edge count

unsigned int add vertex(const Math::Vector2 &v)

No documentation available

void delete vertex(unsigned int id)

No documentation available

Page 386: Gop Ti Cal

Chapter 4: API documentation 383

const Math::Vector2 & get vertex(unsigned int id)

No documentation available

unsigned int get vertices count() const

No documentation available

void insert vertex(const Math::Vector2 &v, unsigned int id)

No documentation available

Page 387: Gop Ti Cal

Chapter 4: API documentation 384

Shape::Polygon class full member list

Functions

• Polygon()

• unsigned int add vertex(const Math::Vector2 &v)

• void delete vertex(unsigned int id)

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &f, constTrace::Distribution &d, bool unobstructed = [...]) const

• const Math::Vector2 & get vertex(unsigned int id)

• unsigned int get vertices count() const

• void insert vertex(const Math::Vector2 &v, unsigned int id)

Page 388: Gop Ti Cal

Chapter 4: API documentation 385

Shape::Rectangle class reference

Declaration

#include <Goptical/Shape/Rectangle>

namespace Goptical {

namespace Shape {

class Rectangle;

};

};

This class is a member of the Shape namespace.

Inheritance

Description

Rectangle and square shape

Members

See also the full member list (see [Shape Rectangle class full member list], page 388) sec-tion for this class.

Inherited members

• 12 members inherited from Base (see [Shape Base class reference], page 359)

Functions

• Rectangle(double width, double height)

• Rectangle(double sqsize)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

Members detail

Rectangle(double width, double height)

Create a rectangle with given width and height

Page 389: Gop Ti Cal

Chapter 4: API documentation 386

Rectangle(double sqsize)

Create a square with given side length

virtual Math::VectorPair2 get bounding box() const

This virtual function implements the get_bounding_box (see [_1073], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get shape bounding box

virtual void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution) const

This virtual function implements the get_contour (see [_1074], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get contour count (see [ 1075], page 360) function.

virtual unsigned int get contour count() const

This virtual function implements the get_contour_count (see [_1075], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get number of contours polygones. This function returns value is greater than 1 if shapehas hole(s).

See also get contour (see [ 1074], page 360) function.

virtual double get outter radius(const Math::Vector2 &dir) const

This virtual function implements the get_outter_radius (see [_1077], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get distance between origin and farthest shape edge in specified direction

virtual void get pattern(const Math::Vector2::put delegate t &v,const Trace::Distribution &d, bool unobstructed) const

This virtual function overrides the get_pattern (see [_1078], page 360) virtual functiondefined in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Get points distributed on shape area with given pattern

Page 390: Gop Ti Cal

Chapter 4: API documentation 387

virtual void get triangles(const Math::Triangle<2>::put delegate t&f, double resolution) const

This virtual function implements the get_triangles (see [_1079], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get shape teselation triangles

virtual bool inside(const Math::Vector2 &point) const

This virtual function implements the inside (see [_1080], page 360) pure function de-clared in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Check if the (x,y) 2d point is inside 2d shape area

virtual double max radius() const

This virtual function implements the max_radius (see [_1081], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and farthest shape edge

virtual double min radius() const

This virtual function implements the min_radius (see [_1082], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge

Page 391: Gop Ti Cal

Chapter 4: API documentation 388

Shape::Rectangle class full member list

Functions

• Rectangle(double width, double height)

• Rectangle(double sqsize)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

Page 392: Gop Ti Cal

Chapter 4: API documentation 389

Shape::RegularPolygon class reference

Declaration

#include <Goptical/Shape/RegularPolygon>

namespace Goptical {

namespace Shape {

class RegularPolygon;

};

};

This class is a member of the Shape namespace.

Inheritance

Description

See Polygon (see [Shape Polygon class reference], page 382) class.

Members

See also the full member list (see [Shape RegularPolygon class full member list], page 392)section for this class.

Inherited members

• 12 members inherited from Base (see [Shape Base class reference], page 359)

Functions

• RegularPolygon(double radius, unsigned int edge cnt, double degree angle = [...])

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

Members detail

RegularPolygon(double radius, unsigned int edge cnt, doubledegree angle = 0.)

Create a regular polygon with given radius and edge count.

Page 393: Gop Ti Cal

Chapter 4: API documentation 390

virtual Math::VectorPair2 get bounding box() const

This virtual function implements the get_bounding_box (see [_1073], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get shape bounding box

virtual void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution) const

This virtual function implements the get_contour (see [_1074], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get contour count (see [ 1075], page 360) function.

virtual unsigned int get contour count() const

This virtual function implements the get_contour_count (see [_1075], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get number of contours polygones. This function returns value is greater than 1 if shapehas hole(s).

See also get contour (see [ 1074], page 360) function.

virtual double get outter radius(const Math::Vector2 &dir) const

This virtual function implements the get_outter_radius (see [_1077], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get distance between origin and farthest shape edge in specified direction

virtual void get triangles(const Math::Triangle<2>::put delegate t&f, double resolution) const

This virtual function implements the get_triangles (see [_1079], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get shape teselation triangles

virtual bool inside(const Math::Vector2 &point) const

This virtual function implements the inside (see [_1080], page 360) pure function de-clared in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Page 394: Gop Ti Cal

Chapter 4: API documentation 391

Documentation inherited from base class:

Check if the (x,y) 2d point is inside 2d shape area

virtual double max radius() const

This virtual function implements the max_radius (see [_1081], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and farthest shape edge

virtual double min radius() const

This virtual function implements the min_radius (see [_1082], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge

Page 395: Gop Ti Cal

Chapter 4: API documentation 392

Shape::RegularPolygon class full member list

Functions

• RegularPolygon(double radius, unsigned int edge cnt, double degree angle = [...])

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &f, constTrace::Distribution &d, bool unobstructed = [...]) const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

Page 396: Gop Ti Cal

Chapter 4: API documentation 393

Shape::Ring class reference

Declaration

#include <Goptical/Shape/Ring>

namespace Goptical {

namespace Shape {

class Ring;

};

};

This class is a member of the Shape namespace.

Inheritance

Description

This is a disk shape with a hole in center.

Members

See also the full member list (see [Shape Ring class full member list], page 395) section forthis class.

Inherited members

• 12 members inherited from Base (see [Shape Base class reference], page 359)

Functions

• Ring(double radius, double hole radius)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• double get hole radius() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• double get radius() const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

• void set radius(double radius, double hole radius)

Page 397: Gop Ti Cal

Chapter 4: API documentation 394

Members detail

Ring(double radius, double hole radius)

Create a new ring with given external radius and hole radius.

Page 398: Gop Ti Cal

Chapter 4: API documentation 395

Shape::Ring class full member list

Functions

• Ring(double radius, double hole radius)

• virtual Math::VectorPair2 get bounding box() const

• virtual void get contour(unsigned int contour, const Math::Vector2::put delegate t &f,double resolution) const

• virtual unsigned int get contour count() const

• double get hole radius() const

• virtual double get hole radius(const Math::Vector2 &dir) const

• virtual double get outter radius(const Math::Vector2 &dir) const

• virtual void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

• double get radius() const

• virtual void get triangles(const Math::Triangle<2>::put delegate t &f, double resolu-tion) const

• virtual bool inside(const Math::Vector2 &point) const

• virtual double max radius() const

• virtual double min radius() const

• void set radius(double radius, double hole radius)

Page 399: Gop Ti Cal

Chapter 4: API documentation 396

Shape::Round<Shape::DiskBase,false> internal class members

virtual void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution) const

This virtual function implements the get_contour (see [_1074], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get contour count (see [ 1075], page 360) function.

virtual unsigned int get contour count() const

This virtual function implements the get_contour_count (see [_1075], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get number of contours polygones. This function returns value is greater than 1 if shapehas hole(s).

See also get contour (see [ 1074], page 360) function.

virtual void get pattern(const Math::Vector2::put delegate t &v,const Trace::Distribution &d, bool unobstructed) const

This virtual function overrides the get_pattern (see [_1078], page 360) virtual functiondefined in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Get points distributed on shape area with given pattern

virtual void get triangles(const Math::Triangle<2>::put delegate t&f, double resolution) const

This virtual function implements the get_triangles (see [_1079], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get shape teselation triangles

Page 400: Gop Ti Cal

Chapter 4: API documentation 397

Shape::Round<Shape::EllipseBase,false> internal classmembers

virtual void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution) const

This virtual function implements the get_contour (see [_1074], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get contour count (see [ 1075], page 360) function.

virtual unsigned int get contour count() const

This virtual function implements the get_contour_count (see [_1075], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get number of contours polygones. This function returns value is greater than 1 if shapehas hole(s).

See also get contour (see [ 1074], page 360) function.

virtual void get pattern(const Math::Vector2::put delegate t &v,const Trace::Distribution &d, bool unobstructed) const

This virtual function overrides the get_pattern (see [_1078], page 360) virtual functiondefined in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Get points distributed on shape area with given pattern

virtual void get triangles(const Math::Triangle<2>::put delegate t&f, double resolution) const

This virtual function implements the get_triangles (see [_1079], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get shape teselation triangles

Page 401: Gop Ti Cal

Chapter 4: API documentation 398

Shape::Round<Shape::EllipticalRingBase,true> internal classmembers

virtual void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution) const

This virtual function implements the get_contour (see [_1074], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get contour count (see [ 1075], page 360) function.

virtual unsigned int get contour count() const

This virtual function implements the get_contour_count (see [_1075], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get number of contours polygones. This function returns value is greater than 1 if shapehas hole(s).

See also get contour (see [ 1074], page 360) function.

virtual void get pattern(const Math::Vector2::put delegate t &v,const Trace::Distribution &d, bool unobstructed) const

This virtual function overrides the get_pattern (see [_1078], page 360) virtual functiondefined in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Get points distributed on shape area with given pattern

virtual void get triangles(const Math::Triangle<2>::put delegate t&f, double resolution) const

This virtual function implements the get_triangles (see [_1079], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get shape teselation triangles

Page 402: Gop Ti Cal

Chapter 4: API documentation 399

Shape::Round<Shape::RingBase,true> internal class members

virtual void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution) const

This virtual function implements the get_contour (see [_1074], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get contour count (see [ 1075], page 360) function.

virtual unsigned int get contour count() const

This virtual function implements the get_contour_count (see [_1075], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get number of contours polygones. This function returns value is greater than 1 if shapehas hole(s).

See also get contour (see [ 1074], page 360) function.

virtual void get pattern(const Math::Vector2::put delegate t &v,const Trace::Distribution &d, bool unobstructed) const

This virtual function overrides the get_pattern (see [_1078], page 360) virtual functiondefined in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Get points distributed on shape area with given pattern

virtual void get triangles(const Math::Triangle<2>::put delegate t&f, double resolution) const

This virtual function implements the get_triangles (see [_1079], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get shape teselation triangles

Page 403: Gop Ti Cal

Chapter 4: API documentation 400

Shape::DiskBase internal class members

double get radius(void ) const

Get disk radius

void set radius(double r)

Set disk radius

Page 404: Gop Ti Cal

Chapter 4: API documentation 401

Shape::EllipseBase internal class members

virtual Math::VectorPair2 get bounding box() const

This virtual function implements the get_bounding_box (see [_1073], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get shape bounding box

virtual double get outter radius(const Math::Vector2 &dir) const

This virtual function implements the get_outter_radius (see [_1077], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get distance between origin and farthest shape edge in specified direction

double get x radius(void ) const

Set ellipse radius along x axis

double get y radius(void ) const

Set ellipse radius along y axis

virtual bool inside(const Math::Vector2 &point) const

This virtual function implements the inside (see [_1080], page 360) pure function de-clared in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Check if the (x,y) 2d point is inside 2d shape area

virtual double max radius() const

This virtual function implements the max_radius (see [_1081], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and farthest shape edge

virtual double min radius() const

This virtual function implements the min_radius (see [_1082], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge

void set radius(double xr, double yr)

Set ellipse radius along x and y axis

Page 405: Gop Ti Cal

Chapter 4: API documentation 402

Shape::EllipticalRingBase internal class members

virtual Math::VectorPair2 get bounding box() const

This virtual function implements the get_bounding_box (see [_1073], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get shape bounding box

virtual double get hole radius(const Math::Vector2 &dir) const

This virtual function overrides the get_hole_radius (see [_1076], page 360) virtualfunction defined in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge in specified direction

virtual double get outter radius(const Math::Vector2 &dir) const

This virtual function implements the get_outter_radius (see [_1077], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get distance between origin and farthest shape edge in specified direction

double get x hole radius(void ) const

Get hole radius along the x axis

double get x radius(void ) const

Get external ring radius along the x axis

double get y hole radius(void ) const

Get hole radius along the y axis

double get y radius(void ) const

Get external ring radius along the y axis

virtual bool inside(const Math::Vector2 &point) const

This virtual function implements the inside (see [_1080], page 360) pure function de-clared in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Check if the (x,y) 2d point is inside 2d shape area

Page 406: Gop Ti Cal

Chapter 4: API documentation 403

virtual double max radius() const

This virtual function implements the max_radius (see [_1081], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and farthest shape edge

virtual double min radius() const

This virtual function implements the min_radius (see [_1082], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge

void set radius(double x radius, double y radius, doublex hole radius)

Set external ring radius along the x and y axes and hole radius along the x axis.

Page 407: Gop Ti Cal

Chapter 4: API documentation 404

Shape::RingBase internal class members

virtual Math::VectorPair2 get bounding box() const

This virtual function implements the get_bounding_box (see [_1073], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get shape bounding box

double get hole radius() const

Get hole radius

virtual double get hole radius(const Math::Vector2 &dir) const

This virtual function overrides the get_hole_radius (see [_1076], page 360) virtualfunction defined in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge in specified direction

virtual double get outter radius(const Math::Vector2 &dir) const

This virtual function implements the get_outter_radius (see [_1077], page 360) purefunction declared in the Base (see [Shape_Base_class_reference], page 359) base ab-stract class.

Documentation inherited from base class:

Get distance between origin and farthest shape edge in specified direction

double get radius() const

Get ring external radius

virtual bool inside(const Math::Vector2 &point) const

This virtual function implements the inside (see [_1080], page 360) pure function de-clared in the Base (see [Shape_Base_class_reference], page 359) base abstract class.

Documentation inherited from base class:

Check if the (x,y) 2d point is inside 2d shape area

virtual double max radius() const

This virtual function implements the max_radius (see [_1081], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and farthest shape edge

Page 408: Gop Ti Cal

Chapter 4: API documentation 405

virtual double min radius() const

This virtual function implements the min_radius (see [_1082], page 360) pure func-tion declared in the Base (see [Shape_Base_class_reference], page 359) base abstractclass.

Documentation inherited from base class:

Get distance between origin and nearest shape outter edge

void set radius(double radius, double hole radius)

Set ring external radius and hole radius

Page 409: Gop Ti Cal

Chapter 4: API documentation 406

Shape::Round internal class members

void get contour(unsigned int contour, constMath::Vector2::put delegate t &f, double resolution)const

No documentation available

unsigned int get contour count() const

No documentation available

void get pattern(const Math::Vector2::put delegate t &v, constTrace::Distribution &d, bool unobstructed) const

No documentation available

void get triangles(const Math::Triangle<2>::put delegate t &f,double resolution) const

No documentation available

Page 410: Gop Ti Cal

Chapter 4: API documentation 407

Sys namespace reference

Description

Optical system and components

Members

Types

• class Group

• class Image

• class Lens

• class Mirror

• class OpticalSurface

• class SourcePoint

• class SourceRays

• class System

• class Container

• class Element

• enum LensEdge

• class Source

• enum SourceInfinityMode

• class Stop

• class Surface

Functions

• std::ostream & operator<<(std::ostream &o, const Element &e)

• std::ostream & operator<<(std::ostream &o, const Container &v)

Members detail

enum LensEdge

Identifier DescriptionStraightEdgeSlopeEdge

enum SourceInfinityMode

Specifies point source location mode

Identifier DescriptionSourceAtFiniteDistance In finite distance mode the point source is located at specified

position and all rays are traced from this point.

Page 411: Gop Ti Cal

Chapter 4: API documentation 408

SourceAtInfinity In infinity mode the point source generate parallel rays ori-ented along source direction vector.

std:: ostream & operator<<(std:: ostream &o, const Element &e)

No documentation available

std:: ostream & operator<<(std:: ostream &o, const Container&v)

No documentation available

Page 412: Gop Ti Cal

Chapter 4: API documentation 409

Sys::Group class reference

Declaration

#include <Goptical/Sys/Group>

namespace Goptical {

namespace Sys {

class Group;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This class is used to form a group of optical elements. A group is a special kind of opticalelement which can contains other elements. A group has its own local coordinate system.

See also System hierarchy and groups (see Section 3.3 [System hierarchy and groups],page 19) section.

Members

See also the full member list (see [Sys Group class full member list], page 411) section forthis class.

Inherited members

• 16 members inherited from Container (see [Sys Container class reference], page 444)

• 40 members inherited from Element (see [Sys Element class reference], page 448)

Functions

• Group(const Math::VectorPair3 &p)

• virtual ~Group()

• virtual Math::VectorPair3 get bounding box() const

Members detail

Group(const Math::VectorPair3 &p)

Create a new group at given position

virtual ~Group()

No documentation available

virtual Math::VectorPair3 get bounding box() const

This virtual function overrides the get_bounding_box (see [_1288], page 450) virtualfunction defined in the Element (see [Sys_Element_class_reference], page 448) baseclass.

Page 413: Gop Ti Cal

Chapter 4: API documentation 410

Documentation inherited from base class:

Get bounding box in local coordinates

Page 414: Gop Ti Cal

Chapter 4: API documentation 411

Sys::Group class full member list

Types

• typedef [...] element list t

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Group(const Math::VectorPair3 &p)

• virtual ~Group()

• void add(const ref<Element> &e)

• template bool contains(const X *x) const

• void draw 2d(Io::Renderer &r) const

• void draw 2d fit(Io::RendererViewport &r, bool keep aspect = [...]) const

• void draw 3d(Io::Renderer &r) const

• void draw 3d fit(Io::RendererViewport &r, double z offset = [...]) const

• template void enable single(const X &e)

• template X * find() const

• virtual Math::VectorPair3 get bounding box() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• const Container::element list t & get element list() const

• template void get elements(const delegate<void(const X&)> &d) const

• template void get elements(const delegate<void(X&)> &d)

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

Page 415: Gop Ti Cal

Chapter 4: API documentation 412

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void remove(Element &e)

• void rotate(double x, double y, double z)

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set transform(const Math::Transform<3> &t)

• void update version()

Page 416: Gop Ti Cal

Chapter 4: API documentation 413

Sys::Image class reference

Declaration

#include <Goptical/Sys/Image>

namespace Goptical {

namespace Sys {

class Image;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

Image plane optical element

Members

See also the full member list (see [Sys Image class full member list], page 414) section forthis class.

Inherited members

• 48 members inherited from Surface (see [Sys Surface class reference], page 463)

Functions

• Image(const Math::VectorPair3 &position, const const ref<Curve::Base> &curve, constconst ref<Shape::Base> &shape)

• Image(const Math::VectorPair3 &position, double radius)

Members detail

Image(const Math::VectorPair3 &position, const const ref<Curve::Base> &curve, const const ref <Shape::Base> &shape)

Create a new image plane at given position.

Image(const Math::VectorPair3 &position, double radius)

Create a new flat square image plane at given position with given half width

Page 417: Gop Ti Cal

Chapter 4: API documentation 414

Sys::Image class full member list

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Image(const Math::VectorPair3 &position, const const ref<Curve::Base> &curve, constconst ref<Shape::Base> &shape)

• Image(const Math::VectorPair3 &position, double radius)

• virtual Math::VectorPair3 get bounding box() const

• virtual Io::Rgb get color(const Io::Renderer &r) const

• const Curve::Base & get curve() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• double get discard intensity() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• Group * get parent() const

• void get pattern(const Math::Vector3::put delegate t &f, const Trace::Distribution &d,bool unobstructed = [...]) const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• const Shape::Base & get shape() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• virtual bool intersect(const Trace::Params &params, Math::VectorPair3 &pt, constMath::VectorPair3 &ray) const

• bool is enabled() const

Page 418: Gop Ti Cal

Chapter 4: API documentation 415

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set curve(const const ref<Curve::Base> &c)

• void set direction(const Math::Vector3 &v)

• void set discard intensity(double intensity)

• void set enable state(bool enabled)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set shape(const const ref<Shape::Base> &s)

• void set transform(const Math::Transform<3> &t)

• template void trace ray(Trace::Result &result, Trace::Ray &incident, constMath::VectorPair3 &local, const Math::VectorPair3 &intersect) const

• void update version()

Page 419: Gop Ti Cal

Chapter 4: API documentation 416

Sys::Lens class reference

Declaration

#include <Goptical/Sys/Lens>

namespace Goptical {

namespace Sys {

class Lens;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This class is a group (see [Sys Group class reference], page 409) of optical surfaces (see[Sys OpticalSurface class reference], page 427). It contains functions to describe a lens orlens group component in a convenient way.

If Material::none (see [ 528], page 223) is passed as material, it will be replaced bysystem environement proxy (see [Material Proxy class reference], page 277) material whenthe optical surface becomes part of a System (see [Sys System class reference], page 439).

See also The Lens component (see Section 3.3.1 [The Lens component], page 19) section.

Members

See also the full member list (see [Sys Lens class full member list], page 420) section forthis class.

Inherited members

• 51 members inherited from Group (see [Sys Group class reference], page 409)

Functions

• Lens(const Math::VectorPair3 &p, double offset = [...], const const ref<Material::Base>&env = [...])

• Lens(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve0, constconst ref<Shape::Base> &shape0, const const ref<Curve::Base> &curve1, constconst ref<Shape::Base> &shape1, double thickness0, const const ref<Material::Base>&glass0, const const ref<Material::Base> &env = [...])

• Lens(const Math::VectorPair3 &p, double roc0, double ap radius0, double roc1,double ap radius1, double thickness, const const ref<Material::Base> &glass0, constconst ref<Material::Base> &env = [...])

• virtual ~Lens()

• void add stop(const const ref<Shape::Base> &shape, double thickness)

• void add stop(double ap radius, double thickness)

Page 420: Gop Ti Cal

Chapter 4: API documentation 417

• unsigned int add surface(const const ref<Curve::Base> &curve, constconst ref<Shape::Base>&shape, double thickness = [...], const const ref<Material::Base>&glass = [...])

• unsigned int add surface(double roc, double ap radius, double thickness = [...], constconst ref<Material::Base> &glass = [...])

• Math::VectorPair3 get exit plane() const

• const OpticalSurface & get left surface() const

• OpticalSurface & get left surface()

• const OpticalSurface & get right surface() const

• OpticalSurface & get right surface()

• const OpticalSurface & get surface(unsigned int index) const

• OpticalSurface & get surface(unsigned int index)

• double get thickness(unsigned int index = [...]) const

• void set curve(const const ref<Curve::Base> &c, unsigned int index)

• void set glass material(const const ref<Material::Base> &m, unsigned int index = [...])

• void set left curve(const const ref<Curve::Base> &c)

• void set left material(const const ref<Material::Base> &m)

• void set right curve(const const ref<Curve::Base> &c)

• void set right material(const const ref<Material::Base> &m)

• void set shape(const const ref<Shape::Base> &s)

• void set shape(const const ref<Shape::Base> &s, unsigned int index)

• void set thickness(double thickness, unsigned int index = [...])

Members detail

Lens(const Math::VectorPair3 &p, double offset = 0., constconst ref <Material::Base> &env = Material::none)

Create an empty lens. Surfaces can be added with the add surface (see [ 1206], page 418)functions.

Lens(const Math::VectorPair3 &p, const const ref <Curve::Base>&curve0, const const ref <Shape::Base> &shape0, const const ref<Curve::Base> &curve1, const const ref <Shape::Base> &shape1,double thickness0, const const ref <Material::Base> &glass0, constconst ref <Material::Base> &env = Material::none)

Create a lens at given position with given thickness, shapes, curvatures and glass.

See also add surface (see [ 1206], page 418) function.

Page 421: Gop Ti Cal

Chapter 4: API documentation 418

Lens(const Math::VectorPair3 &p, double roc0, double ap radius0,double roc1, double ap radius1, double thickness, const const ref<Material::Base> &glass0, const const ref <Material::Base> &env= Material::none)

Create a circular lens with flat or spherical surfaces at given position with given thickness,radius of curvature, aperture radius and glass.

See also add surface (see [ 1207], page 418) function.

virtual ~Lens()

No documentation available

void add stop(const const ref <Shape::Base> &shape, doublethickness)

Add an aperture stop with given, shape and thickness.

void add stop(double ap radius, double thickness)

Add an aperture stop with circular aperture.

Parameters list:

• radius: circular aperture radius.

• thickness: distance to the next stop or exit plane. .

unsigned int add surface(const const ref <Curve::Base> &curve,const const ref <Shape::Base> &shape, double thickness = 0.,const const ref <Material::Base> &glass = Material::none)

Add an optical surface with given curve, shape, thickness and material.

unsigned int add surface(double roc, double ap radius, doublethickness = 0., const const ref <Material::Base> &glass =Material::none)

Add a spherical or flat optical surface with circular aperture.

Parameters list:

• roc: spherical radius of curvature. 0 means flat curve.

• ap radius: circular aperture radius.

• thickness: distance to the next surface or exit plane. .

• glass: material between added surface and next surface.

Math::VectorPair3 get exit plane() const

Get plane of last surface + thickness z offset

const OpticalSurface & get left surface() const

Get a reference to left optical surface element

OpticalSurface & get left surface()

Get a reference to left optical surface element

Page 422: Gop Ti Cal

Chapter 4: API documentation 419

const OpticalSurface & get right surface() const

Get a reference to right optical surface element

OpticalSurface & get right surface()

Get a reference to right optical surface element

const OpticalSurface & get surface(unsigned int index) const

Get a reference to optical surface at given index

OpticalSurface & get surface(unsigned int index)

Get a reference to optical surface at given index

double get thickness(unsigned int index = 0) const

Get thickness between two surfaces

void set curve(const const ref <Curve::Base> &c, unsigned intindex)

Set curve of given surface index

void set glass material(const const ref <Material::Base> &m,unsigned int index = 0)

Set glass material

void set left curve(const const ref <Curve::Base> &c)

Set left curve

void set left material(const const ref <Material::Base> &m)

Set left material

void set right curve(const const ref <Curve::Base> &c)

Set right curve

void set right material(const const ref <Material::Base> &m)

Set left material

void set shape(const const ref <Shape::Base> &s)

Set lens shape (all surfaces)

void set shape(const const ref <Shape::Base> &s, unsigned intindex)

Set lens shape of given surface index

void set thickness(double thickness, unsigned int index = 0)

Adjust thickness between two surfaces

Page 423: Gop Ti Cal

Chapter 4: API documentation 420

Sys::Lens class full member list

Types

• typedef [...] element list t

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Lens(const Math::VectorPair3 &p, double offset = [...], const const ref<Material::Base>&env = [...])

• Lens(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve0, constconst ref<Shape::Base> &shape0, const const ref<Curve::Base> &curve1, constconst ref<Shape::Base> &shape1, double thickness0, const const ref<Material::Base>&glass0, const const ref<Material::Base> &env = [...])

• Lens(const Math::VectorPair3 &p, double roc0, double ap radius0, double roc1,double ap radius1, double thickness, const const ref<Material::Base> &glass0, constconst ref<Material::Base> &env = [...])

• virtual ~Lens()

• void add stop(const const ref<Shape::Base> &shape, double thickness)

• void add stop(double ap radius, double thickness)

• unsigned int add surface(const const ref<Curve::Base> &curve, constconst ref<Shape::Base>&shape, double thickness = [...], const const ref<Material::Base>&glass = [...])

• unsigned int add surface(double roc, double ap radius, double thickness = [...], constconst ref<Material::Base> &glass = [...])

• template bool contains(const X *x) const

• void draw 2d(Io::Renderer &r) const

• void draw 2d fit(Io::RendererViewport &r, bool keep aspect = [...]) const

• void draw 3d(Io::Renderer &r) const

• void draw 3d fit(Io::RendererViewport &r, double z offset = [...]) const

• template void enable single(const X &e)

• template X * find() const

• virtual Math::VectorPair3 get bounding box() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• const Container::element list t & get element list() const

• template void get elements(const delegate<void(const X&)> &d) const

• template void get elements(const delegate<void(X&)> &d)

• Math::VectorPair3 get exit plane() const

• const Math::Transform<3> & get global transform() const

• const OpticalSurface & get left surface() const

Page 424: Gop Ti Cal

Chapter 4: API documentation 421

• OpticalSurface & get left surface()

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• const OpticalSurface & get right surface() const

• OpticalSurface & get right surface()

• const OpticalSurface & get surface(unsigned int index) const

• OpticalSurface & get surface(unsigned int index)

• System * get system() const

• double get thickness(unsigned int index = [...]) const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set curve(const const ref<Curve::Base> &c, unsigned int index)

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• void set glass material(const const ref<Material::Base> &m, unsigned int index = [...])

• void set left curve(const const ref<Curve::Base> &c)

• void set left material(const const ref<Material::Base> &m)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set right curve(const const ref<Curve::Base> &c)

Page 425: Gop Ti Cal

Chapter 4: API documentation 422

• void set right material(const const ref<Material::Base> &m)

• void set shape(const const ref<Shape::Base> &s)

• void set shape(const const ref<Shape::Base> &s, unsigned int index)

• void set thickness(double thickness, unsigned int index = [...])

• void set transform(const Math::Transform<3> &t)

• void update version()

Page 426: Gop Ti Cal

Chapter 4: API documentation 423

Sys::Mirror class reference

Declaration

#include <Goptical/Sys/Mirror>

namespace Goptical {

namespace Sys {

class Mirror;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This class provide a convenient way to describe a reflecting optical surface. Light is reflectedonly on 1 side of the surface.

Members

See also the full member list (see [Sys Mirror class full member list], page 425) section forthis class.

Inherited members

• 51 members inherited from OpticalSurface (see [Sys OpticalSurface class reference],page 427)

Functions

• Mirror(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve,const const ref<Shape::Base> &shape, bool light from left = [...], constconst ref<Material::Base> &metal = [...], const const ref<Material::Base> &env =[...])

• Mirror(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve, doubleap radius, bool light from left = [...], const const ref<Material::Base> &metal = [...],const const ref<Material::Base> &env = [...])

• Mirror(const Math::VectorPair3 &p, double roc, double sc, double ap radius,bool light from left = [...], const const ref<Material::Base> &metal = [...], constconst ref<Material::Base> &env = [...])

Members detail

Page 427: Gop Ti Cal

Chapter 4: API documentation 424

Mirror(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve, const const ref <Shape::Base> &shape, boollight from left = true, const const ref <Material::Base> &metal= Material::mirror, const const ref <Material::Base> &env =Material::none)

Create a mirror at given position with given shape and curve. Default is to reflect lightcoming from left using Material::mirror (see [ 527], page 223) material.

Mirror(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve, double ap radius, bool light from left =true, const const ref <Material::Base> &metal = Material::mirror,const const ref <Material::Base> &env = Material::none)

Create a circular aperture mirror at given position with given curve. Default is to reflectlight coming from left using Material::mirror (see [ 527], page 223) material.

Mirror(const Math::VectorPair3 &p, double roc, double sc,double ap radius, bool light from left = true, const const ref<Material::Base> &metal = Material::mirror, const const ref<Material::Base> &env = Material::none)

Create a conic mirror with circular aperture at given position. Default is to reflect lightcoming from left using Material::mirror (see [ 527], page 223) material.

Page 428: Gop Ti Cal

Chapter 4: API documentation 425

Sys::Mirror class full member list

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Mirror(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve,const const ref<Shape::Base> &shape, bool light from left = [...], constconst ref<Material::Base> &metal = [...], const const ref<Material::Base> &env =[...])

• Mirror(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve, doubleap radius, bool light from left = [...], const const ref<Material::Base> &metal = [...],const const ref<Material::Base> &env = [...])

• Mirror(const Math::VectorPair3 &p, double roc, double sc, double ap radius,bool light from left = [...], const const ref<Material::Base> &metal = [...], constconst ref<Material::Base> &env = [...])

• virtual Math::VectorPair3 get bounding box() const

• virtual Io::Rgb get color(const Io::Renderer &r) const

• const Curve::Base & get curve() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• double get discard intensity() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• const Material::Base & get material(unsigned int id) const

• Group * get parent() const

• void get pattern(const Math::Vector3::put delegate t &f, const Trace::Distribution &d,bool unobstructed = [...]) const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• const Shape::Base & get shape() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

Page 429: Gop Ti Cal

Chapter 4: API documentation 426

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• virtual bool intersect(const Trace::Params &params, Math::VectorPair3 &pt, constMath::VectorPair3 &ray) const

• bool is enabled() const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set curve(const const ref<Curve::Base> &c)

• void set direction(const Math::Vector3 &v)

• void set discard intensity(double intensity)

• void set enable state(bool enabled)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set material(unsigned int index, const const ref<Material::Base> &m)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set shape(const const ref<Shape::Base> &s)

• void set transform(const Math::Transform<3> &t)

• template void trace ray(Trace::Result &result, Trace::Ray &incident, constMath::VectorPair3 &local, const Math::VectorPair3 &intersect) const

• void update version()

Page 430: Gop Ti Cal

Chapter 4: API documentation 427

Sys::OpticalSurface class reference

Declaration

#include <Goptical/Sys/OpticalSurface>

namespace Goptical {

namespace Sys {

class OpticalSurface;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This class implements optical surfaces.

Optical surfaces are defined by material on both side of the surface, curve and contourshape. This class handle light rays refraction and reflection.

If Material::none (see [ 528], page 223) is passed as material, it will be replaced bysystem environement proxy (see [Material Proxy class reference], page 277) material whenthe optical surface becomes part of a System (see [Sys System class reference], page 439).

Members

See also the full member list (see [Sys OpticalSurface class full member list], page 429)section for this class.

Inherited members

• 48 members inherited from Surface (see [Sys Surface class reference], page 463)

Functions

• OpticalSurface(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve,const const ref<Shape::Base> &shape, const const ref<Material::Base> &left, constconst ref<Material::Base> &right)

• OpticalSurface(const Math::VectorPair3 &p, const const ref<Curve::Base>&curve, double ap radius, const const ref<Material::Base> &left, constconst ref<Material::Base> &right)

• OpticalSurface(const Math::VectorPair3 &p, double roc, double ap radius, constconst ref<Material::Base> &left, const const ref<Material::Base> &right)

• virtual ~OpticalSurface()

• virtual Io::Rgb get color(const Io::Renderer &r) const

• const Material::Base & get material(unsigned int id) const

• void set material(unsigned int index, const const ref<Material::Base> &m)

Page 431: Gop Ti Cal

Chapter 4: API documentation 428

Members detail

OpticalSurface(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve, const const ref <Shape::Base> &shape,const const ref <Material::Base> &left, const const ref<Material::Base> &right)

Create an optical surface at specified location.

OpticalSurface(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve, double ap radius, const const ref<Material::Base> &left, const const ref <Material::Base> &right)

Create a circular aperture optical surface at specified location.

• ap radius: circular aperture radius.

OpticalSurface(const Math::VectorPair3 &p, double roc, doubleap radius, const const ref <Material::Base> &left, const const ref<Material::Base> &right)

Create a spherical optical surface with circular aperture at specified location.

• roc: spherical radius of curvature. 0 means flat curve.

• ap radius: circular aperture radius.

virtual ~OpticalSurface()

No documentation available

virtual Io::Rgb get color(const Io::Renderer &r) const

This virtual function overrides the get_color (see [_1343], page 464) virtual functiondefined in the Surface (see [Sys_Surface_class_reference], page 463) base class.

Get surface natural color from material properties.

const Material::Base & get material(unsigned int id) const

Get surface left or right material

void set material(unsigned int index, const const ref<Material::Base> &m)

Set surface left or right material

Page 432: Gop Ti Cal

Chapter 4: API documentation 429

Sys::OpticalSurface class full member list

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• OpticalSurface(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve,const const ref<Shape::Base> &shape, const const ref<Material::Base> &left, constconst ref<Material::Base> &right)

• OpticalSurface(const Math::VectorPair3 &p, const const ref<Curve::Base>&curve, double ap radius, const const ref<Material::Base> &left, constconst ref<Material::Base> &right)

• OpticalSurface(const Math::VectorPair3 &p, double roc, double ap radius, constconst ref<Material::Base> &left, const const ref<Material::Base> &right)

• virtual ~OpticalSurface()

• virtual Math::VectorPair3 get bounding box() const

• virtual Io::Rgb get color(const Io::Renderer &r) const

• const Curve::Base & get curve() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• double get discard intensity() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• const Material::Base & get material(unsigned int id) const

• Group * get parent() const

• void get pattern(const Math::Vector3::put delegate t &f, const Trace::Distribution &d,bool unobstructed = [...]) const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• const Shape::Base & get shape() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

Page 433: Gop Ti Cal

Chapter 4: API documentation 430

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• virtual bool intersect(const Trace::Params &params, Math::VectorPair3 &pt, constMath::VectorPair3 &ray) const

• bool is enabled() const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set curve(const const ref<Curve::Base> &c)

• void set direction(const Math::Vector3 &v)

• void set discard intensity(double intensity)

• void set enable state(bool enabled)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set material(unsigned int index, const const ref<Material::Base> &m)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set shape(const const ref<Shape::Base> &s)

• void set transform(const Math::Transform<3> &t)

• template void trace ray(Trace::Result &result, Trace::Ray &incident, constMath::VectorPair3 &local, const Math::VectorPair3 &intersect) const

• void update version()

Page 434: Gop Ti Cal

Chapter 4: API documentation 431

Sys::SourcePoint class reference

Declaration

#include <Goptical/Sys/SourcePoint>

namespace Goptical {

namespace Sys {

class SourcePoint;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This class implement a point light source. The source can either be infinitely far away witha direction vector, or located at a given position but without direction.

A ray is generated for each defined spectrum line for each distribution pattern point ontarget surface.

Default wavelen list contains a single 550nm entry.

Members

See also the full member list (see [Sys SourcePoint class full member list], page 433) sectionfor this class.

Inherited members

• 48 members inherited from Source (see [Sys Source class reference], page 455)

Functions

• SourcePoint(SourceInfinityMode m, const Math::Vector3 &pos dir)

• void set infinity direction(const Math::Vector3 &dir)

• void set mode(SourceInfinityMode mode)

• void set position(const Math::Vector3 &pos)

Members detail

SourcePoint(SourceInfinityMode m, const Math::Vector3&pos dir)

Create a point source with given mode. A direction vector must be provided when sourceis in infinity mode. If not in infinity mode, a position vector must be provided instead.

void set infinity direction(const Math::Vector3 &dir)

Set point source mode to infinity and adjust source direction vector

Page 435: Gop Ti Cal

Chapter 4: API documentation 432

void set mode(SourceInfinityMode mode)

Change current point source infinity mode

void set position(const Math::Vector3 &pos)

This function shadows the set_position (see [_1321], page 452) function defined inthe Element (see [Sys_Element_class_reference], page 448) base class.

Set point source mode to positioned and adjust source position vector

Page 436: Gop Ti Cal

Chapter 4: API documentation 433

Sys::SourcePoint class full member list

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

• typedef [...] targets t

Functions

• SourcePoint(SourceInfinityMode m, const Math::Vector3 &pos dir)

• void add spectral line(const Light::SpectralLine &l)

• void clear spectrum()

• virtual void draw 2d e(Io::Renderer &r, const Element *ref) const

• virtual void draw 3d e(Io::Renderer &r, const Element *ref) const

• template void generate rays(Trace::Result &result, const Source::targets t &entry)const

• virtual Math::VectorPair3 get bounding box() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• double get max intensity() const

• double get min intensity() const

• Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

Page 437: Gop Ti Cal

Chapter 4: API documentation 434

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• void set infinity direction(const Math::Vector3 &dir)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set material(const const ref<Material::Base> &m)

• void set mode(SourceInfinityMode mode)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &pos)

• void set spectral line(const Light::SpectralLine &l, int index = [...])

• void set transform(const Math::Transform<3> &t)

• void single spectral line(const Light::SpectralLine &l)

• void update version()

Page 438: Gop Ti Cal

Chapter 4: API documentation 435

Sys::SourceRays class reference

Declaration

#include <Goptical/Sys/SourceRays>

namespace Goptical {

namespace Sys {

class SourceRays;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This class implement a light source which generates user defined rays.

Default wavelen list contains a single 550nm entry.

Members

See also the full member list (see [Sys SourceRays class full member list], page 437) sectionfor this class.

Inherited members

• 48 members inherited from Source (see [Sys Source class reference], page 455)

Functions

• SourceRays(const Math::Vector3 &object = [...])

• void add chief rays(const System &sys)

• void add chief rays(const Surface &s)

• void add marginal rays(const System &sys, double entrance height = [...])

• void add marginal rays(const Surface &s, double entrance height = [...])

• void add ray(const Light::Ray &ray, const Element *ref = [...])

• void add rays(const Math::VectorPair3 &ray, const Element *ref = [...])

• void clear rays()

Members detail

SourceRays(const Math::Vector3 &object = Math::vector3 0)

Create a rays source. Source object position is used by some of the ‘add_*’ functions andmay be specified.

void add chief rays(const System &sys)

Add chief rays to system entrance pupil for all defined wavelengths.

Page 439: Gop Ti Cal

Chapter 4: API documentation 436

void add chief rays(const Surface &s)

Add chief rays to specified surface for all defined wavelengths.

void add marginal rays(const System &sys, doubleentrance height = 0.)

Add marginal rays to system entrance pupil for all defined wavelengths.

See also add marginal rays (see [ 1243], page 436) function.

void add marginal rays(const Surface &s, double entrance height= 0.)

Add marginal rays to specified surface for all defined wavelengths.

Source direction (rotation) is used to determine tangential plane.

Entrance height is set to surface aperture radius when 0.

void add ray(const Light::Ray &ray, const Element *ref = 0)

Add a single light ray; rays properties are copied from specified light ray.

Ray origin and direction are expressed in specified ‘ref’ element coordinates or globalcoordinates if none is specified.

void add rays(const Math::VectorPair3 &ray, const Element *ref= 0)

Creates light rays from position and direction for all defined wavelengths.

Ray origin and direction are expressed in specified ‘ref’ element coordinates or globalcoordinates if none is specified.

void clear rays()

Discard all defined rays

Page 440: Gop Ti Cal

Chapter 4: API documentation 437

Sys::SourceRays class full member list

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

• typedef [...] targets t

Functions

• SourceRays(const Math::Vector3 &object = [...])

• void add chief rays(const System &sys)

• void add chief rays(const Surface &s)

• void add marginal rays(const System &sys, double entrance height = [...])

• void add marginal rays(const Surface &s, double entrance height = [...])

• void add ray(const Light::Ray &ray, const Element *ref = [...])

• void add rays(const Math::VectorPair3 &ray, const Element *ref = [...])

• void add spectral line(const Light::SpectralLine &l)

• void clear rays()

• void clear spectrum()

• virtual void draw 2d e(Io::Renderer &r, const Element *ref) const

• virtual void draw 3d e(Io::Renderer &r, const Element *ref) const

• template void generate rays(Trace::Result &result, const Source::targets t &entry)const

• virtual Math::VectorPair3 get bounding box() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• double get max intensity() const

• double get min intensity() const

• Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• System * get system() const

• const Math::Transform<3> & get transform() const

Page 441: Gop Ti Cal

Chapter 4: API documentation 438

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set material(const const ref<Material::Base> &m)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set spectral line(const Light::SpectralLine &l, int index = [...])

• void set transform(const Math::Transform<3> &t)

• void single spectral line(const Light::SpectralLine &l)

• void update version()

Page 442: Gop Ti Cal

Chapter 4: API documentation 439

Sys::System class reference

Declaration

#include <Goptical/Sys/System>

namespace Goptical {

namespace Sys {

class System;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This class is used to describe an optical system. Any optical element (see[Sys Element class reference], page 448) may be part of a system. This class handle 3dtransformation between elements local coordinates.

See also Building the optical system (see Section 3.1.1 [Building the optical system],page 6) section.

Members

See also the full member list (see [Sys System class full member list], page 442) section forthis class.

Inherited members

• 16 members inherited from Container (see [Sys Container class reference], page 444)

Functions

• System()

• virtual ~System()

• Surface * colide next(const Trace::Params &params, Math::VectorPair3 &intersect,const Trace::Ray &ray) const

• Element & get element(unsigned int index) const

• unsigned int get element count() const

• const Surface & get entrance pupil() const

• const Material::Base & get environment() const

• const Surface & get exit pupil() const

• const Math::Transform<3> & get global transform(const Element &from) const

• const Math::Transform<3> & get local transform(const Element &to) const

• const Trace::Params & get tracer params() const

• Trace::Params & get tracer params()

Page 443: Gop Ti Cal

Chapter 4: API documentation 440

• const Math::Transform<3> & get transform(const Element &from, const Element &to)const

• unsigned int get version() const

• bool has entrance pupil() const

• bool has exit pupil() const

• void set entrance pupil(const const ref<Surface> &entrance)

• void set environment(const const ref<Material::Base> &env)

• void set exit pupil(const const ref<Surface> &exit)

• void undef entrance pupil()

• void update version()

Members detail

System()

Create a new empty system.

virtual ~System()

No documentation available

Surface * colide next(const Trace::Params &params,Math::VectorPair3 &intersect, const Trace::Ray &ray) const

Find surface which colides with the given ray and update intersection point

Element & get element(unsigned int index) const

Get registered element. first element has index 1

unsigned int get element count() const

Get the number of registered elements in the system

const Surface & get entrance pupil() const

Get defined entrance pupil surface or try to guess it if none defined

const Material::Base & get environment() const

get environment material

const Surface & get exit pupil() const

Get exit pupil

const Math::Transform<3> & get global transform(const Element&from) const

Get transform from element local to global coordinates

const Math::Transform<3> & get local transform(const Element&to) const

Get transform from global to element local coordinates

Page 444: Gop Ti Cal

Chapter 4: API documentation 441

const Trace::Params & get tracer params() const

Get default tracer parameters

Trace::Params & get tracer params()

Get default tracer parameters

const Math::Transform<3> & get transform(const Element &from,const Element &to) const

Get transform between two elements local coordinates

unsigned int get version() const

Get system version. version is updated each time system or associated elements propertiesare changed

bool has entrance pupil() const

Test if an entrance pupil has been defined

bool has exit pupil() const

Test if an exit pupil has been defined

void set entrance pupil(const const ref <Surface> &entrance)

Define an entrance pupil surface used to project source rays

void set environment(const const ref <Material::Base> &env)

set environment material

void set exit pupil(const const ref <Surface> &exit)

Define an exit pupil surface

void undef entrance pupil()

Discard defined entrance pupil

void update version()

Increase current system version

Page 445: Gop Ti Cal

Chapter 4: API documentation 442

Sys::System class full member list

Type

• typedef [...] element list t

Functions

• System()

• virtual ~System()

• void add(const ref<Element> &e)

• Surface * colide next(const Trace::Params &params, Math::VectorPair3 &intersect,const Trace::Ray &ray) const

• template bool contains(const X *x) const

• void draw 2d(Io::Renderer &r) const

• void draw 2d fit(Io::RendererViewport &r, bool keep aspect = [...]) const

• void draw 3d(Io::Renderer &r) const

• void draw 3d fit(Io::RendererViewport &r, double z offset = [...]) const

• template void enable single(const X &e)

• template X * find() const

• Math::VectorPair3 get bounding box() const

• Element & get element(unsigned int index) const

• unsigned int get element count() const

• const Container::element list t & get element list() const

• template void get elements(const delegate<void(const X&)> &d) const

• template void get elements(const delegate<void(X&)> &d)

• const Surface & get entrance pupil() const

• const Material::Base & get environment() const

• const Surface & get exit pupil() const

• const Math::Transform<3> & get global transform(const Element &from) const

• const Math::Transform<3> & get local transform(const Element &to) const

• const Trace::Params & get tracer params() const

• Trace::Params & get tracer params()

• const Math::Transform<3> & get transform(const Element &from, const Element &to)const

• unsigned int get version() const

• bool has entrance pupil() const

• bool has exit pupil() const

• void remove(Element &e)

• void set entrance pupil(const const ref<Surface> &entrance)

• void set environment(const const ref<Material::Base> &env)

• void set exit pupil(const const ref<Surface> &exit)

Page 446: Gop Ti Cal

Chapter 4: API documentation 443

• void undef entrance pupil()

• void update version()

Page 447: Gop Ti Cal

Chapter 4: API documentation 444

Sys::Container class reference

Declaration

#include <Goptical/Sys/Container>

namespace Goptical {

namespace Sys {

class Container;

};

};

This class is a member of the Sys namespace.

This abstract class contains pure virtuals.

Inheritance

Description

This class base contains optical elements membership management code. It’s used asa base class for System (see [Sys System class reference], page 439) and Group (see[Sys Group class reference], page 409) classes.

Members

See also the full member list (see [Sys Container class full member list], page 447) sectionfor this class.

Type

• typedef [...] element list t

Functions

• Container()

• virtual ~Container()

• void add(const ref<Element> &e)

• template bool contains(const X *x) const

• void draw 2d(Io::Renderer &r) const

• void draw 2d fit(Io::RendererViewport &r, bool keep aspect = [...]) const

• void draw 3d(Io::Renderer &r) const

• void draw 3d fit(Io::RendererViewport &r, double z offset = [...]) const

• template void enable single(const X &e)

• template X * find() const

• Math::VectorPair3 get bounding box() const

• const element list t & get element list() const

• template void get elements(const delegate<void(const X&)> &d) const

• template void get elements(const delegate<void(X&)> &d)

• void remove(Element &e)

Page 448: Gop Ti Cal

Chapter 4: API documentation 445

Members detail

Container()

No documentation available

virtual ~Container()

No documentation available

void add(const ref <Element> &e)

Add an element

template <typename X> bool contains(const X *x) const

Test if element is contained in container and subcontainers

void draw 2d(Io::Renderer &r) const

Draw system 2d layout using specified renderer.

See also draw 2d fit (see [ 1273], page 445) function.

void draw 2d fit(Io::RendererViewport &r, bool keep aspect =true) const

Setup the renderer 2d viewport to best fit for this system or element group.

This function calls Io::Renderer::set window and Io::Renderer::set feature size (see[ 369], page 172).

void draw 3d(Io::Renderer &r) const

Draw system in 3d using specified renderer.

See also draw 3d fit (see [ 1275], page 445) function.

void draw 3d fit(Io::RendererViewport &r, double z offset = 0)const

Move the renderer 3d camera to best fit for this system or element group.

This function calls Io::RendererViewport::set camera transform (see [ 466], page 206)and Io::Renderer::set feature size (see [ 369], page 172).

typedef std:: list <ref<Element> > element list t

No documentation available

template <typename X> void enable single(const X &e)

Disable all elements of specified type which are not specified element

template <typename X> X * find() const

Find first element of type X in container and subcontainers

Math::VectorPair3 get bounding box() const

Get system or element group bounding box

Page 449: Gop Ti Cal

Chapter 4: API documentation 446

const element list t & get element list() const

Return a reference to container children list

template <typename X> void get elements(const delegate<void(const X&)> &d) const

Invoke a delegate for each element of type X in container and subcontainers

template <typename X> void get elements(const delegate<void(X&)> &d)

Invoke a modifier delegate for each element of type X in container and subcontainers

void remove(Element &e)

Remove an element

Page 450: Gop Ti Cal

Chapter 4: API documentation 447

Sys::Container class full member list

Type

• typedef [...] element list t

Functions

• Container()

• virtual ~Container()

• void add(const ref<Element> &e)

• template bool contains(const X *x) const

• void draw 2d(Io::Renderer &r) const

• void draw 2d fit(Io::RendererViewport &r, bool keep aspect = [...]) const

• void draw 3d(Io::Renderer &r) const

• void draw 3d fit(Io::RendererViewport &r, double z offset = [...]) const

• template void enable single(const X &e)

• template X * find() const

• Math::VectorPair3 get bounding box() const

• const element list t & get element list() const

• template void get elements(const delegate<void(const X&)> &d) const

• template void get elements(const delegate<void(X&)> &d)

• void remove(Element &e)

Page 451: Gop Ti Cal

Chapter 4: API documentation 448

Sys::Element class reference

Declaration

#include <Goptical/Sys/Element>

namespace Goptical {

namespace Sys {

class Element;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This is the base class for all optical elements.

Instances of this class may be registered as members of the Container (see[Sys Container class reference], page 444) class. It handles element position and transformto parent coordinates.

This class has virtual functions which must be reimplemented to handle incoming rays.

Members

See also the full member list (see [Sys Element class full member list], page 453) sectionfor this class.

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Element(const Math::VectorPair3 &plane)

• virtual ~Element()

• virtual void draw 2d e(Io::Renderer &r, const Element *ref) const

• virtual void draw 3d e(Io::Renderer &r, const Element *ref) const

• virtual Math::VectorPair3 get bounding box() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

Page 452: Gop Ti Cal

Chapter 4: API documentation 449

• Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set transform(const Math::Transform<3> &t)

• void update version()

Members detail

Element(const Math::VectorPair3 &plane)

Create a new optical element with given position and direction in parent coordinates system.

virtual ~Element()

No documentation available

virtual void draw 2d e(Io::Renderer &r, const Element *ref) const

Draw element 2d layout using the given renderer in given element coordinates.

virtual void draw 3d e(Io::Renderer &r, const Element *ref) const

Draw element in 3d using the given renderer in given element coordinates

Page 453: Gop Ti Cal

Chapter 4: API documentation 450

virtual Math::VectorPair3 get bounding box() const

Get bounding box in local coordinates

Math::Vector3 get direction(const Element &e) const

Get element direction in given element coordinate system

Math::Vector3 get direction() const

Get element direction in system global coordinates

const Math::Transform<3> & get global transform() const

Get transform from this element local to global coordinates

Math::Vector3 get local direction() const

Get element direction in parent coordinate system

Math::VectorPair3 get local plane() const

Get reference plane (position and direction) in parent coordinate system

See also get local direction (see [ 1292], page 450) function and get local position (see[ 1294], page 450) function.

const Math::Vector3 & get local position() const

Get element position in parent local coordinate system

const Math::Transform<3> & get local transform() const

Get transform from global to this element local coordinates

Group * get parent() const

Get a pointer to parent element, if any.

Math::VectorPair3 get plane() const

Get reference plane (position and direction) in system global coordinates

See also get direction (see [ 1289], page 450) function and get position (see [ 1299],page 450) function.

Math::VectorPair3 get plane(const Element &e) const

Get reference plane (position and direction) in given element coordinates

See also get direction (see [ 1289], page 450) function and get position (see [ 1299],page 450) function.

Math::Vector3 get position(const Element &e) const

Get element position in given element coordinate system

Math::Vector3 get position() const

Get element position in system global coordinate system

Page 454: Gop Ti Cal

Chapter 4: API documentation 451

System * get system() const

Get a pointer to system

const Math::Transform<3> & get transform() const

Get transform from this element to parent element coordinate system

const Math::Transform<3> & get transform from(const Element&e) const

Get transform from given element to this element coordinate system

const Math::Transform<3> & get transform from(const Element*e) const

Get transform from given element to this element coordinate system. Transform from globalcoordinates is returned if paramter is 0.

const Math::Transform<3> & get transform to(const Element &e)const

Get transform from this element to given element coordinate system

const Math::Transform<3> & get transform to(const Element *e)const

Get transform from this element to given element coordinate system. Transform to globalcoordinates is returned if paramter is 0.

unsigned int get version() const

Get element version. version is updated each time element or its children properties arechanged

unsigned int id() const

Get element identifer in current system

bool is enabled() const

Return true if element must be considered

typedef delegate <void(Element&)> mod delegate t

No documentation available

virtual void print(std:: ostream &o) const

No documentation available

template <Trace::IntensityMode m> voidprocess rays(Trace::Result &result, Trace::rays queue t*input) const

Batch process a list of light rays interacting with element. This function is only used insequential ray trace mode.

Page 455: Gop Ti Cal

Chapter 4: API documentation 452

typedef delegate <void(const Element&)> put delegate t

No documentation available

void rotate(double x, double y, double z)

Rotate element direction. angles are in degrees

void set direction(const Math::Vector3 &v)

Set element direction in system global coordinates

void set enable state(bool enabled)

Set enable state

void set local direction(const Math::Vector3 &v)

Set element direction in parent coordinate system

void set local plane(const Math::VectorPair3 &p)

Set reference plane (position and direction) in parent coordinate system

See also set local direction (see [ 1317], page 452) function and set local position (see[ 1319], page 452) function.

void set local position(const Math::Vector3 &v)

Set element position in parent local coordinate system

void set plane(const Math::VectorPair3 &p)

Set reference plane (position and direction) in system global coordinates

See also set direction (see [ 1315], page 452) function and set position (see [ 1321],page 452) function.

void set position(const Math::Vector3 &v)

Set element position in system global coordinate system

void set transform(const Math::Transform<3> &t)

Set transform to parant coordinate system

void update version()

Increase current element version

Page 456: Gop Ti Cal

Chapter 4: API documentation 453

Sys::Element class full member list

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Element(const Math::VectorPair3 &plane)

• virtual ~Element()

• virtual void draw 2d e(Io::Renderer &r, const Element *ref) const

• virtual void draw 3d e(Io::Renderer &r, const Element *ref) const

• virtual Math::VectorPair3 get bounding box() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• void set local direction(const Math::Vector3 &v)

Page 457: Gop Ti Cal

Chapter 4: API documentation 454

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set transform(const Math::Transform<3> &t)

• void update version()

Page 458: Gop Ti Cal

Chapter 4: API documentation 455

Sys::Source class reference

Declaration

#include <Goptical/Sys/Source>

namespace Goptical {

namespace Sys {

class Source;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This class is the base class for all light sources implementations.

Members

See also the full member list (see [Sys Source class full member list], page 457) section forthis class.

Inherited members

• 40 members inherited from Element (see [Sys Element class reference], page 448)

Type

• typedef [...] targets t

Functions

• Source(const Math::VectorPair3 &position)

• void add spectral line(const Light::SpectralLine &l)

• void clear spectrum()

• template void generate rays(Trace::Result &result, const targets t &entry) const

• double get max intensity() const

• double get min intensity() const

• void set material(const const ref<Material::Base> &m)

• void set spectral line(const Light::SpectralLine &l, int index = [...])

• void single spectral line(const Light::SpectralLine &l)

Members detail

Source(const Math::VectorPair3 &position)

Create a source at given position.

Page 459: Gop Ti Cal

Chapter 4: API documentation 456

void add spectral line(const Light::SpectralLine &l)

Add a new wavelen for ray generation

void clear spectrum()

Clear wavelen list

template <Trace::IntensityMode m> voidgenerate rays(Trace::Result &result, const targets t &entry) const

Generate light rays from source

double get max intensity() const

Get maximal spectral line intensity

double get min intensity() const

Get minimal spectral line intensity

void set material(const const ref <Material::Base> &m)

Set material where light rays are generated. system environment material is used by default.

void set spectral line(const Light::SpectralLine &l, int index = 0)

Set a wavelen in list for ray generation

void single spectral line(const Light::SpectralLine &l)

Clear ray wavelen list and set a single wavelen

typedef std:: vector <const Sys::Element*> targets t

No documentation available

Page 460: Gop Ti Cal

Chapter 4: API documentation 457

Sys::Source class full member list

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

• typedef [...] targets t

Functions

• Source(const Math::VectorPair3 &position)

• void add spectral line(const Light::SpectralLine &l)

• void clear spectrum()

• virtual void draw 2d e(Io::Renderer &r, const Element *ref) const

• virtual void draw 3d e(Io::Renderer &r, const Element *ref) const

• template void generate rays(Trace::Result &result, const targets t &entry) const

• virtual Math::VectorPair3 get bounding box() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• double get max intensity() const

• double get min intensity() const

• Group * get parent() const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

• virtual void print(std::ostream &o) const

Page 461: Gop Ti Cal

Chapter 4: API documentation 458

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set direction(const Math::Vector3 &v)

• void set enable state(bool enabled)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set material(const const ref<Material::Base> &m)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set spectral line(const Light::SpectralLine &l, int index = [...])

• void set transform(const Math::Transform<3> &t)

• void single spectral line(const Light::SpectralLine &l)

• void update version()

Page 462: Gop Ti Cal

Chapter 4: API documentation 459

Sys::Stop class reference

Declaration

#include <Goptical/Sys/Stop>

namespace Goptical {

namespace Sys {

class Stop;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This class implements an aperture stop surface.

This surface will block all rays which fall outside the surface shape and inside the externalradius. (All rays which pass at a distance from the axis greater than the external radiusare not affected.)

Rays which fall inside the surface shape may either be intercepted and reemited orunaffected. Rays are always intercepted in sequential raytrace mode. In non-sequentialmode this can be changed with set intercept reemit (see [ 1339], page 460); default isdisabled.

Members

See also the full member list (see [Sys Stop class full member list], page 461) section forthis class.

Inherited members

• 48 members inherited from Surface (see [Sys Surface class reference], page 463)

Functions

• Stop(const Math::VectorPair3 &p, const const ref<Shape::Base> &shape)

• Stop(const Math::VectorPair3 &p, double radius)

• double get external radius() const

• bool get intercept reemit() const

• void set external radius(double external radius)

• void set intercept reemit(bool intercept reemit)

Members detail

Stop(const Math::VectorPair3 &p, const const ref <Shape::Base>&shape)

Create an aperture stop surface. External radius is set to twice the shape max radius.

Page 463: Gop Ti Cal

Chapter 4: API documentation 460

Stop(const Math::VectorPair3 &p, double radius)

Create a circular aperture stop surface with given radius. External radius is set to twicethe shape max radius.

double get external radius() const

Get stop external radius. .

See also set external radius (see [ 1338], page 460) function and Stop (see[Sys Stop class reference], page 459) class.

bool get intercept reemit() const

Get intercept and reemit enabled. .

See also set intercept reemit (see [ 1339], page 460) function and Stop (see[Sys Stop class reference], page 459) class.

void set external radius(double external radius)

Set stop external radius. .

See also get external radius (see [ 1336], page 460) function and Stop (see[Sys Stop class reference], page 459) class.

void set intercept reemit(bool intercept reemit)

Set intercept and reemit enabled. .

See also get intercept reemit (see [ 1337], page 460) function and Stop (see[Sys Stop class reference], page 459) class.

Page 464: Gop Ti Cal

Chapter 4: API documentation 461

Sys::Stop class full member list

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Stop(const Math::VectorPair3 &p, const const ref<Shape::Base> &shape)

• Stop(const Math::VectorPair3 &p, double radius)

• virtual Math::VectorPair3 get bounding box() const

• virtual Io::Rgb get color(const Io::Renderer &r) const

• const Curve::Base & get curve() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• double get discard intensity() const

• double get external radius() const

• const Math::Transform<3> & get global transform() const

• bool get intercept reemit() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• Group * get parent() const

• void get pattern(const Math::Vector3::put delegate t &f, const Trace::Distribution &d,bool unobstructed = [...]) const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• const Shape::Base & get shape() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• bool is enabled() const

Page 465: Gop Ti Cal

Chapter 4: API documentation 462

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set curve(const const ref<Curve::Base> &c)

• void set direction(const Math::Vector3 &v)

• void set discard intensity(double intensity)

• void set enable state(bool enabled)

• void set external radius(double external radius)

• void set intercept reemit(bool intercept reemit)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set shape(const const ref<Shape::Base> &s)

• void set transform(const Math::Transform<3> &t)

• template void trace ray(Trace::Result &result, Trace::Ray &incident, constMath::VectorPair3 &local, const Math::VectorPair3 &intersect) const

• void update version()

Page 466: Gop Ti Cal

Chapter 4: API documentation 463

Sys::Surface class reference

Declaration

#include <Goptical/Sys/Surface>

namespace Goptical {

namespace Sys {

class Surface;

};

};

This class is a member of the Sys namespace.

Inheritance

Description

This is the base class for surface element. A surface element is defined by its position,surface curve and contour shape.

This class can handle incoming rays and is responsible for finding rays intersection withthe surface.

Depending on ray trace intensity mode, it will potentially adjust light absorption andthen call trace ray simple, trace ray intensity or trace ray polarized. These functions mustbe reimplemented in sub classes, default implementations will throw.

Members

See also the full member list (see [Sys Surface class full member list], page 466) section forthis class.

Inherited members

• 40 members inherited from Element (see [Sys Element class reference], page 448)

Functions

• Surface(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve, constconst ref<Shape::Base> &shape)

• virtual ~Surface()

• virtual Math::VectorPair3 get bounding box() const

• virtual Io::Rgb get color(const Io::Renderer &r) const

• const Curve::Base & get curve() const

• double get discard intensity() const

• void get pattern(const Math::Vector3::put delegate t &f, const Trace::Distribution &d,bool unobstructed = [...]) const

• const Shape::Base & get shape() const

• virtual bool intersect(const Trace::Params &params, Math::VectorPair3 &pt, constMath::VectorPair3 &ray) const

Page 467: Gop Ti Cal

Chapter 4: API documentation 464

• void set curve(const const ref<Curve::Base> &c)

• void set discard intensity(double intensity)

• void set shape(const const ref<Shape::Base> &s)

• template void trace ray(Trace::Result &result, Trace::Ray &incident, constMath::VectorPair3 &local, const Math::VectorPair3 &intersect) const

Members detail

Surface(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve, const const ref <Shape::Base> &shape)

Create a surface element at given location.

virtual ~Surface()

No documentation available

virtual Math::VectorPair3 get bounding box() const

This virtual function overrides the get_bounding_box (see [_1288], page 450) virtualfunction defined in the Element (see [Sys_Element_class_reference], page 448) baseclass.

Documentation inherited from base class:

Get bounding box in local coordinates

virtual Io::Rgb get color(const Io::Renderer &r) const

Get surface apparent color

const Curve::Base & get curve() const

Get surface curve

double get discard intensity() const

Get minimal ray intensity.

void get pattern(const Math::Vector3::put delegate t &f, constTrace::Distribution &d, bool unobstructed = false) const

Get distribution pattern points projected on the surface

const Shape::Base & get shape() const

Get surface shape

virtual bool intersect(const Trace::Params &params,Math::VectorPair3 &pt, const Math::VectorPair3 &ray) const

Get intersection point and normal to surface at intersection. Return false if no intersectionoccured.

void set curve(const const ref <Curve::Base> &c)

Set surface curve

Page 468: Gop Ti Cal

Chapter 4: API documentation 465

void set discard intensity(double intensity)

Set minimal ray intensity. Incident rays with less intensity will be discarded

void set shape(const const ref <Shape::Base> &s)

Set surface shape

template <Trace::IntensityMode m> void trace ray(Trace::Result&result, Trace::Ray &incident, const Math::VectorPair3 &local,const Math::VectorPair3 &intersect) const

Trace a single ray through the surface

Page 469: Gop Ti Cal

Chapter 4: API documentation 466

Sys::Surface class full member list

Types

• typedef [...] mod delegate t

• typedef [...] put delegate t

Functions

• Surface(const Math::VectorPair3 &p, const const ref<Curve::Base> &curve, constconst ref<Shape::Base> &shape)

• virtual ~Surface()

• virtual Math::VectorPair3 get bounding box() const

• virtual Io::Rgb get color(const Io::Renderer &r) const

• const Curve::Base & get curve() const

• Math::Vector3 get direction(const Element &e) const

• Math::Vector3 get direction() const

• double get discard intensity() const

• const Math::Transform<3> & get global transform() const

• Math::Vector3 get local direction() const

• Math::VectorPair3 get local plane() const

• const Math::Vector3 & get local position() const

• const Math::Transform<3> & get local transform() const

• Group * get parent() const

• void get pattern(const Math::Vector3::put delegate t &f, const Trace::Distribution &d,bool unobstructed = [...]) const

• Math::VectorPair3 get plane() const

• Math::VectorPair3 get plane(const Element &e) const

• Math::Vector3 get position(const Element &e) const

• Math::Vector3 get position() const

• const Shape::Base & get shape() const

• System * get system() const

• const Math::Transform<3> & get transform() const

• const Math::Transform<3> & get transform from(const Element &e) const

• const Math::Transform<3> & get transform from(const Element *e) const

• const Math::Transform<3> & get transform to(const Element &e) const

• const Math::Transform<3> & get transform to(const Element *e) const

• unsigned int get version() const

• unsigned int id() const

• virtual bool intersect(const Trace::Params &params, Math::VectorPair3 &pt, constMath::VectorPair3 &ray) const

• bool is enabled() const

Page 470: Gop Ti Cal

Chapter 4: API documentation 467

• virtual void print(std::ostream &o) const

• template void process rays(Trace::Result &result, Trace::rays queue t *input) const

• void rotate(double x, double y, double z)

• void set curve(const const ref<Curve::Base> &c)

• void set direction(const Math::Vector3 &v)

• void set discard intensity(double intensity)

• void set enable state(bool enabled)

• void set local direction(const Math::Vector3 &v)

• void set local plane(const Math::VectorPair3 &p)

• void set local position(const Math::Vector3 &v)

• void set plane(const Math::VectorPair3 &p)

• void set position(const Math::Vector3 &v)

• void set shape(const const ref<Shape::Base> &s)

• void set transform(const Math::Transform<3> &t)

• template void trace ray(Trace::Result &result, Trace::Ray &incident, constMath::VectorPair3 &local, const Math::VectorPair3 &intersect) const

• void update version()

Page 471: Gop Ti Cal

Chapter 4: API documentation 468

Trace namespace reference

Description

Ray tracer and light propagation

Members

Types

• class Distribution

• class Params

• class Result

• class Sequence

• class Tracer

• enum IntensityMode

• enum Pattern

• class Ray

• typedef [...] rays queue t

Function

• std::ostream & operator<<(std::ostream &o, const Sequence &s)

Members detail

enum IntensityMode

Specifies light intensity calculation mode to use by light propagation algorithms.

Identifier DescriptionSimpleTrace No Intensity calculation is performed

IntensityTrace Light intensity computation is performed without taking po-larization into account

PolarizedTrace Light intensity with polarization computation is performed(not supported yet)

Page 472: Gop Ti Cal

Chapter 4: API documentation 469

enum Pattern

Specifies point distribution patterns over a shape delimited surface.

Identifier DescriptionDefaultDist Preferred distribution pattern for a given shape

SagittalDist Sagittal plane distribution (along the X axis, X/Z plane)

MeridionalDist Meridional plane distribution (along the Y axis, Y/Z plane)

TangentialDist Tangential plane distribution, same as MeridionalDist (see[ 1354], page 469)

CrossDist Sagittal and Meridional distribution combined

SquareDist Square pattern distribution

TriangularDist Triangular pattern distribution

HexaPolarDist Hexapolar pattern, suitable for circular shapes

RandomDist Random distribution

See also Distribution (see [Trace Distribution class reference], page 471) class.

std:: ostream & operator<<(std:: ostream &o, const Sequence &s)

No documentation available

Page 473: Gop Ti Cal

Chapter 4: API documentation 470

typedef std:: deque <Ray*> rays queue t

No documentation available

Page 474: Gop Ti Cal

Chapter 4: API documentation 471

Trace::Distribution class reference

Declaration

#include <Goptical/Trace/Distribution>

namespace Goptical {

namespace Trace {

class Distribution;

};

};

This class is a member of the Trace namespace.

Description

This class describes distribution pattern and ray density used for light ray distribution oversurfaces during light propagation.

Ray density is expressed as average number of rays along surface radius.

Members

See also the full member list (see [Trace Distribution class full member list], page 473)section for this class.

Functions

• Distribution(Pattern pattern = [...], unsigned int radial density = [...], double scaling= [...])

• Pattern get pattern() const

• unsigned int get radial density() const

• double get scaling() const

Page 475: Gop Ti Cal

Chapter 4: API documentation 472

• void set pattern(Pattern p)

• void set radial density(unsigned int count)

• void set scaling(double scaling)

• void set uniform pattern()

Members detail

Distribution(Pattern pattern = DefaultDist, unsigned intradial density = 5, double scaling = 0.999)

Creates a distribution pattern with specified pattern, radial ray density and scaling.

The scaling ratio parameter may be used to avoid distributing rays too close to thesurface edge.

Pattern get pattern() const

Get distribution pattern

unsigned int get radial density() const

Get current radial density

double get scaling() const

get current scaling

void set pattern(Pattern p)

Set distribution pattern

void set radial density(unsigned int count)

Set average number of ray to distribute on surface radius

void set scaling(double scaling)

Set scaling, Rays are distributed on surface but are kept away from surface edge if scalingis less than 1.0.

void set uniform pattern()

Ensure uniform 2d pattern suitable for spot diagram and image analysis is selected. Changeto default pattern if not.

Page 476: Gop Ti Cal

Chapter 4: API documentation 473

Trace::Distribution class full member list

Functions

• Distribution(Pattern pattern = [...], unsigned int radial density = [...], double scaling= [...])

• Pattern get pattern() const

• unsigned int get radial density() const

• double get scaling() const

• void set pattern(Pattern p)

• void set radial density(unsigned int count)

• void set scaling(double scaling)

• void set uniform pattern()

Page 477: Gop Ti Cal

Chapter 4: API documentation 474

Trace::Params class reference

Declaration

#include <Goptical/Trace/Params>

namespace Goptical {

namespace Trace {

class Params;

};

};

This class is a member of the Trace namespace.

Description

This class is used to store light progation parameters. This includes sequential / non-sequential mode, light intensity computation mode and propagation mode (raytracing,diffraction, ...).

See also Performing light propagation (see Section 3.1.2 [Performing light propagation],page 8) section.

Members

See also the full member list (see [Trace Params class full member list], page 477) sectionfor this class.

Functions

• Params()

• const Distribution & get default distribution() const

• Distribution & get default distribution()

• const Distribution & get distribution(const Sys::Surface &s) const

• IntensityMode get intensity mode() const

• double get lost ray length() const

• unsigned int get max bounce() const

• bool get unobstructed() const

• bool is sequential() const

• void reset distribution()

• void set default distribution(const Distribution &default distribution)

• void set distribution(const Sys::Surface &s, const Distribution &dist)

• void set intensity mode(IntensityMode intensity mode)

• void set lost ray length(double lost ray length)

• void set max bounce(unsigned int max bounce)

• void set nonsequential mode()

• void set sequential mode(const const ref<Sequence> &seq)

• void set unobstructed(bool unobstructed)

Page 478: Gop Ti Cal

Chapter 4: API documentation 475

Members detail

Params()

No documentation available

const Distribution & get default distribution() const

Get default rays distribution pattern.

See also set default distribution (see [ 1375], page 475) function.

Distribution & get default distribution()

Get default rays distribution pattern.

See also set default distribution (see [ 1375], page 475) function.

const Distribution & get distribution(const Sys::Surface &s) const

Get distribution pattern for a given surface

IntensityMode get intensity mode() const

Get raytracing intensity mode.

See also set intensity mode (see [ 1377], page 476) function.

double get lost ray length() const

Get lost ray length.

See also set lost ray length (see [ 1378], page 476) function.

unsigned int get max bounce() const

Get maximum ray bounce count, default is 50.

See also set max bounce (see [ 1379], page 476) function.

bool get unobstructed() const

Get unobstructed raytracing mode. Surface shapes are ignored, no rays are stopped.

See also set unobstructed (see [ 1382], page 476) function.

bool is sequential() const

Test if in sequential ray tracing mode

void reset distribution()

Reset all surface specific distribution settings to default

void set default distribution(const Distribution&default distribution)

Set default rays distribution pattern.

See also get default distribution (see [ 1366], page 475) function.

Page 479: Gop Ti Cal

Chapter 4: API documentation 476

void set distribution(const Sys::Surface &s, const Distribution&dist)

Set distribution pattern for a given surface

void set intensity mode(IntensityMode intensity mode)

Set raytracing intensity mode.

See also get intensity mode (see [ 1369], page 475) function.

void set lost ray length(double lost ray length)

Set lost ray length.

See also get lost ray length (see [ 1370], page 475) function.

void set max bounce(unsigned int max bounce)

Set maximum ray bounce count, default is 50.

See also get max bounce (see [ 1371], page 475) function.

void set nonsequential mode()

Set non sequential ray tracing mode (default)

void set sequential mode(const const ref <Sequence> &seq)

Set sequential ray tracing mode

void set unobstructed(bool unobstructed)

Set unobstructed raytracing mode. Surface shapes are ignored, no rays are stopped.

See also get unobstructed (see [ 1372], page 475) function.

Page 480: Gop Ti Cal

Chapter 4: API documentation 477

Trace::Params class full member list

Functions

• Params()

• const Distribution & get default distribution() const

• Distribution & get default distribution()

• const Distribution & get distribution(const Sys::Surface &s) const

• IntensityMode get intensity mode() const

• double get lost ray length() const

• unsigned int get max bounce() const

• bool get unobstructed() const

• bool is sequential() const

• void reset distribution()

• void set default distribution(const Distribution &default distribution)

• void set distribution(const Sys::Surface &s, const Distribution &dist)

• void set intensity mode(IntensityMode intensity mode)

• void set lost ray length(double lost ray length)

• void set max bounce(unsigned int max bounce)

• void set nonsequential mode()

• void set sequential mode(const const ref<Sequence> &seq)

• void set unobstructed(bool unobstructed)

Page 481: Gop Ti Cal

Chapter 4: API documentation 478

Trace::Result class reference

Declaration

#include <Goptical/Trace/Result>

namespace Goptical {

namespace Trace {

class Result;

};

};

This class is a member of the Trace namespace.

Description

This class encapsulates rays data propagation result.

It must be properly configured before light propagation as needed by the analysis cur-rently being performed. All requested light propagation informations will be store for furtherprocessing.

All Ray (see [Trace Ray class reference], page 489) object are allocated by this class. Itis able to remember which element intercepted and generated each ray.

Members

See also the full member list (see [Trace Result class full member list], page 482) sectionfor this class.

Type

• typedef [...] sources t

Functions

• Result()

• ~Result()

• void add generated(const Sys::Element &s, Ray &ray)

• void add intercepted(const Sys::Surface &s, Ray &ray)

• void add ray wavelen(double wavelen)

• void clear()

• void clear save states()

• void draw 2d(Io::Renderer &r, bool hit image = [...], const Sys::Element *ref = [...])const

• void draw 3d(Io::Renderer &r, bool hit image = [...], const Sys::Element *ref = [...])const

• const rays queue t & get generated(const Sys::Element &s) const

• bool get generated save state(const Sys::Element &e)

• const rays queue t & get intercepted(const Sys::Surface &s) const

Page 482: Gop Ti Cal

Chapter 4: API documentation 479

• Math::Vector3 get intercepted center(const Sys::Surface &s) const

• Math::Vector3 get intercepted centroid(const Sys::Surface &s) const

• bool get intercepted save state(const Sys::Element &e)

• Math::VectorPair3 get intercepted window(const Sys::Surface &s) const

• double get max ray intensity() const

• const Params & get params() const

• const std::set<double> & get ray wavelen set() const

• const sources t & get source list() const

• Ray & new ray()

• Ray & new ray(const Light::Ray &r)

• void set generated save state(const Sys::Element &e, bool enabled = [...])

• void set intercepted save state(const Sys::Element &e, bool enabled = [...])

Members detail

Result()

Crate a new empty result object

~Result()

No documentation available

void add generated(const Sys::Element &s, Ray &ray)

Declare a new ray generation

void add intercepted(const Sys::Surface &s, Ray &ray)

Declare a new ray interception

void add ray wavelen(double wavelen)

Declare ray wavelen used for tracing

void clear()

Clear all result data

void clear save states()

Set all save states to false

void draw 2d(Io::Renderer &r, bool hit image = false, constSys::Element *ref = 0) const

Draw all tangential rays using specified renderer. Only rays which end up hitting the imageplane are drawn when ‘hit_image’ is set.

void draw 3d(Io::Renderer &r, bool hit image = false, constSys::Element *ref = 0) const

Draw all rays using specified renderer. Only rays which end up hitting the image plane aredrawn when ‘hit_image’ is set.

Page 483: Gop Ti Cal

Chapter 4: API documentation 480

const rays queue t & get generated(const Sys::Element &s) const

Get the list of rays generated by a given element

bool get generated save state(const Sys::Element &e)

Return true if generated rays must be saved for this element

const rays queue t & get intercepted(const Sys::Surface &s) const

Get the list of rays striking a given surface

Math::Vector3 get intercepted center(const Sys::Surface &s) const

Get center of window

Math::Vector3 get intercepted centroid(const Sys::Surface &s)const

Get centroid of all ray intercepted on a surface

bool get intercepted save state(const Sys::Element &e)

Return true if generated rays must be saved for this element

Math::VectorPair3 get intercepted window(const Sys::Surface &s)const

Get window which include all ray intercepted on a surface

double get max ray intensity() const

Get maximum intensity for a single ray FIXME

const Params & get params() const

Get reference to tracer parameters used

const std:: set <double> & get ray wavelen set() const

Get ray wavelen in use set

const sources t & get source list() const

Get list of sources used for ray tracing

Ray & new ray()

Allocate a new Trace::Ray object from result

Ray & new ray(const Light::Ray &r)

Allocate a new Trace::Ray object from result

void set generated save state(const Sys::Element &e, bool enabled= true)

List of rays generated by this element must be saved when tracing rays

Page 484: Gop Ti Cal

Chapter 4: API documentation 481

void set intercepted save state(const Sys::Element &e, boolenabled = true)

List of rays striking this surface must be saved when tracing rays

typedef std:: vector <const Sys::Source*> sources t

No documentation available

Page 485: Gop Ti Cal

Chapter 4: API documentation 482

Trace::Result class full member list

Type

• typedef [...] sources t

Functions

• Result()

• ~Result()

• void add generated(const Sys::Element &s, Ray &ray)

• void add intercepted(const Sys::Surface &s, Ray &ray)

• void add ray wavelen(double wavelen)

• void clear()

• void clear save states()

• void draw 2d(Io::Renderer &r, bool hit image = [...], const Sys::Element *ref = [...])const

• void draw 3d(Io::Renderer &r, bool hit image = [...], const Sys::Element *ref = [...])const

• const rays queue t & get generated(const Sys::Element &s) const

• bool get generated save state(const Sys::Element &e)

• const rays queue t & get intercepted(const Sys::Surface &s) const

• Math::Vector3 get intercepted center(const Sys::Surface &s) const

• Math::Vector3 get intercepted centroid(const Sys::Surface &s) const

• bool get intercepted save state(const Sys::Element &e)

• Math::VectorPair3 get intercepted window(const Sys::Surface &s) const

• double get max ray intensity() const

• const Params & get params() const

• const std::set<double> & get ray wavelen set() const

• const sources t & get source list() const

• Ray & new ray()

• Ray & new ray(const Light::Ray &r)

• void set generated save state(const Sys::Element &e, bool enabled = [...])

• void set intercepted save state(const Sys::Element &e, bool enabled = [...])

Page 486: Gop Ti Cal

Chapter 4: API documentation 483

Trace::Sequence class reference

Declaration

#include <Goptical/Trace/Sequence>

namespace Goptical {

namespace Trace {

class Sequence;

};

};

This class is a member of the Trace namespace.

Inheritance

Description

There are two light propagation modes in common use: sequential and non sequential. Whenusing the sequential mode, light only interacts with sequence elements in given sequenceorder.

This class will hold the user defined ordered list of elements used by sequential light prop-agation algorithm implemented in the Tracer (see [Trace Tracer class reference], page 486)class.

Members

See also the full member list (see [Trace Sequence class full member list], page 485) sectionfor this class.

Functions

• Sequence()

• Sequence(const Sys::System &system)

• void add(const Sys::System &system)

• unsigned int append(const Sys::Element &element)

• void clear()

• const Sys::Element & get element(unsigned int index) const

• void insert(unsigned int index, const Sys::Element &element)

• void remove(unsigned int index)

Members detail

Sequence()

Create a new empty sequence

Sequence(const Sys::System &system)

Create a new sequence and insert all elements present in the system. This is equivalent tocalling add() on empty sequence.

Page 487: Gop Ti Cal

Chapter 4: API documentation 484

void add(const Sys::System &system)

Add all elements from the given system. Element are sorted in axis order starting from left;reflecting elements do reverse direction.

unsigned int append(const Sys::Element &element)

Insert an element at end of sequence.

The return value is position of the element in the sequence

void clear()

Remove all elements from sequence

const Sys::Element & get element(unsigned int index) const

Get a reference to an element in sequence

void insert(unsigned int index, const Sys::Element &element)

Insert an element in sequence at given position

void remove(unsigned int index)

Remove an element from sequence

Page 488: Gop Ti Cal

Chapter 4: API documentation 485

Trace::Sequence class full member list

Functions

• Sequence()

• Sequence(const Sys::System &system)

• void add(const Sys::System &system)

• unsigned int append(const Sys::Element &element)

• void clear()

• const Sys::Element & get element(unsigned int index) const

• void insert(unsigned int index, const Sys::Element &element)

• void remove(unsigned int index)

Page 489: Gop Ti Cal

Chapter 4: API documentation 486

Trace::Tracer class reference

Declaration

#include <Goptical/Trace/Tracer>

namespace Goptical {

namespace Trace {

class Tracer;

};

};

This class is a member of the Trace namespace.

Description

This class handle light propagation in an optical system.

Propagation result is stored in a Result (see [Trace Result class reference], page 478)object. Propagation parameters are stored in a Params (see [Trace Params class reference],page 474) object.

See also Performing light propagation (see Section 3.1.2 [Performing light propagation],page 8) section.

Members

See also the full member list (see [Trace Tracer class full member list], page 488) sectionfor this class.

Functions

• Tracer(const const ref<Sys::System> &system)

• ~Tracer()

• const Params & get params() const

• Params & get params()

• const Sys::System & get system() const

• Result & get trace result() const

• Result & set default trace result()

• void set params(const Params &params)

• void set trace result(Result &res)

• void trace()

Members detail

Tracer(const const ref <Sys::System> &system)

Create a new Light porpagator object

~Tracer()

No documentation available

Page 490: Gop Ti Cal

Chapter 4: API documentation 487

const Params & get params() const

get tracer parameters

Params & get params()

get tracer parameters

const Sys::System & get system() const

Get attached system

Result & get trace result() const

No documentation available

Result & set default trace result()

Undefine user defined Result object. Next ray trace operation will allocate a new internaltrace result object

void set params(const Params &params)

replace all tracer parameters

void set trace result(Result &res)

Set the Result object which must be used to store ray tracing data. a new Result objectwill be allocated on first ray trace operation if none were defined.

void trace()

Launch ray tracing operation

Page 491: Gop Ti Cal

Chapter 4: API documentation 488

Trace::Tracer class full member list

Functions

• Tracer(const const ref<Sys::System> &system)

• ~Tracer()

• const Params & get params() const

• Params & get params()

• const Sys::System & get system() const

• Result & get trace result() const

• Result & set default trace result()

• void set params(const Params &params)

• void set trace result(Result &res)

• void trace()

Page 492: Gop Ti Cal

Chapter 4: API documentation 489

Trace::Ray class reference

Declaration

#include <Goptical/Trace/Ray>

namespace Goptical {

namespace Trace {

class Ray;

};

};

This class is a member of the Trace namespace.

Inheritance

Description

This class is used to describe a Light::Ray (see [Light Ray class reference], page 214) withall tracing and propagation informations attached.

Members

See also the full member list (see [Trace Ray class full member list], page 492) section forthis class.

Inherited members

• 36 members inherited from Light::Ray (see [Light Ray class reference], page 214)

Functions

• Ray()

• Ray(const Light::Ray &r)

• void add generated(Ray *r)

• const Sys::Element * get creator() const

• Math::Vector3 get direction() const

• Math::Vector3 get direction(const Sys::Element &e) const

• Ray * get first child() const

• Sys::Element & get intercept element() const

• double get intercept intensity() const

• const Math::Vector3 & get intercept point() const

• double get len() const

• const Material::Base * get material() const

• Ray * get next child() const

• Ray * get parent() const

• Math::Vector3 get position() const

• Math::Vector3 get position(const Sys::Element &e) const

Page 493: Gop Ti Cal

Chapter 4: API documentation 490

• bool is lost() const

• void set creator(const Sys::Element *creator)

• void set intercept(const Sys::Element &e, const Math::Vector3 &point)

• void set intercept intensity(double intercept intensity)

• void set len(double len)

• void set material(const Material::Base *material)

Members detail

Ray()

This constructor shadows the Ray (see [_489], page 214) constructor defined in the Ray(see [Light_Ray_class_reference], page 214) base class.

Create a propagated light ray

Ray(const Light::Ray &r)

Create a propagated light ray

void add generated(Ray *r)

Define a new child generated ray

const Sys::Element * get creator() const

Get element which generated this ray..

See also set creator (see [ 1443], page 491) function.

Math::Vector3 get direction() const

Get global direction

Math::Vector3 get direction(const Sys::Element &e) const

Get direction relative to given element

Ray * get first child() const

Get first ray generated from this one

Sys::Element & get intercept element() const

Get light ray interception element

double get intercept intensity() const

Get ray intensity at interception point..

See also set intercept intensity (see [ 1445], page 491) function.

const Math::Vector3 & get intercept point() const

Get light ray interception point

Page 494: Gop Ti Cal

Chapter 4: API documentation 491

double get len() const

Get light ray length..

See also set len (see [ 1446], page 491) function.

const Material::Base * get material() const

Get material ray is propagated in..

See also set material (see [ 1447], page 491) function.

Ray * get next child() const

Get next sibling ray generated by same parent

Ray * get parent() const

Get ray which generated this one

Math::Vector3 get position() const

Get global position

Math::Vector3 get position(const Sys::Element &e) const

Get position relative to given element

bool is lost() const

Return true if ray is not intercepted

void set creator(const Sys::Element *creator)

Set element which generated this ray..

See also get creator (see [ 1429], page 490) function.

void set intercept(const Sys::Element &e, const Math::Vector3&point)

Set light ray interception point and element

void set intercept intensity(double intercept intensity)

Set ray intensity at interception point..

See also get intercept intensity (see [ 1434], page 490) function.

void set len(double len)

Set light ray length..

See also get len (see [ 1436], page 491) function.

void set material(const Material::Base *material)

Set material ray is propagated in..

See also get material (see [ 1437], page 491) function.

Page 495: Gop Ti Cal

Chapter 4: API documentation 492

Trace::Ray class full member list

Functions

• Ray()

• Ray(const Light::Ray &r)

• void add generated(Ray *r)

• Math::Vector<N> & direction()

• const Math::Vector<N> & direction() const

• const Sys::Element * get creator() const

• Math::Vector3 get direction() const

• Math::Vector3 get direction(const Sys::Element &e) const

• Ray * get first child() const

• double get intensity() const

• Sys::Element & get intercept element() const

• double get intercept intensity() const

• const Math::Vector3 & get intercept point() const

• double get len() const

• const Material::Base * get material() const

• Ray * get next child() const

• Ray * get parent() const

• Math::Vector3 get position() const

• Math::Vector3 get position(const Sys::Element &e) const

• double get wavelen() const

• bool is lost() const

• Math::Vector<3> ln ln clst pt(const Math::VectorPair<3> &line) const

• double ln ln clst pt scale(const Math::VectorPair<3> &line) const

• Math::Vector<N> ln pt clst pt(const Math::Vector<N> &point) const

• double ln pt clst pt scale(const Math::Vector<N> &point) const

• Math::Vector<N> & normal()

• const Math::Vector<N> & normal() const

• Math::VectorPairBase<3> operator*(double factor)

• const Math::VectorPairBase<3> & operator+=(const Math::VectorPairBase<3> &p)

• const Math::Vector<N> & operator[](int n) const

• Math::Vector<N> & operator[](int n)

• Math::Vector<N> & origin()

• const Math::Vector<N> & origin() const

• Math::Vector<3> pl ln intersect(const Math::VectorPair<3> &line) const

• double pl ln intersect scale(const Math::VectorPair<3> &line) const

• Math::Vector<N> seg pt clst pt(const Math::Vector<N> &point) const

Page 496: Gop Ti Cal

Chapter 4: API documentation 493

• double seg pt clst pt scale(const Math::Vector<N> &point) const

• void set creator(const Sys::Element *creator)

• void set intensity(double intensity)

• void set intercept(const Sys::Element &e, const Math::Vector3 &point)

• void set intercept intensity(double intercept intensity)

• void set len(double len)

• void set material(const Material::Base *material)

• void set wavelen(double wavelen)

• double x0() const

• double & x0()

• double x1() const

• double & x1()

• double y0() const

• double & y0()

• double y1() const

• double & y1()

• double z0() const

• double & z0()

• double z1() const

• double & z1()

Page 497: Gop Ti Cal

Chapter 5: GNU Free Documentation License 494

5 GNU Free Documentation License

Version 1.3, 3 November 2008

Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.http://fsf.org/

Everyone is permitted to copy and distribute verbatim copies of this license document,but changing it is not allowed.

0 PREAMBLE

The purpose of this License is to make a manual, textbook, or other functional and usefuldocument free in the sense of freedom: to assure everyone the effective freedom to copyand redistribute it, with or without modifying it, either commercially or noncommercially.Secondarily, this License preserves for the author and publisher a way to get credit for theirwork, while not being considered responsible for modifications made by others.

This License is a kind of "copyleft", which means that derivative works of the documentmust themselves be free in the same sense. It complements the GNU General Public License,which is a copyleft license designed for free software.

We have designed this License in order to use it for manuals for free software, because freesoftware needs free documentation: a free program should come with manuals providing thesame freedoms that the software does. But this License is not limited to software manuals;it can be used for any textual work, regardless of subject matter or whether it is publishedas a printed book. We recommend this License principally for works whose purpose isinstruction or reference.

1 APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that contains a noticeplaced by the copyright holder saying it can be distributed under the terms of this License.Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use thatwork under the conditions stated herein. The "Document", below, refers to any such manualor work. Any member of the public is a licensee, and is addressed as "you". You acceptthe license if you copy, modify or distribute the work in a way requiring permission undercopyright law.

A "Modified Version" of the Document means any work containing the Document or aportion of it, either copied verbatim, or with modifications and/or translated into anotherlanguage.

A "Secondary Section" is a named appendix or a front-matter section of the Documentthat deals exclusively with the relationship of the publishers or authors of the Documentto the Document’s overall subject (or to related matters) and contains nothing that couldfall directly within that overall subject. (Thus, if the Document is in part a textbook ofmathematics, a Secondary Section may not explain any mathematics.) The relationshipcould be a matter of historical connection with the subject or with related matters, or oflegal, commercial, philosophical, ethical or political position regarding them.

The "Invariant Sections" are certain Secondary Sections whose titles are designated, asbeing those of Invariant Sections, in the notice that says that the Document is released

Page 498: Gop Ti Cal

Chapter 5: GNU Free Documentation License 495

under this License. If a section does not fit the above definition of Secondary then it is notallowed to be designated as Invariant. The Document may contain zero Invariant Sections.If the Document does not identify any Invariant Sections then there are none.

The "Cover Texts" are certain short passages of text that are listed, as Front-CoverTexts or Back-Cover Texts, in the notice that says that the Document is released under thisLicense. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be atmost 25 words.

A "Transparent" copy of the Document means a machine-readable copy, represented ina format whose specification is available to the general public, that is suitable for revisingthe document straightforwardly with generic text editors or (for images composed of pixels)generic paint programs or (for drawings) some widely available drawing editor, and that issuitable for input to text formatters or for automatic translation to a variety of formatssuitable for input to text formatters. A copy made in an otherwise Transparent file formatwhose markup, or absence of markup, has been arranged to thwart or discourage subsequentmodification by readers is not Transparent. An image format is not Transparent if used forany substantial amount of text. A copy that is not "Transparent" is called "Opaque".

Examples of suitable formats for Transparent copies include plain ascii without markup,Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML , PostScript or PDF designed for human modi-fication. Examples of transparent image formats include PNG , XCF and JPG . Opaqueformats include proprietary formats that can be read and edited only by proprietary wordprocessors, SGML or XML for which the DTD and/or processing tools are not generallyavailable, and the machine-generated HTML , PostScript or PDF produced by some wordprocessors for output purposes only.

The "Title Page" means, for a printed book, the title page itself, plus such followingpages as are needed to hold, legibly, the material this License requires to appear in the titlepage. For works in formats which do not have any title page as such, "Title Page" meansthe text near the most prominent appearance of the work’s title, preceding the beginningof the body of the text.

The "publisher" means any person or entity that distributes copies of the Document tothe public.

A section "Entitled XYZ" means a named subunit of the Document whose title eitheris precisely XYZ or contains XYZ in parentheses following text that translates XYZ inanother language. (Here XYZ stands for a specific section name mentioned below, suchas "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve theTitle" of such a section when you modify the Document means that it remains a section"Entitled XYZ" according to this definition.

The Document may include Warranty Disclaimers next to the notice which states thatthis License applies to the Document. These Warranty Disclaimers are considered to beincluded by reference in this License, but only as regards disclaiming warranties: any otherimplication that these Warranty Disclaimers may have is void and has no effect on themeaning of this License.

Page 499: Gop Ti Cal

Chapter 5: GNU Free Documentation License 496

2 VERBATIM COPYING

You may copy and distribute the Document in any medium, either commercially or noncom-mercially, provided that this License, the copyright notices, and the license notice sayingthis License applies to the Document are reproduced in all copies, and that you add noother conditions whatsoever to those of this License. You may not use technical measuresto obstruct or control the reading or further copying of the copies you make or distribute.However, you may accept compensation in exchange for copies. If you distribute a largeenough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may publiclydisplay copies.

3 COPYING IN QUANTITY

If you publish printed copies (or copies in media that commonly have printed covers) of theDocument, numbering more than 100, and the Document’s license notice requires CoverTexts, you must enclose the copies in covers that carry, clearly and legibly, all these CoverTexts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Bothcovers must also clearly and legibly identify you as the publisher of these copies. The frontcover must present the full title with all words of the title equally prominent and visible.You may add other material on the covers in addition. Copying with changes limited to thecovers, as long as they preserve the title of the Document and satisfy these conditions, canbe treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you should putthe first ones listed (as many as fit reasonably) on the actual cover, and continue the restonto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more than 100,you must either include a machine-readable Transparent copy along with each Opaque copy,or state in or with each Opaque copy a computer-network location from which the generalnetwork-using public has access to download using public-standard network protocols acomplete Transparent copy of the Document, free of added material. If you use the latteroption, you must take reasonably prudent steps, when you begin distribution of Opaquecopies in quantity, to ensure that this Transparent copy will remain thus accessible at thestated location until at least one year after the last time you distribute an Opaque copy(directly or through your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of the Document wellbefore redistributing any large number of copies, to give them a chance to provide you withan updated version of the Document.

4 MODIFICATIONS

You may copy and distribute a Modified Version of the Document under the conditionsof sections 2 and 3 above, provided that you release the Modified Version under preciselythis License, with the Modified Version filling the role of the Document, thus licensingdistribution and modification of the Modified Version to whoever possesses a copy of it. Inaddition, you must do these things in the Modified Version:

Page 500: Gop Ti Cal

Chapter 5: GNU Free Documentation License 497

• Use in the Title Page (and on the covers, if any) a title distinct from that of theDocument, and from those of previous versions (which should, if there were any, belisted in the History section of the Document). You may use the same title as a previousversion if the original publisher of that version gives permission.

• List on the Title Page, as authors, one or more persons or entities responsible forauthorship of the modifications in the Modified Version, together with at least five ofthe principal authors of the Document (all of its principal authors, if it has fewer thanfive), unless they release you from this requirement.

• State on the Title page the name of the publisher of the Modified Version, as thepublisher.

• Preserve all the copyright notices of the Document.

• Add an appropriate copyright notice for your modifications adjacent to the other copy-right notices.

• Include, immediately after the copyright notices, a license notice giving the publicpermission to use the Modified Version under the terms of this License, in the formshown in the Addendum below.

• Preserve in that license notice the full lists of Invariant Sections and required CoverTexts given in the Document’s license notice.

• Include an unaltered copy of this License.

• Preserve the section Entitled "History", Preserve its Title, and add to it an item statingat least the title, year, new authors, and publisher of the Modified Version as givenon the Title Page. If there is no section Entitled "History" in the Document, createone stating the title, year, authors, and publisher of the Document as given on itsTitle Page, then add an item describing the Modified Version as stated in the previoussentence.

• Preserve the network location, if any, given in the Document for public access to aTransparent copy of the Document, and likewise the network locations given in theDocument for previous versions it was based on. These may be placed in the "History"section. You may omit a network location for a work that was published at least fouryears before the Document itself, or if the original publisher of the version it refers togives permission.

• For any section Entitled "Acknowledgements" or "Dedications", Preserve the Titleof the section, and preserve in the section all the substance and tone of each of thecontributor acknowledgements and/or dedications given therein.

• Preserve all the Invariant Sections of the Document, unaltered in their text and in theirtitles. Section numbers or the equivalent are not considered part of the section titles.

• Delete any section Entitled "Endorsements". Such a section may not be included inthe Modified Version.

• Do not retitle any existing section to be Entitled "Endorsements" or to conflict in titlewith any Invariant Section.

• Preserve any Warranty Disclaimers.

If the Modified Version includes new front-matter sections or appendices that qualify asSecondary Sections and contain no material copied from the Document, you may at your

Page 501: Gop Ti Cal

Chapter 5: GNU Free Documentation License 498

option designate some or all of these sections as invariant. To do this, add their titles tothe list of Invariant Sections in the Modified Version’s license notice. These titles must bedistinct from any other section titles.

You may add a section Entitled "Endorsements", provided it contains nothing but en-dorsements of your Modified Version by various parties—for example, statements of peerreview or that the text has been approved by an organization as the authoritative definitionof a standard.

You may add a passage of up to five words as a Front-Cover Text, and a passage of upto 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the ModifiedVersion. Only one passage of Front-Cover Text and one of Back-Cover Text may be addedby (or through arrangements made by) any one entity. If the Document already includesa cover text for the same cover, previously added by you or by arrangement made by thesame entity you are acting on behalf of, you may not add another; but you may replace theold one, on explicit permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License give permissionto use their names for publicity for or to assert or imply endorsement of any ModifiedVersion.

5 COMBINING DOCUMENTS

You may combine the Document with other documents released under this License, underthe terms defined in section 4 above for modified versions, provided that you include in thecombination all of the Invariant Sections of all of the original documents, unmodified, andlist them all as Invariant Sections of your combined work in its license notice, and that youpreserve all their Warranty Disclaimers.

The combined work need only contain one copy of this License, and multiple identicalInvariant Sections may be replaced with a single copy. If there are multiple InvariantSections with the same name but different contents, make the title of each such sectionunique by adding at the end of it, in parentheses, the name of the original author orpublisher of that section if known, or else a unique number. Make the same adjustment tothe section titles in the list of Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections Entitled "History" in the variousoriginal documents, forming one section Entitled "History"; likewise combine any sectionsEntitled "Acknowledgements", and any sections Entitled "Dedications". You must deleteall sections Entitled "Endorsements."

6 COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other documents released underthis License, and replace the individual copies of this License in the various documents witha single copy that is included in the collection, provided that you follow the rules of thisLicense for verbatim copying of each of the documents in all other respects.

You may extract a single document from such a collection, and distribute it individuallyunder this License, provided you insert a copy of this License into the extracted document,and follow this License in all other respects regarding verbatim copying of that document.

Page 502: Gop Ti Cal

Chapter 5: GNU Free Documentation License 499

7 AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate and independentdocuments or works, in or on a volume of a storage or distribution medium, is called an"aggregate" if the copyright resulting from the compilation is not used to limit the legalrights of the compilation’s users beyond what the individual works permit. When theDocument is included in an aggregate, this License does not apply to the other works inthe aggregate which are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these copies of the Document,then if the Document is less than one half of the entire aggregate, the Document’s CoverTexts may be placed on covers that bracket the Document within the aggregate, or theelectronic equivalent of covers if the Document is in electronic form. Otherwise they mustappear on printed covers that bracket the whole aggregate.

8 TRANSLATION

Translation is considered a kind of modification, so you may distribute translations of theDocument under the terms of section 4. Replacing Invariant Sections with translationsrequires special permission from their copyright holders, but you may include translationsof some or all Invariant Sections in addition to the original versions of these InvariantSections. You may include a translation of this License, and all the license notices inthe Document, and any Warranty Disclaimers, provided that you also include the originalEnglish version of this License and the original versions of those notices and disclaimers. Incase of a disagreement between the translation and the original version of this License or anotice or disclaimer, the original version will prevail.

If a section in the Document is Entitled "Acknowledgements", "Dedications", or "His-tory", the requirement (section 4) to Preserve its Title (section 1) will typically requirechanging the actual title.

9 TERMINATION

You may not copy, modify, sublicense, or distribute the Document except as expressly pro-vided under this License. Any attempt otherwise to copy, modify, sublicense, or distributeit is void, and will automatically terminate your rights under this License.

However, if you cease all violation of this License, then your license from a particularcopyright holder is reinstated (a) provisionally, unless and until the copyright holder explic-itly and finally terminates your license, and (b) permanently, if the copyright holder fails tonotify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently ifthe copyright holder notifies you of the violation by some reasonable means, this is the firsttime you have received notice of violation of this License (for any work) from that copyrightholder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of partieswho have received copies or rights from you under this License. If your rights have beenterminated and not permanently reinstated, receipt of a copy of some or all of the samematerial does not give you any rights to use it.

Page 503: Gop Ti Cal

Chapter 5: GNU Free Documentation License 500

10 FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions of the GNU Free Doc-umentation License from time to time. Such new versions will be similar in spirit tothe present version, but may differ in detail to address new problems or concerns. Seehttp://www.gnu.org/copyleft/ .

Each version of the License is given a distinguishing version number. If the Documentspecifies that a particular numbered version of this License "or any later version" appliesto it, you have the option of following the terms and conditions either of that specifiedversion or of any later version that has been published (not as a draft) by the Free SoftwareFoundation. If the Document does not specify a version number of this License, you maychoose any version ever published (not as a draft) by the Free Software Foundation. If theDocument specifies that a proxy can decide which future versions of this License can beused, that proxy’s public statement of acceptance of a version permanently authorizes youto choose that version for the Document.

11 RELICENSING

"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Webserver that publishes copyrightable works and also provides prominent facilities for anybodyto edit those works. A public wiki that anybody can edit is an example of such a server. A"Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set ofcopyrightable works thus published on the MMC site.

"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license pub-lished by Creative Commons Corporation, a not-for-profit corporation with a principalplace of business in San Francisco, California, as well as future copyleft versions of thatlicense published by that same organization.

"Incorporate" means to publish or republish a Document, in whole or in part, as partof another Document.

An MMC is "eligible for relicensing" if it is licensed under this License, and if all worksthat were first published under this License somewhere other than this MMC, and subse-quently incorporated in whole or in part into the MMC, (1) had no cover texts or invariantsections, and (2) were thus incorporated prior to November 1, 2008.

The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligiblefor relicensing.

ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of the License in thedocument and put the following copyright and license notices just after the title page:

Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/ormodify this document under the terms of the GNU Free Documentation License, Version 1.3or any later version published by the Free Software Foundation; with no Invariant Sections,no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in thesection entitled "GNU Free Documentation License".

Page 504: Gop Ti Cal

Chapter 5: GNU Free Documentation License 501

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the"with...Texts." line with this:

with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Textsbeing LIST, and with the Back-Cover Texts being LIST.

If you have Invariant Sections without Cover Texts, or some other combination of thethree, merge those two alternatives to suit the situation.

If your document contains nontrivial examples of program code, we recommend releasingthese examples in parallel under your choice of free software license, such as the GNUGeneral Public License, to permit their use in free software.