Class | CWrp::WrpObject
In: | ../lib/roller/CWRP.rb
Parent: | Object

An object stored in a WRP file.

### Methods

dir new new valid? write

### Constants

NAME_LENGTH | = | 76
NAME_FORMAT | = | "Z#{NAME_LENGTH}"

### External Aliases

initialize | -> | init_1
initialize | -> | init_2

### Attributes

id | [RW] |
name | [RW] |
orientation | [RW] |
position | [RW] |

### Public Class methods

new(name, id, position, orientation)

Creates object by giving it all its data.

new(reader, stream, is_arma)

Reads object info from WRP stream.

reader: | BinaryIO#BinaryReader
stream: | output stream
is_arma: | True if this is a 8WVR format file.

### Public Instance methods

dir()

Horizontal angle (-180 -> +180)

valid?()

Is this a valid object, otherwise it will just be the centre position which doesn‘t have a name.

write(writer, stream)

Writes object to WRP stream.

writer: | BinaryIO#BinaryWriter
stream: | output stream

[Validate]