1// =============================================================================
2// PROJECT CHRONO - http://projectchrono.org
3//
4// Copyright (c) 2020 projectchrono.org
5// All rights reserved.
6//
7// Use of this source code is governed by a BSD-style license that can be found
8// in the LICENSE file at the top level of the distribution and at
9// http://projectchrono.org/license-chrono.txt.
10//
11// =============================================================================
12// Authors: Jay Taves
13// =============================================================================
14//
15// Schema file that defines state data for Soil Contact Model (SCM) deformable
16// terrain. For further details see chrono_vehicle/terrain/SCMDeformableTerrain
17// To synchronize deformable terrain state, it is sufficient to communicate
18//  -- the (x, y) position of each deformed node on an integer grid
19//  -- the deformation (double) associated with each such node
20// The scheme is thus just a vector of such structs
21//
22// =============================================================================
23
24include "Utils.fbs";
25
26// Derived "class" of Terrain
27// Creates a SCM terrain message
28namespace SynFlatBuffers.Terrain.SCM;
29
30struct NodeLevel {
31    x:int;
32    y:int;
33    level:double;
34}
35
36table State {
37    time:double;
38
39    nodes:[NodeLevel];
40}
41
42root_type State;
43
44// Base "class"
45// Creates a terrain message
46namespace SynFlatBuffers.Terrain;
47
48union Type { SCM.State }
49
50table State {
51  message:Type;
52}
53
54root_type State;
55