class Conreality::Object

Represents a Conreality object.

Constants

KEY
TABLE

Attributes

color[RW]

The object's estimated color (as a 24-bit RGB value).

@return [Integer]

group[RW]

The group, if any, that the object belongs to.

@return [Group]

label[RW]

The object's designated label.

@return [String]

mass[RW]

The object's estimated mass (in kilograms).

@return [Float]

orientation[RW]

The object's current orientation (in radians relative to north).

@return [Float]

position[RW]

The object's current position (as 3D coordinates relative to its theater).

@return [?]

radius[RW]

The object's determined radius (in meters).

@return [Float]

theater[RW]

The theater that the object is located in.

@return [Theater]

type[R]

The object's type.

@return [Symbol]

uuid[R]

The object's unique identifier.

@return [String]

Public Class Methods

new(session, uuid) click to toggle source

@param session [Session] @param uuid [#to_s]

Calls superclass method
# File lib/conreality/object.rb, line 73
def initialize(session, uuid)
  super(session)
  @uuid = uuid.to_s.freeze
end

Public Instance Methods

as_asset() click to toggle source

Returns this object cast to an asset.

@return [Asset]

# File lib/conreality/object.rb, line 92
def as_asset
  Asset.new(@session, @uuid)
end
as_camera() click to toggle source

Returns this object cast to a camera.

@return [Camera]

# File lib/conreality/object.rb, line 100
def as_camera
  Camera.new(@session, @uuid)
end
as_player() click to toggle source

Returns this object cast to a player.

@return [Player]

# File lib/conreality/object.rb, line 108
def as_player
  Player.new(@session, @uuid)
end
inspect() click to toggle source

Returns a developer-friendly representation of this object.

@return [String]

# File lib/conreality/object.rb, line 82
def inspect
  sprintf("#<%s:%#0x(uuid: %s)>", self.class.name, self.__id__, @uuid)
end
is_asset?() click to toggle source

Checks whether this object is an asset.

@return [Boolean]

# File lib/conreality/object.rb, line 120
def is_asset?
  nil # TODO
end
is_camera?() click to toggle source

Checks whether this object is a camera.

@return [Boolean]

# File lib/conreality/object.rb, line 128
def is_camera?
  nil # TODO
end
is_player?() click to toggle source

Checks whether this object is a player.

@return [Boolean]

# File lib/conreality/object.rb, line 136
def is_player?
  nil # TODO
end
is_target?() click to toggle source

Checks whether this object is a target.

@return [Boolean]

# File lib/conreality/object.rb, line 144
def is_target?
  nil # TODO
end
send_message(text) click to toggle source

@param text [String] the message contents as text @return [Message] the sent message

# File lib/conreality/object.rb, line 155
def send_message(text)
  @session.execute do |action| # FIXME
    action.send_message(self, text)
  end
end