Skip to Content
Oct 28, 2019 at 07:34 AM

SAP 3D Visual Enterprise viewer SDK


Is there anyone in the SAP world (or this site) that is able to provide assistance on SAP 3D Visual Enterprise viewer SDK?

I asked a lot of questions but no answers, it's a pretty poor service.

Now I would like to know if there is a way to convert a 2D point into its 3D coordinate since I should implement a sort of "select by box" with the SDK objects. My idea was to use the query command "bbox_test".

my attemps: recovering the scene matrices

dvlRenderer.GetCameraMatrices (mVeaView, mVeaPJ)

and then following these directions:

use a function of this type, but the results are not encouraging ...

Public Shared Function UnProject (ByRef projection As Matrix4x4, view As Matrix4x4, viewport As Size, mouse As Vector2, Optional zIN As Single = 0) As Vector4
Dim vec As Vector4

vec.X = ((2.0F * mouse.X) / CSng (viewport.Width)) - 1
vec.Y = - ((2.0F * mouse.Y / CSng (viewport.Height) - 1))
vec.Z = zIN
vec.W = 1.0F
Dim mMolt As Matrix4x4 = Matrix4x4.Multiply (view, projection)

Dim mMoltInv As Matrix4x4
Matrix4x4.Invert (mMolt, mMoltInv)

vec = Vector4.Transform (vec, mMoltInv)

If vec.W> Single.Epsilon OrElse vec.W <Single.Epsilon Then
vec.X / = vec.W
vec.Y / = vec.W
vec.Z / = vec.W
End If

Return vec
End Function Community