Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
Entity(OOEntityInspectorExtensions) Category Reference

#include <OOEntityInspectorExtensions.h>

Instance Methods

(NSString *) - inspScanClassLine
 
(NSString *) - inspStatusLine
 
(NSString *) - inspRetainCountLine
 
(NSString *) - inspPositionLine
 
(NSString *) - inspVelocityLine
 
(NSString *) - inspOrientationLine
 
(NSString *) - inspEnergyLine
 
(NSString *) - inspOwnerLine
 
(NSString *) - inspTargetLine
 
(NSString *) - inspDescription [implementation]
 
(NSString *) - inspBasicIdentityLine [implementation]
 

Detailed Description

Definition at line 49 of file OOEntityInspectorExtensions.h.

Method Documentation

◆ inspBasicIdentityLine

- (NSString *) inspBasicIdentityLine
implementation

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

96{
97 OOUniversalID myID = [self universalID];
98
99 if (myID != NO_TARGET)
100 {
101 return [NSString stringWithFormat:@"%@ ID %u", [self class], myID];
102 }
103 else
104 {
105 return [self className];
106 }
107}
uint16_t OOUniversalID
Definition OOTypes.h:189
@ NO_TARGET
Definition OOTypes.h:194

◆ inspDescription

- (NSString *) inspDescription
implementation

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

90{
91 return [NSString stringWithFormat:@"%@ ID %u", [self class], [self universalID]];
92}

◆ inspEnergyLine

- (NSString *) inspEnergyLine

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

150{
151 return [NSString stringWithFormat:@"%i/%i", (int)[self energy], (int)[self maxEnergy]];
152}

◆ inspOrientationLine

- (NSString *) inspOrientationLine

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

143{
144 Quaternion q = [self orientation];
145 return [NSString stringWithFormat:@"%.3f (%.3f, %.3f, %.3f)", q.w, q.x, q.y, q.z];
146}

◆ inspOwnerLine

- (NSString *) inspOwnerLine

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

156{
157 if ([self owner] == self) return @"Self";
158 return [[self owner] inspDescription];
159}

◆ inspPositionLine

- (NSString *) inspPositionLine

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

129{
130 HPVector v = [self position];
131 return [NSString stringWithFormat:@"%.0f, %.0f, %.0f", v.x, v.y, v.z];
132}

◆ inspRetainCountLine

- (NSString *) inspRetainCountLine

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

123{
124 return [NSString stringWithFormat:@"%lu", [self retainCount]];
125}

◆ inspScanClassLine

- (NSString *) inspScanClassLine

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

111{
112 return OOStringFromScanClass([self scanClass]);
113}
NSString * OOStringFromScanClass(OOScanClass scanClass) CONST_FUNC

◆ inspStatusLine

- (NSString *) inspStatusLine

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

117{
118 return OOStringFromEntityStatus([self status]);
119}
NSString * OOStringFromEntityStatus(OOEntityStatus status) CONST_FUNC

◆ inspTargetLine

- (NSString *) inspTargetLine

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

163{
164 return nil;
165}
return nil

◆ inspVelocityLine

- (NSString *) inspVelocityLine

Extends class Entity.

Definition at line 1 of file OOEntityInspectorExtensions.m.

136{
137 Vector v = [self velocity];
138 return [NSString stringWithFormat:@"%.1f, %.1f, %.1f (%.1f)", v.x, v.y, v.z, magnitude(v)];
139}

The documentation for this category was generated from the following files: