Class SphericalPoint
- java.lang.Object
-
- nl.tudelft.simulation.language.d3.SphericalPoint
-
- All Implemented Interfaces:
Serializable
public class SphericalPoint extends Object implements Serializable
A spherical point as defined in https://mathworld.wolfram.com/SphericalCoordinates.html . Also according to ISO 31-11Copyright (c) 2002-2023 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SphericalPoint(double radius, double theta, double phi)constructs a new SphericalPoint.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)doublegetPhi()doublegetRadius()doublegetTheta()inthashCode()CartesianPointtoCartesianPoint()converts a spherical point to a Cartesian point.static CartesianPointtoCartesianPoint(SphericalPoint point)converts a spherical point to a Cartesian point.StringtoString()
-
-
-
Method Detail
-
getPhi
public double getPhi()
- Returns:
- phi
-
getRadius
public double getRadius()
- Returns:
- radius
-
getTheta
public double getTheta()
- Returns:
- theta
-
toCartesianPoint
public CartesianPoint toCartesianPoint()
converts a spherical point to a Cartesian point.- Returns:
- the Cartesian point
-
toCartesianPoint
public static CartesianPoint toCartesianPoint(SphericalPoint point)
converts a spherical point to a Cartesian point.- Parameters:
point- SphericalPoint; the spherical point- Returns:
- the Cartesian point
-
-