Package cz.fidentis.analyst.data.mesh
Record Class Material
java.lang.Object
java.lang.Record
cz.fidentis.analyst.data.mesh.Material
- Record Components:
name
- Name of the materialambient
- Ambient colordiffuse
- Diffuse colorspecular
- Specular colorshininess
- Shininessalpha
- Alpha channelillumination
- IlluminationtexturePath
- Path to the texture file
- All Implemented Interfaces:
Serializable
public record Material(String name, javax.vecmath.Vector3d ambient, javax.vecmath.Vector3d diffuse, javax.vecmath.Vector3d specular, double shininess, double alpha, double illumination, String texturePath)
extends Record
implements Serializable
Material.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
alpha()
Returns the value of thealpha
record component.javax.vecmath.Vector3d
ambient()
Returns the value of theambient
record component.javax.vecmath.Vector3d
diffuse()
Returns the value of thediffuse
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
boolean
double
Returns the value of theillumination
record component.name()
Returns the value of thename
record component.double
Returns the value of theshininess
record component.javax.vecmath.Vector3d
specular()
Returns the value of thespecular
record component.Returns the value of thetexturePath
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
Material
public Material(String name, javax.vecmath.Vector3d ambient, javax.vecmath.Vector3d diffuse, javax.vecmath.Vector3d specular, double shininess, double alpha, double illumination, String texturePath) Creates an instance of aMaterial
record class.- Parameters:
name
- the value for thename
record componentambient
- the value for theambient
record componentdiffuse
- the value for thediffuse
record componentspecular
- the value for thespecular
record componentshininess
- the value for theshininess
record componentalpha
- the value for thealpha
record componentillumination
- the value for theillumination
record componenttexturePath
- the value for thetexturePath
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hasName
- Parameters:
name
- compared string- Returns:
- true if material name is same as provided string.
-
hasTexture
public boolean hasTexture()- Returns:
- true if texture file exists
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
ambient
public javax.vecmath.Vector3d ambient()Returns the value of theambient
record component.- Returns:
- the value of the
ambient
record component
-
diffuse
public javax.vecmath.Vector3d diffuse()Returns the value of thediffuse
record component.- Returns:
- the value of the
diffuse
record component
-
specular
public javax.vecmath.Vector3d specular()Returns the value of thespecular
record component.- Returns:
- the value of the
specular
record component
-
shininess
public double shininess()Returns the value of theshininess
record component.- Returns:
- the value of the
shininess
record component
-
alpha
public double alpha()Returns the value of thealpha
record component.- Returns:
- the value of the
alpha
record component
-
illumination
public double illumination()Returns the value of theillumination
record component.- Returns:
- the value of the
illumination
record component
-
texturePath
Returns the value of thetexturePath
record component.- Returns:
- the value of the
texturePath
record component
-