Record Class AgentModel.Placed
java.lang.Object
java.lang.Record
com.eco.bio7.simulation.AgentModel.Placed
- Record Components:
model- the name of the model (loadModel)x- the position (the units of the box, z the height of its base)heading- the heading in degrees (0 the direction of y, clockwise)size- the height of the model (the units of the box; 0: the diameter of an agent)animation- the animation (its name or number, null: the first, "none": still)
- Enclosing class:
AgentModel<A extends Agent>
public static record AgentModel.Placed(String model, double x, double y, double z, double heading, double size, String animation)
extends Record
An object of the environment: a 3D model (glTF, loaded with loadModel) at a
place of the box. It is no agent (not in agents) and stays until it is
removed (removeModel, clearModels; Setup removes all).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanimationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheading()Returns the value of theheadingrecord component.model()Returns the value of themodelrecord component.doublesize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.doublez()Returns the value of thezrecord component.
-
Constructor Details
-
Placed
public Placed(String model, double x, double y, double z, double heading, double size, String animation) Creates an instance of aPlacedrecord class.- Parameters:
model- the value for themodelrecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentheading- the value for theheadingrecord componentsize- the value for thesizerecord componentanimation- the value for theanimationrecord 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. -
model
-
x
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public double z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
heading
-
size
-
animation
-