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 ObjectStateAppearanceGeneral
general dynamic appearance attributes of the segment.protected int
zero-filled array of padding bits for byte alignment and consistent sizing of PDU dataprotected float
The depth of the linear segment, in meters, below ground levelprotected float
The height of the linear segment, in meters, above ground shall be specified by a 16-bit unsigned integer.protected float
length of the linear segment, in meters, extending in the positive X directionprotected Vector3Double
This field shall specify the location of the linear segment in the simulated world and shall be represented by a World Coordinates recordprotected ObjectStateModificationLinearObject
whether a modification has been made to the point object's location or orientation UID 241protected byte
The individual segment of the linear segmentprotected EulerAngles
orientation of the linear segment about the segment location and shall be represented by a Euler Angles recordprotected float
The total width of the linear segment, in meters, shall be specified by a 16-bit unsigned integer.protected int
This field shall specify specific dynamic appearance attributes of the segment. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor creates and configures a new instance object -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equalsImpl
(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied objectGetter forgeneralSegmentAppearance
int
Returns size of this serialized (marshalled) object in bytesint
Getter forpadding
float
Getter forsegmentDepth
float
Getter forsegmentHeight
float
Getter forsegmentLength
Getter forsegmentLocation
Getter forsegmentModification
byte
Getter forsegmentNumber
Getter forsegmentOrientation
float
Getter forsegmentWidth
int
Getter forspecificSegmentAppearance
int
hashCode()
void
marshal
(DataOutputStream dos) Serializes an object to a DataOutputStream.void
marshal
(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setGeneralSegmentAppearance
(ObjectStateAppearanceGeneral pGeneralSegmentAppearance) Setter forgeneralSegmentAppearance
setPadding
(int pPadding) Setter forpadding
setSegmentDepth
(float pSegmentDepth) Setter forsegmentDepth
setSegmentHeight
(float pSegmentHeight) Setter forsegmentHeight
setSegmentLength
(float pSegmentLength) Setter forsegmentLength
setSegmentLocation
(Vector3Double pSegmentLocation) Setter forsegmentLocation
setSegmentModification
(ObjectStateModificationLinearObject pSegmentModification) Setter forsegmentModification
setSegmentNumber
(byte pSegmentNumber) Setter forsegmentNumber
setSegmentNumber
(int pSegmentNumber) Utility setter forsegmentNumber
setSegmentOrientation
(EulerAngles pSegmentOrientation) Setter forsegmentOrientation
setSegmentWidth
(float pSegmentWidth) Setter forsegmentWidth
setSpecificSegmentAppearance
(int pSpecificSegmentAppearance) Setter forspecificSegmentAppearance
toString()
int
unmarshal
(DataInputStream dis) Deserializes an object from a DataInputStream.int
unmarshal
(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, forthis
and the supplied object- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
-
hashCode
-