Skip to content

YoComposite

SylvainBertrand edited this page Nov 19, 2019 · 18 revisions

What is a YoComposite?

A YoComposite is an abstract data structure composed of several YoVariables, for more information on YoVariables YoVariable wiki, which can represent a more complex type of data such as a 2D or 3D point.

A YoComposite is attributed a name and a set of component identifiers, following the example of a 3D point composite, the name would be Point3D and the component identifiers would be: x, y, and z. Using this pattern, SCS 2 can then search throughout all the control variables to retrieve any set of YoVariables that represents a Point3D, allowing then direct interaction with a point rather than with its coordinates.

By default, SCS 2 defines a small set of predefined YoComposites that are:

  • YoTuple2D representing any 2D points and vectors. It uses the following identifiers: x, and y.
  • YoTuple3D representing any 3D points and vectors. It uses the following identifiers: x, y, z.
  • YoQuaternion representing any unit-length quaternion. It uses the following identifiers: qx, qy, qz, and qs.
  • YoYawPitchRoll representing any orientation described as the yaw, pitch and roll angles. It uses the following identifiers: yaw, pitch, and roll.

The use of YoComposites instead of YoVariables when searching control variables reduces the size of the search result.

Search example when searching for YoVariables:

YoVariable search example

Same keywords but searching for YoTuple3Ds:

YoTuple3D search example

Clone this wiki locally