SAP 3D Visual Enterprise applications SDK
|
#include <DVLRenderer.h>
Public Member Functions | |
virtual DVLRESULT | SetDimensions (uint32_t width, uint32_t height)=0 |
virtual void | SetBackgroundColor (float fTopRed, float fTopGreen, float fTopBlue, float fBottomRed, float fBottomGreen, float fBottomBlue)=0 |
virtual void | SetBackgroundOpacity (float fTopAlpha, float fBottomAlpha)=0 |
virtual DVLRESULT | AttachScene (IDVLScene *pScene)=0 |
virtual IDVLScene * | GetAttachedScenePtr ()=0 |
virtual size_t | GetAuxiliaryScenesCount ()=0 |
virtual DVLRESULT | AttachAuxiliaryScene (IDVLScene *pScene)=0 |
virtual DVLRESULT | DetachAuxiliaryScene (size_t index)=0 |
virtual DVLRESULT | GetAuxiliarySceneInfo (size_t index, IDVLScene **ppScene, DVLID *pIDAnchorNode, sDVLMatrix *pTMWorld)=0 |
virtual DVLRESULT | SetAuxiliarySceneAnchor (size_t index, DVLID idAnchorNode)=0 |
virtual DVLRESULT | SetAuxiliarySceneAnchorMatrix (size_t index, const sDVLMatrix &tmLocal)=0 |
virtual DVLRESULT | SetAuxiliarySceneMatrix (size_t index, const sDVLMatrix &tmWorld)=0 |
virtual bool | ShouldRenderFrame () const =0 |
virtual DVLRESULT | RenderFrame ()=0 |
virtual DVLRESULT | RenderFrameEx (const sDVLMatrix &matView, const sDVLMatrix &matProjection)=0 |
virtual DVLRESULT | GetCameraMatrices (sDVLMatrix &matView, sDVLMatrix &matProjection) const =0 |
virtual DVLRESULT | SetCameraMatrices (const sDVLMatrix &matView, const sDVLMatrix &matProjection, float fCrossFadeSeconds)=0 |
virtual DVLRESULT | SetOption (DVLRENDEROPTION type, bool bEnable)=0 |
virtual DVLRESULT | GetOption (DVLRENDEROPTION type, bool &bEnabled)=0 |
virtual DVLRESULT | SetOptionF (DVLRENDEROPTIONF type, float fValue)=0 |
virtual DVLRESULT | GetOptionF (DVLRENDEROPTIONF type, float &fValue) const =0 |
virtual DVLRESULT | ResetView (uint32_t flags=DVLRESETVIEWFLAG::DVLRESETVIEWFLAG_CAMERA|DVLRESETVIEWFLAG::DVLRESETVIEWFLAG_SMOOTHTRANSITION)=0 |
virtual DVLRESULT | BeginGesture (float x, float y)=0 |
virtual DVLRESULT | EndGesture ()=0 |
virtual DVLRESULT | Pan (float dx, float dy)=0 |
virtual DVLRESULT | Rotate (float dx, float dy)=0 |
virtual DVLRESULT | Zoom (float f)=0 |
virtual bool | CanIsolateNode (DVLID id)=0 |
virtual DVLRESULT | SetIsolatedNode (DVLID id)=0 |
virtual DVLID | GetIsolatedNode ()=0 |
virtual DVLRESULT | ZoomTo (DVLZOOMTO what, DVLID idNode, float fCrossFadeSeconds)=0 |
virtual DVLRESULT | Tap (float x, float y, bool bDouble)=0 |
virtual DVLRESULT | HitTest (sDVLHitTest *pHitTest)=0 |
virtual DVLRESULT | MultipleHitTest (size_t numHitTests, sDVLHitTest *pHitTests)=0 |
virtual IDVLTexture * | CreateTexture (uint32_t width, uint32_t height, uint8_t bpp, const void *pData)=0 |
virtual DVLRESULT | ReleaseTexture (IDVLTexture *pTexture)=0 |
This class defines the main interface for interaction with the rendering system of DVL
Attaches an auxiliary scene to the renderer. Index of this scene == GetAuxiliaryScenesCount(). Increases the total number of auxiliary scenes by one.
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_ACCESSDENIED | If master scene is not set using AttachScene() method |
DVLRESULT_BADARG | If pScene is NULL |
DVLRESULT_OUTOFMEMORY | If no memory to store pointer |
DVLRESULT_OK | If worked correctly |
Attaches a scene that will be displayed through this interface
The typical usage would be:
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Begins a gesture by computing target hit point, touch direction etc. Should be called at the beginning of each gesture.
x | Horizontal coordinate in points |
y | Vertical coordinate in points |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Checks if the provided node can be isolated (by seeing if there are any visible geometry underneath it)
|
pure virtual |
Detaches an auxiliary scene from the renderer.
index | Index of the scene to be detached |
|
pure virtual |
Ends a gesture, should be called at the end of each gesture to decrease the internal counter
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_PROCESSED | Gesture was not started, thus ending gesture had no effect. This is not an error, you can call this method many times |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Returns a pointer to the currently attached scene
|
pure virtual |
Retrieves auxiliary scene information by index: 1) Scene pointer 2) ID of anchor node (scene matrix is set to be equal to the matrix of anchor node). DVLID_INVALID if anchoring is not used. 3) scene matrix
index | Index of the scene to be queried |
ppScene | Pointer to the scene. Set to NULL, if not needed |
pIDAnchorNode | Pointer to anchor DVLID. Set to NULL, if not needed |
pTMWorld | Pointer to world matrix of the scene. Set to NULL, if not needed |
|
pure virtual |
Master scene (set in AttachScene()) is rendered in each frame. But it is also possible to render additional scenes in the same frame. Such scenes are called auxiliary. By default, there are no auxiliary scenes.
|
pure virtual |
Gets camera matrices
matView | View matrix |
matProjection | Projection matrix |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Returns the DVLID of currently isolated node or DVLID_INVALID if nothing is isolated
|
pure virtual |
Returns the current state of rendering options
See the DVLRENDEROPTION enum for the details.
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_BADARG | If such option does not exist |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Returns the current value of rendering options
See the DVLRENDEROPTIONF enum for the details.
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_BADARG | If such option does not exist |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Performs hit testing and finds a 3D object under the X, Y coordinates and returns the world coordinates of the taps intersection with the 3D object
DVLRESULT_BADFORMAT | If m_uSizeOfDVLHitTest is wrong |
DVLRESULT_BADARG | If pHitTest == NULL |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_PROCESSED | If worked correctly and no 3D objects were hit |
DVLRESULT_OK | If worked correctly and 3D object was hit |
|
pure virtual |
Performs mulptiple hit testing and finds a 3D object under the X, Y coordinates and returns the world coordinates of the taps intersection with the 3D object
numHitTests | Number of hit tests |
pHitTests | Hit test query structures |
DVLRESULT_BADFORMAT | If m_uSizeOfDVLHitTest is wrong |
DVLRESULT_BADARG | If pHitTest == NULL |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_PROCESSED | If worked correctly and no 3D objects were hit |
DVLRESULT_OK | If worked correctly and 3D object was hit |
|
pure virtual |
Pans the scene
dx | Horizontal delta in points |
dy | Vertical delta in points |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Renders a single frame using currently activated camera
Call this method to draw the attached scene. It requires OpenGL context to work.
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Renders a single frame using explicitly defined View and Projection matrices
Call this method to draw the attached scene. It requires OpenGL context to work.
matView | View matrix |
matProjection | Projection matrix |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Changes view to default viewport (the "Home" mode)
flags | Option that customize behavior of this method |
After calling this method the scene will look like just loaded.
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Rotates the scene around 3d orbit rotation center (which is calculated in BeginGesture())
dx | Horizontal delta in points |
dy | Vertical delta in points |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Sets ID of a node in master scene that will act as anchor for a given auxiliary scene. This means that scene matrix will be equal to world matrix of anchor node. If anchor node changes matrix, auxiliary scene will also change matrix automatically.
index | Index of the scene |
idAnchorNode | ID of the node from master scene to be acting as an anchor |
|
pure virtual |
Sets anchor matrix for the auxiliary scene.
index | Index of the scene |
tmWorld | Transformation matrix in local coordinates. All nodes in auxiliary scene will be pre-multiplied by this matrix during rendering. |
|
pure virtual |
Sets world matrix for the auxiliary scene.
index | Index of the scene |
tmWorld | Transformation matrix in world coordinates. All nodes in auxiliary scene will be pre-multiplied by this matrix during rendering. |
|
pure virtual |
Sets the color which is used to clear the screen. Can be gradient from top to bottom.
Some examples are below:
|
pure virtual |
Sets the opacity which is used to clear the screen. Can be gradient from top to bottom.
|
pure virtual |
Sets camera matrices
matView | View matrix |
matProjection | Projection matrix |
fCrossFadeSeconds | Time to perform the "fly to" animation. Set to 0.0f to do this immediately |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Sets dimensions of the canvas
You usually call this in OnResize() handler of your application. You also need to call it once the renderer is created to let it know the target resolution.
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
Sets/clears isolated node
id | Specifies the node to be isolated. Set to DVLID_INVALID to clear isolation. |
|
pure virtual |
Sets the specified rendering option to ON or OFF
See the DVLRENDEROPTION enum for the details.
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_HARDWAREERROR | If new option is not supported by hardware |
DVLRESULT_BADARG | If such option does not exist |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Sets the specified rendering option value
See the DVLRENDEROPTIONF enum for the details.
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_HARDWAREERROR | If new option is not supported by hardware |
DVLRESULT_BADARG | If such option does not exist |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Checks if the scene has been somehow modified and requires repaint
Use this method to check if the scene needs repainting. There are two reasons why scenes may need to be redrawn: if something is changed by the user or if something is changed inside the core, like mesh has been moved by animation. You can handle events of the first type yourself, but you can't do this for the internal events. So there is a method that tells you if the scene has been changed "inside" and needs updating.
|
pure virtual |
Sends the "tap" event to the core (for selection)
x | Horizontal coordinate in points |
y | Vertical coordinate in points |
bDouble | Is that double or single tap |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Zooms the scene
f | Zoom velocity in points per second |
DVLRESULT_NOTINITIALIZED | If renderer initialization was not performed |
DVLRESULT_OK | If worked correctly |
|
pure virtual |
Zooms the scene to a bounding box created from a particular set of nodes
what | What set of nodes to zoom to |
fCrossFadeSeconds | Time to perform the "fly to" animation. Set to 0.0f to do this immediately |
idNode | Is only used if what == DVLZOOMTO_NODE |
DVLRESULT_NOTINITIALIZED | If scene was not properly initialized |
DVLRESULT_NOTFOUND | If the nodes set was empty (for example DVLZOOMTO_VISIBLE and all is hidden) |
DVLRESULT_NOTINITIALIZED | If DVLZOOMTO_RESTORE and there is no saved view |
DVLRESULT_OK | If worked correctly |