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.

YoComposites are searched using a search pattern. A pattern has a name and a set of component identifiers. Following the example of a 3D point, the pattern would be defined as follows:

  • name: Point3D
  • component identifiers: x, y, and z.

Using this pattern, SCS 2 can then search throughout all the control variables and construct all YoComposite matching the definition of Point3D, allowing then direct interaction with 3D points rather than with their coordinates.

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

  • YoTuple2D representing a 2D point/vectors. Component identifiers: x, and y.
  • YoTuple3D representing a 3D point/vectors. Component identifiers: x, y, and z.
  • YoQuaternion representing a quaternion. Component identifiers: qx, qy, qz, and qs.
  • YoYawPitchRoll representing an orientation described as the yaw, pitch and roll angles. Component 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