Skip to content
Snippets Groups Projects
Commit ab381380 authored by Pascal Engeler's avatar Pascal Engeler
Browse files

Started writing README.md

parent ebacaba0
No related branches found
No related tags found
No related merge requests found
# RBComb Simulation Framework
This project aims at developing a framework that can be used to simulate any project
that is to be undertaken on the RBComb platform. It is designed in modular fashion,
such that it is flexible enough to adapt easily to any given situation.
## Structure
The code is structured in an object oriented approach. The classes that likely will
not need to be adapted for a new situation are found in the `lib` folder. They
consist of the following:
### Type `Vec2` (`vec2.hpp`), 2-vector utility class
1. Template parameters:
- `value_t`: type of vector entries
2. Members:
- Access:
- `value_t x()`: returns x entry
- `value_t y()`: returns y entry
- `Vec2 normalized()`: returns normalized version of vector
- `value_t r()`: returns length
- `value_t phi()`: returns angle (`std::atan2` version of it)
- Member functions:
- `value_t r_wrt(Vec2)`: returns length with origin at argument
- `value_t phi_wrt(Vec2)`: returns angle with origin at argument
- `value_t norm()`: returns norm
- `value_t norm_sq()`: returns square of norm
- Modifiers:
- `Vec2 normalize()`: normalize the vector
- `Vec2 rotate(Vec2, value_t)`: rotate the vector
- Supported Operators: All of these work as one would expect
- `*` with `Vec2` (inner product) and `value_t`
- `/` with `value_t`
- `+, -` with `Vec2`
- All versions of `op=` of the above
- `[]` with `std::size_t`
- `<<` with `std::ostream`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment