Namespace: dvl

sap.ve. dvl

SAP Visual Enterprise DVL namespace.

Namespaces

Client
Core
Library
Renderer
Scene

Members

(static, readonly) DVLCAMERAFOVBINDING :number

Enum of camera field of view (FOV) binding.
Type:
  • number
Properties:
Name Type Description
MIN number Bind the camera field of view to the shortest edge of the viewport.
MAX number Bind the camera field of view to the longest edge of the viewport.
HORZ number Bind the camera field of view horizontally.
VERT number Bind the camera field of view vertically.

(static, readonly) DVLCAMERAPROJECTION :number

Enum of camera projection types.
Type:
  • number
Properties:
Name Type Description
PERSPECTIVE number Perspective projection.
ORTHOGRAPHIC number Orthographic projection.

(static, readonly) DVLCLIENTLOGTYPE :number

Enum of client log types.
Type:
  • number
Properties:
Name Type Description
DVLLOGTYPE_DEBUG number Indicates 'debug' type message has been logged (can usually be ignored).
DVLLOGTYPE_INFO number Indicates an 'information' type message has been logged (for example, the name of the file loaded, or the ID of the activated step).
DVLLOGTYPE_WARNING number Indicates a 'warning' type message has been logged (something went wrong, but you can proceed).
DVLLOGTYPE_ERROR number Indicates an 'error' type message has been logged (something has failed).

(static, readonly) DVLCREATENODECOPYFLAG :number

Enum of flag states related to creating node copies.
Type:
  • number
Properties:
Name Type Description
COPY_CHILDREN number Copy children of the node.
COPY_ANIMATION number Copy animations attached to the node.
FULL_COPY number Copy children of the node and animations attached to the node.

(static, readonly) DVLEXECUTE :number

Enum of DVL execute actions.
Type:
  • number
Properties:
Name Type Description
DVLEXECUTE_QUERY number VE query language. For example:
  everything() select()
Only for 3D files.
DVLEXECUTE_PAINTXML number SAP Paint XML. For example:
  <PAINT_LIST ASSEMBLY_PAINTING_ENABLED="true" ASSEMBLY_LEVEL="5">
    <PAINT COLOR="#008000" OPACITY="1.0" VISIBLE="true" ALLOW_OVERRIDE="false">
      <NODE ID="0__moto_x_asm"></NODE>
    </PAINT>
  </PAINT_LIST>
Only for 3D files.
DVLEXECUTE_CGMNAVIGATEACTION number CGM navigate action. For example:
  pictid(engine_top).id(oil-pump-t,full+newHighlight)
Only for 2D files.
See WebCGM Intelligent Content for further information.
DVLEXECUTE_DYNAMICLABELS number Dynamic Labels XML.

(static, readonly) DVLFILEFLAG :number

Enum of flag states describing the features of a VDS file. Flags can be combined.
Type:
  • number
Properties:
Name Type Description
PAGESCOMPRESSED number Indicates the individual pages inside the file are compressed.
WHOLEFILECOMPRESSED number Indicates the whole file is compressed.
ENCRYPTED number Indicates the file is encrypted.

(static, readonly) DVLFINDNODEMODE :number

Enum of the different modes for finding nodes.
Type:
  • number
Properties:
Name Type Description
DVLFINDNODEMODE_EQUAL number Match nodes by comparing node name/assetid/uniqueid with "str". Case sensitive search. This is the fastest search option (does buffer compare without UTF8 parsing).
DVLFINDNODEMODE_EQUAL_CASE_INSENSITIVE number Match nodes by comparing node name/assetid/uniqueid with "str". Case insensitive search. UTF8-aware.
DVLFINDNODEMODE_SUBSTRING number Match nodes by finding "str" substring in node name/assetid/uniqueid. Case sensitive search. UTF8-aware.
DVLFINDNODEMODE_SUBSTRING_CASE_INSENSITIVE number Match nodes by finding "str" substring in node name/assetid/uniqueid. Case insensitive search. UTF8-aware.
DVLFINDNODEMODE_STARTS_WITH number Match nodes by comparing first "strlen(str)" symbols of node name/assetid/uniqueid with "str". Case sensitive search. UTF8-aware.
DVLFINDNODEMODE_STARTS_WITH_CASE_INSENSITIVE number Match nodes by comparing first "strlen(str)" symbols of node name/assetid/uniqueid with "str". Case insensitive search. UTF8-aware.

(static, readonly) DVLFINDNODETYPE :number

Enum of the options for finding nodes.
Type:
  • number
Properties:
Name Type Description
DVLFINDNODETYPE_NODE_NAME number Find node or nodes by node name.
DVLFINDNODETYPE_ASSET_ID number Find node or nodes by asset ID (asset ID is stored inside some VDS files, and is optional).
DVLFINDNODETYPE_UNIQUE_ID number Find node or nodes by unique ID (unique ID is stored inside some VDS files, and is optional).
DVLFINDNODETYPE_DSSELECTOR_ID number Find node or nodes by DS selector ID (DS selector ID is stored inside some VDS files, and is optional).
DVLFINDNODETYPE_METADATA number Find node or nodes by metadata (metadata is optional).

(static, readonly) DVLFLAGOPERATION :number

Enum of flag operations.
Type:
  • number
Properties:
Name Type Description
DVLFLAGOP_SET number Set the flag.
DVLFLAGOP_CLEAR number Clear the flag.
DVLFLAGOP_INVERT number If DVLFLAGOP_MODIFIER_RECURSIVE, then child node flags are set to parent flag values. For example, if parent is visible and child is hidden, after this operation both parent and child will be hidden.
DVLFLAGOP_INVERT_INDIVIDUAL number If DVLFLAGOP_MODIFIER_RECURSIVE, then child nodes are inverted. For example, if parent is visible and child is hidden, after this operation the parent will be hidden and the child visible.
DVLFLAGOP_VALUES_BITMASK number Bit mask.
DVLFLAGOP_MODIFIER_RECURSIVE number Perform the operation recursively for all the subitems.

(static, readonly) DVLID_INVALID :string

Indicates an 'invalid' value of the DVLID type.
Type:
  • string

(static, readonly) DVLLAYERVISIBILITYACTION :number

Enum of actions that define the way a layer is applied to the scene in ApplyLayerVisibility().
Type:
  • number
Properties:
Name Type Description
HIDEALL_SHOWLAYER number Hide all nodes in the scene, and then show only the nodes in the layer.
SHOWALL_HIDELAYER number Show all nodes in the scene, and then hide only the nodes in the layer.
SHOWLAYER number Make nodes in the layer visible. Does not change the visibility of nodes that are not in the layer.
HIDELAYER number Make nodes in the layer hidden. Does not change the visibility of nodes that are not in the layer.

(static, readonly) DVLMATERIALCOLORPARAM :number

Enum of material color parameters.
Type:
  • number
Properties:
Name Type Description
AMBIENT number Ambient color.
DIFFUSE number Diffuse color.
SPECULAR number Specular color.
EMISSIVE number Emissive color.

(static, readonly) DVLMATERIALSCALARPARAM :number

Enum of material scalar parameters.
Type:
  • number
Properties:
Name Type Description
OPACITY number Opacity.
GLOSSINESS number Glossiness.
SPECULAR_LEVEL number Specular Level.

(static, readonly) DVLMATERIALTEXTURE :number

Enum of material color parameters.
Type:
  • number
Properties:
Name Type Description
DIFFUSE number First diffuse color.
DIFFUSE2 number Second diffuse color.
DIFFUSE3 number Third diffuse color.
DIFFUSE4 number Fourth diffuse color.
SELF_ILLUMINATION number Self illumination color.
REFLECTION number Reflection.
BUMP number Bump map.

(static, readonly) DVLMATERIALTEXTUREFLAG :number

Enum of material texture flags.
Type:
  • number
Properties:
Name Type Description
CLAMP_U number Clamp u flag.
CLAMP_V number Clamp v flag.
MODULATE number Modulate flag.
INVERT number Invert flag.
COLOR_MAP number Color map flag.
DECAL number Decal flag.

(static, readonly) DVLMATERIALTEXTUREPARAM :number

Enum of material texture parameters.
Type:
  • number
Properties:
Name Type Description
AMOUNT number Texture amount.
OFFSET_U number Texture offset in the U-axis.
OFFSET_V number Texture offset in the V-axis.
SCALE_U number Texture scale in the U-axis.
SCALE_V number Texture scale in the V-axis.
ANGLE number Texture angle.

(static, readonly) DVLNODEFLAG :number

Enum of node flags.
Type:
  • number
Properties:
Name Type Description
DVLNODEFLAG_VISIBLE number Indicates the node is visible.
DVLNODEFLAG_SELECTED number Indicates the node is selected.
DVLNODEFLAG_HOTSPOT number Indicates the node is a hotspot.
DVLNODEFLAG_CLOSED number Indicates the node is closed (the node itself and all children are treated as a single node).
DVLNODEFLAG_SINGLE_SIDED number Indicates the node is single-sided.
DVLNODEFLAG_DOUBLE_SIDED number Indicates the node is double-sided.
DVLNODEFLAG_UNHITABLE number Indicates the node cannot be 'hit'; that is, the node remains transparent when clicked or tapped.
DVLNODEFLAG_BILLBOARD_VIEW number Indicates the node is a common billboard - it scales with the camera, but is always orthogonal.
DVLNODEFLAG_BILLBOARD_LOCK_TO_VIEWPORT number Indicates the node is positioned on a 2D layer on top of the screen.
DVLNODEFLAG_MAPPED_HASCHILDREN number Indicates the node has children.
DVLNODEFLAG_MAPPED_HASNAME number Indicates the node has a name.
DVLNODEFLAG_MAPPED_HASASSETID number Indicates the node has an asset identifier.
DVLNODEFLAG_MAPPED_HASUNIQUEID number Indicates the node has a unique identifier.
DVLNODEFLAG_TEMPORARY_PREVIOUS_VISIBILITY number Temporary flag: Indicates the visibility of the node in the previous frame.
DVLNODEFLAG_TEMPORARY_ORIGINAL_VISIBILITY number Temporary flag: Indicates the visibility of the node when the file was just loaded.
DVLNODEFLAG_TEMPORARY_CONSUMED number Temporary flag: Indicates whether the node was consumed in this step or not.

(static, readonly) DVLNODEINFO :number

Enum of node information retrieval methods.
Type:
  • number
Properties:
Name Type Description
DVLNODEINFO_NAME number Retrieve the name of the node.
DVLNODEINFO_ASSETID number Retrieve the node asset ID.
DVLNODEINFO_UNIQUEID number Retrieve the node unique ID.
DVLNODEINFO_PARENTS number Retrieve parents of the node.
DVLNODEINFO_CHILDREN number Retrieve children of the node.
DVLNODEINFO_FLAGS number Retrieve node flags.
DVLNODEINFO_OPACITY number Retrieve node opacity.
DVLNODEINFO_HIGHLIGHT_COLOR number Retrieve node highlight color.
DVLNODEINFO_URI number Retrieve node URIs.

(static, readonly) DVLPARTSLISTSORT :number

Enum of options for sorting parts list.
Type:
  • number
Properties:
Name Type Description
DVLPARTSLISTSORT_NAME_ASCENDING number Sort parts alphabetically in ascending order (from A to Z).
DVLPARTSLISTSORT_NAME_DESCENDING number Sort parts alphabetically in descending order (from Z to A).
DVLPARTSLISTSORT_COUNT_ASCENDING number Sort parts by the number of nodes in the part; parts with smaller number of nodes go first.
DVLPARTSLISTSORT_COUNT_DESCENDING number Sort parts by the number of nodes in the part; parts with larger number of nodes go first.

(static, readonly) DVLPARTSLISTTYPE :number

Enum of options for building parts list.
Type:
  • number
Properties:
Name Type Description
DVLPARTSLISTTYPE_ALL number Build a parts list using all the nodes.
DVLPARTSLISTTYPE_VISIBLE number Build a parts list using only the visible nodes.
DVLPARTSLISTTYPE_CONSUMED_BY_STEP number Build a parts list using only the nodes consumed by a particular step. Step DVLID is passed as a parameter to the BuildPartsList() call.

(static, readonly) DVLRENDEROPTION :number

Enum of rendering options.
Type:
  • number
Properties:
Name Type Description
DVLRENDEROPTION_SHOW_DEBUG_INFO number Enable debug information to be displayed (for example, Frames Per Second (FPS)). By default, this is turned 'Off'.
DVLRENDEROPTION_SHOW_BACKFACING number Display backfacing triangles or not. By default, this option is 'Off'.
DVLRENDEROPTION_SHOW_SHADOW number Enable shadows to be displayed. By default, this option is 'On'.
DVLRENDEROPTION_CAMERA_ROTATION_MODE_ORBIT number Set camera rotation to Orbit or Turntable mode. By default, this option is 'Off' (Turntable mode).
DVLRENDEROPTION_CLEAR_COLOR_BUFFER number Clear the color buffer during each Renderer.RenderFrame() or not. Default: ON. By setting this option OFF, you can draw a textured background or paint video camera frame. The caller application would need to clear color buffer itself before calling Renderer.RenderFrame() if option is OFF.
DVLRENDEROPTION_AMBIENT_OCCLUSION number Enable Ambient Occlusion render mode. If this option is turned 'On', other render modes will be disabled.
DVLRENDEROPTION_ANAGLYPH_STEREO number Enable Anaglyph Stereo render mode. If this option is turned 'On', other render modes will be disabled.
DVLRENDEROPTION_SHOW_ALL_HOTSPOTS number Enable hotspots to be displayed or not. By default, this option is 'Off'. This only works for 2D .cgm scenes.
DVLRENDEROPTION_LEFT_RIGHT_STEREO number Enable Left+Right Stereo render mode. If this option is turned 'On', other render modes will be disabled.
DVLRENDEROPTION_SOLID number Enable Solid render mode. If this option is turned 'On', other render modes will be disabled.
DVLRENDEROPTION_TRANSPARENT number Enable Transparent render mode. If this option is turned 'On', other render modes will be disabled.
DVLRENDEROPTION_LINE_ILLUSTRATION number Enable Line Illustration render mode. If this option is turned 'On', other render modes will be disabled.
DVLRENDEROPTION_SOLID_OUTLINE number Enable Solid Outline render mode. If this option is turned 'On', other render modes will be disabled.
DVLRENDEROPTION_SHADED_ILLUSTRATION number Enable Shaded Illustration render mode. If this option is turned 'On', other render modes will be disabled.

(static, readonly) DVLRENDEROPTIONF :number

Enum of additional rendering options.
Type:
  • number
Properties:
Name Type Description
DVLRENDEROPTIONF_DPI number Indicates the DPI (Dots Per Inch) setting. Defaults to 132.0 on iPad, and 96.0 on other platforms. Used in calculating the size of sprites and polyline thickness. It is highly recommended that you set the DPI properly.
DVLRENDEROPTIONF_MIN_VISIBLE_FONT_SIZE number Indicates the minimum visible CGM font size. The default font size is 20.

(static, readonly) DVLRESETVIEWFLAG :number

Enum of reset view options.
Type:
  • number
Properties:
Name Type Description
CAMERA number Reset the camera position.
VISIBILITY number Reset the node visibility.
SMOOTHTRANSITION number Perform smooth animated transition between current viewport and home viewport.

(static, readonly) DVLRESULT :number

Enum of DVL results.
Type:
  • number
Properties:
Name Type Description
ENCRYPTED number Indicates that no password was provided for the encrypted file, or the password provided was incorrect.
FILENOTFOUND number Indicates that no file was found.
NOTINITIALIZED number Indicates that the library has not been initialized properly.
WRONGVERSION number Indicates the version is wrong (file version, library version, etc).
MISSINGEXTENSION number Indicates the file name does not have an extension.
ACCESSDENIED number Indicates access to the file has been denied.
NOINTERFACE number Indicates there is no such interface.
OUTOFMEMORY number Indicates out of memory exception occurred.
INVALIDCALL number Indicates an invalid call was made.
NOTFOUND number Indicates the item or file is not found.
BADARG number Indicates the argument is invalid.
FAIL number Failure, something went completely wrong.
BADTHREAD number Indicates that the thread is invalid.
BADFORMAT number Indicates incorrect format.
FILEERROR number Indicates that an error occurred while reading the file.
NOTIMPLEMENTED number Indicates the requested feature is not yet implemented.
HARDWAREERROR number Indicates that a hardware error occurred.
INTERRUPTED number Indicates the process has been interrupted.
FALSE number Indicates a negative result.
OK number Indicates that everything is OK.
PROCESSED number Indicates that nothing was changed as a result of processing/action (similar to OK). For example, if you want to "hide a node that is already hidden".
ALREADYINITIALIZED number Indicates the initialization has been performed. Initialization can be done multiple times. However, this is not optimal.
getDescription sap.ve.dvl~getDvlResultDescription Returns the description of the DVLRESULT code.

(static, readonly) DVLSCENEACTION :number

Enum of scene actions.
Type:
  • number
Properties:
Name Type Description
DVLSCENEACTION_SHOW_ALL number Make all nodes in the scene "visible".
DVLSCENEACTION_HIDE_ALL number Make all nodes in the scene "hidden".
DVLSCENEACTION_SHOW_SELECTED number Make selected nodes and all their children "visible".
DVLSCENEACTION_HIDE_SELECTED number Make selected nodes and all their children "hidden".

(static, readonly) DVLSCENEINFO :number

Enum of scene information.
Type:
  • number
Properties:
Name Type Description
DVLSCENEINFO_CHILDREN number Retrieve the list of child nodes.
DVLSCENEINFO_SELECTED number Retrieve the list of selected nodes.
DVLSCENEINFO_LOCALIZATION_PREFIX number Retrieve the prefix for scene localization.
DVLSCENEINFO_DIMENSIONS number Retrieve the dimensions of the scene.
DVLSCENEINFO_STEP_INFO number Retrieve the current step ID and step time.
DVLSCENEINFO_LAYERS number Retrieve a list of layers in the scene.
DVLSCENEINFO_DISPLAY_UNITS number Retrieve the display units used in the scene.
DVLSCENEINFO_MATERIALS number Retrieve a list of all materials. Reserved for future.
DVLSCENEINFO_HOTSPOTS number Retrieve a list of all hotspots.
DVLSCENEINFO_HOTSPOT_LAYERS number Retrieve a list of hotspot layers.

(static, readonly) DVLSTEPEVENT :number

Enum of step events.
Type:
  • number
Properties:
Name Type Description
DVLSTEPEVENT_STARTED number Indicates the step has started (stepId is a new step).
DVLSTEPEVENT_SWITCHED number Indicates the previous step has finished, and the new one has started (stepId is a new step).
DVLSTEPEVENT_FINISHED number Indicates the step has finished playing, and no more steps are to be played (stepId is the old step).

(static, readonly) DVLZOOMTO :number

Enum of zoom actions.
Type:
  • number
Properties:
Name Type Description
DVLZOOMTO_ALL number Zoom to the bounding box of the whole scene.
DVLZOOMTO_VISIBLE number Zoom to the bounding box of visible nodes.
DVLZOOMTO_SELECTED number Zoom to the bounding box of selected nodes.
DVLZOOMTO_NODE number Zoom to the bounding box of a specific node and its children.
DVLZOOMTO_NODE_SETISOLATION number Same as DVLZOOMTO_NODE, but also does Renderer.SetIsolatedNode() for the node.
DVLZOOMTO_RESTORE number Zoom to the previously saved view. The view is saved every time Renderer.ZoomTo() is executed.
DVLZOOMTO_RESTORE_REMOVEISOLATION number Same as DVLZOOMTO_RESTORE, but also does Renderer.SetIsolatedNode() with the DVLID_INVALID parameter.
VIEW_LEFT number Zoom to the left view.
VIEW_RIGHT number Zoom to the right view.
VIEW_TOP number Zoom to the top view.
VIEW_BOTTOM number Zoom to the bottom view.
VIEW_BACK number Zoom to the back view.
VIEW_FRONT number Zoom to the front view.

(static, readonly) SOURCELOCATION :string

of model source locations.
Type:
  • string
Properties:
Name Type Description
LOCAL string File is loaded from a computer's local file system via the File API.
REMOTE string File is loaded from a remote location via the HTTP(S) protocol.

Methods

(static) createRuntime(optionsopt) → {sap.ve.dvl~DVL}

Creates a DVL module runtime instance.
Parameters:
Name Type Attributes Description
options object <optional>
Emscripten runtime module settings. A JSON object with the following properties:
Properties
Name Type Attributes Default Description
totalMemory number <optional>
128*1024*1024 Size of Emscripten module memory in bytes.
logElementId string <optional>
ID of a textarea DOM element to write the log to.
statusElementId string <optional>
ID of a DOM element to write the status messages to.
Returns:
A DVL module runtime instance.
Type
sap.ve.dvl~DVL

(inner) CreateCoreInstance(clientId) → {string|sap.ve.dvl.DVLRESULT}

Creates a new instance of DVL core.
Parameters:
Name Type Description
clientId string Token representing the target client instance. This is usually the canvas ID.
Returns:
The DVL core token or an error code if fails.
Type
string | sap.ve.dvl.DVLRESULT

(inner) getDvlResultDescription(code) → {string}

Returns the description of the DVLRESULT code.
Parameters:
Name Type Description
code sap.ve.dvl.DVLRESULT The DVLRESULT enum code.
Returns:
The description of the DVLRESULT code.
Type
string

Type Definitions

DVL

DVL module runtime. Instances of this type are not created with operator new. They can only be created with a call to sap.ve.dvl.createRuntime().
Type:
  • Object
Properties:
Name Type Description
CreateCoreInstance sap.ve.dvl~CreateCoreInstance A function to create a new instance of DVL core.
Settings sap.ve.dvl~Settings The DVL settings used internally to track various instance properties.
Client sap.ve.dvl~Client A set of callback functions used for notifications from the DVL library.
Core sap.ve.dvl~Core A set of functions that defines the main interface for interaction with the DVL library.
Scene sap.ve.dvl~Scene A set of functions that allow to access the scene tree, enumerate nodes and perform some operations, like selection or metadata retrieval.
Renderer sap.ve.dvl~Renderer A set of functions for interaction with the rendering system of the DVL library.
Library sap.ve.dvl~Library A set of functions for interaction with file library.

Settings

The properties exposed in DVL Settings are used internally to track various instance properties. In general they should be considered readonly unless explicitly stated, and consumed for diagnostic purposes only.
Type:
  • Object
Properties:
Name Type Description
Initialised boolean A flag that indicates if the runtime is initialized.
MajorVersion number Major version of the DVL library.
MinorVersion number Minor version of the DVL library.
CoreToken string Token of the DVL core instance.
RendererToken string Token of the DVL renderer instance.
LastLoadedSceneId string Identifier of the last loaded model.