|
Virtual Testbed
Ship dynamics simulator for extreme conditions
|
Guile bindings. More...
Classes | |
| class | Aspect |
| Aspect that extends Guile-unaware classes and provides a pointer to the corresponding wrapper object. More... | |
| struct | c_deleter |
| class | Grid_wrapper |
| class | Traits |
| class | Traits< std::any > |
| class | Traits< std::unique_ptr< T > > |
| struct | Uniform_vector_traits |
| struct | Uniform_vector_traits< double > |
| struct | Uniform_vector_traits< float > |
| struct | Uniform_vector_traits< int > |
| class | Wrapper |
| Foreign object wrapper. More... | |
| class | Wrapper< std::any > |
| class | Wrapper< std::unique_ptr< T > > |
Typedefs | |
| template<class T > | |
| using | c_string = std::unique_ptr< T, c_deleter > |
| using | main_function_type = void(*)(int, char **) |
Functions | |
| SCM | get_testbed () |
| Get the current instance of virtual testbed. More... | |
| SCM | set_testbed (SCM other) |
Replace the current instance of virtual testbed with other. More... | |
| SCM | testbed_gui_start_recording () |
| Start screen recording. More... | |
| SCM | testbed_gui_stop_recording () |
| Stop screen recording. More... | |
| SCM | testbed_gui_start () |
| Start real-time simulation. More... | |
| SCM | testbed_gui_pause () |
| Pause real-time simulation (and screen recording). More... | |
| SCM | testbed_gui_stop () |
| Stop real-time simulation (and screen recording). More... | |
| SCM | import_asset (SCM rest) |
Import an asset from file using options. Options are specified as rest argument. File path is specified as input-path option. More... | |
| SCM | export_asset (SCM s_asset, SCM rest) |
Export asset asset to file using options. Options are specified as rest argument. File path is specified as output-path option. More... | |
| SCM | convert_asset (SCM s_asset, SCM rest) |
Convert asset asset using options. Options are specified as rest argument. Output format is specified as output-format option. More... | |
| SCM | import_polyhedron (SCM path, SCM rest) |
Import polyhedron from file path using options. Options are specified as rest argument. More... | |
| SCM | export_polyhedron (SCM polyhedron, SCM path, SCM rest) |
Export polyhedron polyhedron to file path using options. Options are specified as rest argument. More... | |
| SCM | import_hull (SCM path, SCM rest) |
Import ship hull from file path using options. Options are specified as rest argument. More... | |
| SCM | import_compartments (SCM path, SCM rest) |
Import ship compartments from file path using options. Options are specified as rest argument. More... | |
| void | assets_define () |
| template<class Pointer > | |
| void | define_procedure (const char *name, int req, int opt, int rest, Pointer ptr, const char *documentation=nullptr) |
| void | throw_error (const char *message) |
| bool | symbol_equal (SCM a, SCM b) |
| SCM | vtestbed_gc () |
| Run garbage collection and all object destructors. More... | |
| template<class T > | |
| T * | allocate (const char *name) |
| template<class T > | |
| T * | allocate_pointerless (const char *name) |
| template<class T , class ... Args> | |
| T * | construct_pointerless (const char *name, Args ... args) |
| bool | is_bound (SCM s) |
| int | length (SCM s) |
| bool | is_list (SCM s) |
| template<int N> | |
| SCM | to_scm (const blitz::TinyVector< float, N > &x) |
| template<int N> | |
| SCM | to_scm (const blitz::TinyVector< double, N > &x) |
| template<class T , int N> | |
| blitz::TinyVector< T, N > | to_vector (SCM x) |
| c_string< char > | to_c_string (SCM s) |
| std::string | to_string (SCM s) |
| SCM | to_scm (int32_t x) |
| SCM | to_scm (uint32_t x) |
| SCM | to_scm (int64_t x) |
| SCM | to_scm (uint64_t x) |
| SCM | to_scm (float x) |
| SCM | to_scm (double x) |
| SCM | to_scm (const char *x) |
| SCM | to_scm (const std::string &x) |
| template<class T > | |
| T | from_scm (SCM x) |
| template<> | |
| bool | from_scm< bool > (SCM x) |
| template<> | |
| int | from_scm< int > (SCM x) |
| template<> | |
| float | from_scm< float > (SCM x) |
| template<> | |
| double | from_scm< double > (SCM x) |
| SCM | make_compartment (SCM polyhedron, SCM rest) |
Construct ship compartment using polyhedron and optional name. More... | |
| SCM | generate_compartments (SCM hull, SCM nrooms) |
Generate ship compartments for hull using 3-d grid of size nrooms. More... | |
| SCM | make_gerstner_solver (SCM rest) |
| Construct Gerstner solver. More... | |
| template<int N> | |
| Grid_wrapper< N > * | get_grid_wrapper (SCM object) |
| size_t | get_dimensions (SCM object) |
| SCM | make_grid (SCM rest) |
| Construct multidimensional rectangular grid. More... | |
| SCM | grid_min (SCM object) |
| Get grid lower bound. More... | |
| SCM | grid_max (SCM object) |
| Get grid upper bound. More... | |
| SCM | grid_begin_index (SCM object) |
| Get grid begin index (inclusive). More... | |
| SCM | grid_end_index (SCM object) |
| Get grid end index (exclusive). More... | |
| SCM | grid_select (SCM object, SCM indices) |
| Construct new grid by selecting dimensions from the existing grid. More... | |
| SCM | grid_compact (SCM object) |
| Re-index the grid to make begin index equal nought. More... | |
| SCM | grid_to_string (SCM object) |
| Convert grid to human-readable string. More... | |
| void | grid_define () |
| template<class T , int N> | |
| SCM | grid_make (const vtb::core::Grid< T, N > &grid) |
| SCM | make_hull () |
| Construct ship hull. More... | |
| void | main (int argc, char *argv[], main_function_type main) |
| void | misc_define () |
| SCM | polyhedron_reorder (SCM object) |
| Fix face winding. More... | |
| SCM | polyhedron_reorder_self (SCM object) |
| Fix face winding. More... | |
| SCM | polyhedron_normalise (SCM object) |
| Compute vertex and face normals. More... | |
| SCM | polyhedron_normalise_self (SCM object) |
| Compute vertex and face normals. More... | |
| SCM | polyhedron_unique (SCM object) |
| Remove redundant vertices and faces. More... | |
| SCM | polyhedron_unique_self (SCM object) |
| Remove redundant vertices and faces. More... | |
| SCM | polyhedron_move (SCM object, SCM arg) |
| Move the polyhedron to a specified amount in three dimensions. More... | |
| SCM | polyhedron_move_self (SCM object, SCM arg) |
| Move the polyhedron to a specified amount in three dimensions. More... | |
| SCM | polyhedron_scale (SCM object, SCM arg) |
| Scale the polyhedron by a specified factor in three dimensions. More... | |
| SCM | polyhedron_scale_self (SCM object, SCM arg) |
| Scale the polyhedron by a specified factor in three dimensions. More... | |
| SCM | polyhedron_flip (SCM object, SCM arg) |
| Flip the polyhedron relative to the origin in a specified dimension. More... | |
| SCM | polyhedron_flip_self (SCM object, SCM arg) |
| Flip the polyhedron relative to the origin in a specified dimension. More... | |
| SCM | polyhedron_mirror (SCM object, SCM arg) |
| Mirror the polhedron relative to the origin in a specified dimension. More... | |
| SCM | polyhedron_mirror_self (SCM object, SCM arg) |
| Mirror the polhedron relative to the origin in a specified dimension. More... | |
| SCM | polyhedron_rotate (SCM object, SCM arg1, SCM arg2) |
| Rotate the polhedron relative to the origin in a specified dimension by an angle that is multiple of 90 degrees. More... | |
| SCM | polyhedron_rotate_self (SCM object, SCM arg1, SCM arg2) |
| Rotate the polhedron relative to the origin in a specified dimension by an angle that is multiple of 90 degrees. More... | |
| SCM | polyhedron_empty (SCM object) |
| Check if polyhedron is not initialised. More... | |
| SCM | polyhedron_signed_volume (SCM object) |
| Compute signed volume of the polyhedron. More... | |
| SCM | polyhedron_signed_volume_below (SCM object, SCM dimension, SCM level) |
Compute signed volume of the polyhedron below certain level of dimension. More... | |
| SCM | polyhedron_volume (SCM object) |
| Compute absolute volume of the polyhedron. More... | |
| SCM | polyhedron_centroid (SCM object) |
| Compute centroid of the polyhedron. More... | |
| SCM | polyhedron_bounding_box (SCM object) |
| Compute bounding box of the polyhedron. More... | |
| SCM | polyhedron_bounds (SCM object, SCM dimension) |
| Compute the extent of the polyhedron in specified dimension. More... | |
| SCM | make_polyhedron () |
| Construct polyhedron. More... | |
| SCM | make_ship (SCM rest) |
Construct ship from hull and compartments mass/displacement/draught. More... | |
| SCM | ship_mass (SCM object) |
| Get ship mass. More... | |
| SCM | make_testbed (SCM rest) |
| Construct virtual testbed. More... | |
| SCM | testbed_policy (SCM object, SCM policy) |
| Get policy. More... | |
| SCM | testbed_step (SCM object, SCM dt) |
Simulate one time step dt. More... | |
| SCM | testbed_reset (SCM object) |
| Reset virtual testbed state. More... | |
| SCM | testbed_time_instant (SCM object) |
| Get current simulation time instant. More... | |
| SCM | testbed_grid (SCM object) |
| Get simulation grid. More... | |
| template<class T > | |
| Wrapper< T > * | get_wrapper (SCM object) |
| template<> | |
| Wrapper< std::any > * | get_wrapper (SCM object) |
| template<class T > | |
| T * | get_object (SCM object) |
| template<class T > | |
| T * | get_pointer (SCM object) |
| SCM | make_wave (SCM type, SCM rest) |
| Construct wave from amplitude, length and direction using dispersion relation. More... | |
| void | wave_define () |
| SCM | make_calm_sea_generator () |
| Construct calm sea wavy surface generator. More... | |
| SCM | make_plain_wave_generator (SCM rest) |
| Construct plain wave wavy surface generator. More... | |
| template<class T > | |
| Wrapper< T > * | to_wrapper (SCM object) |
| template<class T > | |
| void | finalize (SCM object) |
| template<class T > | |
| SCM | make_type (const char *name) |
| template<class T > | |
| SCM | define_type (const char *name) |
| template<class T > | |
| Wrapper< T > * | make_wrapper (Aspect< T > *ptr) |
| template<class T > | |
| Wrapper< std::unique_ptr< T > > * | make_wrapper (std::unique_ptr< T > &&ptr) |
| Wrapper< std::any > * | make_wrapper (std::any &&any) |
| Wrapper< std::any > * | make_wrapper (const std::any &any) |
| template<class T > | |
| Wrapper< T > * | make_wrapper () |
| template<class T > | |
| SCM | make_object (SCM type, Wrapper< T > *wrapper) |
| template<class T > | |
| SCM | make_object (SCM type, Aspect< T > *ptr) |
| template<class T > | |
| SCM | make_object (SCM type, std::unique_ptr< T > &&ptr) |
| SCM | make_object (SCM type, std::any &&any) |
| SCM | make_object (SCM type, const std::any &any) |
| template<class T > | |
| SCM | make_object (SCM type) |
Guile bindings.
| SCM vtb::guile::grid_compact | ( | SCM | object | ) |
Re-index the grid to make begin index equal nought.
Definition at line 322 of file guile/grid.cc.
| SCM vtb::guile::grid_select | ( | SCM | object, |
| SCM | indices | ||
| ) |
Construct new grid by selecting dimensions from the existing grid.
Definition at line 305 of file guile/grid.cc.
| SCM vtb::guile::grid_to_string | ( | SCM | object | ) |
Convert grid to human-readable string.
Definition at line 339 of file guile/grid.cc.
| SCM vtb::guile::polyhedron_flip_self | ( | SCM | object, |
| SCM | arg | ||
| ) |
Flip the polyhedron relative to the origin in a specified dimension.
Definition at line 114 of file guile/polyhedron.cc.
| SCM vtb::guile::polyhedron_mirror_self | ( | SCM | object, |
| SCM | arg | ||
| ) |
Mirror the polhedron relative to the origin in a specified dimension.
Definition at line 123 of file guile/polyhedron.cc.
| SCM vtb::guile::polyhedron_move_self | ( | SCM | object, |
| SCM | arg | ||
| ) |
Move the polyhedron to a specified amount in three dimensions.
Definition at line 96 of file guile/polyhedron.cc.
| SCM vtb::guile::polyhedron_normalise_self | ( | SCM | object | ) |
| SCM vtb::guile::polyhedron_reorder_self | ( | SCM | object | ) |
| SCM vtb::guile::polyhedron_rotate_self | ( | SCM | object, |
| SCM | arg1, | ||
| SCM | arg2 | ||
| ) |
Rotate the polhedron relative to the origin in a specified dimension by an angle that is multiple of 90 degrees.
Definition at line 133 of file guile/polyhedron.cc.
| SCM vtb::guile::polyhedron_scale_self | ( | SCM | object, |
| SCM | arg | ||
| ) |
Scale the polyhedron by a specified factor in three dimensions.
Definition at line 105 of file guile/polyhedron.cc.
| SCM vtb::guile::polyhedron_unique_self | ( | SCM | object | ) |
Remove redundant vertices and faces.
Definition at line 87 of file guile/polyhedron.cc.
1.8.15