Table of Contents

Class CreateLookAt

Namespace
Bonsai.Shaders
Assembly
Bonsai.Shaders.dll

Represents an operator that creates a view matrix specifying a camera looking at a target position.

public class CreateLookAt : Source<Matrix4>
Inheritance
CreateLookAt
Inherited Members

Constructors

CreateLookAt()

Initializes a new instance of the CreateLookAt class.

public CreateLookAt()

Properties

Eye

Gets or sets the eye, or camera position, in the world coordinate frame.

[TypeConverter(typeof(NumericRecordConverter))]
public Vector3 Eye { get; set; }

Property Value

Vector3

Target

Gets or sets the target position in the world coordinate frame.

[TypeConverter(typeof(NumericRecordConverter))]
public Vector3 Target { get; set; }

Property Value

Vector3

Up

Gets or sets a 3D vector specifying the up vector of the camera, in the world coordinate frame. Should not be parallel to the camera direction.

[TypeConverter(typeof(NumericRecordConverter))]
public Vector3 Up { get; set; }

Property Value

Vector3

Methods

Generate()

Generates an observable sequence that contains a single view matrix representing a camera with the specified position and up vector, looking at the specified target.

public override IObservable<Matrix4> Generate()

Returns

IObservable<Matrix4>

A sequence containing the created Matrix4 look-at view matrix for transforming world space into camera space.

Generate<TSource>(IObservable<TSource>)

Generates an observable sequence of view matrices representing a camera with the specified position and up vector, looking at the specified target, where each Matrix4 object is emitted only when an observable sequence emits a notification.

public IObservable<Matrix4> Generate<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence containing the notifications used for emitting new matrices.

Returns

IObservable<Matrix4>

The sequence of created Matrix4 look-at view matrices for transforming world space into camera space.

Type Parameters

TSource

The type of the elements in the source sequence.