-
Notifications
You must be signed in to change notification settings - Fork 32
VTK
in progress
VTK is open-source 3D rendering code authored by KitWare (link)
dev most active on c++ (link) - can be useful to see what is available
we use javascript (link) which is typically behind the c++
we update on major version releases (x of x.y.z) (or soon thereafter) because they release several per day
class wrappers for ease of use
sirepo-vtk-plotting.js
(generated jsdoc)
(generated jsdoc)
A convenient object bundling a source, actor, and mapper, which almost always appear together anyway
Name | Type | Description |
---|---|---|
source |
* | a vtk source, reader, etc. |
transform |
SIREPO.GEOMETRY.Transform | a Transform to translate between "lab" and "local" coordinate systems |
actorProperties |
Object | a map of actor properties (e.g. 'color') to values |
Source:
the transform
- vtk.Rendering.Core.vtkActor
Source:
properties of the actor
- vtk.Rendering.Core.Property
Source:
a mapper
- vtk.Rendering.Core.vtkMapper
Source:
the transform
- SIREPO.GEOMETRY.Transform
Source:
actorBoundingBox(padPct) → {BoxBundle}
Builds a wireframe box around this actor, with optional padding
Name | Type | Default | Description |
---|---|---|---|
padPct |
number | 0 | additional padding as a percentage of the size |
Source:
Type
BoxBundle
Gets the value of the actor property with the given name
Name | Type | Description |
---|---|---|
name |
string | the name of the property |
Source:
Type
*
Sets the actor property with the given name to the given value
Name | Type | Description |
---|---|---|
name |
string | the name of the property |
value |
* | the value to set |
Source:
Convenience method for setting the color. Uses colorToFloat to convert
Name | Type | Description |
---|---|---|
color |
string | Array.<number> |
Source:
Sets the mapper for this bundle as well as the actor
Name | Type | Description |
---|---|---|
mapper |
vtk.Rendering.Core.vtkMapper |
Source:
Sets the source for this bundle. Also sets the mapper's input connection to the source's output
Name | Type | Description |
---|---|---|
source |
* | vtk source |
Source:
Documentation generated by JSDoc 3.6.10 on Wed Jul 13 2022 15:19:06 GMT+0000 (GMT)
A bundle for a cube source
Name | Type | Description |
---|---|---|
labSize |
Array.<number> | array of the x, y, z sides of the box in the lab |
labCenter |
Array.<number> | array of the x, y, z coords of the box's center in the lab |
transform |
SIREPO.GEOMETRY.Transform | a Transform to translate between "lab" and "local" coordinate systems |
actorProperties |
Object | a map of actor properties (e.g. 'color') to values |
Source:
Sets the center of the box
Name | Type | Description |
---|---|---|
labCenter |
Array.<number> | array of the x, y, z coords of the box's center in the lab |
Source:
Sets the size of the box
Name | Type | Description |
---|---|---|
labSize- |
Array.<number> | array of the x, y, z lengths of the box |
Source:
Documentation generated by JSDoc 3.6.10 on Wed Jul 13 2022 15:19:06 GMT+0000 (GMT)
Provides a mapping from "lab" coordinates to vtk's coordinates via a SIREPO.GEOMETRY.Transform. Also wraps the creation of various Bundles so the transform gets applied automatically
Name | Type | Description |
---|---|---|
transform |
SIREPO.GEOMETRY.Transform | a Transform to translate between "lab" and "local" coordinate systems |
Source:
Creates a Bundle from an arbitrary source
Name | Type | Description |
---|---|---|
source |
* | a vtk source, reader, etc. |
transform |
SIREPO.GEOMETRY.Transform | a Transform to translate between "lab" and "local" coordinate systems |
actorProperties |
Object | a map of actor properties (e.g. 'color') to values |
Source:
buildBox(labSize, labCenter, actorProperties) → {BoxBundle}
Builds a box
Name | Type | Description |
---|---|---|
labSize |
Array.<number> | array of the x, y, z sides of the box in the lab |
labCenter |
Array.<number> | array of the x, y, z coords of the box's center in the lab |
actorProperties |
Object | a map of actor properties (e.g. 'color') to values |
Source:
Type
BoxBundle
buildLine(labP1, labP2, actorProperties) → {LineBundle}
Builds a line
Name | Type | Description |
---|---|---|
labP1 |
Array.<number> | 1st point |
labP2 |
Array.<number> | 2nd point |
actorProperties |
Object | a map of actor properties (e.g. 'color') to values |
Source:
Type
LineBundle
buildPlane(labOrigin, labP1, labP2, actorProperties) → {LineBundle}
Builds a plane
Name | Type | Description |
---|---|---|
labOrigin |
Array.<number> | origin |
labP1 |
Array.<number> | 1st point |
labP2 |
Array.<number> | 2nd point |
actorProperties |
Object | a map of actor properties (e.g. 'color') to values |
Source:
Type
LineBundle
buildSphere(labCenter, radius, actorProperties) → {SphereBundle}
Builds a sphere
Name | Type | Description |
---|---|---|
labCenter |
Array.<number> | center in the lab |
radius |
number | |
actorProperties |
Object | a map of actor properties (e.g. 'color') to values |
Source:
Type
SphereBundle
Documentation generated by JSDoc 3.6.10 on Wed Jul 13 2022 15:19:06 GMT+0000 (GMT)
Also see sirepo-geometry.js
License: http://www.apache.org/licenses/LICENSE-2.0.html
Copyright ©️ 2015–2020 RadiaSoft LLC. All Rights Reserved.
- Activait
- Controls
- elegant
- FLASH
- Genesis
- JSPEC
- JupyterHub
- MAD-X
- OPAL
- Radia
- Shadow
- Synchrotron Radiation Workshop (SRW)
- Warp PBA
- Warp VND
- Zgoubi
- Authentication and Account Creation
- How Your Sirepo Workspace Works
- Navigating the Sirepo Simulations Interface
- How to upload a lattice file
- How to share a Sirepo simulation via URL
- How Example simulations work
- How to report a bug in Sirepo
- Using lattice files in Sirepo
- Resetting an Example Simulation to default
- Backup SRW Sirepo simulations
- SRW Aperture
- SRW Brilliance Report
- SRW Circular Cylinder Mirror
- SRW CRL
- SRW Crystal
- SRW Electron Beam
- SRW Elliptical Cylinder Mirror
- SRW Fiber
- SRW Flux
- SRW Fully Coherent Gaussian Beam
- SRW Import Python or JSON Simulation File
- SRW Initial Wavefront Simulation Grid
- SRW Intensity Report
- SRW Planar Mirror
- SRW Power Density Report
- SRW Propagation Parameters
- SRW Single Electron Spectrum Report
- SRW Spherical Mirror
- SRW Toroid Mirror
- SRW Watchpoint
- SRW Additional Documentation