|
| void | Begin (double length, bool closed=false) |
| |
| void | Add (const Eigen::Vector3d ¢re, const Eigen::Vector3d &axis) |
| |
|
void | Build () |
| | Finds the joints and their positions from the elements added.
|
| |
|
int | NumElements () const |
| | The number of elements in the chain.
|
| |
|
int | NumJoints () const |
| | The number of joints: one more than the number of elements in an open chain, as many in a closed loop, none for an empty chain.
|
| |
|
const Eigen::Vector3d & | JointPosition (int joint) const |
| | The position of joint joint [m], NED.
|
| |
| int | JointOfEnd (int element, int end) const |
| |
| void | AppendJointPositions (std::vector< double > &points) const |
| |
| void | QueryWater (const environment::wake::ElementFlowInteraction &flow, double T, int firstPoint) |
| |
|
EndWater | WaterOf (int element) const |
| | The water at the ends of element element, after QueryWater.
|
| |
The joints of a chain of equal elements, and the water at them.
Fill it with Begin, Add (once per element, in chain order) and Build; then QueryWater. The buffers keep their size from call to call, so a chain of fixed length allocates nothing after the first call.
In an open chain joint j lies between element j − 1 and element j; joint 0 is the free end of the first element, joint n the free end of the last. In a closed loop (at least three elements) there are n joints, and joint j lies between element j and element (j + 1) mod n. Which end of an element touches its neighbour is found from the geometry, not from the axis direction: the end of element i nearest the centre of element i + 1 goes to joint i + 1, the other end to joint i (the last element: the end nearest the centre of the one before goes to joint n − 1, the other to joint n).