SAP 3D Visual Enterprise applications SDK
|
#include <DVLScene.h>
Public Types | |
enum | eCreateNodeCopyFlags : uint16_t { COPY_CHILDREN = (1 << 0), COPY_ANIMATION = (1 << 1), FULL_COPY = 0xFFFF } |
Public Member Functions | |
virtual DVLRESULT | RetrieveSceneInfo (uint32_t flags, sDVLSceneInfo *pInfo)=0 |
virtual void | ReleaseSceneInfo (sDVLSceneInfo *pInfo)=0 |
virtual void | GetNodeSelectionInfo (uint32_t *pTotalSelectedNodesCount, uint32_t *pVisibleSelectedNodesCount, uint32_t *pHiddenSelectedNodesCount)=0 |
virtual void | PerformAction (DVLSCENEACTION action)=0 |
virtual DVLRESULT | RetrieveNodeInfo (DVLID id, uint32_t flags, sDVLNodeInfo *pInfo)=0 |
virtual void | ReleaseNodeInfo (sDVLNodeInfo *pInfo)=0 |
virtual DVLRESULT | RetrieveLayerInfo (DVLID id, sDVLLayerInfo *pInfo)=0 |
virtual void | ReleaseLayerInfo (sDVLLayerInfo *pInfo)=0 |
virtual DVLRESULT | RetrieveMetadata (DVLID id, sDVLMetadataInfo *pInfo)=0 |
virtual void | ReleaseMetadata (sDVLMetadataInfo *pInfo)=0 |
virtual DVLRESULT | RetrieveVEIDs (DVLID id, sDVLVEIDInfo *pInfo)=0 |
virtual void | ReleaseVEIDs (sDVLVEIDInfo *pInfo)=0 |
virtual DVLRESULT | RetrieveThumbnail (DVLID id, sDVLImage *pThumbnail)=0 |
virtual void | ReleaseThumbnail (sDVLImage *pThumbnail)=0 |
virtual DVLRESULT | BuildPartsList (uint32_t uMaxParts, uint32_t uMaxNodesInSinglePart, uint32_t uMaxPartNameLength, eDVLPartsListType eType, eDVLPartsListSort eSort, DVLID idConsumedStep, const char *szSubstring, sDVLPartsListInfo *pInfo)=0 |
virtual void | ReleasePartsList (sDVLPartsListInfo *pInfo)=0 |
virtual DVLRESULT | FindNodes (eDVLFindNodeType type, eDVLFindNodeMode mode, const char *str, sDVLNodeIDsArrayInfo *pInfo)=0 |
virtual void | ReleaseNodeIDsArrayInfo (sDVLNodeIDsArrayInfo *pInfo)=0 |
virtual DVLRESULT | RetrieveProcedures (sDVLProceduresInfo *pInfo)=0 |
virtual void | ReleaseProcedures (sDVLProceduresInfo *pInfo)=0 |
virtual DVLRESULT | ActivateStep (DVLID id, bool bFromTheBeginning, bool bContinueToTheNext, float stepTime=-1.f)=0 |
virtual DVLRESULT | PauseCurrentStep ()=0 |
virtual DVLRESULT | ApplyLayerVisibility (DVLID id, DVLLAYERVISIBILITYACTION action=DVLLAYERVISIBILITYACTION_HIDEALL_SHOWLAYER)=0 |
virtual DVLID | CreateNode (DVLID idParent, const char *szNodeName=NULL, DVLID idInsertBefore=DVLID_INVALID)=0 |
virtual DVLID | CreateNodeCopy (DVLID idNode, DVLID idParent, eCreateNodeCopyFlags flags)=0 |
virtual DVLRESULT | DeleteNode (DVLID id)=0 |
virtual DVLRESULT | ChangeNodeFlags (DVLID id, uint32_t flags, DVLFLAGOPERATION flagop)=0 |
virtual DVLRESULT | SetNodeOpacity (DVLID id, float opacity)=0 |
virtual DVLRESULT | SetNodeHighlightColor (DVLID id, uint32_t color)=0 |
virtual DVLRESULT | GetNodeWorldMatrix (DVLID id, sDVLMatrix &wtm) const =0 |
virtual DVLRESULT | SetNodeWorldMatrix (DVLID id, const sDVLMatrix *pwtm)=0 |
virtual DVLRESULT | GetNodeLocalMatrix (DVLID id, sDVLMatrix &tm) const =0 |
virtual DVLRESULT | SetNodeLocalMatrix (DVLID id, const sDVLMatrix *ptm)=0 |
virtual IDVLMaterial * | GetMaterialByName (const char *name) const =0 |
virtual size_t | GetNodeSubmeshesCount (DVLID nodeId) const =0 |
virtual IDVLMaterial * | GetNodeSubmeshMaterial (DVLID nodeId, size_t index) const =0 |
virtual DVLRESULT | SetNodeSubmeshMaterial (DVLID nodeId, size_t index, IDVLMaterial *material)=0 |
virtual DVLRESULT | Execute (DVLEXECUTE type, const char *str)=0 |
virtual void | Retain ()=0 |
virtual void | Release ()=0 |
This class defines the scene interface
|
pure virtual |
Activates a step by playing its animation. Optionally plays steps that go after this step
id | The identifier of the step or model view to activate |
bFromTheBeginning | Play step from beginning or from currently paused position |
bContinueToTheNext | What to do after finishing playing the current step: play next steps or stop |
stepTime | The time at which the step animation starts. Default: -1. |
DVLRESULT_NOTFOUND | If Step with such ID does not exist |
DVLRESULT_PROCESSED | If bFromTheBeginning is false and current step is already playing (not an error, the step just continues to play) |
DVLRESULT_INVALIDCALL | If bFromTheBeginning is false, bContinueToTheNext is true and current step has stopped playing and doesn't have next step (i.e. we're at the end of all steps) |
DVLRESULT_OK | If a step was activated |
Notes
|
pure virtual |
Hides all nodes in the scene and then shows only nodes that exist in the given layer
id | The identifier of the layer |
DVLRESULT_NOTFOUND | If Layer with such ID does not exist |
DVLRESULT_OK | If operation was successfully performed |
|
pure virtual |
Builds a parts list and stores it inside the provided structure
uMaxParts | Maximum number of parts required. For example, it doesn't make sense to have 100,000 parts on iPad. 0 for unlimited. |
uMaxNodesInSinglePart | Maximum number of nodes in a single part to be saved. If more nodes belong to a part, they will be ignored. For example, more than 1000 nodes per part is probably more than enough for iPad. 0 for unlimited. |
uMaxPartNameLength | Maximum length of part name. For example, no point in having 1000 symbol strings on iPad (cause there is no way to display them anyways). 0 for unlimited. |
eType | Type of listing: full, visible only, only consumed by idConsumedStep step |
eSort | Type of sorting: A..Z, Z..A, etc |
idConsumedStep | Only used when eType == DVLPARTSLISTTYPE_CONSUMED_BY_STEP, set to DVLID_INVALID or any other value if not DVLPARTSLISTTYPE_CONSUMED_BY_STEP |
szSubstring | Only parts that include szSubstring are returned. Set to NULL if filtering is not required. |
pInfo | A pointer to a sDVLPartsListInfo structure that receives the data |
DVLRESULT_BADFORMAT | If m_uSizeOfDVLPartsListInfo is wrong |
DVLRESULT_BADARG | If pInfo == NULL |
DVLRESULT_BADARG | If eType == DVLPARTSLISTTYPE_CONSUMED_BY_STEP and idConsumedStep == DVLID_INVALID |
DVLRESULT_OUTOFMEMORY | If parts list could not be created due to memory failure |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If all went fine |
Notes
Example
|
pure virtual |
Changes some node flags
id | DVLID of the node that you need to change flags on |
flags | Bitfield combination of one or more DVLNODEFLAG flags |
flagop | DVLFLAGOP_SET, DVLFLAGOP_CLEAR, DVLFLAGOP_INVERT possibly ORed with DVLFLAGOP_MODIFIER_RECURSIVE |
DVLRESULT_NOINTERFACE | If "id" is pointing to an item of different type |
DVLRESULT_PROCESSED | If flags were not changed (not an error, DVLSUCCEEDED(DVLRESULT_PROCESSED) == true). For example when hiding a hidden node |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If some flags were changed |
|
pure virtual |
Creates an empty node in the scene. You can use this method for building node hierarchies using API.
idParent | Parent node id. If set to DVLID_INVALID, then the node would be created at top level in hierarchy. |
szNodeName | Name of the newly created node, can be NULL |
idInsertBefore | The id of the node before which to insert the new node. If set to DVLID_INVALID then add the node at the end. |
DVLID | Created node id or DVLID_INVALID in case of error |
|
pure virtual |
Creates node copy
idNode | Copied node id |
idParent | Parent node id |
flags | Copy flags |
DVLID | Created node id |
Deletes a node and all of its children. Works only with nodes that were previously created via API (CreateNode() and CreateNodeCopy() methods).
id | Id of the node to delete |
DVLRESULT_FAIL | If "id" is incorrect |
DVLRESULT_ACCESSDENIED | If node was loaded from a .vds file. You can only delete nodes created using API. |
DVLRESULT_NOTFOUND | If node with specified "id" doesn't exist |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If node and all its children were deleted |
|
pure virtual |
Executes a query
type | Query type, see DVLEXECUTE enum |
str | Query string, see DVLEXECUTE enum for string format |
DVLRESULT_FAIL | If query wasn't performed |
DVLRESULT_OK | If query was successfully performed |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
|
pure virtual |
Finds a list of scene nodes by matching them using a string parameter [different search types are possible: by name, asset id or unique id]
type | One of eDVLFindNodeType values |
mode | One of eDVLFindNodeMode values |
str | String identifier to search on (depends on "type" value) |
pInfo | A pointer to the sDVLNodeIDsArrayInfo structure that receives the list of found nodes |
DVLRESULT_BADARG | If pInfo == NULL |
DVLRESULT_BADFORMAT | If m_uSizeOfDVLFindNodesList is wrong |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_PROCESSED | If scene does not have nodes which satisfy a query |
DVLRESULT_OK | If some nodes have been retrieved |
|
pure virtual |
Retrieves node local matrix
id | DVLID of the node |
tm | Node local matrix will be put into this variable |
DVLRESULT_FAIL | If "id" is incorrect |
DVLRESULT_NOTFOUND | If node with specified "id" doesn't exist |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If matrix was successfully retrieved |
|
pure virtual |
Used for quick interrogation of "node selection", for example "Show selected nodes" is only available if there is at least 1 invisible node selected
pTotalSelectedNodesCount | Pointer to the total number of selected nodes. Set to NULL if not needed. |
pVisibleSelectedNodesCount | Pointer to the number of visible selected nodes. Set to NULL if not needed. |
pHiddenSelectedNodesCount | Pointer to the number of hidden selected nodes. Set to NULL if not needed. |
|
pure virtual |
Retrieves node world matrix
id | DVLID of the node |
wtm | Node world matrix will be put into this variable |
Example
DVLRESULT_FAIL | If "id" is incorrect |
DVLRESULT_NOTFOUND | If node with specified "id" doesn't exist |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If matrix was successfully retrieved |
|
pure virtual |
Pauses the current step, if any
DVLRESULT_PROCESSED | If current step is already paused (in this case it is still kept paused) |
DVLRESULT_NOTFOUND | If there is no "current step" playing |
DVLRESULT_OK | If current step was paused |
|
pure virtual |
Executes a particular action on the scene, see DVLSCENEACTION enum
Example
|
pure virtual |
Releases the scene and deletes it if reference count is zero.
See Retain() method for more details on reference counting.
|
pure virtual |
Releases all memory that was initialized in a previous call to RetrieveLayerInfo()
pInfo | A pointer to a sDVLLayerInfo structure filled by RetrieveLayerInfo() call |
|
pure virtual |
Releases all memory that was initialized in a previous call to RetrieveMetadata()
pInfo | A pointer to the sDVLMetadataInfo structure filled by the RetrieveMetadata() call |
|
pure virtual |
Releases all memory that was allocated by SDK in the provided pInfo structure (For example after using FindNodes())
pInfo | A pointer to a sDVLNodeIDsArrayInfo structure |
|
pure virtual |
Releases all memory that was initialized in a previous call to RetrieveNodeInfo()
pInfo | A pointer to the sDVLNodeInfo structure filled by the RetrieveNodeInfo() call |
|
pure virtual |
Releases all memory that was initialized in a previous call to BuildPartsList()
pInfo | A pointer to a sDVLPartsListInfo structure filled by a previous BuildPartsList() call |
|
pure virtual |
Releases all memory that was initialized in a previous call to RetrieveSteps()
pInfo | A pointer to a sDVLProceduresInfo structure filled by the RetrieveSteps() call |
|
pure virtual |
Releases all memory that was initialized in a previous call to RetrieveSceneInfo()
pInfo | A pointer to a sDVLSceneInfo structure filled by RetrieveSceneInfo() call |
|
pure virtual |
Releases all memory that was initialized in a previous call to RetrieveThumbnail()
pThumbnail | A pointer to a sDVLImage structure filled by the RetrieveThumbnail() call |
|
pure virtual |
Releases all memory that was initialized in a previous call to RetrieveVEIDs()
pInfo | A pointer to the sDVLVEIDInfo structure filled by the RetrieveVEIDs() call |
|
pure virtual |
Increases the internal reference counter
The scene object maintains a counter of references to itself. Each Retain() call increments it, each Release() call decrements. The scene gets deleted when the counter becomes zero. When you load a scene, the counter is set to 1. You then need to call Release() to delete the scene. However, if you attach the scene to a renderer, it will keep its own reference, so your Release() call will not delete the scene unless the renderer releases it, as well.
|
pure virtual |
Retrieves layer information into the provided structure
id | DVLID of the layer that you query on |
pInfo | A pointer to the sDVLLayerInfo structure that receives the data |
|
pure virtual |
Retrieves metadata into the provided structure
id | DVLID of the item that you query on (can be node, layer, step view) |
pInfo | A pointer to the sDVLMetadataInfo structure that receives the data |
DVLRESULT_BADFORMAT | If m_uSizeOfDVLMetadata is wrong |
DVLRESULT_BADARG | If pInfo == NULL |
DVLRESULT_OUTOFMEMORY | If metadata data could not be created due to memory failure |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_PROCESSED | If item does not have metadata (in such case sDVLMetadataInfo::m_pMetadata == NULL) |
DVLRESULT_OK | If some metadata has been retrieved |
Notes
Example
|
pure virtual |
Retrieves node information into the provided structure
id | DVLID of the node that you query on |
flags | Bitfield combination of one or more DVLNODEINFO flags |
pInfo | A pointer to the sDVLNodeInfo structure that receives the data |
DVLRESULT_BADFORMAT | If m_uSizeOfDVLNodeInfo is wrong |
DVLRESULT_BADARG | If pInfo == NULL |
DVLRESULT_NOINTERFACE | If "id" is pointing to an item of different type |
DVLRESULT_OUTOFMEMORY | If some info could not be retrieved due to memory failure |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
Notes
Example
|
pure virtual |
Retrieves a list of procedures and portfolios in the scene
pInfo | A pointer to a sDVLProceduresInfo structure that receives the data |
DVLRESULT_BADFORMAT | If m_uSizeOfDVLProceduresInfo is wrong |
DVLRESULT_BADARG | If pInfo == NULL |
DVLRESULT_OUTOFMEMORY | In case of memory failure |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If all went fine |
Notes
Example
|
pure virtual |
Retrieves scene information into the provided structure
flags | Bitfield combination of one or more DVLSCENEINFO flags |
pInfo | A pointer to the sDVLSceneInfo structure that receives the scene information |
DVLRESULT_BADFORMAT | If m_uSizeOfDVLSceneInfo is wrong |
DVLRESULT_BADARG | If pInfo == NULL |
DVLRESULT_OUTOFMEMORY | If some info could not be retrieved due to memory failure |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
Notes
Example
Retrieves a thumbnail for specified DVLID into the provided buffer
id | DVLID of an item (item type may be arbitrary) |
pThumbnail | A pointer to the sDVLImage structure that receives the data. |
DVLRESULT_BADFORMAT | If m_uSizeOfDVLMetadata is wrong |
DVLRESULT_BADARG | If pInfo == NULL |
DVLRESULT_OUTOFMEMORY | If thumbnail could not be retrieved due to memory failure |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_NOTFOUND | If item does not have thumbnail (in such case sDVLImage::m_pImageBuffer == NULL) |
DVLRESULT_OK | If thumbnail was successfully retrieved |
Notes
Example
|
pure virtual |
Retrieves VEIDs into the provided structure.
id | DVLID of the item that you query on |
pInfo | A pointer to the sDVLVEIDInfo structure that receives the data |
DVLRESULT_BADFORMAT | If m_uSizeOfDVLVEID is wrong |
DVLRESULT_BADARG | If pInfo == NULL |
DVLRESULT_OUTOFMEMORY | If VEID data could not be created due to memory failure |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_PROCESSED | If item does not have VEIDs (in such case sDVLVEIDInfo::m_pIDs == NULL) |
DVLRESULT_OK | If VEIDs have been retrieved |
Notes
Sets node highlight color
id | DVLID of the node that you need to set highlight color for |
color | Highlight color value (32-bit ABGR, where A is amount of blending between material color and highlight color) |
DVLRESULT_FAIL | If "id" is incorrect |
DVLRESULT_NOTFOUND | If node with specified "id" doesn't exist |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If node highlight color was modified |
|
pure virtual |
Sets node local matrix
id | DVLID of the node |
ptm | Pointer to a local matrix to set. Set to NULL if you want to remove local matrix (if local matrix does not exist, it is treated as Identity matrix in all computations). |
DVLRESULT_FAIL | If "id" is incorrect |
DVLRESULT_ACCESSDENIED | If node was loaded from a .vds file. Local matrix modification is only allowed on nodes created via API. |
DVLRESULT_NOTFOUND | If node with specified "id" doesn't exist |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If matrix was successfully modified |
Sets node opacity
id | DVLID of the node that you need to set opacity |
opacity | Opacity amount (0.0 - fully transparent, 1.0 - fully opaque) |
DVLRESULT_FAIL | If "id" is incorrect |
DVLRESULT_NOTFOUND | If node with specified "id" doesn't exist |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If node opacity was modified |
|
pure virtual |
Sets node world matrix
id | DVLID of the node |
pwtm | Pointer to a world matrix to set. Set to NULL if you want to restore default matrix. |
Example
DVLRESULT_FAIL | If "id" is incorrect |
DVLRESULT_NOTFOUND | If node with specified "id" doesn't exist |
DVLRESULT_NOTINITIALIZED | If scene is not properly initialized |
DVLRESULT_OK | If matrix was successfully modified |