v1.1
 
Axis3D Class Reference

The axis is a vector which is attached to a fixed point. More...

Public Member Functions

 Axis3D (Point3D point, Vector3D direction)
 Constructor.
 
self Shift (number x, number y, number z)
 Shifts the axis.
 
self Rotate (Axis3D axis, number angle)
 Rotates the axis.
 
self Scale (Point3D fixedPoint, number xScale, number yScale, number zScale)
 Scales the axis.
 
self Transform (Matrix3D matrix)
 Transforms according to the matrix.
 
Axis3D Clone ()
 Returns a copy of the object.
 
Point3D GetOrigin ()
 Returns the axis point.
 
Vector3D GetDirection ()
 Returns unit length vector of the axis direction.
 
self Negate ()
 Changes axis direction to opposite one.
 
boolean operator== (Axis3D other)
 Checks for equality.
 
boolean operator~= (Axis3D other)
 Checks for inequality.
 

Detailed Description

The axis is a vector which is attached to a fixed point.

The fixed point is the axis origin. The vector defines a positive direction. Is used for a rotation of objects in the space.

Member Function Documentation

◆ Rotate()

self Rotate ( Axis3D axis,
number angle )

Rotates the axis.

Parameters
axisAxis of rotation.
angleThe angle in radians.

◆ Scale()

self Scale ( Point3D fixedPoint,
number xScale,
number yScale,
number zScale )

Scales the axis.

Parameters
fixedPointFixed point.
xScaleX scale coefficient.
yScaleY scale coefficient.
zScaleZ scale coefficient.