Package edu.nps.moves.dis7
Class LinearSegmentParameter
java.lang.Object
edu.nps.moves.dis7.LinearSegmentParameter
- All Implemented Interfaces:
java.io.Serializable
public class LinearSegmentParameter
extends java.lang.Object
implements java.io.Serializable
The specification of an individual segment of a linear segment synthetic environment object in a Linear Object State PDU Section 6.2.52
IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation—Application Protocols
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected ObjectStateAppearanceGeneral
generalSegmentAppearance
general dynamic appearance attributes of the segment.protected int
padding
paddingprotected float
segmentDepth
The depth of the linear segment, in meters, below ground levelprotected float
segmentHeight
The height of the linear segment, in meters, above ground shall be specified by a 16-bit unsigned integer.protected float
segmentLength
length of the linear segment, in meters, extending in the positive X directionprotected Vector3Double
segmentLocation
This field shall specify the location of the linear segment in the simulated world and shall be represented by a World Coordinates recordprotected ObjectStateModificationLinearObject
segmentModification
whether a modification has been made to the point object's location or orientation UID 241protected byte
segmentNumber
the individual segment of the linear segmentprotected EulerAngles
segmentOrientation
orientation of the linear segment about the segment location and shall be represented by a Euler Angles recordprotected float
segmentWidth
The total width of the linear segment, in meters, shall be specified by a 16-bit unsigned integer.protected int
specificSegmentAppearance
This field shall specify specific dynamic appearance attributes of the segment. -
Constructor Summary
Constructors Constructor Description LinearSegmentParameter()
Constructor -
Method Summary
-
Field Details
-
segmentNumber
protected byte segmentNumberthe individual segment of the linear segment -
segmentModification
whether a modification has been made to the point object's location or orientation UID 241 -
generalSegmentAppearance
general dynamic appearance attributes of the segment. This record shall be defined as a 16-bit record of enumerations. The values defined for this record are included in Section 12 of SISO-REF-010. UID 229 -
specificSegmentAppearance
protected int specificSegmentAppearanceThis field shall specify specific dynamic appearance attributes of the segment. This record shall be defined as a 32-bit record of enumerations. -
segmentLocation
This field shall specify the location of the linear segment in the simulated world and shall be represented by a World Coordinates record -
segmentOrientation
orientation of the linear segment about the segment location and shall be represented by a Euler Angles record -
segmentLength
protected float segmentLengthlength of the linear segment, in meters, extending in the positive X direction -
segmentWidth
protected float segmentWidthThe total width of the linear segment, in meters, shall be specified by a 16-bit unsigned integer. One-half of the width shall extend in the positive Y direction, and one-half of the width shall extend in the negative Y direction. -
segmentHeight
protected float segmentHeightThe height of the linear segment, in meters, above ground shall be specified by a 16-bit unsigned integer. -
segmentDepth
protected float segmentDepthThe depth of the linear segment, in meters, below ground level -
padding
protected int paddingpadding
-
-
Constructor Details
-
LinearSegmentParameter
public LinearSegmentParameter()Constructor
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns the size of this serialized object in bytes -
setSegmentNumber
Setter forsegmentNumber
-
getSegmentNumber
public byte getSegmentNumber()Getter forsegmentNumber
-
setSegmentModification
public LinearSegmentParameter setSegmentModification(ObjectStateModificationLinearObject pSegmentModification)Setter forsegmentModification
-
getSegmentModification
Setter forsegmentModification
-
setGeneralSegmentAppearance
public LinearSegmentParameter setGeneralSegmentAppearance(ObjectStateAppearanceGeneral pGeneralSegmentAppearance)Setter forgeneralSegmentAppearance
-
getGeneralSegmentAppearance
Setter forgeneralSegmentAppearance
-
setSpecificSegmentAppearance
Setter forspecificSegmentAppearance
-
getSpecificSegmentAppearance
public int getSpecificSegmentAppearance()Getter forspecificSegmentAppearance
-
setSegmentLocation
Setter forsegmentLocation
-
getSegmentLocation
Getter forsegmentLocation
-
setSegmentOrientation
Setter forsegmentOrientation
-
getSegmentOrientation
Getter forsegmentOrientation
-
setSegmentLength
Setter forsegmentLength
-
getSegmentLength
public float getSegmentLength()Getter forsegmentLength
-
setSegmentWidth
Setter forsegmentWidth
-
getSegmentWidth
public float getSegmentWidth()Getter forsegmentWidth
-
setSegmentHeight
Setter forsegmentHeight
-
getSegmentHeight
public float getSegmentHeight()Getter forsegmentHeight
-
setSegmentDepth
Setter forsegmentDepth
-
getSegmentDepth
public float getSegmentDepth()Getter forsegmentDepth
-
setPadding
Setter forpadding
-
getPadding
public int getPadding()Getter forpadding
-
marshal
public void marshal(java.io.DataOutputStream dos) throws java.lang.ExceptionSerializes an object to a DataOutputStream.- Parameters:
dos
- the OutputStream- Throws:
java.lang.Exception
- if something goes wrong- See Also:
DataOutputStream
-
unmarshal
public int unmarshal(java.io.DataInputStream dis) throws java.lang.ExceptionUnserializes an object from a DataInputStream.- Parameters:
dis
- the InputStream- Returns:
- unmarshalled size
- Throws:
java.lang.Exception
- if something goes wrong- See Also:
DataInputStream
-
marshal
public void marshal(java.nio.ByteBuffer buff) throws java.lang.ExceptionPacks an object into the ByteBuffer.- Parameters:
buff
- The ByteBuffer at the position to begin writing- Throws:
java.nio.BufferOverflowException
- if buff is too smalljava.nio.ReadOnlyBufferException
- if buff is read onlyjava.lang.Exception
- ByteBuffer-generated exception- See Also:
ByteBuffer
-
unmarshal
public int unmarshal(java.nio.ByteBuffer buff) throws java.lang.ExceptionUnpacks a Pdu from the underlying data.- Parameters:
buff
- The ByteBuffer at the position to begin reading- Returns:
- marshalled size
- Throws:
java.nio.BufferUnderflowException
- if buff is too smalljava.lang.Exception
- ByteBuffer-generated exception- See Also:
ByteBuffer
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
equalsImpl
public boolean equalsImpl(java.lang.Object obj)Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied object- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-