Click here to Skip to main content
14,364,335 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have changed from Winform to WPF to use Helix3d toolkit & it is a very steep learning curve but I am having some issue with camera views.

1) When I use OrthographicCamera I get clipping on zoom. After a lot of searching this seems to be an issue with WPF but there does not seem to have any work around (Tried NearPlaneDistance to Big negative & FarPlaneDistance to Big Positive with no fix). I need to have the in Ortho mode due precision without view distortion.

2) Rotating the camera after changing the UpDirection I have managed to do but rotating the view so X+ is pointing up the screen & Z+ is pointing right (in "T" Mode). I can achieve this by the viewcube by clicking "U". Plus the View edges & corners stop working after updirection change (Still have not found workaround if it is an error)

3) Is there a way of changing the default position (i.e. double click mouse wheel for each mode)?

Sorry this looks look a Christmas list but I have been looking for weeks without any fixes. Without these fixes the app will not function correct & is dead in the water.

Hi Solved the Clipping issue but still have not managed to solve the ModelUpDirection issue & I think I can solve the default position once I can workout how to trigger an event on double mousewheel Click (Any ideas please help)

ViewPort.Camera.NearPlaneDistance = -1000
       ViewPort.Camera.FarPlaneDistance = 1000


What I have tried:

  Dim myPCamera As OrthographicCamera = New OrthographicCamera()

    Select Case Type
        Case "M"
            myPCamera.LookDirection = New Vector3D(0, 0, 1)
            ViewPort.Camera = myPCamera
            ViewPort.IsViewCubeEdgeClicksEnabled = False
            ViewPort.ModelUpDirection = New Vector3D(0, 0, 1)
            ViewPort.Camera.ChangeDirection(New Vector3D(0, 0, -100), New Vector3D(0, 1, 0), 1000)
            ViewPort.IsViewCubeEdgeClicksEnabled = True
        Case "T"
            myPCamera.LookDirection = New Vector3D(0, 1, 0)
            ViewPort.Camera = myPCamera
            ViewPort.IsViewCubeEdgeClicksEnabled = False
            ViewPort.ModelUpDirection = New Vector3D(0, 1, 0)
            ViewPort.Camera.ChangeDirection(New Vector3D(0, -1, 0), New Vector3D(0, 0, 1), 1000)
            ViewPort.IsViewCubeEdgeClicksEnabled = True
    End Select
End Sub
Updated 7-Nov-19 10:22am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100