Cylindrical

class Cylindrical(var radius: Double = 1.0, var theta: Double = 0.0, var y: Double = 0.0)

Represents points in 3D space as cylindrical coordinates.

Instances are mutable and not thread-safe; confine an instance to a single thread, exactly as in three.js.

Parameters

radius

The distance from the origin to a point in the x-z plane.

theta

A counterclockwise angle in the x-z plane measured in radians from the positive z-axis.

y

The height above the x-z plane.

Constructors

Link copied to clipboard
constructor(radius: Double = 1.0, theta: Double = 0.0, y: Double = 0.0)

Properties

Link copied to clipboard

The distance from the origin to a point in the x-z plane.

Link copied to clipboard

A counterclockwise angle in the x-z plane measured in radians from the positive z-axis.

Link copied to clipboard
var y: Double

The height above the x-z plane.

Functions

Link copied to clipboard

Returns a new cylindrical with copied values from this instance.

Link copied to clipboard

Copies the values of the given cylindrical to this instance.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Structural equality: true when other is a Cylindrical with equal components (component-wise ==, so NaN != NaN).

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun set(radius: Double, theta: Double, y: Double): Cylindrical

Sets the cylindrical components by copying the given values.

Link copied to clipboard

Sets the cylindrical components from the given Cartesian coordinates.

Link copied to clipboard

Sets the cylindrical components from the given vector which is assumed to hold Cartesian coordinates.

Link copied to clipboard
open override fun toString(): String