Package edu.nps.moves.dis7.pdus
Class LinearSegmentParameter
java.lang.Object
edu.nps.moves.dis7.pdus.LinearSegmentParameter
- All Implemented Interfaces:
Serializable
The specification of an individual segment of a linear segment synthetic environment object in a Linear Object State PDU Section 6.2.52
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ObjectStateAppearanceGeneralgeneral dynamic appearance attributes of the segment.protected intzero-filled array of padding bits for byte alignment and consistent sizing of PDU dataprotected floatThe depth of the linear segment, in meters, below ground levelprotected floatThe height of the linear segment, in meters, above ground shall be specified by a 16-bit unsigned integer.protected floatlength of the linear segment, in meters, extending in the positive X directionprotected Vector3DoubleThis field shall specify the location of the linear segment in the simulated world and shall be represented by a World Coordinates recordprotected ObjectStateModificationLinearObjectwhether a modification has been made to the point object's location or orientation UID 241protected byteThe individual segment of the linear segmentprotected EulerAnglesorientation of the linear segment about the segment location and shall be represented by a Euler Angles recordprotected floatThe total width of the linear segment, in meters, shall be specified by a 16-bit unsigned integer.protected intThis field shall specify specific dynamic appearance attributes of the segment. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor creates and configures a new instance object -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsImpl(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied objectGetter forgeneralSegmentAppearanceintReturns size of this serialized (marshalled) object in bytesintGetter forpaddingfloatGetter forsegmentDepthfloatGetter forsegmentHeightfloatGetter forsegmentLengthGetter forsegmentLocationGetter forsegmentModificationbyteGetter forsegmentNumberGetter forsegmentOrientationfloatGetter forsegmentWidthintGetter forspecificSegmentAppearanceinthashCode()voidmarshal(DataOutputStream dos) Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setGeneralSegmentAppearance(ObjectStateAppearanceGeneral pGeneralSegmentAppearance) Setter forgeneralSegmentAppearancesetPadding(int pPadding) Setter forpaddingsetSegmentDepth(float pSegmentDepth) Setter forsegmentDepthsetSegmentHeight(float pSegmentHeight) Setter forsegmentHeightsetSegmentLength(float pSegmentLength) Setter forsegmentLengthsetSegmentLocation(Vector3Double pSegmentLocation) Setter forsegmentLocationsetSegmentModification(ObjectStateModificationLinearObject pSegmentModification) Setter forsegmentModificationsetSegmentNumber(byte pSegmentNumber) Setter forsegmentNumbersetSegmentNumber(int pSegmentNumber) Utility setter forsegmentNumbersetSegmentOrientation(EulerAngles pSegmentOrientation) Setter forsegmentOrientationsetSegmentWidth(float pSegmentWidth) Setter forsegmentWidthsetSpecificSegmentAppearance(int pSpecificSegmentAppearance) Setter forspecificSegmentAppearancetoString()intunmarshal(DataInputStream dis) Deserializes an object from a DataInputStream.intunmarshal(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.
-
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 paddingzero-filled array of padding bits for byte alignment and consistent sizing of PDU data
-
-
Constructor Details
-
LinearSegmentParameter
public LinearSegmentParameter()Constructor creates and configures a new instance object
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Returns:
- serialized size in bytes
- See Also:
-
setSegmentNumber
Setter forsegmentNumber- Parameters:
pSegmentNumber- new value of interest- Returns:
- same object to permit progressive setters
-
setSegmentNumber
Utility setter forsegmentNumber- Parameters:
pSegmentNumber- new value of interest- Returns:
- same object to permit progressive setters
-
getSegmentNumber
-
setSegmentModification
public LinearSegmentParameter setSegmentModification(ObjectStateModificationLinearObject pSegmentModification) Setter forsegmentModification- Parameters:
pSegmentModification- new value of interest- Returns:
- same object to permit progressive setters
-
getSegmentModification
Getter forsegmentModification- Returns:
- value of interest
-
setGeneralSegmentAppearance
public LinearSegmentParameter setGeneralSegmentAppearance(ObjectStateAppearanceGeneral pGeneralSegmentAppearance) Setter forgeneralSegmentAppearance- Parameters:
pGeneralSegmentAppearance- new value of interest- Returns:
- same object to permit progressive setters
-
getGeneralSegmentAppearance
Getter forgeneralSegmentAppearance- Returns:
- value of interest
-
setSpecificSegmentAppearance
Setter forspecificSegmentAppearance- Parameters:
pSpecificSegmentAppearance- new value of interest- Returns:
- same object to permit progressive setters
-
getSpecificSegmentAppearance
public int getSpecificSegmentAppearance()Getter forspecificSegmentAppearance- Returns:
- value of interest
-
setSegmentLocation
Setter forsegmentLocation- Parameters:
pSegmentLocation- new value of interest- Returns:
- same object to permit progressive setters
-
getSegmentLocation
-
setSegmentOrientation
Setter forsegmentOrientation- Parameters:
pSegmentOrientation- new value of interest- Returns:
- same object to permit progressive setters
-
getSegmentOrientation
-
setSegmentLength
Setter forsegmentLength- Parameters:
pSegmentLength- new value of interest- Returns:
- same object to permit progressive setters
-
getSegmentLength
-
setSegmentWidth
Setter forsegmentWidth- Parameters:
pSegmentWidth- new value of interest- Returns:
- same object to permit progressive setters
-
getSegmentWidth
-
setSegmentHeight
Setter forsegmentHeight- Parameters:
pSegmentHeight- new value of interest- Returns:
- same object to permit progressive setters
-
getSegmentHeight
-
setSegmentDepth
Setter forsegmentDepth- Parameters:
pSegmentDepth- new value of interest- Returns:
- same object to permit progressive setters
-
getSegmentDepth
-
setPadding
Setter forpadding- Parameters:
pPadding- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding
-
marshal
Serializes an object to a DataOutputStream.- Parameters:
dos- the OutputStream- Throws:
Exception- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Parameters:
dis- the InputStream- Returns:
- marshalled serialized size in bytes
- Throws:
Exception- if something goes wrong- See Also:
-
marshal
Packs an object into the ByteBuffer.- Parameters:
byteBuffer- The ByteBuffer at the position to begin writing- Throws:
BufferOverflowException- if byteBuffer is too smallReadOnlyBufferException- if byteBuffer is read onlyException- ByteBuffer-generated exception- See Also:
-
unmarshal
Unpacks a Pdu from the underlying data.- Parameters:
byteBuffer- The ByteBuffer at the position to begin reading- Returns:
- marshalled serialized size in bytes
- Throws:
BufferUnderflowException- if byteBuffer is too smallException- ByteBuffer-generated exception- See Also:
-
equals
-
equalsImpl
Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
-
hashCode
-