Platforms to show: All Mac Windows Linux Cross-Platform

Back to DynaPDFMatrixMBS class.

DynaPDFMatrixMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new matrix and sets it to identity.
Example
Var m as new DynaPDFMatrixMBS
MsgBox m

See also:

DynaPDFMatrixMBS.Constructor(a as Double, b as Double, c as Double, d as Double, x as Double, y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new instance with setting values to the given parameters.
Example
Var m as new DynaPDFMatrixMBS(1,2,3,4,5,6)
MsgBox m

See also:

DynaPDFMatrixMBS.Constructor(other as DynaPDFMatrixMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a matrix object with copying the values.
Example
Var m as new DynaPDFMatrixMBS(1,2,3,4,5,6)
Var n as new DynaPDFMatrixMBS(m)
MsgBox n

See also:

DynaPDFMatrixMBS.Invert

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Inverts the matrix.
Example
Var m as new DynaPDFMatrixMBS

m.Invert

MsgBox m // shows [1.000000 -0.000000 -0.000000 1.000000 0.000000 0.000000]

DynaPDFMatrixMBS.LeftMultiply(a as Double, b as Double, c as Double, d as Double, x as Double, y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies both matrix where self is on the left side.

See also:

Some examples using this method:

DynaPDFMatrixMBS.LeftMultiply(other as DynaPDFMatrixMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies both matrix where self is on the left side.
Example
Var m1 as new DynaPDFMatrixMBS
Var m2 as new DynaPDFMatrixMBS

m1.Rotate 0.1
m2.Scale 2.0, 3.0

Var m3 as new DynaPDFMatrixMBS(m1)
m3.LeftMultiply(m2)

MsgBox m1.Str+EndOfLine+m2.Str+EndOfLine+m3.Str

See also:

DynaPDFMatrixMBS.Operator_Compare(other as DynaPDFMatrixMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Compares two matrix objects whether they have same values.
Example
Var m1 as new DynaPDFMatrixMBS
Var m2 as new DynaPDFMatrixMBS

if m1 = m2 then
MsgBox "Equal, same values."
else
MsgBox "Not equal -> Bug in Plugin."
end if

if m1 is m2 then
MsgBox "Equal -> Bug in Xojo."
else
MsgBox "Not equal, different objects."
end if

DynaPDFMatrixMBS.Operator_Convert as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts matrix into a string for displaying in log files.
Example
Var m as new DynaPDFMatrixMBS
MsgBox m // shows [1.000000 0.000000 0.000000 1.000000 0.000000 0.000000]

Added for debugging.

DynaPDFMatrixMBS.Operator_Multiply(other as DynaPDFMatrixMBS) as DynapdfMatrixMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies both matrix where self is on the left side.
Example
Var m1 as new DynaPDFMatrixMBS
Var m2 as new DynaPDFMatrixMBS

m1.Rotate 0.1
m2.Scale 2.0, 3.0

Var m3 as DynaPDFMatrixMBS = m1*m2

MsgBox m1.Str+EndOfLine+m2.Str+EndOfLine+m3.Str

DynaPDFMatrixMBS.Operator_MultiplyRight(other as DynaPDFMatrixMBS) as DynapdfMatrixMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies both matrix where self is on the right side.

DynaPDFMatrixMBS.RightMultiply(a as Double, b as Double, c as Double, d as Double, x as Double, y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies both matrix where self is on the right side.

See also:

Some examples using this method:

DynaPDFMatrixMBS.RightMultiply(other as DynaPDFMatrixMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies both matrix where self is on the right side.

See also:

DynaPDFMatrixMBS.Rotate(angle as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Rotates matrix with the given angle.
Example
Var m as new DynaPDFMatrixMBS

const pi = 3.14159265

Var angle as Double = 30.0/180.0*pi

m.Rotate(angle)

MsgBox m // shows [0.866025 0.500000 -0.500000 0.866025 0.000000 0.000000]

Angle in radians: 2*pi = 360 degree

DynaPDFMatrixMBS.Scale(sx as Double, sy as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Scales the matrix.
Example
Var m as new DynaPDFMatrixMBS

m.Scale 2.0, 3.0

MsgBox m // [2.000000 0.000000 0.000000 3.000000 0.000000 0.000000]

DynaPDFMatrixMBS.SetIdentity

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets values back to the identity matrix.
Example
Var m as new DynaPDFMatrixMBS

m.Scale 2.0, 3.0 // modify values
m.SetIdentity // and reset

MsgBox m // [1.000000 0.000000 0.000000 1.000000 0.000000 0.000000]

DynaPDFMatrixMBS.SetValues(a as Double, b as Double, c as Double, d as Double, x as Double, y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets all the values in one method
Example
Var m as new DynaPDFMatrixMBS

m.SetValues 1,2,3,4,5,6

MsgBox m

DynaPDFMatrixMBS.Transform(byref x as Double, byref y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Applies the matrix to the given point.
Example
Var m as new DynaPDFMatrixMBS

const pi = 3.14159265
Var angle as Double = 30.0/180.0*pi
m.Rotate(angle)
m.Translate 2.0, 3.0

Var x as Double = 100.0
Var y as Double = 100.0

m.Transform x,y

MsgBox str(x)+" "+str(y) // 36.83459 140.2006

DynaPDFMatrixMBS.TransformInv(byref x as Double, byref y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Applies the matrix to the given point in inverse mode.
Example
Var m as new DynaPDFMatrixMBS

const pi = 3.14159265
Var angle as Double = 30.0/180.0*pi
m.Rotate(angle)
m.Translate 2.0, 3.0

Var x as Double = 100.0
Var y as Double = 100.0

// transform
m.Transform x,y

MsgBox str(x)+" "+str(y) // 36.83459 140.2006

// transform back
m.TransformInv x,y

MsgBox str(x)+" "+str(y) // 100 100#

Like you have a point and want to know whether it was before the matrix was applied.

DynaPDFMatrixMBS.Translate(x as Double, y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Translates matrix by given values.
Example
Var m as new DynaPDFMatrixMBS

m.Translate 2,3

MsgBox m // shows [1.000000 0.000000 0.000000 1.000000 2.000000 3.000000]

The items on this page are in the following plugins: MBS DynaPDF Plugin.


The biggest plugin in space...