Camera.SetupModelView Method

Gives a chance to derived classes to setup camera by two points and a vector.
Protected Friend Overridable Sub SetupModelView( _ 
ByVal setGraphics As Boolean, _ 
ByVal reflection As Boolean, _ 
ByVal cameraEyePos As CameraEyePosType, _ 
ByVal applySceneTransformation As Boolean
)
This language is not supported or no code example is available.
internal protected virtual void SetupModelView( 
bool setGraphics
bool reflection
CameraEyePosType cameraEyePos
bool applySceneTransformation 
)
This language is not supported or no code example is available.

Parameters

setGraphics
bool

When true, the RenderContextBase.SetModelView is called.

reflection
bool

When true, reflection is active.

cameraEyePos
CameraEyePosType

The camera position

applySceneTransformation
bool

When true, ApplySceneTransformation is called.

Example
 
public class myCamera : devDept.Eyeshot.Camera
   {
       Point3D myLocation = new Point3D(100, 0, 0);
       Point3D myTarget = Point3D.Origin;
       Vector3D myUpVector = Vector3D.AxisZ;
   
       protected override void SetupModelView(bool setGraphics, bool reflection, Environment.CameraEyePosType cameraEyePos)
       {
           modelViewMatrix = LookAt(myLocation, myTarget, myUpVector, reflection);
   
           if (setGraphics && renderContext != null)
           {
               renderContext.SetMatrices(projectionMatrix, modelViewMatrix);
           }
       }
   }
   
   public partial class Form1 : Form
   {
        
       public Form1()
       {
   
           InitializeComponent();
   
           myViewport.Camera = New myCamera;
   
       }
   
   }					
This language is not supported or no code example is available.
  
Public Class myCamera
 	Inherits devDept.Eyeshot.Camera
 
 	Private myLocation As New Point3D(100, 0, 0)
 	Private myTarget As Point3D = Point3D.Origin
 	Private myUpVector As Vector3D = Vector3D.AxisZ
 
 	Protected Overrides Sub SetupModelView(setGraphics As Boolean, reflection As Boolean, cameraEyePos As Environment.CameraEyePosType)
 		modelViewMatrix = LookAt(myLocation, myTarget, myUpVector, reflection)
 
 		If setGraphics AndAlso renderContext IsNot Nothing Then
 			renderContext.SetMatrices(projectionMatrix, modelViewMatrix)
 		End If
 	End Sub
 
     End Class
 
     Public Class Form1
 
         Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
             MyViewport.Camera = New MyCamera
 
         End Sub
 
     End Class					
This language is not supported or no code example is available.

.NET Framework

Supported in: 4.8

In this article

Definition