Class Trans (version 0.18)

Description: A simple transformation

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

Class overview

Index

Method Overview

[static] Trans from_dtrans( DTrans double_trans )Conversion constructor from a floating-point transformation
[static] Trans newCreates a unit transformation
[static] Trans new( int f )Conversion constructor from a fixpoint transformation
[static] Trans new( int rot, bool mirr, ref Point u )The standard constructor using angle and mirror flag
[static] Trans new( int rot, bool mirr, int x, int y )The standard constructor using angle and mirror flag and two coordinate values for displacement
[static] Trans new( int f, Point u )The standard constructor using a code rather than angle and mirror
[static] Trans new( int f, int x, int y )The standard constructor using a code rather than angle and mirror and two coordinate values for displacement
[static] Trans new( Point u )The standard constructor using a displacement only
[static] Trans new( int x, int y )The standard constructor using a displacement given as two coordinates
[const] Trans invertedInversion
Trans invertIn-place inversion
[const] int ctrans( int d )The transformation of a distance
[const] Point trans( Point p )The transformation of a point
[const] Trans *( Trans * )Multiplication (concatenation) of transformations
[const] bool <( Trans )A sorting criterion
[const] bool ==( Trans )Equality test
[const] bool !=( Trans )Inequality test
[const] string to_sString conversion
[const] const ref Point 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( Trans other )Assign the contents of another object to self
[const] Trans dupCreates a copy of self.
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

[const] bool !=( Trans )

Description: Inequality test

[const] Trans *( Trans * )

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 <( Trans )

Description: A sorting criterion

[const] bool ==( Trans )

Description: Equality test

[const] int angle

Description: Accessor to the angle in units of 90 degree

assign( Trans 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] int ctrans( int 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 Point disp

Description: Accessor to the point

[const] Trans dup

Description: Creates a copy of self.

[static] Trans from_dtrans( DTrans double_trans )

Description: Conversion constructor from a floating-point transformation

Trans invert

Description: In-place inversion

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

returns:The inverted transformation

[const] Trans 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] Trans new( int rot, bool mirr, ref Point u )
synonym: [static] Trans new_rmu( int rot, bool mirr, ref Point 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] Trans new( int rot, bool mirr, int x, int y )
synonym: [static] Trans new_rmxy( int rot, bool mirr, int x, int 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] Trans new( int f, Point u )
synonym: [static] Trans new_fu( int f, Point 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] Trans new( int f, int x, int y )
synonym: [static] Trans new_fxy( int f, int x, int 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] Trans new

Description: Creates a unit transformation

[static] Trans new( Point u )
synonym: [static] Trans new_u( Point u )

Description: The standard constructor using a displacement only

u:The displacement

[static] Trans new( int x, int y )
synonym: [static] Trans new_xy( int x, int y )

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

x:The horizontal displacement
y:The vertical displacement

[static] Trans new( int f )
synonym: [static] Trans 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] Point trans( Point 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