Star
Derived Object created based on datafiles. Can be cast to and from an Object@.
Members
-
bool
alwaysVisible
— Whether the object can be seen from any distance.
-
uint
visibleMask
— Empire mask of which empires can see this object.
-
uint
memoryMask
— Empire mask of which empires have any memory of this object.
-
float
sightRange
— Radius around which the object can see other objects.
-
vec3d
position
— Current position in space.
-
vec3d
velocity
— Current momentary velocity.
-
vec3d
acceleration
— Current acceleration vector.
-
uint
donatedVision
— Mask of empires that this object will become visible to.
-
quaterniond
rotation
— Rotation/facing expressed as a quaternion.
-
double
radius
— Radius of the object's bounding sphere and size of its visuals.
-
double
lastTick
— Game time of the last time the object ticked.
-
int
id
— Unique identifier referring to this object.
-
Region@
region
— Member created from datafiles.
-
Component_Orbit@
orbit
— Member created from datafiles.
-
double
temperature
— Member created from datafiles.
Empire@
get_owner(
) const
Returns
Empire@
: The empire that owns this object.
void
finalizeCreation(
)
Finalize the creation of this object. Should only be called on objects that were created with delayedCreation set to true.
string
get_name(
) const
Returns
string
: Name of the object.
bool
get_valid(
) const
Returns
bool
: Whether the object is valid and not a zombie. Zombies are objects that have already been destroyed but are awaiting disposal.
bool
isFocus(
) const
Returns
bool
: Whether the object is a focus object. Focus objects have higher priority for interpolation and syncing.
void
focus(
)
Mark the object as a focus object. Focus decays and should be set periodically on accessed objects.
void
wake(
)
Tells the processing threads to tick the object next time (ignoring requested timeout)
void
wait(
)
Waits for all asynchronous messages to finish on this object. This is considered a relocking operation.
void
damage(
DamageEvent&
evt,
double
position,
vec2d&
direction
)
Deal damage to the object from a particular direction.
-
DamageEvent&
evt — Event relating information about the damage dealt.
-
double
position — Position between 0 and 1 on the side that is hit.
-
vec2d&
direction — Direction vector towards the object of the damage.
Object@
get_targets(
uint
index
) const
Retrieve one of the targeting system targets the object is holding.
-
uint
index — Index of the object to retrieve (maximum TARGET_COUNT).
Returns
Object@
: Held object by the targetting system.
Node@
getNode(
) const
Returns the node associated with the object. Asynchronous.
Component_Orbit@
get_Orbit(
)
Returns the component handle for this type of component.