@Namespace(value="dai") @NoOffset @Properties(inherit=depthai.class) public class Rect extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
Rect() |
Rect(float x,
float y,
float width,
float height) |
Rect(long size)
Native array allocator.
|
Rect(Point2f pt1,
Point2f pt2) |
Rect(Point2f org,
Size2f sz) |
Rect(Pointer p)
Pointer cast constructor.
|
Rect(Rect r) |
| Modifier and Type | Method and Description |
|---|---|
float |
area()
Area (width*height) of the rectangle
|
Point2f |
bottomRight()
The bottom-right corner
|
boolean |
contains(Point2f pt)
Checks whether the rectangle contains the point.
|
Rect |
denormalize(int destWidth,
int destHeight)
Denormalize rectangle.
|
boolean |
empty()
True if rectangle is empty.
|
Rect |
getPointer(long i) |
float |
height() |
Rect |
height(float setter) |
boolean |
isNormalized()
Whether rectangle is normalized (coordinates in [0,1] range) or not.
|
Rect |
normalize(int srcWidth,
int srcHeight)
Normalize rectangle.
|
Rect |
position(long position) |
Rect |
put(Rect r) |
Size2f |
size()
Size (width, height) of the rectangle
|
Point2f |
topLeft()
The top-left corner.
|
float |
width() |
Rect |
width(float setter) |
float |
x() |
Rect |
x(float setter) |
float |
y() |
Rect |
y(float setter) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic Rect(Pointer p)
Pointer(Pointer).public Rect(long size)
Pointer.position(long).public Rect()
public Rect(float x,
float y,
float width,
float height)
public Rect getPointer(long i)
getPointer in class Pointerpublic float area()
@Cast(value="bool") public boolean contains(@Const @ByRef Point2f pt)
@Cast(value="bool") public boolean isNormalized()
@ByVal public Rect denormalize(int destWidth, int destHeight)
destWidth - Destination frame width.destHeight - Destination frame height.@ByVal public Rect normalize(int srcWidth, int srcHeight)
srcWidth - Source frame width.srcHeight - Source frame height.public float x()
public Rect x(float setter)
public float y()
public Rect y(float setter)
public float width()
public Rect width(float setter)
public float height()
public Rect height(float setter)
Copyright © 2023. All rights reserved.