Loading...
Searching...
No Matches

Axis-aligned bounding box defined by two corner points. More...

#include <com/navigine/idl/objc/NCBoundingBox.h>

Inherits NSObject.

Instance Methods

(nonnull instancetype) - initWithBottomLeft:topRight:
 Default constructor for class NCBoundingBox.
 

Class Methods

(nonnull instancetype) + boundingBoxWithBottomLeft:topRight:
 Factory method for class NCBoundingBox.
 

Properties

NCPointbottomLeft
 Lower-left corner of the bounding box.
 
NCPointtopRight
 Upper-right corner of the bounding box.
 

Detailed Description

Axis-aligned bounding box defined by two corner points.

Swift code snippet:

let boundingBox = BoundingBox(bottomLeft: bottomLeft, topRight: topRight)
print("Created bounding box: bottomLeft(\‍(boundingBox.bottomLeft.x), \‍(boundingBox.bottomLeft.y)), topRight(\‍(boundingBox.topRight.x), \‍(boundingBox.topRight.y))")

Objective C code snippet:

NCBoundingBox *boundingBox = [[NCBoundingBox alloc] initWithBottomLeft:bottomLeft topRight:topRight];
NSLog(@"Created bounding box: bottomLeft(%.1f, %.1f), topRight(%.1f, %.1f)",
boundingBox.bottomLeft.x, boundingBox.bottomLeft.y,
boundingBox.topRight.x, boundingBox.topRight.y);

Definition at line 25 of file NCBoundingBox.h.

Method Documentation

◆ boundingBoxWithBottomLeft:topRight:

+ (nonnull instancetype) boundingBoxWithBottomLeft: (nonnull NCPoint *) bottomLeft
topRight: (nonnull NCPoint *) topRight 

Factory method for class NCBoundingBox.

◆ initWithBottomLeft:topRight:

- (nonnull instancetype) initWithBottomLeft: (nonnull NCPoint *) bottomLeft
topRight: (nonnull NCPoint *) topRight 

Default constructor for class NCBoundingBox.

Property Documentation

◆ bottomLeft

- (NCPoint*) bottomLeft
readnonatomicassign

Lower-left corner of the bounding box.

Swift code snippet:

let leftCorner = boundingBox.bottomLeft
print("Bottom-left corner: (\‍(leftCorner.x), \‍(leftCorner.y))")

Objective C code snippet:

NCPoint *leftCorner = boundingBox.bottomLeft;
NSLog(@"Bottom-left corner: (%.1f, %.1f)", leftCorner.x, leftCorner.y);

Definition at line 51 of file NCBoundingBox.h.

◆ topRight

- (NCPoint*) topRight
readnonatomicassign

Upper-right corner of the bounding box.

Swift code snippet:

let rightCorner = boundingBox.topRight
print("Top-right corner: (\‍(rightCorner.x), \‍(rightCorner.y))")

Objective C code snippet:

NCPoint *rightCorner = boundingBox.topRight;
NSLog(@"Top-right corner: (%.1f, %.1f)", rightCorner.x, rightCorner.y);

Definition at line 65 of file NCBoundingBox.h.


The documentation for this class was generated from the following file: