Class GeomModule
java.lang.Object
gaiasky.script.v2.impl.APIModule
gaiasky.script.v2.impl.GeomModule
- All Implemented Interfaces:
GeomAPI
-
Field Summary
Fields inherited from class APIModule
api, em, logger, me, nameModifier and TypeFieldDescriptionprotected final APIv2Reference to API object.protected final EventManagerReference to event manager.protected final Logger.Logprotected final APIModuleReference to self.protected final StringModule name. -
Constructor Summary
ConstructorsConstructorDescriptionGeomModule(EventManager em, APIv2 api, String name) Create a new module with the given attributes. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]cross3(double[] vec1, double[] vec2) Computes the cross product between the two 3D vectors.double[]doubledot3(double[] vec1, double[] vec2) Computes the dot product between the two 3D vectors.doubledouble[]rotate2(double[] vector, double angle) Rotates a 2D vector by the specified angle in degrees, counter-clockwise assuming that the Y axis points up.double[]rotate2(double[] vector, long angle) double[]double[]double[]rotate3(double[] vector, double[] axis, double angle) Rotates a 3D vector around the given axis by the specified angle in degrees.double[]rotate3(double[] vector, double[] axis, long angle) double[]double[]
-
Constructor Details
-
GeomModule
Create a new module with the given attributes.- Parameters:
api- Reference to the API class.name- Name of the module.
-
-
Method Details
-
rotate3
public double[] rotate3(double[] vector, double[] axis, double angle) Description copied from interface:GeomAPIRotates a 3D vector around the given axis by the specified angle in degrees. Vectors are arrays with 3 components. If more components are there, they are ignored. -
rotate3
public double[] rotate3(double[] vector, double[] axis, long angle) -
rotate3
-
rotate3
-
rotate2
public double[] rotate2(double[] vector, double angle) Description copied from interface:GeomAPIRotates a 2D vector by the specified angle in degrees, counter-clockwise assuming that the Y axis points up. -
rotate2
public double[] rotate2(double[] vector, long angle) -
rotate2
-
rotate2
-
cross3
-
cross3
-
dot3
-
dot3
-