Skip to main content

Post-processing tools 2023 R2

ensightservice::UpdatePart Struct Reference

Last update: 17.04.2023

Update a Part entity. More...

Public Types

enum  RenderingMode { NODES = 0 , CONNECTIVITY = 1 }
 
enum  ShadingMode { ELEMENTAL = 0 , NODAL = 1 }
 
enum  TextureWrapMode { REPEAT = 0 , CLAMP = 1 , CLAMP_TEXTURE = 2 }
 
enum  TextureApplyMode { REPLACE = 0 , DECAL = 1 , MODULATE = 2 }
 
enum  TextureSampleMode { NEAREST = 0 , LINEAR = 1 }
 

Public Attributes

uint64 id = 1
 The Part entity id.
 
uint64 parent_id = 2
 Parent Group id.
 
string name = 3
 The name of the Part.
 
repeated float matrix4x4 = 4
 Rigid body motion.
 
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.
 
repeated float line_color = 6
 Used for rendering line connectivity and element boundaries if edgeflags are specified.
 
RenderingMode render = 7
 What to aspect of the mesh to render.
 
ShadingMode shading = 8
 Defines the location of the normals. If normals are specified per-element, triangles should be shaded as "flat".
 
float ambient = 9
 OpenGL style ambient coloring factor: GL_AMBIENT.
 
float diffuse = 10
 OpenGL style diffuse coloring rgb: GL_DIFFUSE.
 
float specular_shine = 11
 OpenGL style specular factor: GL_SHININESS.
 
float specular_intensity = 12
 OpenGL style specular factor: GL_SPECULAR.
 
string material_name = 13
 The material name specification.
 
float node_size_default = 14
 If node rendering is specified, the base size of each node.
 
uint64 color_variableid = 15
 per-node or per-element coloring specification
 
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.
 
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.
 
uint64 displacement_variableid = 18
 if this is set, the vector variable should be added to the coordinate variable to generate the final coordinate.
 
uint64 texture_id = 19
 2D texture to apply.
 
TextureWrapMode texture_wrap_mode = 20
 2D texture wrapping options
 
TextureApplyMode texture_apply_mode = 21
 2D texture color blending options
 
TextureSampleMode texture_sample_mode = 22
 2D texture sampling options
 
string hash = 23
 hash for this message payload
 

Detailed Description

Update a Part entity.

Sent to update part rendering attributes. Parts have Geom entity children that define the bulk data arrays.

The material name needs additional work. If 'steel' or 'glass' are specified, are we expecting the client to come up with shaders for those materials, or just informing that fill_color and shininess parameters are steel-like or glass-like. General thinking is to use common namespaces (e.g. granta, etc) for known material specifications and namespace prefixed JSON for others (e.g. ensight:{json payload}

Definition at line 269 of file dynamic_scene_graph.proto.

Member Enumeration Documentation

◆ RenderingMode

The rendering mode is actually a bit field, defining what should be rendered.

Enumerator
NODES 

render the nodes of the connectivity (spheres)

CONNECTIVITY 

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

Definition at line 272 of file dynamic_scene_graph.proto.

◆ ShadingMode

Define the location of normals

Enumerator
ELEMENTAL 

Normals are specified per element face (e.g. one normal per triangle).

NODAL 

Normals are specified per node.

Definition at line 278 of file dynamic_scene_graph.proto.

◆ TextureApplyMode

2D texture options for combining texture color with part color, lighting, color by var

Enumerator
REPLACE 

2D texture color replaces all other color. No lighting. Same as DECAL unless wrap mode is CLAMP.

DECAL 

2D texture color replaces all other color. No lighting.

MODULATE 

Color as usual with part color, lighting, color by var, etc. Then multiply by the 2D texture color.

Definition at line 291 of file dynamic_scene_graph.proto.

◆ TextureSampleMode

2D texture interpolation

Enumerator
NEAREST 

Like GL_NEAREST.

LINEAR 

Like GL_LINEAR.

Definition at line 298 of file dynamic_scene_graph.proto.

◆ TextureWrapMode

2D texture options for tex coords outside [0,1]

Enumerator
REPEAT 

Like GL_REPEAT.

CLAMP 

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.

CLAMP_TEXTURE 

Like GL_CLAMP_TO_EDGE.

Definition at line 284 of file dynamic_scene_graph.proto.


The documentation for this struct was generated from the following file: