SAP 3D Visual Enterprise applications SDK
DVLRenderer.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 
11 
12 
19 #pragma pack(push, 1)
21 {
24 
27  float m_fScreenCoordinateY;
28 
31 
34  float m_fWorldCoordinateY;
35  float m_fWorldCoordinateZ;
36 
39  float m_fLocalCoordinateY;
40  float m_fLocalCoordinateZ;
41 };
42 #pragma pack(pop)
43 
44 
45 
50 {
51 protected:
52  virtual ~IDVLRenderer() {}//can't be deleted using this interface
53 
54 public:
64  virtual DVLRESULT SetDimensions(uint32_t width, uint32_t height) = 0;
65 
79  virtual void SetBackgroundColor(float fTopRed, float fTopGreen, float fTopBlue, float fBottomRed, float fBottomGreen, float fBottomBlue) = 0;
80 
86  virtual void SetBackgroundOpacity(float fTopAlpha, float fBottomAlpha) = 0;
87 
109  virtual DVLRESULT AttachScene(IDVLScene *pScene) = 0;
110 
117  virtual IDVLScene *GetAttachedScenePtr() = 0;
118 
123  virtual size_t GetAuxiliaryScenesCount() = 0;
124 
138  virtual DVLRESULT AttachAuxiliaryScene(IDVLScene *pScene) = 0;
139 
145  virtual DVLRESULT DetachAuxiliaryScene(size_t index) = 0;
146 
158  virtual DVLRESULT GetAuxiliarySceneInfo(size_t index, IDVLScene **ppScene, DVLID *pIDAnchorNode, sDVLMatrix *pTMWorld) = 0;
159 
170  virtual DVLRESULT SetAuxiliarySceneAnchor(size_t index, DVLID idAnchorNode) = 0;
171 
178  virtual DVLRESULT SetAuxiliarySceneAnchorMatrix(size_t index, const sDVLMatrix &tmLocal) = 0;
179 
180 
187  virtual DVLRESULT SetAuxiliarySceneMatrix(size_t index, const sDVLMatrix &tmWorld) = 0;
188 
197  virtual bool ShouldRenderFrame() const = 0;
198 
207  virtual DVLRESULT RenderFrame() = 0;
208 
220  virtual DVLRESULT RenderFrameEx(const sDVLMatrix &matView, const sDVLMatrix &matProjection) = 0;
221 
231  virtual DVLRESULT GetCameraMatrices(sDVLMatrix &matView, sDVLMatrix &matProjection) const = 0;
232 
243  virtual DVLRESULT SetCameraMatrices(const sDVLMatrix &matView, const sDVLMatrix &matProjection, float fCrossFadeSeconds) = 0;
244 
255  virtual DVLRESULT SetOption(DVLRENDEROPTION type, bool bEnable) = 0;
256 
266  virtual DVLRESULT GetOption(DVLRENDEROPTION type, bool &bEnabled) = 0;
267 
278  virtual DVLRESULT SetOptionF(DVLRENDEROPTIONF type, float fValue) = 0;
279 
289  virtual DVLRESULT GetOptionF(DVLRENDEROPTIONF type, float &fValue) const = 0;
290 
302 
315  virtual DVLRESULT BeginGesture(float x, float y) = 0;
316 
324  virtual DVLRESULT EndGesture() = 0;
325 
335  virtual DVLRESULT Pan(float dx, float dy) = 0;
336 
346  virtual DVLRESULT Rotate(float dx, float dy) = 0;
347 
356  virtual DVLRESULT Zoom(float f) = 0;
357 
361  virtual bool CanIsolateNode(DVLID id) = 0;
362 
368  virtual DVLRESULT SetIsolatedNode(DVLID id) = 0;
369 
373  virtual DVLID GetIsolatedNode() = 0;
374 
389  virtual DVLRESULT ZoomTo(DVLZOOMTO what, DVLID idNode, float fCrossFadeSeconds) = 0;
390 
401  virtual DVLRESULT Tap(float x, float y, bool bDouble) = 0;
402 
412  virtual DVLRESULT HitTest(sDVLHitTest *pHitTest) = 0;
413 
426  virtual DVLRESULT MultipleHitTest(size_t numHitTests, sDVLHitTest *pHitTests) = 0;
427 
428  virtual IDVLTexture *CreateTexture(uint32_t width, uint32_t height, uint8_t bpp, const void *pData) = 0;
429  virtual DVLRESULT ReleaseTexture(IDVLTexture *pTexture) = 0;
430 };
float m_fWorldCoordinateX
Output: world coordinate of the hit (only valid if m_idNode != DVLID_INVALID)
Definition: DVLRenderer.h:33
Definition: DVLTypes.h:383
DVLID m_idNode
Output: identifier of the node that was hit. Or DVLID_INVALID if there are no 3D objects underneath t...
Definition: DVLRenderer.h:30
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: DVLMaterial.h:128
DVLZOOMTO
Defines the Zoom To options.
Definition: DVLTypes.h:139
float m_fScreenCoordinateX
Input: X, Y coordinates of the point in question.
Definition: DVLRenderer.h:26
uint16_t m_uSizeOfDVLHitTest
Size of the structure. You must set it to sizeof(sDVLHitTest) before calling HitTest() ...
Definition: DVLRenderer.h:23
Definition: DVLRenderer.h:20
Reset camera position.
Definition: DVLTypes.h:299
DVLRENDEROPTIONF
Defines the rendering options.
Definition: DVLTypes.h:267
float m_fLocalCoordinateX
Output: local coordinate of the hit (only valid if m_idNode != DVLID_INVALID). In local coordinates o...
Definition: DVLRenderer.h:38
Definition: DVLRenderer.h:49
DVLRESULT
Defines the result of the operation. May be successful or not.
Definition: DVLTypes.h:37
DVLRENDEROPTION
Defines the rendering options.
Definition: DVLTypes.h:208
Smooth animated transition between current viewport and home viewport.
Definition: DVLTypes.h:305