Record Class AcousticRayTracer.Ray
java.lang.Object
java.lang.Record
org.episteme.social.architecture.AcousticRayTracer.Ray
- All Implemented Interfaces:
Serializable
- Enclosing class:
AcousticRayTracer
public static record AcousticRayTracer.Ray(double[] origin, double[] direction, double intensity)
extends Record
implements Serializable
Represents a single sound ray in terms of geometry and energy.
- Since:
- 1.0
- Version:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRay(double[] origin, double[] direction, double intensity) Creates an instance of aRayrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theintensityrecord component.double[]origin()Returns the value of theoriginrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Ray
public Ray(double[] origin, double[] direction, double intensity) Creates an instance of aRayrecord class.- Parameters:
origin- the value for theoriginrecord componentdirection- the value for thedirectionrecord componentintensity- the value for theintensityrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
origin
public double[] origin()Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
direction
public double[] direction()Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
intensity
public double intensity()Returns the value of theintensityrecord component.- Returns:
- the value of the
intensityrecord component
-