    

 ## On this page

  

 

 # dynamic\_scene\_graph

 Last update: 16.07.2025 

<a id="l00001" name="l00001"></a> 1// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00002" name="l00002"></a> 2// Copyright 2022-2024 ANSYS, Inc.

<a id="l00003" name="l00003"></a> 3// All Rights Reserved.

<a id="l00004" name="l00004"></a> 4//

<a id="l00005" name="l00005"></a> 5// Restricted Rights Legend

<a id="l00006" name="l00006"></a> 6//

<a id="l00007" name="l00007"></a> 7// Use, duplication, or disclosure of this

<a id="l00008" name="l00008"></a> 8// software and its documentation by the

<a id="l00009" name="l00009"></a> 9// Government is subject to restrictions as

<a id="l00010" name="l00010"></a> 10// set forth in subdivision \[(b)(3)(ii)\] of

<a id="l00011" name="l00011"></a> 11// the Rights in Technical Data and Computer

<a id="l00012" name="l00012"></a> 12// Software clause at 52.227-7013.

<a id="l00013" name="l00013"></a> 13// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00014" name="l00014"></a> 14 

<a id="l00015" name="l00015"></a> 15syntax = "proto3";

<a id="l00016" name="l00016"></a> 16 

<a id="l00017" name="l00017"></a> 17//@ingroup grpc

<a id="l00018" name="l00018"></a> 18// Dynamic scene graph gRPC service definition

<a id="l00019" name="l00019"></a> 19 

<a id="l00020" name="l00020"></a> 20package ensightservice;

<a id="l00021" name="l00021"></a> 21 

<a id="l00022" name="l00022"></a> 22//@defgroup DSG DynamicSceneGraphService

<a id="l00023" name="l00023"></a> 23//@ingroup grpc

<a id="l00024" name="l00024"></a> 24//@brief The dynamic scene graph gRPC service

<a id="l00025" name="l00025"></a> 25//

<a id="l00026" name="l00026"></a> 26// The dynamic scene graph gRPC service provides a mechanism by which a client

<a id="l00027" name="l00027"></a> 27// application can attach to a running EnSight session and read the current scene

<a id="l00028" name="l00028"></a> 28// geometry. The API allows the client application to track the client scene

<a id="l00029" name="l00029"></a> 29// graph state. It supports both complete and incremental updates. For incremental

<a id="l00030" name="l00030"></a> 30// updates, the EnSight client tracks the remote scene graph state specific to each

<a id="l00031" name="l00031"></a> 31// active scene stream.

<a id="l00032" name="l00032"></a> 32//

<a id="l00033" name="l00033"></a> 33// The EnSight distribution includes a simple example client written in Python. The

<a id="l00034" name="l00034"></a> 34// renderer in the example client is not complete (e.g. it does not support all of 

<a id="l00035" name="l00035"></a> 35// the texturing modes or two sided lighting), but it does demonstrate how a client

<a id="l00036" name="l00036"></a> 36// should interpret the various messages that constitute a scene update operation.

<a id="l00037" name="l00037"></a> 37// This example is located in the same directory (ensightXXX/site\_preferences/extensions/grpc) 

<a id="l00038" name="l00038"></a> 38// as this .proto file and is named dynamic\_scene\_graph\_example\_client.py. To

<a id="l00039" name="l00039"></a> 39// run the example client (Windows example, ANSYS 2021 R1 distribution), first start 

<a id="l00040" name="l00040"></a> 40// EnSight with the following command line:

<a id="l00041" name="l00041"></a> 41// \\code{.unparsed}

<a id="l00042" name="l00042"></a> 42// ensight.bat -grpc\_server 12345

<a id="l00043" name="l00043"></a> 43// \\endcode

<a id="l00044" name="l00044"></a> 44// Then in another shell window run the Python script using the EnSight Python

<a id="l00045" name="l00045"></a> 45// interpreter:

<a id="l00046" name="l00046"></a> 46// \\code{.unparsed}

<a id="l00047" name="l00047"></a> 47// cpython.bat dynamic\_scene\_graph\_example\_client.py

<a id="l00048" name="l00048"></a> 48// \\endcode

<a id="l00049" name="l00049"></a> 49// Load some data into the EnSight session and then select "Update" from the

<a id="l00050" name="l00050"></a> 50// example client GUI menus to initiate a scene refresh. By default, the example

<a id="l00051" name="l00051"></a> 51// client will send a SceneClientCommand (SceneClientCommand::ClientCommandType::INIT)

<a id="l00052" name="l00052"></a> 52// message and EnSight will respond with a sequence of update messages. If the File-&gt;Allow push updates

<a id="l00053" name="l00053"></a> 53// option is enabled in the sample client, it will allow EnSight to push scene graph updates

<a id="l00054" name="l00054"></a> 54// in asynchronous fashion. An EnSight initiated scene update can be started from the Python 

<a id="l00055" name="l00055"></a> 55// interpreter in the EnSight client using this code fragment:

<a id="l00056" name="l00056"></a> 56// \\code{.python}

<a id="l00057" name="l00057"></a> 57// import enspyqtgui\_int

<a id="l00058" name="l00058"></a> 58// enspyqtgui\_int.dynamic\_scene\_graph\_command("dynamicscenegraph://localhost/client/update")

<a id="l00059" name="l00059"></a> 59// \\endcode

<a id="l00060" name="l00060"></a> 60// This update will be seen by all current dynamic scene graph sessions that have the 

<a id="l00061" name="l00061"></a> 61// allow\_spontaneous flag set in their SceneClientCommand INIT messages.

<a id="l00062" name="l00062"></a> 62//

<a id="l00063" name="l00063"></a> 63// EnSight will export all of the geometry visible in the viewport 0 as the scene

<a id="l00064" name="l00064"></a> 64// contents. Individual parts may have the metadata tag "ENS\_DSG\_HINTS" set to a 

<a id="l00065" name="l00065"></a> 65// string. If the string contains the substring "HIDE", that part will not be

<a id="l00066" name="l00066"></a> 66// included in the export, even if it is visible in viewport 0.

<a id="l00067" name="l00067"></a> 67//

<a id="l00068" name="l00068"></a> 68// @section entities Overview of the dynamic scene graph API entities

<a id="l00069" name="l00069"></a> 69// &lt;hr&gt;

<a id="l00070" name="l00070"></a> 70//

<a id="l00071" name="l00071"></a> 71// The gRPC API update commands define a collection of entities that describe the

<a id="l00072" name="l00072"></a> 72// scene graph. These entities refer to each other using entity IDs. The IDs are

<a id="l00073" name="l00073"></a> 73// a proxy for pointers. An individual entity can be updated (one SceneUpdateCommand 

<a id="l00074" name="l00074"></a> 74// message for each update message) or destroyed by SceneUpdateCommand messages.

<a id="l00075" name="l00075"></a> 75// All addressable entities have a 64bit "id" associated with them. An "update" command 

<a id="l00076" name="l00076"></a> 76// is used to create an entity and to update its attributes. 

<a id="l00077" name="l00077"></a> 77//

<a id="l00078" name="l00078"></a> 78// An incremental update will only send updates for the entities that have changed

<a id="l00079" name="l00079"></a> 79// since the previous update. If an entity no longer exists after this update, the

<a id="l00080" name="l00080"></a> 80// entity ID will be sent in a DeleteID command.

<a id="l00081" name="l00081"></a> 81//

<a id="l00082" name="l00082"></a> 82// The currently defined entities are:

<a id="l00083" name="l00083"></a> 83//

<a id="l00084" name="l00084"></a> 84// Entity | Description

<a id="l00085" name="l00085"></a> 85// ------ | -----------

<a id="l00086" name="l00086"></a> 86// Scene | Top of the tree of entities. It may contain View and Variable entities.

<a id="l00087" name="l00087"></a> 87// View | Contains timestep and camera information for a tree of geometry. It may contain Group and Part entities.

<a id="l00088" name="l00088"></a> 88// Group | Child of a View or another Group. It may contain Part and Group entities. Includes a 4x4 matrix transform and arbitrary attributes.

<a id="l00089" name="l00089"></a> 89// Part | Child of a Group, parent to Geom entities. Defines a "mesh" and display attributes.

<a id="l00090" name="l00090"></a> 90// Geom | Child of a Part. Storage for the arrays that define a block of a geometry. Note: a single Geom will have connectivity defining either be LINES or TRIANGLES, not both. Includes: Coordinates, Connectivity, current variable data, edge flags 

<a id="l00091" name="l00091"></a> 91// Variable | Defines variable display properties: Nodal, Elemental, ranges, interpolation, etc. Child of a Scene.

<a id="l00092" name="l00092"></a> 92//

<a id="l00093" name="l00093"></a> 93// The View, Group, Part, Geom and Variable entities all include a hash field. This string

<a id="l00094" name="l00094"></a> 94// is unique to the contents of the update message. Thus, if two messages of the same type

<a id="l00095" name="l00095"></a> 95// have the same hash, they can be considered to have identical contents.

<a id="l00096" name="l00096"></a> 96//

<a id="l00097" name="l00097"></a> 97// @subsection updateprocess The entity update gRPC message sequence

<a id="l00098" name="l00098"></a> 98// &lt;hr&gt;

<a id="l00099" name="l00099"></a> 99//

<a id="l00100" name="l00100"></a> 100// The update process is initiated by the client application unless a SceneClientCommand message 

<a id="l00101" name="l00101"></a> 101// has enabled spontaneous updates. A spontaneous update starts with step 2.

<a id="l00102" name="l00102"></a> 102//

<a id="l00103" name="l00103"></a> 103// 1. Client sends a SceneClientCommand (SceneClientCommand::ClientCommandType::INIT)

<a id="l00104" name="l00104"></a> 104// message to the EnSight gRPC service of the type SceneClientInit. This triggers 

<a id="l00105" name="l00105"></a> 105// the update sequence.

<a id="l00106" name="l00106"></a> 106//

<a id="l00107" name="l00107"></a> 107// 2. EnSight sends a SceneUpdateCommand UpdateSceneBegin (SceneUpdateCommand::SceneUpdateCommandType::UPDATE\_SCENE\_BEGIN) 

<a id="l00108" name="l00108"></a> 108// message to the client.

<a id="l00109" name="l00109"></a> 109//

<a id="l00110" name="l00110"></a> 110// 3. EnSight sends a series of SceneUpdateCommand messages to the client. These messages

<a id="l00111" name="l00111"></a> 111// can be of these types (DeleteID, UpdatePart, UpdateGroup, UpdateGeom, UpdateVariable, UpdateView).

<a id="l00112" name="l00112"></a> 112// Note there should be no assumption about the order of these messages.

<a id="l00113" name="l00113"></a> 113//

<a id="l00114" name="l00114"></a> 114// 4. EnSight sends a final SceneUpdateCommand UpdateSceneEnd (SceneUpdateCommand::SceneUpdateCommandType::UPDATE\_SCENE\_END) 

<a id="l00115" name="l00115"></a> 115// message to the client, signifying the end of a scene graph update.

<a id="l00116" name="l00116"></a> 116//

<a id="l00117" name="l00117"></a> 117// @subsection entitydiagram Entity relationship diagram

<a id="l00118" name="l00118"></a> 118// &lt;hr&gt;

<a id="l00119" name="l00119"></a> 119//

<a id="l00120" name="l00120"></a> 120// \\image html ./dynamic\_scene\_graph\_service\_entities.svg

<a id="l00121" name="l00121"></a> 121//

<a id="l00123" name="l00123"></a> 123service DynamicSceneGraphService {

<a id="l00124" name="l00124"></a> 124 //@addtogroup DSG

<a id="l00126" name="l00126"></a> 126 

<a id="l00127" name="l00127"></a> 127 // @brief Start a new dynamic scene graph stream

<a id="l00128" name="l00128"></a> 128 //

<a id="l00129" name="l00129"></a> 129 // This gRPC call opens a bi-directional stream between the client application and the

<a id="l00130" name="l00130"></a> 130 // EnSight gRPC server. The client application can make requests for updates to the

<a id="l00131" name="l00131"></a> 131 // current scene graph by sending SceneClientCommand messages. The EnSight server

<a id="l00132" name="l00132"></a> 132 // responds with a series of SceneUpdateCommand messages.

<a id="l00133" name="l00133"></a> 133 // @param SceneClientCommand A stream of SceneClientCommand objects

<a id="l00134" name="l00134"></a> 134 // @return SceneUpdateCommand A stream of SceneUpdateCommand messages from the EnSight client

<a id="l00135" name="l00135"></a> 135 rpc GetSceneStream (stream SceneClientCommand) returns (stream SceneUpdateCommand) {};

<a id="l00136" name="l00136"></a> 136 

<a id="l00137" name="l00137"></a> 137 // @brief Get the server version of the dynamic scene graph stream

<a id="l00138" name="l00138"></a> 138 // @param versionrequest dummy argument

<a id="l00139" name="l00139"></a> 139 // @return VersionReply the API version currently supported by the server

<a id="l00140" name="l00140"></a> 140 rpc GetAPIVersion (VersionRequest) returns (VersionReply) {};

<a id="l00141" name="l00141"></a> 141 

<a id="l00143" name="l00143"></a> 143}

<a id="l00145" name="l00145"></a> 145 

<a id="l00146" name="l00146"></a> 146 

<a id="l00147" name="l00147"></a> 147// @brief Request for the server API version

<a id="l00148" name="l00148"></a> 148//

<a id="l00149" name="l00149"></a> 149// Dummy argument for the GetAPIVersion rpc

<a id="l00150" name="l00150"></a> 150message VersionRequest {

<a id="l00151" name="l00151"></a> 151}

<a id="l00152" name="l00152"></a> 152 

<a id="l00153" name="l00153"></a> 153// @brief The server API version

<a id="l00154" name="l00154"></a> 154//

<a id="l00155" name="l00155"></a> 155// This command returns the version number of the DynamicSceneGraphService that the server

<a id="l00156" name="l00156"></a> 156// supports. The number is defined in this .proto file as VersionEnumType::CURRENT\_VERSION.

<a id="l00157" name="l00157"></a> 157// The protocol passes this value as an int32 so that the client can receive the value

<a id="l00158" name="l00158"></a> 158// properly and then compare it to its own value of the VersionEnumType::CURRENT\_VERSION enum

<a id="l00159" name="l00159"></a> 159// generated by the version of the proto file it had compiled.

<a id="l00160" name="l00160"></a> 160message VersionReply {

<a id="l00161" name="l00161"></a> 161 // @brief version number

<a id="l00162" name="l00162"></a> 162 //

<a id="l00163" name="l00163"></a> 163 // The version type is used to determine the version number the protocol corresponds to.

<a id="l00164" name="l00164"></a> 164 enum VersionEnumType {

<a id="l00165" name="l00165"></a> 165 UNDEFINED = 0; // No version number specified

<a id="l00166" name="l00166"></a> 166 CURRENT_VERSION = 101; // Current version of the .proto file/protocol 

<a id="l00167" name="l00167"></a> 167 }

<a id="l00168" name="l00168"></a> 168 int32 version = 1; // The API version number as an integer. It should be the value VersionEnumType::CURRENT\_VERSION.

<a id="l00169" name="l00169"></a> 169}

<a id="l00170" name="l00170"></a> 170 

<a id="l00171" name="l00171"></a> 171// @brief Request by the client for an EnSight scene update

<a id="l00172" name="l00172"></a> 172//

<a id="l00173" name="l00173"></a> 173// This SceneClientCommand sub message is sent by the client at startup or whenever the client 

<a id="l00174" name="l00174"></a> 174// would like a scene update. The server will respond by starting a scene update command sequence, 

<a id="l00175" name="l00175"></a> 175// beginning with a SceneUpdateCommand message, UpdateSceneBegin sub command. The update sequence

<a id="l00176" name="l00176"></a> 176// will end with a SceneUpdateCommand message, UpdateSceneEnd sub command.

<a id="l00177" name="l00177"></a> 177//

<a id="l00178" name="l00178"></a> 178// This message also informs the server what the maximum size of a block of data should be (in bytes). 

<a id="l00179" name="l00179"></a> 179// It also can be used to enable "spontaneous" scene updates that can be started by the EnSight server

<a id="l00180" name="l00180"></a> 180// at any time. If the client would like the server to rebroadcast the entire scene, it should

<a id="l00181" name="l00181"></a> 181// set the allow\_incremental\_updates flag to false, suppressing state cache tracking by the server.

<a id="l00182" name="l00182"></a> 182message SceneClientInit {

<a id="l00183" name="l00183"></a> 183 bool allow_spontaneous = 1; // If true, EnSight is allowed to spontaneously start a scene update. If false, updates can only be initiated by the client via this message.

<a id="l00184" name="l00184"></a> 184 bool allow_incremental_updates = 2; // If true, EnSight is allowed/encouraged to send the minimal number of update packets. If false, the client must re-send the entire scene.

<a id="l00185" name="l00185"></a> 185 int32 maximum_chunk_size = 3; // Sets the maximum payload blocksize in bytes in a single UpdateGeom message (0=unrestricted payload size).

<a id="l00186" name="l00186"></a> 186 bool include_temporal_geometry = 4; // If true, request that the current temporal geometry be sent. If false, the current static view is sent

<a id="l00187" name="l00187"></a> 187}

<a id="l00188" name="l00188"></a> 188 

<a id="l00189" name="l00189"></a> 189// @brief Update a parameter in the EnSight session

<a id="l00190" name="l00190"></a> 190//

<a id="l00191" name="l00191"></a> 191// Message from client to change some EnSight session state. This command is currently unimplemented. The

<a id="l00192" name="l00192"></a> 192// intent is that this message would be sent from the VR environment to interact with the EnSight session (e.g. load data, clip plane motion)

<a id="l00193" name="l00193"></a> 193message SceneClientUpdate {

<a id="l00194" name="l00194"></a> 194 // To be defined

<a id="l00195" name="l00195"></a> 195}

<a id="l00196" name="l00196"></a> 196 

<a id="l00197" name="l00197"></a> 197// @brief Aggregate command sent by a dynamic scene graph client

<a id="l00198" name="l00198"></a> 198//

<a id="l00199" name="l00199"></a> 199// This command represents a union of two different base commands: SceneClientInit and SceneClientUpdate. To 

<a id="l00200" name="l00200"></a> 200// use the message, set the command\_type to the type of the message and fill in the appropriate ClientCommand

<a id="l00201" name="l00201"></a> 201// sub-message.

<a id="l00202" name="l00202"></a> 202message SceneClientCommand {

<a id="l00203" name="l00203"></a> 203 // The type of the ClientCommand oneof that has been set

<a id="l00204" name="l00204"></a> 204 enum ClientCommandType {

<a id="l00205" name="l00205"></a> 205 INIT = 0; // Initial command to be sent. Can be sent repeatedly to reset session parameters or request a scene update

<a id="l00206" name="l00206"></a> 206 UPDATE = 1; // Undefined at present, but used to send interaction information from VR1 back to EnSight

<a id="l00207" name="l00207"></a> 207 }

<a id="l00208" name="l00208"></a> 208 ClientCommandType command_type = 1; // The command type

<a id="l00209" name="l00209"></a> 209 // message union

<a id="l00210" name="l00210"></a> 210 oneof ClientCommand {

<a id="l00211" name="l00211"></a> 211 SceneClientInit init = 2; // Init a session/request a scene graph update

<a id="l00212" name="l00212"></a> 212 SceneClientUpdate update = 3; // Modify an EnSight session 

<a id="l00213" name="l00213"></a> 213 }

<a id="l00214" name="l00214"></a> 214}

<a id="l00215" name="l00215"></a> 215 

<a id="l00216" name="l00216"></a> 216// @brief Begin an update sequence

<a id="l00217" name="l00217"></a> 217//

<a id="l00218" name="l00218"></a> 218// Sent to mark the start of an update operation, the scene will not be complete until UpdateSceneEnd is received

<a id="l00219" name="l00219"></a> 219message UpdateSceneBegin {

<a id="l00220" name="l00220"></a> 220 bool reset = 1; // If true, scene being updated will replace the current scene, client deletes all existing entity definitions. If false, this is an incremental update to be merged into existing scene entities

<a id="l00221" name="l00221"></a> 221 uint64 id = 2; // The scene entity id

<a id="l00222" name="l00222"></a> 222}

<a id="l00223" name="l00223"></a> 223 

<a id="l00224" name="l00224"></a> 224// @brief End an update sequence

<a id="l00225" name="l00225"></a> 225//

<a id="l00226" name="l00226"></a> 226// Sent when the entire scene as been defined and can now be rendered

<a id="l00227" name="l00227"></a> 227message UpdateSceneEnd {

<a id="l00228" name="l00228"></a> 228 uint64 id = 1; // The scene entity id

<a id="l00229" name="l00229"></a> 229}

<a id="l00230" name="l00230"></a> 230 

<a id="l00231" name="l00231"></a> 231// @brief Delete a list of entities.

<a id="l00232" name="l00232"></a> 232message DeleteID {

<a id="l00233" name="l00233"></a> 233 repeated uint64 ids = 1 [packed=true]; // A list of entity ids that have been deleted (and non longer exist in the cache)

<a id="l00234" name="l00234"></a> 234}

<a id="l00235" name="l00235"></a> 235 

<a id="l00236" name="l00236"></a> 236// @brief Update a View entity

<a id="l00237" name="l00237"></a> 237//

<a id="l00238" name="l00238"></a> 238// Scenes contain a collection of View entities that provide camera definitions and 

<a id="l00239" name="l00239"></a> 239// have groups (leading to Parts entities) as children. A View also provides a timeline 

<a id="l00240" name="l00240"></a> 240// over which its children should be considered visible. The timeline contains

<a id="l00241" name="l00241"></a> 241// two time values. Children of the View are considered visible at some time t, 

<a id="l00242" name="l00242"></a> 242// if: `timeline\[0\] &lt;= t &lt; timeline\[1\]`. 

<a id="l00243" name="l00243"></a> 243message UpdateView {

<a id="l00244" name="l00244"></a> 244 uint64 id = 1; // View entity id.

<a id="l00245" name="l00245"></a> 245 uint64 parent_id = 2; // Scene entity id.

<a id="l00246" name="l00246"></a> 246 repeated float timeline = 3; // Start and end time these children are to be displayed, two values.

<a id="l00247" name="l00247"></a> 247 repeated float lookat = 4; // X,Y,Z of the view lookat point.

<a id="l00248" name="l00248"></a> 248 repeated float lookfrom = 5; // X,Y,Z of the view lookfrom point.

<a id="l00249" name="l00249"></a> 249 repeated float upvector = 6; // NX,NY,NZ of the view up vector.

<a id="l00250" name="l00250"></a> 250 float fieldofview = 7; // The field of view angle in degrees.

<a id="l00251" name="l00251"></a> 251 float aspectratio = 8; // Display rectangle aspect ratio (dx/dy).

<a id="l00252" name="l00252"></a> 252 repeated float nearfar = 9; // The distance from the lookfrom point to the near and far clipping planes.

<a id="l00253" name="l00253"></a> 253 

<a id="l00254" name="l00254"></a> 254 string hash = 10; // hash for this message payload

<a id="l00255" name="l00255"></a> 255} 

<a id="l00256" name="l00256"></a> 256 

<a id="l00257" name="l00257"></a> 257 

<a id="l00258" name="l00258"></a> 258// @brief Update a Part entity

<a id="l00259" name="l00259"></a> 259//

<a id="l00260" name="l00260"></a> 260// Sent to update part rendering attributes. Parts have Geom entity children that define 

<a id="l00261" name="l00261"></a> 261// the bulk data arrays.

<a id="l00262" name="l00262"></a> 262//

<a id="l00263" name="l00263"></a> 263// The material name needs additional work. If 'steel' or 'glass' are specified, are we expecting the client 

<a id="l00264" name="l00264"></a> 264// to come up with shaders for those materials, or just informing that fill\_color and shininess parameters 

<a id="l00265" name="l00265"></a> 265// are steel-like or glass-like. General thinking is to use common namespaces (e.g. granta, etc)

<a id="l00266" name="l00266"></a> 266// for known material specifications and namespace prefixed JSON for others (e.g. ensight:{json payload}

<a id="l00267" name="l00267"></a> 267message UpdatePart {

<a id="l00268" name="l00268"></a> 268 // The rendering mode is actually a bit field, defining what should be rendered.

<a id="l00269" name="l00269"></a> 269 enum RenderingMode {

<a id="l00270" name="l00270"></a> 270 NODES = 0; // render the nodes of the connectivity (spheres)

<a id="l00271" name="l00271"></a> 271 CONNECTIVITY = 1; // render the elements defined by the connectivity, triangles or lines. Note: if edgeflags are specified and the connectivity is triangle, element boundaries are to be outlined

<a id="l00272" name="l00272"></a> 272 }

<a id="l00273" name="l00273"></a> 273 

<a id="l00274" name="l00274"></a> 274 // Define the location of normals

<a id="l00275" name="l00275"></a> 275 enum ShadingMode {

<a id="l00276" name="l00276"></a> 276 ELEMENTAL = 0; // Normals are specified per element face (e.g. one normal per triangle).

<a id="l00277" name="l00277"></a> 277 NODAL = 1; // Normals are specified per node.

<a id="l00278" name="l00278"></a> 278 }

<a id="l00279" name="l00279"></a> 279 

<a id="l00280" name="l00280"></a> 280 // 2D texture options for tex coords outside \[0,1\]

<a id="l00281" name="l00281"></a> 281 enum TextureWrapMode {

<a id="l00282" name="l00282"></a> 282 REPEAT = 0; // Like GL\_REPEAT

<a id="l00283" name="l00283"></a> 283 CLAMP = 1; // Like GL\_CLAMP\_TO\_BORDER, except values outside \[0,1\] get the usual part color/lighting/color by var in DECAL mode, and killed in REPLACE or MODULATE mode.

<a id="l00284" name="l00284"></a> 284 CLAMP_TEXTURE = 2; // Like GL\_CLAMP\_TO\_EDGE

<a id="l00285" name="l00285"></a> 285 }

<a id="l00286" name="l00286"></a> 286 // 2D texture options for combining texture color with part color, lighting, color by var

<a id="l00287" name="l00287"></a> 287 enum TextureApplyMode {

<a id="l00288" name="l00288"></a> 288 REPLACE = 0; // 2D texture color replaces all other color. No lighting. Same as DECAL unless wrap mode is CLAMP.

<a id="l00289" name="l00289"></a> 289 DECAL = 1; // 2D texture color replaces all other color. No lighting.

<a id="l00290" name="l00290"></a> 290 MODULATE = 2; // Color as usual with part color, lighting, color by var, etc. Then multiply by the 2D texture color.

<a id="l00291" name="l00291"></a> 291 }

<a id="l00292" name="l00292"></a> 292 // 2D texture interpolation

<a id="l00293" name="l00293"></a> 293 enum TextureSampleMode {

<a id="l00294" name="l00294"></a> 294 NEAREST = 0; // Like GL\_NEAREST

<a id="l00295" name="l00295"></a> 295 LINEAR = 1; // Like GL\_LINEAR

<a id="l00296" name="l00296"></a> 296 }

<a id="l00297" name="l00297"></a> 297 

<a id="l00298" name="l00298"></a> 298 uint64 id = 1; // The Part entity id

<a id="l00299" name="l00299"></a> 299 uint64 parent_id = 2; // Parent Group id

<a id="l00300" name="l00300"></a> 300 

<a id="l00301" name="l00301"></a> 301 string name = 3; // The name of the Part

<a id="l00302" name="l00302"></a> 302 repeated float matrix4x4 = 4; // Rigid body motion

<a id="l00303" name="l00303"></a> 303 

<a id="l00304" name="l00304"></a> 304 repeated float fill_color = 5; // Base color for the part (rgba). If color\_variableid is not set, draw the part with this RGB. Even if color\_variableid is set, combine RGB from color\_variableid with A in fill\_color.

<a id="l00305" name="l00305"></a> 305 repeated float line_color = 6; // Used for rendering line connectivity and element boundaries if edgeflags are specified

<a id="l00306" name="l00306"></a> 306 RenderingMode render = 7; // What to aspect of the mesh to render

<a id="l00307" name="l00307"></a> 307 ShadingMode shading = 8; // Defines the location of the normals. If normals are specified per-element, triangles should be shaded as "flat"

<a id="l00308" name="l00308"></a> 308 

<a id="l00309" name="l00309"></a> 309 float ambient = 9; // OpenGL style ambient coloring factor: GL\_AMBIENT

<a id="l00310" name="l00310"></a> 310 float diffuse = 10; // OpenGL style diffuse coloring rgb: GL\_DIFFUSE 

<a id="l00311" name="l00311"></a> 311 float specular_shine = 11; // OpenGL style specular factor: GL\_SHININESS

<a id="l00312" name="l00312"></a> 312 float specular_intensity = 12; // OpenGL style specular factor: GL\_SPECULAR

<a id="l00313" name="l00313"></a> 313 string material_name = 13; // The material name specification

<a id="l00314" name="l00314"></a> 314 float node_size_default = 14; // If node rendering is specified, the base size of each node

<a id="l00315" name="l00315"></a> 315 uint64 color_variableid = 15; // per-node or per-element coloring specification

<a id="l00316" name="l00316"></a> 316 uint64 alpha_variableid = 16; // If this is set, transparency varies over the part, and comes from the alpha channel for alpha\_variableid. It supercedes the alpha value in fill\_color.

<a id="l00317" name="l00317"></a> 317 uint64 node_size_variableid = 17; // If the 'render' variable has 'NODES' set, the size of rendered points can vary by the value of a variable, multiplied by the node\_size\_default.

<a id="l00318" name="l00318"></a> 318 uint64 displacement_variableid = 18; // if this is set, the vector variable should be added to the coordinate variable to generate the final coordinate.

<a id="l00319" name="l00319"></a> 319 

<a id="l00320" name="l00320"></a> 320 uint64 texture_id = 19; // 2D texture to apply.

<a id="l00321" name="l00321"></a> 321 TextureWrapMode texture_wrap_mode = 20; // 2D texture wrapping options

<a id="l00322" name="l00322"></a> 322 TextureApplyMode texture_apply_mode = 21; // 2D texture color blending options

<a id="l00323" name="l00323"></a> 323 TextureSampleMode texture_sample_mode = 22; // 2D texture sampling options

<a id="l00324" name="l00324"></a> 324 

<a id="l00325" name="l00325"></a> 325 string hash = 23; // hash for this message payload

<a id="l00326" name="l00326"></a> 326 

<a id="l00327" name="l00327"></a> 327 // could specify a projected plane for tex coords, then sometimes would not need to send the TEX\_COORDINATES update

<a id="l00328" name="l00328"></a> 328 // TBD: "control" variables (e.g. clip plane position, etc) that can be modified in the VR environment

<a id="l00329" name="l00329"></a> 329 // TBD: attributes specific to certain types of parts, like animation options on particle traces

<a id="l00330" name="l00330"></a> 330 // TBD: mirroring/instancing. perhaps add an array of transformation matrices, or just the mirror plane/rotational axis parameters

<a id="l00331" name="l00331"></a> 331}

<a id="l00332" name="l00332"></a> 332 

<a id="l00333" name="l00333"></a> 333 

<a id="l00334" name="l00334"></a> 334// @brief Update a Group entity

<a id="l00335" name="l00335"></a> 335//

<a id="l00336" name="l00336"></a> 336// Sent to update a group entity. The group is a simple entity serving as the basic "tree"

<a id="l00337" name="l00337"></a> 337// node.

<a id="l00338" name="l00338"></a> 338//

<a id="l00339" name="l00339"></a> 339// The attributes are open for various uses, but several attribute key values have already been

<a id="l00340" name="l00340"></a> 340// defined:

<a id="l00341" name="l00341"></a> 341//

<a id="l00342" name="l00342"></a> 342// \[EnSight Units\]: https://nexusdemo.ensight.com/docs/python/html/ENS\_UNITSSchema.html#TOC-ENS\_UNITS\_SYSTEM "EnSight Units System"

<a id="l00343" name="l00343"></a> 343//

<a id="l00344" name="l00344"></a> 344// Attribute | Value

<a id="l00345" name="l00345"></a> 345// --------- | -----

<a id="l00346" name="l00346"></a> 346// ENS\_OBJ\_TYPE | The EnSight object type associated with this Group entity (e.g. "ENS\_PART", "ENS\_CASE", "ENS\_VAR").

<a id="l00347" name="l00347"></a> 347// ENS\_OBJ\_ID | The EnSight object ID associated with the Group entity.

<a id="l00348" name="l00348"></a> 348// ENS\_UNITS\_SYSTEM | The unit system for the a specific ENS\_CASE. Encoded in JSON. An example would be: '{"system":"SI","label":"Metric SI","M":"kg","L":"m","T":"s","K":"K","Q":"A","D":"rad","I":"cd","A":"mol"}'. See also \[EnSight Units\].

<a id="l00349" name="l00349"></a> 349// ENS\_CASE\_DATAFORMAT | The EnSight data reader used to load this portion of the tree. An example would be: 'Fluent'.

<a id="l00350" name="l00350"></a> 350message UpdateGroup{

<a id="l00351" name="l00351"></a> 351 uint64 id = 1; // The Group entity id

<a id="l00352" name="l00352"></a> 352 uint64 parent_id = 2; // Parent Group or View id

<a id="l00353" name="l00353"></a> 353 string name = 3; // The name of the Group

<a id="l00354" name="l00354"></a> 354 repeated float matrix4x4 = 4; // A 4x4 transformation matrix 

<a id="l00355" name="l00355"></a> 355 map&lt;string,string&gt; attributes = 5; // General attributes associated with this Group

<a id="l00356" name="l00356"></a> 356 

<a id="l00357" name="l00357"></a> 357 string hash = 6; // hash for this message payload

<a id="l00358" name="l00358"></a> 358}

<a id="l00359" name="l00359"></a> 359 

<a id="l00360" name="l00360"></a> 360// @brief Update a Geom entity

<a id="l00361" name="l00361"></a> 361// 

<a id="l00362" name="l00362"></a> 362// The geom entity holds the physical arrays used for rendering.

<a id="l00363" name="l00363"></a> 363// It contains a coordinate array and connectivity that is relative to the coordinate array

<a id="l00364" name="l00364"></a> 364// for this geom. The connectivity can be triangles, lines or empty (points).

<a id="l00365" name="l00365"></a> 365// If triangles, optional edgeflags specify the "line" representation of the triangles (for element outlining)

<a id="l00366" name="l00366"></a> 366// Otherwise, the geom object can hold the data payloads for other variables tagged via their variable id.

<a id="l00367" name="l00367"></a> 367// The use of these variables is dictated by fields in the Part entity that note the use of specific

<a id="l00368" name="l00368"></a> 368// variables for other purposes (e.g. normals, coloring, node size, etc).

<a id="l00369" name="l00369"></a> 369// Multiple UpdateGeom packets are send to fill in an entire array, limited by the size specified 

<a id="l00370" name="l00370"></a> 370// in the init command. All Geom packets for a specific array will include the full size of the

<a id="l00371" name="l00371"></a> 371// target array (in base type units, uint32 or float) and an offset where the payload of a specific

<a id="l00372" name="l00372"></a> 372// UpdateGeom packet should be stored in the array.

<a id="l00373" name="l00373"></a> 373message UpdateGeom {

<a id="l00374" name="l00374"></a> 374 // The type of array the Geom represents

<a id="l00375" name="l00375"></a> 375 enum ArrayType {

<a id="l00376" name="l00376"></a> 376 COORDINATES = 0; // x1,y1,z1,x2,y2,z2 ...

<a id="l00377" name="l00377"></a> 377 TRIANGLES = 1; // 3\*uint32 per triangle (zero based)

<a id="l00378" name="l00378"></a> 378 LINES = 2; // 2\*uint32 per line segment (zero based)

<a id="l00379" name="l00379"></a> 379 EDGEFLAGS = 3; // uint32 per element (only used with triangles)

<a id="l00380" name="l00380"></a> 380 ELEM_VARIABLE = 4; // per element 1D variable values from the variable\_id

<a id="l00381" name="l00381"></a> 381 NODE_VARIABLE = 5; // per node 1D variable values from the variable\_id

<a id="l00382" name="l00382"></a> 382 ELEM_NORMALS = 6; // x1,y1,z1,x2,y2,z2 ... 

<a id="l00383" name="l00383"></a> 383 NODE_NORMALS = 7; // x1,y1,z1,x2,y2,z2 ...

<a id="l00384" name="l00384"></a> 384 TEX_COORDINATES = 8;// 2\*float, always per vertex, u1,v1,u2,v2 ...

<a id="l00385" name="l00385"></a> 385 }

<a id="l00386" name="l00386"></a> 386 

<a id="l00387" name="l00387"></a> 387 uint64 id = 1; // The Geom entity id

<a id="l00388" name="l00388"></a> 388 uint64 parent_id = 2; // Parent Part entity id

<a id="l00389" name="l00389"></a> 389 

<a id="l00390" name="l00390"></a> 390 ArrayType payload_type = 3; // The type of the array represented by this entity

<a id="l00391" name="l00391"></a> 391 uint64 variable_id = 4; // If the ArrayType is VARIABLE, this is the associated entity id of a Variable 

<a id="l00392" name="l00392"></a> 392 

<a id="l00393" name="l00393"></a> 393 repeated float flt_array = 5 [packed=true]; // Used when payload\_type is VARIABLE or COORDINATES

<a id="l00394" name="l00394"></a> 394 repeated uint32 int_array = 6 [packed=true]; // Used when payload\_type is TRIANGLES, LINES or EDGEFLAGS

<a id="l00395" name="l00395"></a> 395 uint64 chunk_offset = 7; // The offset in "elements" (floats, uint32, etc) of the array represented by this Geom

<a id="l00396" name="l00396"></a> 396 uint64 total_array_size = 8; // The total size in "elements" (floats, uint32, etc) of the array represented by this Geom

<a id="l00397" name="l00397"></a> 397 

<a id="l00398" name="l00398"></a> 398 string hash = 9; // hash for this message payload

<a id="l00399" name="l00399"></a> 399}

<a id="l00400" name="l00400"></a> 400 

<a id="l00401" name="l00401"></a> 401 

<a id="l00402" name="l00402"></a> 402// @brief A "knot" point in the palette for the Variable

<a id="l00403" name="l00403"></a> 403//

<a id="l00404" name="l00404"></a> 404// This message maps a variable value to a specific color.

<a id="l00405" name="l00405"></a> 405message VariableLevel {

<a id="l00406" name="l00406"></a> 406 float value = 1; // The variable value the color is associated with

<a id="l00407" name="l00407"></a> 407 float red = 2; // Red \[0, 1\]

<a id="l00408" name="l00408"></a> 408 float green = 3; // Green \[0, 1\]

<a id="l00409" name="l00409"></a> 409 float blue = 4; // Blue \[0, 1\]

<a id="l00410" name="l00410"></a> 410 float alpha = 5; // Alpha \[0, 1\]

<a id="l00411" name="l00411"></a> 411}

<a id="l00412" name="l00412"></a> 412 

<a id="l00413" name="l00413"></a> 413// @brief Update a Variable entity

<a id="l00414" name="l00414"></a> 414//

<a id="l00415" name="l00415"></a> 415// General meta data about a variable, and about how to color by that variable.

<a id="l00416" name="l00416"></a> 416// All parts colored by a the same variable in EnSight use the same palette, same var range, etc.

<a id="l00417" name="l00417"></a> 417//

<a id="l00418" name="l00418"></a> 418// The attributes are open for various uses, but several attribute key values have already been

<a id="l00419" name="l00419"></a> 419// defined:

<a id="l00420" name="l00420"></a> 420//

<a id="l00421" name="l00421"></a> 421// \[EnSight Units\]: https://nexusdemo.ensight.com/docs/python/html/ENS\_UNITSSchema.html#TOC-ENS\_UNITS\_SYSTEM "EnSight Units System"

<a id="l00422" name="l00422"></a> 422//

<a id="l00423" name="l00423"></a> 423// Attribute | Value

<a id="l00424" name="l00424"></a> 424// --------- | -----

<a id="l00425" name="l00425"></a> 425// ENS\_OBJ\_TYPE | The EnSight object type associated with this Group entity (e.g. "ENS\_PART", "ENS\_CASE", "ENS\_VAR").

<a id="l00426" name="l00426"></a> 426// ENS\_OBJ\_ID | The EnSight object ID associated with the Group entity.

<a id="l00427" name="l00427"></a> 427// ENS\_UNITS\_DIMS | The unit dimensionality for the a specific ENS\_VAR. An example for a pressure variable would be: 'M/LTT'. See also \[EnSight Units\].

<a id="l00428" name="l00428"></a> 428message UpdateVariable {

<a id="l00429" name="l00429"></a> 429 // @brief Declare where a variable is defined to exist

<a id="l00430" name="l00430"></a> 430 //

<a id="l00431" name="l00431"></a> 431 // Variables can located at each node or element of the mesh.

<a id="l00432" name="l00432"></a> 432 enum VarLocation {

<a id="l00433" name="l00433"></a> 433 NODAL = 0; // The variable is specified per mesh node

<a id="l00434" name="l00434"></a> 434 ELEMENTAL = 1; // The variable is specified per mesh element (e.g. triangle)

<a id="l00435" name="l00435"></a> 435 }

<a id="l00436" name="l00436"></a> 436 

<a id="l00437" name="l00437"></a> 437 // @brief Declare the variable dimension

<a id="l00438" name="l00438"></a> 438 //

<a id="l00439" name="l00439"></a> 439 // Variables can either be a single float (SCALAR) per observed location or

<a id="l00440" name="l00440"></a> 440 // a 3 float vector (VECTOR).

<a id="l00441" name="l00441"></a> 441 enum VarDimension {

<a id="l00442" name="l00442"></a> 442 [SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68) = 0; // The variable has one value per location

<a id="l00443" name="l00443"></a> 443 [VECTOR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a1a85ef13eaa80e8561743892f9dba958) = 1; // The variable has three values per location

<a id="l00444" name="l00444"></a> 444 }

<a id="l00445" name="l00445"></a> 445 

<a id="l00446" name="l00446"></a> 446 // @brief Palette interpolation options

<a id="l00447" name="l00447"></a> 447 //

<a id="l00448" name="l00448"></a> 448 // Specify if palette interpolation should be linear or stepwise.

<a id="l00449" name="l00449"></a> 449 enum PaletteInterpolation {

<a id="l00450" name="l00450"></a> 450 CONTINUOUS = 0; // The interpolation of the variable palette is linear

<a id="l00451" name="l00451"></a> 451 BANDED = 1; // The interpolation of the variable palette is a step function

<a id="l00452" name="l00452"></a> 452 }

<a id="l00453" name="l00453"></a> 453 

<a id="l00454" name="l00454"></a> 454 // @brief Undefined interpretation

<a id="l00455" name="l00455"></a> 455 //

<a id="l00456" name="l00456"></a> 456 // EnSight has a special float value indicating that the variable is undefined for a vertex or element.

<a id="l00457" name="l00457"></a> 457 // Options for drawing these elements are in the UndefinedDisplay enum. The value that means 'undefined' is

<a id="l00458" name="l00458"></a> 458 // given below in undefined\_value. By default, the undefined value is -1.2345e-10.

<a id="l00459" name="l00459"></a> 459 enum UndefinedDisplay {

<a id="l00460" name="l00460"></a> 460 AS_ZERO = 0; // Draw 'undefined' as 0.0

<a id="l00461" name="l00461"></a> 461 AS_INVISIBLE = 1; // Don't draw any pixels where the variable value is undefined.

<a id="l00462" name="l00462"></a> 462 USE_PART_COLOR = 2; // Draw 'undefined' areas using the 'fill\_color' value on the part

<a id="l00463" name="l00463"></a> 463 USE_UNDEF_COLOR = 3; // Draw 'undefined' areas using a color given below in undefined\_color

<a id="l00464" name="l00464"></a> 464 }

<a id="l00465" name="l00465"></a> 465 

<a id="l00466" name="l00466"></a> 466 uint64 id = 1; // The Variable entity id

<a id="l00467" name="l00467"></a> 467 uint64 parent_id = 2; // The parent scene id

<a id="l00468" name="l00468"></a> 468 

<a id="l00469" name="l00469"></a> 469 string name = 3; // The name of the variable

<a id="l00470" name="l00470"></a> 470 VarLocation location = 4; // The location of the variable

<a id="l00471" name="l00471"></a> 471 VarDimension dimension = 5; // The dimensionality of the variable

<a id="l00472" name="l00472"></a> 472 float undefined_value = 6; // The float value that should be interpreted as "Undefined"

<a id="l00473" name="l00473"></a> 473 

<a id="l00474" name="l00474"></a> 474 PaletteInterpolation pal_interp = 7; // How the color palette specified by levels should be interpolated

<a id="l00475" name="l00475"></a> 475 repeated VariableLevel levels = 8; // The color and var value at palette levels. Lowest to highest.

<a id="l00476" name="l00476"></a> 476 uint32 sub_levels = 9; // The number of "sub-levels" that might be used with BANDED interpolation. The total number of bands is (levels-1)\*(sub\_levels+1). The color in each level is used on the band at and above the level value, except for the last level's color, which is use on the band below it. Linearly interpolate in RGB space to get the colors of the bands between levels.

<a id="l00477" name="l00477"></a> 477 UndefinedDisplay undefined_display = 10; // How should the undefined values be displayed.

<a id="l00478" name="l00478"></a> 478 repeated float undefined_color = 11; // If undefined\_display==USE\_UNDEF\_COLOR, rgb in \[0,1\] given here

<a id="l00479" name="l00479"></a> 479 bytes texture = 12; // rgba pixel values (rrggbbaa 4 bytes/pixel) in \[0,255\]. For the color\_variableid, use only the rgb portion of this texture. For the alpha\_variableid, use only the 'a' portion of this texture. levels\[0\].value should map to tex coord==0 for banded, 0.5 texel for continuous levels\[levels.size()-1\].value should map to tex coord==1 for banded, 1 - 0.5 texel for continuous.

<a id="l00480" name="l00480"></a> 480 map&lt;string,string&gt; attributes = 13; // General attributes associated with this Variable

<a id="l00481" name="l00481"></a> 481 

<a id="l00482" name="l00482"></a> 482 string hash = 14; // hash for this message payload

<a id="l00483" name="l00483"></a> 483}

<a id="l00484" name="l00484"></a> 484 

<a id="l00485" name="l00485"></a> 485 

<a id="l00486" name="l00486"></a> 486// @brief Update a Texture entity

<a id="l00487" name="l00487"></a> 487//

<a id="l00488" name="l00488"></a> 488// Sent to update a 2D texture. 

<a id="l00489" name="l00489"></a> 489message UpdateTexture {

<a id="l00490" name="l00490"></a> 490 // @brief Define the imaging format of a texture

<a id="l00491" name="l00491"></a> 491 //

<a id="l00492" name="l00492"></a> 492 // Texture images are always a single byte per component, but images can be

<a id="l00493" name="l00493"></a> 493 // RGB (three components) or RGBA (four components) per pixel. RGBA are the

<a id="l00494" name="l00494"></a> 494 // red, blue, green and alpha channels of the image.

<a id="l00495" name="l00495"></a> 495 enum TextureFormat {

<a id="l00496" name="l00496"></a> 496 RGB = 0;

<a id="l00497" name="l00497"></a> 497 RGBA = 1;

<a id="l00498" name="l00498"></a> 498 }

<a id="l00499" name="l00499"></a> 499 uint64 id = 1; // texture entity id

<a id="l00500" name="l00500"></a> 500 uint64 parent_id = 2; // scene entity id

<a id="l00501" name="l00501"></a> 501 TextureFormat format = 3; // RGB or RGBA

<a id="l00502" name="l00502"></a> 502 uint32 width = 4; // texture width. not generally a power of 2

<a id="l00503" name="l00503"></a> 503 uint32 height = 5; // texture height. not generally a power of 2

<a id="l00504" name="l00504"></a> 504 bytes texels = 6; // packed RGB or RGBA values depending on 'format', in range \[0,255\]

<a id="l00505" name="l00505"></a> 505 

<a id="l00506" name="l00506"></a> 506 string hash = 7; // hash for this message payload

<a id="l00507" name="l00507"></a> 507}

<a id="l00508" name="l00508"></a> 508 

<a id="l00509" name="l00509"></a> 509 

<a id="l00510" name="l00510"></a> 510// @brief Aggregate command sent by EnSight to a client

<a id="l00511" name="l00511"></a> 511//

<a id="l00512" name="l00512"></a> 512// This command represents a union of a number of different commands: UpdateSceneBegin, 

<a id="l00513" name="l00513"></a> 513// UpdateSceneEnd, DeleteID, UpdatePart, UpdateGroup, UpdateGeom, UpdateVariable and 

<a id="l00514" name="l00514"></a> 514// UpdateView. To use the message, set the command\_type to the type of the message 

<a id="l00515" name="l00515"></a> 515// and fill in the appropriate UpdateCommand sub-message.

<a id="l00516" name="l00516"></a> 516message SceneUpdateCommand {

<a id="l00517" name="l00517"></a> 517 // @brief Specify the specific command type

<a id="l00518" name="l00518"></a> 518 //

<a id="l00519" name="l00519"></a> 519 // SceneUpdateCommand object can represent many different sub-commands, but

<a id="l00520" name="l00520"></a> 520 // packed into a common message. The SceneUpdateCommandType is the specific

<a id="l00521" name="l00521"></a> 521 // sub-command type of the base message.

<a id="l00522" name="l00522"></a> 522 enum SceneUpdateCommandType {

<a id="l00523" name="l00523"></a> 523 UPDATE_SCENE_BEGIN = 0; // Marks the beginning of a scene update

<a id="l00524" name="l00524"></a> 524 UPDATE_SCENE_END = 1; // Marks the completion of a scene update

<a id="l00525" name="l00525"></a> 525 DELETE_ID = 2; // Tell the client to delete an entity ID that was defined in a previous scene update

<a id="l00526" name="l00526"></a> 526 UPDATE_PART = 3; // Create/update a Part entity

<a id="l00527" name="l00527"></a> 527 UPDATE_GROUP = 4; // Create/update a Group entity

<a id="l00528" name="l00528"></a> 528 UPDATE_GEOM = 5; // Create/update a Geom entity

<a id="l00529" name="l00529"></a> 529 UPDATE_VARIABLE = 6; // Create/update a Variable entity

<a id="l00530" name="l00530"></a> 530 UPDATE_VIEW = 7; // Create/update a View entity

<a id="l00531" name="l00531"></a> 531 UPDATE_TEXTURE = 8; // Create/update a Texture entity

<a id="l00532" name="l00532"></a> 532 }

<a id="l00533" name="l00533"></a> 533 SceneUpdateCommandType command_type = 1; // The update command type

<a id="l00534" name="l00534"></a> 534 

<a id="l00535" name="l00535"></a> 535 // @brief The union of the sub-command messages

<a id="l00536" name="l00536"></a> 536 //

<a id="l00537" name="l00537"></a> 537 // Each SceneUpdateCommand message can be one of the types defined by the

<a id="l00538" name="l00538"></a> 538 // command\_type. These are represented via a union message construct.

<a id="l00539" name="l00539"></a> 539 oneof UpdateCommand { 

<a id="l00540" name="l00540"></a> 540 UpdateSceneBegin scene_begin = 2; // Begin a scene update 

<a id="l00541" name="l00541"></a> 541 UpdateSceneEnd scene_end = 3; // End a scene update

<a id="l00542" name="l00542"></a> 542 DeleteID delete_id = 4; // Delete a collection of entities from the cache

<a id="l00543" name="l00543"></a> 543 UpdatePart update_part = 5; // Update a Part entity

<a id="l00544" name="l00544"></a> 544 UpdateGroup update_group = 6; // Update a Group entity

<a id="l00545" name="l00545"></a> 545 UpdateGeom update_geom = 7; // Update a Geom entity

<a id="l00546" name="l00546"></a> 546 UpdateVariable update_variable = 8; // Update a Variable entity

<a id="l00547" name="l00547"></a> 547 UpdateView update_view = 9; // Update a View entity

<a id="l00548" name="l00548"></a> 548 UpdateTexture update_texture = 10; // Update a Texture entity

<a id="l00549" name="l00549"></a> 549 }

<a id="l00550" name="l00550"></a> 550}

[VECTOR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a1a85ef13eaa80e8561743892f9dba958)

@ VECTOR

XYZ Coordinates.

**Definition** [dynamic\_visualization\_store\_enums.h:32](dynamic__visualization__store__enums_8h_source.xhtml#l00032)



[SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68)

@ SCALAR

Scalar.

**Definition** [dynamic\_visualization\_store\_enums.h:31](dynamic__visualization__store__enums_8h_source.xhtml#l00031)