Table of Contents

Class CreateTransform

Namespace
Bonsai.Shaders
Assembly
Bonsai.Shaders.dll

Represents an operator that creates a model matrix specifying position, rotation and scale.

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

Constructors

CreateTransform()

Initializes a new instance of the CreateTransform class.

public CreateTransform()

Properties

Position

Gets or sets the position of the model, in the local coordinate frame.

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

Property Value

Vector3

Rotation

Gets or sets the quaternion representing the rotation of the model, in the local coordinate frame.

[TypeConverter(typeof(NumericRecordConverter))]
public Quaternion Rotation { get; set; }

Property Value

Quaternion

Scale

Gets or sets the scale vector applied to the model, in the local coordinate frame.

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

Property Value

Vector3

Methods

Generate()

Generates an observable sequence that returns a model matrix specifying position, rotation and scale.

public override IObservable<Matrix4> Generate()

Returns

IObservable<Matrix4>

A sequence containing the created Matrix4 object.

Generate<TSource>(IObservable<TSource>)

Generates an observable sequence of model matrices specifying position, rotation and scale, and 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 values.

Type Parameters

TSource

The type of the elements in the source sequence.