Skip to main content

Post-processing tools 2023 R2

dynamic_scene_graph.proto

Last update: 17.04.2023
1 // *****************************************
2 // Copyright 2022 ANSYS, Inc.
3 // All Rights Reserved.
4 //
5 // Restricted Rights Legend
6 //
7 // Use, duplication, or disclosure of this
8 // software and its documentation by the
9 // Government is subject to restrictions as
10 // set forth in subdivision [(b)(3)(ii)] of
11 // the Rights in Technical Data and Computer
12 // Software clause at 52.227-7013.
13 // *****************************************
14 
15 syntax = "proto3";
16 
17 //@ingroup grpc
18 // Dynamic scene graph gRPC service definition
19 
20 package ensightservice;
21 
22 //@defgroup DSG DynamicSceneGraphService
23 //@ingroup grpc
24 //@brief The dynamic scene graph gRPC service
25 //
26 // The dynamic scene graph gRPC service provides a mechanism by which a client
27 // application can attach to a running EnSight session and read the current scene
28 // geometry. The API allows the client application to track the client scene
29 // graph state. It supports both complete and incremental updates. For incremental
30 // updates, the EnSight client tracks the remote scene graph state specific to each
31 // active scene stream.
32 //
33 // The EnSight distribution includes a simple example client written in Python. The
34 // renderer in the example client is not complete (e.g. it does not support all of
35 // the texturing modes or two sided lighting), but it does demonstrate how a client
36 // should interpret the various messages that constitute a scene update operation.
37 // This example is located in the same directory (ensightXXX/site_preferences/extensions/grpc)
38 // as this .proto file and is named dynamic_scene_graph_example_client.py. To
39 // run the example client (Windows example, ANSYS 2021 R1 distribution), first start
40 // EnSight with the following command line:
41 // \code{.unparsed}
42 // ensight.bat -grpc_server 12345
43 // \endcode
44 // Then in another shell window run the Python script using the EnSight Python
45 // interpreter:
46 // \code{.unparsed}
47 // cpython.bat dynamic_scene_graph_example_client.py
48 // \endcode
49 // Load some data into the EnSight session and then select "Update" from the
50 // example client GUI menus to initiate a scene refresh. By default, the example
51 // client will send a SceneClientCommand (SceneClientCommand::ClientCommandType::INIT)
52 // message and EnSight will respond with a sequence of update messages. If the File->Allow push updates
53 // option is enabled in the sample client, it will allow EnSight to push scene graph updates
54 // in asynchronous fashion. An EnSight initiated scene update can be started from the Python
55 // interpreter in the EnSight client using this code fragment:
56 // \code{.python}
57 // import enspyqtgui_int
58 // enspyqtgui_int.dynamic_scene_graph_command("dynamicscenegraph://localhost/client/update")
59 // \endcode
60 // This update will be seen by all current dynamic scene graph sessions that have the
61 // allow_spontaneous flag set in their SceneClientCommand INIT messages.
62 //
63 // EnSight will export all of the geometry visible in the viewport 0 as the scene
64 // contents. Individual parts may have the metadata tag "ENS_DSG_HINTS" set to a
65 // string. If the string contains the substring "HIDE", that part will not be
66 // included in the export, even if it is visible in viewport 0.
67 //
68 // @section entities Overview of the dynamic scene graph API entities
69 // <hr>
70 //
71 // The gRPC API update commands define a collection of entities that describe the
72 // scene graph. These entities refer to each other using entity IDs. The IDs are
73 // a proxy for pointers. An individual entity can be updated (one SceneUpdateCommand
74 // message for each update message) or destroyed by SceneUpdateCommand messages.
75 // All addressable entities have a 64bit "id" associated with them. An "update" command
76 // is used to create an entity and to update its attributes.
77 //
78 // An incremental update will only send updates for the entities that have changed
79 // since the previous update. If an entity no longer exists after this update, the
80 // entity ID will be sent in a DeleteID command.
81 //
82 // The currently defined entities are:
83 //
84 // Entity | Description
85 // ------ | -----------
86 // Scene | Top of the tree of entities. It may contain View and Variable entities.
87 // View | Contains timestep and camera information for a tree of geometry. It may contain Group and Part entities.
88 // Group | Child of a View or another Group. It may contain Part and Group entities. Includes a 4x4 matrix transform and arbitrary attributes.
89 // Part | Child of a Group, parent to Geom entities. Defines a "mesh" and display attributes.
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
91 // Variable | Defines variable display properties: Nodal, Elemental, ranges, interpolation, etc. Child of a Scene.
92 //
93 // The View, Group, Part, Geom and Variable entities all include a hash field. This string
94 // is unique to the contents of the update message. Thus, if two messages of the same type
95 // have the same hash, they can be considered to have identical contents.
96 //
97 // @subsection updateprocess The entity update gRPC message sequence
98 // <hr>
99 //
100 // The update process is initiated by the client application unless a SceneClientCommand message
101 // has enabled spontaneous updates. A spontaneous update starts with step 2.
102 //
103 // 1. Client sends a SceneClientCommand (SceneClientCommand::ClientCommandType::INIT)
104 // message to the EnSight gRPC service of the type SceneClientInit. This triggers
105 // the update sequence.
106 //
107 // 2. EnSight sends a SceneUpdateCommand UpdateSceneBegin (SceneUpdateCommand::SceneUpdateCommandType::UPDATE_SCENE_BEGIN)
108 // message to the client.
109 //
110 // 3. EnSight sends a series of SceneUpdateCommand messages to the client. These messages
111 // can be of these types (DeleteID, UpdatePart, UpdateGroup, UpdateGeom, UpdateVariable, UpdateView).
112 // Note there should be no assumption about the order of these messages.
113 //
114 // 4. EnSight sends a final SceneUpdateCommand UpdateSceneEnd (SceneUpdateCommand::SceneUpdateCommandType::UPDATE_SCENE_END)
115 // message to the client, signifying the end of a scene graph update.
116 //
117 // @subsection entitydiagram Entity relationship diagram
118 // <hr>
119 //
120 // \image html ./dynamic_scene_graph_service_entities.svg
121 //
123 service DynamicSceneGraphService {
124  //@addtogroup DSG
126 
127  // @brief Start a new dynamic scene graph stream
128  //
129  // This gRPC call opens a bi-directional stream between the client application and the
130  // EnSight gRPC server. The client application can make requests for updates to the
131  // current scene graph by sending SceneClientCommand messages. The EnSight server
132  // responds with a series of SceneUpdateCommand messages.
133  // @param SceneClientCommand A stream of SceneClientCommand objects
134  // @return SceneUpdateCommand A stream of SceneUpdateCommand messages from the EnSight client
135  rpc GetSceneStream (stream SceneClientCommand) returns (stream SceneUpdateCommand) {};
136 
137  // @brief Get the server version of the dynamic scene graph stream
138  // @param versionrequest dummy argument
139  // @return VersionReply the API version currently supported by the server
141 
143 }
145 
146 
147 // @brief Request for the server API version
148 //
149 // Dummy argument for the GetAPIVersion rpc
150 message VersionRequest {
151 }
152 
153 // @brief The server API version
154 //
155 // This command returns the version number of the DynamicSceneGraphService that the server
156 // supports. The number is defined in this .proto file as VersionEnumType::CURRENT_VERSION.
157 // The protocol passes this value as an int32 so that the client can receive the value
158 // properly and then compare it to its own value of the VersionEnumType::CURRENT_VERSION enum
159 // generated by the version of the proto file it had compiled.
160 message VersionReply {
161  // @brief version number
162  //
163  // The version type is used to determine the version number the protocol corresponds to.
164  enum VersionEnumType {
165  UNDEFINED = 0; // No version number specified
166  CURRENT_VERSION = 101; // Current version of the .proto file/protocol
167  }
168  int32 version = 1; // The API version number as an integer. It should be the value VersionEnumType::CURRENT_VERSION.
169 }
170 
171 // @brief Request by the client for an EnSight scene update
172 //
173 // This SceneClientCommand sub message is sent by the client at startup or whenever the client
174 // would like a scene update. The server will respond by starting a scene update command sequence,
175 // beginning with a SceneUpdateCommand message, UpdateSceneBegin sub command. The update sequence
176 // will end with a SceneUpdateCommand message, UpdateSceneEnd sub command.
177 //
178 // This message also informs the server what the maximum size of a block of data should be (in bytes).
179 // It also can be used to enable "spontaneous" scene updates that can be started by the EnSight server
180 // at any time. If the client would like the server to rebroadcast the entire scene, it should
181 // set the allow_incremental_updates flag to false, suppressing state cache tracking by the server.
182 message SceneClientInit {
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.
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.
185  int32 maximum_chunk_size = 3; // Sets the maximum payload blocksize in bytes in a single UpdateGeom message (0=unrestricted payload size).
186  bool include_temporal_geometry = 4; // If true, request that the current temporal geometry be sent. If false, the current static view is sent
187 }
188 
189 // @brief Update a parameter in the EnSight session
190 //
191 // Message from client to change some EnSight session state. This command is currently unimplemented. The
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)
193 message SceneClientUpdate {
194  // To be defined
195 }
196 
197 // @brief Aggregate command sent by a dynamic scene graph client
198 //
199 // This command represents a union of two different base commands: SceneClientInit and SceneClientUpdate. To
200 // use the message, set the command_type to the type of the message and fill in the appropriate ClientCommand
201 // sub-message.
202 message SceneClientCommand {
203  // The type of the ClientCommand oneof that has been set
205  INIT = 0; // Initial command to be sent. Can be sent repeatedly to reset session parameters or request a scene update
206  UPDATE = 1; // Undefined at present, but used to send interaction information from VR1 back to EnSight
207  }
208  ClientCommandType command_type = 1; // The command type
209  // message union
210  oneof ClientCommand {
211  SceneClientInit init = 2; // Init a session/request a scene graph update
212  SceneClientUpdate update = 3; // Modify an EnSight session
213  }
214 }
215 
216 // @brief Begin an update sequence
217 //
218 // Sent to mark the start of an update operation, the scene will not be complete until UpdateSceneEnd is received
219 message UpdateSceneBegin {
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
221  uint64 id = 2; // The scene entity id
222 }
223 
224 // @brief End an update sequence
225 //
226 // Sent when the entire scene as been defined and can now be rendered
227 message UpdateSceneEnd {
228  uint64 id = 1; // The scene entity id
229 }
230 
231 // @brief Delete a list of entities.
232 message DeleteID {
233  repeated uint64 ids = 1 [packed=true]; // A list of entity ids that have been deleted (and non longer exist in the cache)
234 }
235 
236 // @brief Update a View entity
237 //
238 // Scenes contain a collection of View entities that provide camera definitions and
239 // have groups (leading to Parts entities) as children. A View also provides a timeline
240 // over which its children should be considered visible. The timeline contains
241 // two time values. Children of the View are considered visible at some time t,
242 // if: `timeline[0] <= t < timeline[1]`.
243 message UpdateView {
244  uint64 id = 1; // View entity id.
245  uint64 parent_id = 2; // Scene entity id.
246  repeated float timeline = 3; // Start and end time these children are to be displayed, two values.
247  repeated float lookat = 4; // X,Y,Z of the view lookat point.
248  repeated float lookfrom = 5; // X,Y,Z of the view lookfrom point.
249  repeated float upvector = 6; // NX,NY,NZ of the view up vector.
250  float fieldofview = 7; // The field of view angle in degrees.
251  float aspectratio = 8; // Display rectangle aspect ratio (dx/dy).
252  repeated float nearfar = 9; // The distance from the lookfrom point to the near and far clipping planes.
253 
254  string hash = 10; // hash for this message payload
255 }
256 
257 
258 // @brief Update a Part entity
259 //
260 // Sent to update part rendering attributes. Parts have Geom entity children that define
261 // the bulk data arrays.
262 //
263 // The material name needs additional work. If 'steel' or 'glass' are specified, are we expecting the client
264 // to come up with shaders for those materials, or just informing that fill_color and shininess parameters
265 // are steel-like or glass-like. General thinking is to use common namespaces (e.g. granta, etc)
266 // for known material specifications and namespace prefixed JSON for others (e.g. ensight:{json payload}
267 message UpdatePart {
268  // The rendering mode is actually a bit field, defining what should be rendered.
270  NODES = 0; // render the nodes of the connectivity (spheres)
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
272  }
273 
274  // Define the location of normals
275  enum ShadingMode {
276  ELEMENTAL = 0; // Normals are specified per element face (e.g. one normal per triangle).
277  NODAL = 1; // Normals are specified per node.
278  }
279 
280  // 2D texture options for tex coords outside [0,1]
281  enum TextureWrapMode {
282  REPEAT = 0; // Like GL_REPEAT
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.
284  CLAMP_TEXTURE = 2; // Like GL_CLAMP_TO_EDGE
285  }
286  // 2D texture options for combining texture color with part color, lighting, color by var
288  REPLACE = 0; // 2D texture color replaces all other color. No lighting. Same as DECAL unless wrap mode is CLAMP.
289  DECAL = 1; // 2D texture color replaces all other color. No lighting.
290  MODULATE = 2; // Color as usual with part color, lighting, color by var, etc. Then multiply by the 2D texture color.
291  }
292  // 2D texture interpolation
294  NEAREST = 0; // Like GL_NEAREST
295  LINEAR = 1; // Like GL_LINEAR
296  }
297 
298  uint64 id = 1; // The Part entity id
299  uint64 parent_id = 2; // Parent Group id
300 
301  string name = 3; // The name of the Part
302  repeated float matrix4x4 = 4; // Rigid body motion
303 
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.
305  repeated float line_color = 6; // Used for rendering line connectivity and element boundaries if edgeflags are specified
306  RenderingMode render = 7; // What to aspect of the mesh to render
307  ShadingMode shading = 8; // Defines the location of the normals. If normals are specified per-element, triangles should be shaded as "flat"
308 
309  float ambient = 9; // OpenGL style ambient coloring factor: GL_AMBIENT
310  float diffuse = 10; // OpenGL style diffuse coloring rgb: GL_DIFFUSE
311  float specular_shine = 11; // OpenGL style specular factor: GL_SHININESS
312  float specular_intensity = 12; // OpenGL style specular factor: GL_SPECULAR
313  string material_name = 13; // The material name specification
314  float node_size_default = 14; // If node rendering is specified, the base size of each node
315  uint64 color_variableid = 15; // per-node or per-element coloring specification
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.
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 instead of the node_size_default.
318  uint64 displacement_variableid = 18; // if this is set, the vector variable should be added to the coordinate variable to generate the final coordinate.
319 
320  uint64 texture_id = 19; // 2D texture to apply.
321  TextureWrapMode texture_wrap_mode = 20; // 2D texture wrapping options
322  TextureApplyMode texture_apply_mode = 21; // 2D texture color blending options
323  TextureSampleMode texture_sample_mode = 22; // 2D texture sampling options
324 
325  string hash = 23; // hash for this message payload
326 
327  // could specify a projected plane for tex coords, then sometimes would not need to send the TEX_COORDINATES update
328  // TBD: "control" variables (e.g. clip plane position, etc) that can be modified in the VR environment
329  // TBD: attributes specific to certain types of parts, like animation options on particle traces
330  // TBD: mirroring/instancing. perhaps add an array of transformation matrices, or just the mirror plane/rotational axis parameters
331 }
332 
333 
334 // @brief Update a Group entity
335 //
336 // Sent to update a group entity. The group is a simple entity serving as the basic "tree"
337 // node.
338 //
339 // The attributes are open for various uses, but several attribute key values have already been
340 // defined:
341 //
342 // [EnSight Units]: https://nexusdemo.ensight.com/docs/python/html/ENS_UNITSSchema.html#TOC-ENS_UNITS_SYSTEM "EnSight Units System"
343 //
344 // Attribute | Value
345 // --------- | -----
346 // ENS_OBJ_TYPE | The EnSight object type associated with this Group entity (e.g. "ENS_PART", "ENS_CASE", "ENS_VAR").
347 // ENS_OBJ_ID | The EnSight object ID associated with the Group entity.
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].
349 // ENS_CASE_DATAFORMAT | The EnSight data reader used to load this portion of the tree. An example would be: 'Fluent'.
350 message UpdateGroup{
351  uint64 id = 1; // The Group entity id
352  uint64 parent_id = 2; // Parent Group or View id
353  string name = 3; // The name of the Group
354  repeated float matrix4x4 = 4; // A 4x4 transformation matrix
355  map<string,string> attributes = 5; // General attributes associated with this Group
356 
357  string hash = 6; // hash for this message payload
358 }
359 
360 // @brief Update a Geom entity
361 //
362 // The geom entity holds the physical arrays used for rendering.
363 // It contains a coordinate array and connectivity that is relative to the coordinate array
364 // for this geom. The connectivity can be triangles, lines or empty (points).
365 // If triangles, optional edgeflags specify the "line" representation of the triangles (for element outlining)
366 // Otherwise, the geom object can hold the data payloads for other variables tagged via their variable id.
367 // The use of these variables is dictated by fields in the Part entity that note the use of specific
368 // variables for other purposes (e.g. normals, coloring, node size, etc).
369 // Multiple UpdateGeom packets are send to fill in an entire array, limited by the size specified
370 // in the init command. All Geom packets for a specific array will include the full size of the
371 // target array (in base type units, uint32 or float) and an offset where the payload of a specific
372 // UpdateGeom packet should be stored in the array.
373 message UpdateGeom {
374  // The type of array the Geom represents
375  enum ArrayType {
376  COORDINATES = 0; // x1,y1,z1,x2,y2,z2 ...
377  TRIANGLES = 1; // 3*uint32 per triangle (zero based)
378  LINES = 2; // 2*uint32 per line segment (zero based)
379  EDGEFLAGS = 3; // uint32 per element (only used with triangles)
380  ELEM_VARIABLE = 4; // per element 1D variable values from the variable_id
381  NODE_VARIABLE = 5; // per node 1D variable values from the variable_id
382  ELEM_NORMALS = 6; // x1,y1,z1,x2,y2,z2 ...
383  NODE_NORMALS = 7; // x1,y1,z1,x2,y2,z2 ...
384  TEX_COORDINATES = 8;// 2*float, always per vertex, u1,v1,u2,v2 ...
385  }
386 
387  uint64 id = 1; // The Geom entity id
388  uint64 parent_id = 2; // Parent Part entity id
389 
390  ArrayType payload_type = 3; // The type of the array represented by this entity
391  uint64 variable_id = 4; // If the ArrayType is VARIABLE, this is the associated entity id of a Variable
392 
393  repeated float flt_array = 5 [packed=true]; // Used when payload_type is VARIABLE or COORDINATES
394  repeated uint32 int_array = 6 [packed=true]; // Used when payload_type is TRIANGLES, LINES or EDGEFLAGS
395  uint64 chunk_offset = 7; // The offset in "elements" (floats, uint32, etc) of the array represented by this Geom
396  uint64 total_array_size = 8; // The total size in "elements" (floats, uint32, etc) of the array represented by this Geom
397 
398  string hash = 9; // hash for this message payload
399 }
400 
401 
402 // @brief A "knot" point in the palette for the Variable
403 //
404 // This message maps a variable value to a specific color.
405 message VariableLevel {
406  float value = 1; // The variable value the color is associated with
407  float red = 2; // Red [0, 1]
408  float green = 3; // Green [0, 1]
409  float blue = 4; // Blue [0, 1]
410  float alpha = 5; // Alpha [0, 1]
411 }
412 
413 // @brief Update a Variable entity
414 //
415 // General meta data about a variable, and about how to color by that variable.
416 // All parts colored by a the same variable in EnSight use the same palette, same var range, etc.
417 //
418 // The attributes are open for various uses, but several attribute key values have already been
419 // defined:
420 //
421 // [EnSight Units]: https://nexusdemo.ensight.com/docs/python/html/ENS_UNITSSchema.html#TOC-ENS_UNITS_SYSTEM "EnSight Units System"
422 //
423 // Attribute | Value
424 // --------- | -----
425 // ENS_OBJ_TYPE | The EnSight object type associated with this Group entity (e.g. "ENS_PART", "ENS_CASE", "ENS_VAR").
426 // ENS_OBJ_ID | The EnSight object ID associated with the Group entity.
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].
428 message UpdateVariable {
429  // @brief Declare where a variable is defined to exist
430  //
431  // Variables can located at each node or element of the mesh.
432  enum VarLocation {
433  NODAL = 0; // The variable is specified per mesh node
434  ELEMENTAL = 1; // The variable is specified per mesh element (e.g. triangle)
435  }
436 
437  // @brief Declare the variable dimension
438  //
439  // Variables can either be a single float (SCALAR) per observed location or
440  // a 3 float vector (VECTOR).
441  enum VarDimension {
442  SCALAR = 0; // The variable has one value per location
443  VECTOR = 1; // The variable has three values per location
444  }
445 
446  // @brief Palette interpolation options
447  //
448  // Specify if palette interpolation should be linear or stepwise.
449  enum PaletteInterpolation {
450  CONTINUOUS = 0; // The interpolation of the variable palette is linear
451  BANDED = 1; // The interpolation of the variable palette is a step function
452  }
453 
454  // @brief Undefined interpretation
455  //
456  // EnSight has a special float value indicating that the variable is undefined for a vertex or element.
457  // Options for drawing these elements are in the UndefinedDisplay enum. The value that means 'undefined' is
458  // given below in undefined_value. By default, the undefined value is -1.2345e-10.
460  AS_ZERO = 0; // Draw 'undefined' as 0.0
461  AS_INVISIBLE = 1; // Don't draw any pixels where the variable value is undefined.
462  USE_PART_COLOR = 2; // Draw 'undefined' areas using the 'fill_color' value on the part
463  USE_UNDEF_COLOR = 3; // Draw 'undefined' areas using a color given below in undefined_color
464  }
465 
466  uint64 id = 1; // The Variable entity id
467  uint64 parent_id = 2; // The parent scene id
468 
469  string name = 3; // The name of the variable
470  VarLocation location = 4; // The location of the variable
471  VarDimension dimension = 5; // The dimensionality of the variable
472  float undefined_value = 6; // The float value that should be interpreted as "Undefined"
473 
474  PaletteInterpolation pal_interp = 7; // How the color palette specified by levels should be interpolated
475  repeated VariableLevel levels = 8; // The color and var value at palette levels. Lowest to highest.
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.
477  UndefinedDisplay undefined_display = 10; // How should the undefined values be displayed.
478  repeated float undefined_color = 11; // If undefined_display==USE_UNDEF_COLOR, rgb in [0,1] given here
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.
480  map<string,string> attributes = 13; // General attributes associated with this Variable
481 
482  string hash = 14; // hash for this message payload
483 }
484 
485 
486 // @brief Update a Texture entity
487 //
488 // Sent to update a 2D texture.
489 message UpdateTexture {
490  // @brief Define the imaging format of a texture
491  //
492  // Texture images are always a single byte per component, but images can be
493  // RGB (three components) or RGBA (four components) per pixel. RGBA are the
494  // red, blue, green and alpha channels of the image.
496  RGB = 0;
497  RGBA = 1;
498  }
499  uint64 id = 1; // texture entity id
500  uint64 parent_id = 2; // scene entity id
501  TextureFormat format = 3; // RGB or RGBA
502  uint32 width = 4; // texture width. not generally a power of 2
503  uint32 height = 5; // texture height. not generally a power of 2
504  bytes texels = 6; // packed RGB or RGBA values depending on 'format', in range [0,255]
505 
506  string hash = 7; // hash for this message payload
507 }
508 
509 
510 // @brief Aggregate command sent by EnSight to a client
511 //
512 // This command represents a union of a number of different commands: UpdateSceneBegin,
513 // UpdateSceneEnd, DeleteID, UpdatePart, UpdateGroup, UpdateGeom, UpdateVariable and
514 // UpdateView. To use the message, set the command_type to the type of the message
515 // and fill in the appropriate UpdateCommand sub-message.
517  // @brief Specify the specific command type
518  //
519  // SceneUpdateCommand object can represent many different sub-commands, but
520  // packed into a common message. The SceneUpdateCommandType is the specific
521  // sub-command type of the base message.
523  UPDATE_SCENE_BEGIN = 0; // Marks the beginning of a scene update
524  UPDATE_SCENE_END = 1; // Marks the completion of a scene update
525  DELETE_ID = 2; // Tell the client to delete an entity ID that was defined in a previous scene update
526  UPDATE_PART = 3; // Create/update a Part entity
527  UPDATE_GROUP = 4; // Create/update a Group entity
528  UPDATE_GEOM = 5; // Create/update a Geom entity
529  UPDATE_VARIABLE = 6; // Create/update a Variable entity
530  UPDATE_VIEW = 7; // Create/update a View entity
531  UPDATE_TEXTURE = 8; // Create/update a Texture entity
532  }
533  SceneUpdateCommandType command_type = 1; // The update command type
534 
535  // @brief The union of the sub-command messages
536  //
537  // Each SceneUpdateCommand message can be one of the types defined by the
538  // command_type. These are represented via a union message construct.
539  oneof UpdateCommand {
540  UpdateSceneBegin scene_begin = 2; // Begin a scene update
541  UpdateSceneEnd scene_end = 3; // End a scene update
542  DeleteID delete_id = 4; // Delete a collection of entities from the cache
543  UpdatePart update_part = 5; // Update a Part entity
544  UpdateGroup update_group = 6; // Update a Group entity
545  UpdateGeom update_geom = 7; // Update a Geom entity
546  UpdateVariable update_variable = 8; // Update a Variable entity
547  UpdateView update_view = 9; // Update a View entity
548  UpdateTexture update_texture = 10; // Update a Texture entity
549  }
550 }
@ VECTOR
XYZ Coordinates.
rpc GetSceneStream(stream SceneClientCommand) returns(stream SceneUpdateCommand)
Start a new dynamic scene graph stream.
rpc GetAPIVersion(VersionRequest versionrequest) returns(VersionReply)
Get the server version of the dynamic scene graph stream.
Delete a list of entities.
Aggregate command sent by a dynamic scene graph client.
Request by the client for an EnSight scene update.
Update a parameter in the EnSight session.
Aggregate command sent by EnSight to a client.
SceneUpdateCommandType
Specify the specific command type.
TextureFormat
Define the imaging format of a texture.
VarLocation
Declare where a variable is defined to exist.
VarDimension
Declare the variable dimension.
UndefinedDisplay
Undefined interpretation.
PaletteInterpolation
Palette interpolation options.
A "knot" point in the palette for the Variable.
Request for the server API version.