LuciadCPillar C# 2024.0.05
Luciad.Cameras.PerspectiveCamera.Builder Class Reference

Factory object that can create new PerspectiveCamera instances. More...

Inheritance diagram for Luciad.Cameras.PerspectiveCamera.Builder:

Public Member Functions

 Builder (Luciad.Cameras.PerspectiveCamera.Builder other)
 
Luciad.Cameras.PerspectiveCamera Build ()
 Returns a new perspective camera. More...
 
void Dispose ()
 
Luciad.Cameras.PerspectiveCamera.Builder Eye (Luciad.Cartesian.Coordinate eye)
 Sets the eye the position of the new camera. More...
 
Luciad.Cameras.PerspectiveCamera.Builder FovY (Luciad.Cartesian.Angle fovY)
 Sets the vertical field of view. More...
 
Luciad.Cameras.PerspectiveCamera.Builder Look (Luciad.Cameras.Camera.Look look)
 Sets the position and orientation of the new camera. More...
 
Luciad.Cameras.PerspectiveCamera.Builder LookAt (Luciad.Cameras.Camera.LookAt lookAt)
 Sets the description of what the camera is looking at and the orientation of the camera. More...
 
Luciad.Cameras.PerspectiveCamera.Builder LookFrom (Luciad.Cameras.Camera.LookFrom lookFrom)
 Sets the description of the position and orientation of the new camera. More...
 
Luciad.Cameras.PerspectiveCamera.Builder Orientation (Luciad.Cartesian.Coordinate forward, Luciad.Cartesian.Coordinate up)
 Sets the forward the viewing direction of the new camera and the camera's up direction. More...
 

Detailed Description

Factory object that can create new PerspectiveCamera instances.

Constructor & Destructor Documentation

◆ Builder()

Luciad.Cameras.PerspectiveCamera.Builder.Builder ( Luciad.Cameras.PerspectiveCamera.Builder  other)
inline

Member Function Documentation

◆ Build()

Luciad.Cameras.PerspectiveCamera Luciad.Cameras.PerspectiveCamera.Builder.Build ( )
inline

Returns a new perspective camera.

Returns
a new perspective camera.

◆ Dispose()

void Luciad.Cameras.PerspectiveCamera.Builder.Dispose ( )
inline

◆ Eye()

Luciad.Cameras.PerspectiveCamera.Builder Luciad.Cameras.PerspectiveCamera.Builder.Eye ( Luciad.Cartesian.Coordinate  eye)
inline

Sets the eye the position of the new camera.

Parameters
eyethe position of the new camera.
Returns
this builder

◆ FovY()

Luciad.Cameras.PerspectiveCamera.Builder Luciad.Cameras.PerspectiveCamera.Builder.FovY ( Luciad.Cartesian.Angle  fovY)
inline

Sets the vertical field of view.

Note
The horizontal field of view will be derived from vertical field of view based on the aspect ratio. You can convert between horizontal and vertical field-of-view angles using the following formulae:
// Vertical -> horizontal field-of-view
double aspectRatio = (double)(camera.Width) / camera.Height;
Angle cameraFovX = Angle.FromRadians(2.0 * Math.Atan(Math.Tan(camera.FovY.Radians / 2.0) * aspectRatio));
// Horizontal -> vertical field-of-view
Angle newFovX = 60.0;
Angle newFovY = Angle.FromRadians(2 * Math.Atan(Math.Tan(newFovX.Radians / 2.0) / aspectRatio));
Parameters
fovYthe new vertical field of view.
Returns
this builder

◆ Look()

Luciad.Cameras.PerspectiveCamera.Builder Luciad.Cameras.PerspectiveCamera.Builder.Look ( Luciad.Cameras.Camera.Look  look)
inline

Sets the position and orientation of the new camera.

Parameters
lookthe position and orientation of the new camera.
Returns
this builder

◆ LookAt()

Luciad.Cameras.PerspectiveCamera.Builder Luciad.Cameras.PerspectiveCamera.Builder.LookAt ( Luciad.Cameras.Camera.LookAt  lookAt)
inline

Sets the description of what the camera is looking at and the orientation of the camera.

Parameters
lookAtthe description of what the camera is looking at and the orientation of the camera.
Returns
this builder

◆ LookFrom()

Luciad.Cameras.PerspectiveCamera.Builder Luciad.Cameras.PerspectiveCamera.Builder.LookFrom ( Luciad.Cameras.Camera.LookFrom  lookFrom)
inline

Sets the description of the position and orientation of the new camera.

Parameters
lookFromthe description of the position and orientation of the new camera.
Returns
this builder

◆ Orientation()

Luciad.Cameras.PerspectiveCamera.Builder Luciad.Cameras.PerspectiveCamera.Builder.Orientation ( Luciad.Cartesian.Coordinate  forward,
Luciad.Cartesian.Coordinate  up 
)
inline

Sets the forward the viewing direction of the new camera and the camera's up direction.

Parameters
forwardthe viewing direction of the new camera
upthe camera's up direction
Returns
this builder