SAP 3D Visual Enterprise applications SDK
DVLScene.h
Go to the documentation of this file.
1 /*
2  (C) 2013 SAP AG or an SAP affiliate company. All rights reserved.
3 */
9 #pragma once
10 struct sDVLMetadata;
11 
12 
13 
16 {
19 
22 
25 
28 
31 
33  DVLSCENEINFO_LAYERS = (1 << 5),
34 
37 
40 
43 
46 };
47 
55 #pragma pack(push, 1)
57 {
60 
63 
69 
72 
76 
79 
82  float m_vSceneDimensions[2][3];
83 
84  DVLID m_uStepId;
85  float m_fStepTime;
86 
88  uint32_t m_uLayersCount;
89 
93 
96 };
97 #pragma pack(pop)
98 
99 
100 
103 {
106 
109 
112 
115 
118 
121 
124 
127 
129  DVLNODEINFO_URI = 0x0100,
130 
133 };
134 
135 
136 
143 #pragma pack(push, 1)
144 struct sDVLURI
145 {
146  char *m_szDestination;
147  char *m_szTitle;
148  char *m_szBehavior;
149 };
150 #pragma pack(pop)
151 
152 
153 
161 #pragma pack(push, 1)
163 {
166 
169 
172 
174  char *m_szAssetID;
175 
178 
181 
187 
190 
195 
197  uint32_t m_uFlags;
198 
200  float m_fOpacity;
201 
208 
210  uint32_t m_uURIsCount;
211 
216 };
217 #pragma pack(pop)
218 
219 
220 
228 #pragma pack(push, 1)
230 {
233 
235  char *m_szName;
236 
238  char *m_szInfo;
239 
241  uint32_t m_uNodesCount;
242 
246 
249 };
250 #pragma pack(pop)
251 
252 
253 
261 #pragma pack(push, 1)
263 {
265  char *m_szName;
266 
269 };
270 
275 {
277  char *m_szName;
278 
280  char *m_szValue;
281 };
282 
288 {
291 
294 
297 
300 };
301 
305 {
308 
310  void *pimpl;
311 
314 };
315 
320 {
322  char *m_szName;
323 
325  char *m_szValue;
326 };
327 
330 struct sDVLVEID
331 {
333  char *m_szSource;
334 
336  char *m_szType;
337 
340 
343 };
344 
348 {
351 
353  void *pimpl;
354 
357 
359  uint32_t m_uIDCount;
360 };
361 #pragma pack(pop)
362 
363 
364 
366 #define DVLPARTSLIST_RECOMMENDED_uMaxParts 1000
367 
369 #define DVLPARTSLIST_RECOMMENDED_uMaxNodesInSinglePart 1000
370 
372 #define DVLPARTSLIST_RECOMMENDED_uMaxPartNameLength 200
373 
375 #define DVLPARTSLIST_UNLIMITED_uMaxParts 0
376 
378 #define DVLPARTSLIST_UNLIMITED_uMaxNodesInSinglePart 0
379 
381 #define DVLPARTSLIST_UNLIMITED_uMaxPartNameLength 0
382 
386 {
389 
392 
395 };
396 
400 {
403 
406 
409 
412 };
413 
416 #pragma pack(push, 1)
418 {
420  char *m_szName;
421 
423  uint32_t m_uNodesCount;
424 
427 };
428 #pragma pack(pop)
429 
437 #pragma pack(push, 1)
439 {
442 
444  void *pimpl;
445 
447  uint32_t m_uPartsCount;
448 
451 };
452 #pragma pack(pop)
453 
454 
455 
456 #pragma pack(push, 1)
457 struct sDVLStep
462 {
465 
467  char *m_szName;
468 
471 
474 };
475 
479 {
482 
484  char *m_szName;
485 
487  uint32_t m_uStepsCount;
488 
491 };
492 
501 {
504 
506  void *pimpl;
507 
510 
513 
516 
519 };
520 #pragma pack(pop)
521 
522 
523 
527 {
530 
533 
536 
539 };
540 
544 {
547 
550 
553 
556 
559 
562 };
563 
565 #pragma pack(push, 1)
567 {
570 
572  uint32_t m_uNodesCount;
573 
576 };
577 #pragma pack(pop)
578 
579 
580 
587 {
588 protected:
589  virtual ~IDVLScene() {}//can't be deleted using this interface, use Release()
590 
591 public:
637  virtual DVLRESULT RetrieveSceneInfo(uint32_t flags, sDVLSceneInfo *pInfo) = 0;
638 
646  virtual void ReleaseSceneInfo(sDVLSceneInfo *pInfo) = 0;
647 
655  virtual void GetNodeSelectionInfo(uint32_t *pTotalSelectedNodesCount, uint32_t *pVisibleSelectedNodesCount, uint32_t *pHiddenSelectedNodesCount) = 0;
656 
668  virtual void PerformAction(DVLSCENEACTION action) = 0;
669 
712  virtual DVLRESULT RetrieveNodeInfo(DVLID id, uint32_t flags, sDVLNodeInfo *pInfo) = 0;
713 
721  virtual void ReleaseNodeInfo(sDVLNodeInfo *pInfo) = 0;
722 
723 
724 
731  virtual DVLRESULT RetrieveLayerInfo(DVLID id, sDVLLayerInfo *pInfo) = 0;
732 
740  virtual void ReleaseLayerInfo(sDVLLayerInfo *pInfo) = 0;
741 
742 
743 
779  virtual DVLRESULT RetrieveMetadata(DVLID id, sDVLMetadataInfo *pInfo) = 0;
780 
788  virtual void ReleaseMetadata(sDVLMetadataInfo *pInfo) = 0;
789 
790 
791 
809  virtual DVLRESULT RetrieveVEIDs(DVLID id, sDVLVEIDInfo *pInfo) = 0;
810 
818  virtual void ReleaseVEIDs(sDVLVEIDInfo *pInfo) = 0;
819 
820 
821 
853  virtual DVLRESULT RetrieveThumbnail(DVLID id, sDVLImage *pThumbnail) = 0;
854 
862  virtual void ReleaseThumbnail(sDVLImage *pThumbnail) = 0;
863 
864 
865 
919  virtual DVLRESULT BuildPartsList(uint32_t uMaxParts, uint32_t uMaxNodesInSinglePart, uint32_t uMaxPartNameLength,
920  eDVLPartsListType eType, eDVLPartsListSort eSort, DVLID idConsumedStep, const char *szSubstring, sDVLPartsListInfo *pInfo) = 0;
921 
929  virtual void ReleasePartsList(sDVLPartsListInfo *pInfo) = 0;
930 
931 
932 
947  virtual DVLRESULT FindNodes(eDVLFindNodeType type, eDVLFindNodeMode mode, const char *str, sDVLNodeIDsArrayInfo *pInfo) = 0;
948 
956  virtual void ReleaseNodeIDsArrayInfo(sDVLNodeIDsArrayInfo *pInfo) = 0;
957 
958 
959 
1001  virtual DVLRESULT RetrieveProcedures(sDVLProceduresInfo *pInfo) = 0;
1002 
1010  virtual void ReleaseProcedures(sDVLProceduresInfo *pInfo) = 0;
1011 
1012 
1013 
1034  virtual DVLRESULT ActivateStep(DVLID id, bool bFromTheBeginning, bool bContinueToTheNext, float stepTime = -1.f) = 0;
1035 
1043  virtual DVLRESULT PauseCurrentStep() = 0;
1044 
1045 
1046 
1055  virtual DVLRESULT ApplyLayerVisibility(DVLID id, DVLLAYERVISIBILITYACTION action = DVLLAYERVISIBILITYACTION_HIDEALL_SHOWLAYER) = 0;
1056 
1057 
1058 
1068  virtual DVLID CreateNode(DVLID idParent, const char *szNodeName = NULL, DVLID idInsertBefore = DVLID_INVALID) = 0;
1069 
1070 
1071 
1072  enum eCreateNodeCopyFlags : uint16_t
1073  {
1074  COPY_CHILDREN = (1 << 0),
1075  COPY_ANIMATION = (1 << 1),
1076  FULL_COPY = 0xFFFF,
1077  };
1078 
1088  virtual DVLID CreateNodeCopy(DVLID idNode, DVLID idParent, eCreateNodeCopyFlags flags) = 0;
1089 
1090 
1091 
1103  virtual DVLRESULT DeleteNode(DVLID id) = 0;
1104 
1105 
1106 
1119  virtual DVLRESULT ChangeNodeFlags(DVLID id, uint32_t flags, DVLFLAGOPERATION flagop) = 0;
1120 
1121 
1122 
1134  virtual DVLRESULT SetNodeOpacity(DVLID id, float opacity) = 0;
1135 
1151  virtual DVLRESULT SetNodeHighlightColor(DVLID id, uint32_t color) = 0;
1152 
1153 
1154 
1179  virtual DVLRESULT GetNodeWorldMatrix(DVLID id, sDVLMatrix &wtm) const = 0;
1180 
1204  virtual DVLRESULT SetNodeWorldMatrix(DVLID id, const sDVLMatrix *pwtm) = 0;
1205 
1206 
1207 
1219  virtual DVLRESULT GetNodeLocalMatrix(DVLID id, sDVLMatrix &tm) const = 0;
1220 
1235  virtual DVLRESULT SetNodeLocalMatrix(DVLID id, const sDVLMatrix *ptm) = 0;
1236 
1237 
1238 
1247  virtual IDVLMaterial *GetMaterialByName(const char *name) const = 0;
1248 
1255  virtual size_t GetNodeSubmeshesCount(DVLID nodeId) const = 0;
1256 
1266  virtual IDVLMaterial *GetNodeSubmeshMaterial(DVLID nodeId, size_t index) const = 0;
1267 
1279  virtual DVLRESULT SetNodeSubmeshMaterial(DVLID nodeId, size_t index, IDVLMaterial *material) = 0;
1280 
1281 
1282 
1293  virtual DVLRESULT Execute(DVLEXECUTE type, const char *str) = 0;
1294 
1295 
1296 
1304  virtual void Retain() = 0;
1305 
1311  virtual void Release() = 0;
1312 };
Match nodes by comparing node name/assetid/uniqueid with "str" (case insensitive, UTF8-aware) ...
Definition: DVLScene.h:549
Retrieve the node unique id.
Definition: DVLScene.h:111
sDVLMetadata * m_pMetadata
A pointer to the sDVLMetadata structure that contains the root namespace of the metadata. If the node has no metadata, it is NULL.
Definition: DVLScene.h:313
uint32_t m_uNodesCount
Number of nodes in the layer.
Definition: DVLScene.h:241
uint32_t m_uFlags
Receives a set of DVLNODEINFO_XXX flags that show which members of the structure are valid...
Definition: DVLScene.h:197
DVLID * m_pNodes
Array of node IDs. Array size is m_uNodesCount.
Definition: DVLScene.h:575
Retrieve the list of child nodes.
Definition: DVLScene.h:18
char * m_szName
Name of the layer.
Definition: DVLScene.h:235
uint16_t m_uSizeOfDVLNodeInfo
You must set it to sizeof(sDVLNodeInfo) before calling RetrieveNodeInfo()
Definition: DVLScene.h:165
Definition: DVLScene.h:478
uint32_t m_uNodesCount
Number of nodes belonging to this part.
Definition: DVLScene.h:423
uint32_t m_uChildNodesCount
Number of child nodes if DVLSCENEINFO_CHILDREN flag is passed. Otherwise 0.
Definition: DVLScene.h:62
Definition: DVLScene.h:229
uint16_t m_uSizeOfDVLMetadataInfo
The size of the structure, needs to be sizeof(sDVLMetadataInfo)
Definition: DVLScene.h:307
Match nodes by comparing first "strlen(str)" symbols of node name/assetid/uniqueid with "str" (case s...
Definition: DVLScene.h:558
DVLID * m_pNodes
Array of nodes belonging to the part of the m_uNodesCount length.
Definition: DVLScene.h:426
char * m_szValue
The value of the pair.
Definition: DVLScene.h:325
#define DVLID_INVALID
The "invalid" value of DVLID type.
Definition: DVLTypes.h:15
Definition: DVLScene.h:417
uint16_t m_uSizeOfDVLLayerInfo
Size of the structure. You must set it to sizeof(sDVLLayerInfo) before calling RetrieveLayerInfo() ...
Definition: DVLScene.h:232
Retrieve scene dimensions.
Definition: DVLScene.h:27
eDVLFindNodeType
Definition: DVLScene.h:526
DVLEXECUTE
Defines the language type of the string passed into Execute()
Definition: DVLTypes.h:187
uint32_t m_uSelectedNodesCount
Number of selected nodes if DVLSCENEINFO_SELECTED flag is passed. Otherwise 0.
Definition: DVLScene.h:71
Definition: DVLScene.h:566
Definition: DVLScene.h:500
char * m_szAssetID
Receives the asset id of the node (UTF-8) if DVLNODEINFO_ASSETID is used. Otherwise NULL...
Definition: DVLScene.h:174
bool m_bIsHotspotLayer
"Hotspot layer" flag
Definition: DVLScene.h:248
Definition: DVLScene.h:162
Find node by "node name".
Definition: DVLScene.h:529
Definition: DVLScene.h:262
Definition: DVLScene.h:330
Definition: DVLTypes.h:383
Retrieve hotspots (some of top level nodes have a &#39;hotspot&#39; flag. Nodes with hotspot flag may only ha...
Definition: DVLScene.h:42
Retrieve node highlight color.
Definition: DVLScene.h:126
char * m_szSource
VEID source.
Definition: DVLScene.h:333
uint32_t m_uNodesCount
Number of nodes.
Definition: DVLScene.h:572
sDVLVEIDNameValuePair * m_pNameValuePairs
Array of key-value pairs of the m_uNameValuePairsCount size.
Definition: DVLScene.h:342
uint16_t m_uSizeOfDVLSceneInfo
Size of the structure. You must set it to sizeof(sDVLSceneInfo) before calling RetrieveSceneInfo() ...
Definition: DVLScene.h:59
uint32_t m_uHighlightColor
Definition: DVLScene.h:207
Find node by "DS selector id" (unique id is stored inside some VDS files [it is optional]) ...
Definition: DVLScene.h:538
char * m_szName
The name of the step or model view, UTF-8 encoding. May be NULL.
Definition: DVLScene.h:467
uint16_t m_uSizeOfDVLPartsListInfo
The size of the sDVLPartsListInfo structure. Needs to be filled before calling IDVLScene::BuildPartsL...
Definition: DVLScene.h:441
Retrieve a list of hotspot layers (hotspot layers may only have hotspot nodes inside them) ...
Definition: DVLScene.h:45
sDVLMetadata * m_pMetadata
A pointer to the sDVLMetadata structure, describing this namespace.
Definition: DVLScene.h:268
eDVLFindNodeMode
Definition: DVLScene.h:543
char * m_szInfo
Description of the layer.
Definition: DVLScene.h:238
char * m_szType
VEID type.
Definition: DVLScene.h:336
Hides all nodes in the scene and then shows only the nodes in the layer.
Definition: DVLTypes.h:317
Build a list using all the nodes.
Definition: DVLScene.h:388
uint16_t m_uSizeOfDVLProceduresInfo
The size of the sDVLProceduresInfo structure. Needs to be filled before calling IDVLScene::RetrievePr...
Definition: DVLScene.h:503
Retrieve the node additional information. Used only for the hotspots.
Definition: DVLScene.h:132
Retrieve parents of the node.
Definition: DVLScene.h:114
Retrieve materials.
Definition: DVLScene.h:39
void * pimpl
A pointer to the private data, do not touch it.
Definition: DVLScene.h:444
char * m_szLocalizationPrefix
If DVLSCENEINFO_LOCALIZATION_PREFIX flag is specified, this member variable contains a UTF-8 prefix o...
Definition: DVLScene.h:78
Retrieve node opacity.
Definition: DVLScene.h:123
char * m_szUniqueID
Receives the unique id of the node (UTF-8) if DVLNODEINFO_UNIQUEID is used. Otherwise NULL...
Definition: DVLScene.h:177
Definition: DVLScene.h:304
Retrieve a list of layers.
Definition: DVLScene.h:33
uint32_t m_uParentNodesCount
Receives the length of the parent node chain if DVLNODEINFO_PARENTS is used. Otherwise 0...
Definition: DVLScene.h:180
Retrieve display units.
Definition: DVLScene.h:36
Retrieve current step info.
Definition: DVLScene.h:30
Definition: DVLScene.h:461
Sort from Z to A.
Definition: DVLScene.h:405
Sort by the number of nodes in the part, parts with smaller number of nodes go first.
Definition: DVLScene.h:408
uint32_t m_uNamespacesCount
Number of the nested namespaces.
Definition: DVLScene.h:290
Definition: DVLScene.h:586
uint64_t DVLID
DVLID is the main identifier for all items inside a DVL scene. Materials, nodes, meshes, lights, cameras, animations - they all have unique DVLID.
Definition: DVLTypes.h:12
Definition: DVLScene.h:438
uint32_t m_uPartsCount
The number of parts in the list.
Definition: DVLScene.h:447
sDVLVEID * m_pIDs
A pointer to the array of sDVLVEID structures that contain VEIDs. The number of elements in the array...
Definition: DVLScene.h:356
Sort by the number of nodes in the part, parts with larger number of nodes go first.
Definition: DVLScene.h:411
Definition: DVLScene.h:274
Retrieve node URIs.
Definition: DVLScene.h:129
Definition: DVLTypes.h:361
float m_vSceneDimensions[2][3]
Definition: DVLScene.h:82
DVLSCENEINFO
Defines the scene information flags to be used in IDVLScene::RetrieveSceneInfo()
Definition: DVLScene.h:15
char * m_szName
Name of the part in UTF-8 encoding, can be NULL.
Definition: DVLScene.h:420
sDVLProcedure * m_pProcedures
The array of procedures of the m_uProceduresCount size. May be NULL.
Definition: DVLScene.h:512
DVLID * m_pChildNodes
Definition: DVLScene.h:194
char * m_szName
The key of the pair.
Definition: DVLScene.h:277
DVLID * m_pParentNodes
Definition: DVLScene.h:186
void * pimpl
A pointer to the private data, do not touch it.
Definition: DVLScene.h:353
char * m_szNodeInfo
Receives the additional info of the node (UTF-8) if DVLNODEINFO_INFO is used. Otherwise NULL...
Definition: DVLScene.h:171
uint32_t m_uURIsCount
Receives the number of URIs if DVLNODEINFO_URI is used. Otherwise 0. May also be 0 if node has no URI...
Definition: DVLScene.h:210
sDVLMetadataNameValuePair * m_pNameValuePairs
Array of key-value pairs of the m_uNameValuePairsCount size.
Definition: DVLScene.h:299
float m_fOpacity
Receives node opacity, which is a floating point value in the range of 0.0f .. 1.0f (0...
Definition: DVLScene.h:200
DVLLAYERVISIBILITYACTION
Defines the way a layer is applied to the scene in ApplyLayerVisibility()
Definition: DVLTypes.h:314
uint32_t m_uIDCount
The number of elements in the m_pIDs array.
Definition: DVLScene.h:359
Definition: DVLScene.h:56
Retrieve the node name.
Definition: DVLScene.h:105
Definition: DVLScene.h:144
Retrieve node flags.
Definition: DVLScene.h:120
uint32_t m_uStepsCount
The number of steps in the procedure or the number of model views in the portfolio.
Definition: DVLScene.h:487
DVLID m_ID
The DVLID identifier of the step or model view.
Definition: DVLScene.h:464
Find node by "unique id" (unique id is stored inside some VDS files [it is optional]) ...
Definition: DVLScene.h:535
Match nodes by finding "str" substring in node name/assetid/uniqueid (case insensitive, UTF8-aware)
Definition: DVLScene.h:555
Definition: DVLScene.h:319
eDVLPartsListSort
Definition: DVLScene.h:399
double m_dDisplayUnits
DisplayUnits are user preference units. 0.001 stands for millimeter, 0.01 stands for centimeter etc...
Definition: DVLScene.h:95
Retrieve the list of selected nodes.
Definition: DVLScene.h:21
DVLNODEINFO
Defines the node information flags to be used in IDVLScene::RetrieveNodeInfo()
Definition: DVLScene.h:102
uint32_t m_uNameValuePairsCount
Number of key-value pairs for this namespace.
Definition: DVLScene.h:296
Match nodes by finding "str" substring in node name/assetid/uniqueid (case sensitive, UTF8-aware)
Definition: DVLScene.h:552
Retrieve children of the node.
Definition: DVLScene.h:117
uint32_t m_uProceduresCount
The number of the procedures in the scene.
Definition: DVLScene.h:509
Definition: DVLScene.h:287
Sort from A to Z.
Definition: DVLScene.h:402
char * m_szValue
The value of the pair.
Definition: DVLScene.h:280
Match nodes by comparing first "strlen(str)" symbols of node name/assetid/uniqueid with "str" (case i...
Definition: DVLScene.h:561
sDVLMetadataNamespace * m_pNamespaces
Array of the nested namespaces of the m_uNamespacesCount size.
Definition: DVLScene.h:293
char * m_szName
Receives the name of the metadata namespace (UTF-8)
Definition: DVLScene.h:265
Retrieve the prefix for scene localization.
Definition: DVLScene.h:24
DVLID * m_pLayers
Definition: DVLScene.h:92
uint32_t m_uChildNodesCount
Receives the number of child nodes if DVLNODEINFO_CHILDREN is used. Otherwise 0. May also be 0 if the...
Definition: DVLScene.h:189
DVLID * m_pSelectedNodes
Definition: DVLScene.h:75
DVLFLAGOPERATION
Definition: DVLTypes.h:113
uint16_t m_uSizeOfDVLFindNodesList
The size of the sDVLNodeIDsArrayInfo structure. Needs to be filled before using sDVLNodeIDsArrayInfo ...
Definition: DVLScene.h:569
void * pimpl
A pointer to the private data, do not touch it.
Definition: DVLScene.h:310
Find node by "asset id" (asset id is stored inside some VDS files [it is optional]) ...
Definition: DVLScene.h:532
eDVLPartsListType
Definition: DVLScene.h:385
DVLSCENEACTION
Defines the scene actions.
Definition: DVLTypes.h:335
DVLID m_ID
The DVLID identifier of the procedure or portfolio.
Definition: DVLScene.h:481
char * m_szName
The key of the pair.
Definition: DVLScene.h:322
uint32_t m_uLayersCount
Number of layers in the scene if DVLSCENEINFO_LAYERS flag is passed. Otherwise 0. ...
Definition: DVLScene.h:88
Build a list using only the nodes, consumed by a particular step (step DVLID is passed as a parameter...
Definition: DVLScene.h:394
void * pimpl
A pointer to the private data, do not touch it.
Definition: DVLScene.h:506
Retrieve the node asset id.
Definition: DVLScene.h:108
sDVLProcedure * m_pPortfolios
The array of portfolios of the m_uPortfoliosCount size. May be NULL.
Definition: DVLScene.h:518
uint32_t m_uPortfoliosCount
The number of portfolios in the scene.
Definition: DVLScene.h:515
char * m_szNodeName
Receives the name of the node (UTF-8) if DVLNODEINFO_NAME is used. Otherwise NULL.
Definition: DVLScene.h:168
uint16_t m_uSizeOfDVLVEIDInfo
The size of the structure, needs to be sizeof(sDVLVEIDInfo)
Definition: DVLScene.h:350
Match nodes by comparing node name/assetid/uniqueid with "str" (case sensitive, fastest option [does ...
Definition: DVLScene.h:546
DVLRESULT
Defines the result of the operation. May be successful or not.
Definition: DVLTypes.h:37
char * m_szName
The name of the procedure or portfolio, UTF-8 encoding.
Definition: DVLScene.h:484
char * m_szDescription
The description of the step or model view, UTF-8 encoding. May be NULL.
Definition: DVLScene.h:470
sDVLStep * m_pSteps
The array of sDVLStep structures defining the steps or model views. The length is defined by the m_uS...
Definition: DVLScene.h:490
char * m_szKeywords
The keywords / publishing metadata of the step or model view, UTF-8 encoding. May be NULL...
Definition: DVLScene.h:473
DVLID * m_pChildNodes
Definition: DVLScene.h:68
uint32_t m_uNameValuePairsCount
Number of key-value pairs for this VEID.
Definition: DVLScene.h:339
Definition: DVLScene.h:347
sDVLURI * m_pURIs
Definition: DVLScene.h:215
Build a list using only the visible nodes.
Definition: DVLScene.h:391
DVLID * m_pNodes
Definition: DVLScene.h:245
Definition: DVLMaterial.h:139
sDVLPartsListItem * m_pParts
Array of sDVLPartsListItem structures, defining the parts list. The length is defined in the m_uParts...
Definition: DVLScene.h:450