Skip to content

DataModel

Loris Sauter edited this page Jan 6, 2019 · 3 revisions

Data Model

On these pages, the data model is documented.


General Types

Generally speaking, the data model consits of object that are POJOs serialized to JSON utilizing Gson. Thus Java type defintions are mapped to JSON ones, based on Gson's rule set. However, to be clear the vanilla (i.e. standard) types are defined in the following.

Decimal (Floating Point Number)

A decimal number as one half, which is written as 0.5. In VREM and VREP this is treated as a float (Java float and C Sharp float

Boolean

A boolean can be true or false.

String

A sequence of characters encased in double quotes such as "example". In VREM and VREP this is treated as a Java String and C Sharp String respectively.

Vector3f

A three dimensional vector consisting of float values. In VREM this is a custom class, in VREP this refers to Unity3d Vector3.

Be aware of Unity's left handed coordinate system: X Axis to the right, Y Axis up, Z Axis into the screen.

Properties:

  • x (Decimal): The vector's x value.
  • y (Decimal): The vector's y value.
  • z (Decimal): The vector's z value.

Example:

A Vector3f example with arbitrary values. Note even though the y value is an integer, it's written as decimal.

{
 "x": 0.5,
 "y": 2.0,
 "z": 4.2151
}
Clone this wiki locally