Class DTrans (version 0.18)

Description: A simple transformation

The simple transformation applies a displacement vector and a simple fixpoint transformation. This version acts on double coordinates.

Class overview

Index

Method Overview

[static] DTrans from_itrans( Trans int_trans )Conversion constructor from an integer coordinate transformation
[static] DTrans newCreates a unit transformation
[static] DTrans new( int f )Conversion constructor from a fixpoint transformation
[static] DTrans new( int rot, bool mirr, ref DPoint u )The standard constructor using angle and mirror flag
[static] DTrans new( int rot, bool mirr, double x, double y )The standard constructor using angle and mirror flag and two coordinate values for displacement
[static] DTrans new( int f, DPoint u )The standard constructor using a code rather than angle and mirror
[static] DTrans new( int f, double x, double y )The standard constructor using a code rather than angle and mirror and two coordinate values for displacement
[static] DTrans new( DPoint u )The standard constructor using a displacement only
[static] DTrans new( double x, double y )The standard constructor using a displacement given as two coordinates
[const] DTrans invertedInversion
DTrans invertIn-place inversion
[const] double ctrans( double d )The transformation of a distance
[const] DPoint trans( DPoint p )The transformation of a point
[const] DTrans *( DTrans * )Multiplication (concatenation) of transformations
[const] bool <( DTrans )A sorting criterion
[const] bool ==( DTrans )Equality test
[const] bool !=( DTrans )Inequality test
[const] string to_sString conversion
[const] const ref DPoint dispAccessor to the point
[const] int rotAccessor to the angle/mirror code
[const] int angleAccessor to the angle in units of 90 degree
[const] bool is_mirror?Accessor to the mirror flag
[static] int r0Angle/mirror code for the "unrotated" transformation
[static] int r90Angle/mirror code for the "rotated by 90 degree counterclockwise" transformation
[static] int r180Angle/mirror code for the "rotated by 180 degree counterclockwise" transformation
[static] int r270Angle/mirror code for the "rotated by 270 degree counterclockwise" transformation
[static] int m0Angle/mirror code for the "mirrored at the x-axis" transformation
[static] int m45Angle/mirror code for the "mirrored at the 45 degree axis" transformation
[static] int m90Angle/mirror code for the "mirrored at the y (90 degree) axis" transformation
[static] int m135Angle/mirror code for the "mirrored at the 135 degree axis" transformation
assign( DTrans other )Assign the contents of another object to self
[const] DTrans dupCreates a copy of self.
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

[const] bool !=( DTrans )

Description: Inequality test

[const] DTrans *( DTrans * )

Description: Multiplication (concatenation) of transformations

The * operator returns self*t ("t is applied before this transformation").

t:The transformation to apply before
returns:The modified transformation

[const] bool <( DTrans )

Description: A sorting criterion

[const] bool ==( DTrans )

Description: Equality test

[const] int angle

Description: Accessor to the angle in units of 90 degree

assign( DTrans other )

Description: Assign the contents of another object to self

This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content.

[const] double ctrans( double d )

Description: The transformation of a distance

The "ctrans" method transforms the given distance. e = t(d). For the simple transformations, there is no magnification and no modification of the distance therefore.

d:The distance to transform
returns:The transformed distance

destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed

Description: Tell, if the object was destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] const ref DPoint disp

Description: Accessor to the point

[const] DTrans dup

Description: Creates a copy of self.

[static] DTrans from_itrans( Trans int_trans )

Description: Conversion constructor from an integer coordinate transformation

DTrans invert

Description: In-place inversion

Inverts the transformation and replaces this object by the inverted one.

returns:The inverted transformation

[const] DTrans inverted

Description: Inversion

Returns the inverted transformation

returns:The inverted transformation

[const] bool is_mirror?

Description: Accessor to the mirror flag

[static] int m0

Description: Angle/mirror code for the "mirrored at the x-axis" transformation

[static] int m135

Description: Angle/mirror code for the "mirrored at the 135 degree axis" transformation

[static] int m45

Description: Angle/mirror code for the "mirrored at the 45 degree axis" transformation

[static] int m90

Description: Angle/mirror code for the "mirrored at the y (90 degree) axis" transformation

[static] DTrans new( int rot, bool mirr, ref DPoint u )
synonym: [static] DTrans new_rmu( int rot, bool mirr, ref DPoint u )

Description: The standard constructor using angle and mirror flag

The sequence of operations is: mirroring at x axis, rotation, application of displacement.

rot:The rotation in units of 90 degree
mirrx:True, if mirrored at x axis
u:The displacement

[static] DTrans new( int rot, bool mirr, double x, double y )
synonym: [static] DTrans new_rmxy( int rot, bool mirr, double x, double y )

Description: The standard constructor using angle and mirror flag and two coordinate values for displacement

The sequence of operations is: mirroring at x axis, rotation, application of displacement.

rot:The rotation in units of 90 degree
mirrx:True, if mirrored at x axis
x:The horizontal displacement
y:The vertical displacement

[static] DTrans new( int f, DPoint u )
synonym: [static] DTrans new_fu( int f, DPoint u )

Description: The standard constructor using a code rather than angle and mirror

f:The rotation/mirror code (r0 .. m135 constants)
u:The displacement

[static] DTrans new( int f, double x, double y )
synonym: [static] DTrans new_fxy( int f, double x, double y )

Description: The standard constructor using a code rather than angle and mirror and two coordinate values for displacement

f:The rotation/mirror code (r0 .. m135 constants)
x:The horizontal displacement
y:The vertical displacement

[static] DTrans new

Description: Creates a unit transformation

[static] DTrans new( DPoint u )
synonym: [static] DTrans new_u( DPoint u )

Description: The standard constructor using a displacement only

u:The displacement

[static] DTrans new( double x, double y )
synonym: [static] DTrans new_xy( double x, double y )

Description: The standard constructor using a displacement given as two coordinates

x:The horizontal displacement
y:The vertical displacement

[static] DTrans new( int f )
synonym: [static] DTrans new_f( int f )

Description: Conversion constructor from a fixpoint transformation

This constructor will create a transformation with a fixpoint transformation but no displacement.

f:The rotation/mirror code (r0 .. m135 constants)

[static] int r0

Description: Angle/mirror code for the "unrotated" transformation

[static] int r180

Description: Angle/mirror code for the "rotated by 180 degree counterclockwise" transformation

[static] int r270

Description: Angle/mirror code for the "rotated by 270 degree counterclockwise" transformation

[static] int r90

Description: Angle/mirror code for the "rotated by 90 degree counterclockwise" transformation

[const] int rot

Description: Accessor to the angle/mirror code

[const] string to_s

Description: String conversion

[const] DPoint trans( DPoint p )

Description: The transformation of a point

The "trans" method transforms the given point. q = t(p)

p:The point to transform
returns:The transformed point