Class SphericalPoint
java.lang.Object
nl.tudelft.simulation.language.d3.SphericalPoint
- All Implemented Interfaces:
Serializable
A spherical point as defined in
https://mathworld.wolfram.com/SphericalCoordinates.html . Also according to ISO 31-11
Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Peter Jacobs
- See Also:
-
Constructor Summary
ConstructorDescriptionSphericalPoint
(double radius, double theta, double phi) constructs a new SphericalPoint. -
Method Summary
Modifier and TypeMethodDescriptionboolean
double
getPhi()
double
double
getTheta()
int
hashCode()
converts a spherical point to a Cartesian point.static CartesianPoint
toCartesianPoint
(SphericalPoint point) converts a spherical point to a Cartesian point.toString()
-
Constructor Details
-
SphericalPoint
public SphericalPoint(double radius, double theta, double phi) constructs a new SphericalPoint.- Parameters:
radius
- double; radiustheta
- double; thetaphi
- double; phi
-
-
Method Details
-
getPhi
public double getPhi()- Returns:
- phi
-
getRadius
public double getRadius()- Returns:
- radius
-
getTheta
public double getTheta()- Returns:
- theta
-
toCartesianPoint
converts a spherical point to a Cartesian point.- Returns:
- the Cartesian point
-
toCartesianPoint
converts a spherical point to a Cartesian point.- Parameters:
point
- SphericalPoint; the spherical point- Returns:
- the Cartesian point
-
hashCode
public int hashCode() -
equals
-
toString
-