Public Member Functions | Private Member Functions | Private Attributes | List of all members
com.introlab.rtabmap.DisplayRotationHelper Class Reference
Inheritance diagram for com.introlab.rtabmap.DisplayRotationHelper:
Inheritance graph
[legend]

Public Member Functions

 DisplayRotationHelper (Context context)
 
float getCameraSensorRelativeViewportAspectRatio (String cameraId)
 
int getCameraSensorToDisplayRotation (String cameraId)
 
void onDisplayAdded (int displayId)
 
void onDisplayChanged (int displayId)
 
void onDisplayRemoved (int displayId)
 
void onPause ()
 
void onResume ()
 
void onSurfaceChanged (int width, int height)
 
void updateSessionIfNeeded (ARCoreSharedCamera session)
 

Private Member Functions

int toDegrees (int rotation)
 

Private Attributes

final CameraManager cameraManager
 
final Display display
 
final DisplayManager displayManager
 
boolean viewportChanged
 
int viewportHeight
 
int viewportWidth
 

Detailed Description

Helper to track the display rotations. In particular, the 180 degree rotations are not notified by the onSurfaceChanged() callback, and thus they require listening to the android display events.

Definition at line 36 of file DisplayRotationHelper.java.

Constructor & Destructor Documentation

◆ DisplayRotationHelper()

com.introlab.rtabmap.DisplayRotationHelper.DisplayRotationHelper ( Context  context)
inline

Constructs the DisplayRotationHelper but does not register the listener yet.

Parameters
contextthe Android Context.

Definition at line 49 of file DisplayRotationHelper.java.

Member Function Documentation

◆ getCameraSensorRelativeViewportAspectRatio()

float com.introlab.rtabmap.DisplayRotationHelper.getCameraSensorRelativeViewportAspectRatio ( String  cameraId)
inline

Returns the aspect ratio of the GL surface viewport while accounting for the display rotation relative to the device camera sensor orientation.

Definition at line 101 of file DisplayRotationHelper.java.

◆ getCameraSensorToDisplayRotation()

int com.introlab.rtabmap.DisplayRotationHelper.getCameraSensorToDisplayRotation ( String  cameraId)
inline

Returns the rotation of the back-facing camera with respect to the display. The value is one of 0, 90, 180, 270.

Definition at line 123 of file DisplayRotationHelper.java.

◆ onDisplayAdded()

void com.introlab.rtabmap.DisplayRotationHelper.onDisplayAdded ( int  displayId)
inline

Definition at line 157 of file DisplayRotationHelper.java.

◆ onDisplayChanged()

void com.introlab.rtabmap.DisplayRotationHelper.onDisplayChanged ( int  displayId)
inline

Definition at line 163 of file DisplayRotationHelper.java.

◆ onDisplayRemoved()

void com.introlab.rtabmap.DisplayRotationHelper.onDisplayRemoved ( int  displayId)
inline

Definition at line 160 of file DisplayRotationHelper.java.

◆ onPause()

void com.introlab.rtabmap.DisplayRotationHelper.onPause ( )
inline

Unregisters the display listener. Should be called from Activity#onPause().

Definition at line 62 of file DisplayRotationHelper.java.

◆ onResume()

void com.introlab.rtabmap.DisplayRotationHelper.onResume ( )
inline

Registers the display listener. Should be called from Activity#onResume().

Definition at line 57 of file DisplayRotationHelper.java.

◆ onSurfaceChanged()

void com.introlab.rtabmap.DisplayRotationHelper.onSurfaceChanged ( int  width,
int  height 
)
inline

◆ toDegrees()

int com.introlab.rtabmap.DisplayRotationHelper.toDegrees ( int  rotation)
inlineprivate

Definition at line 141 of file DisplayRotationHelper.java.

◆ updateSessionIfNeeded()

void com.introlab.rtabmap.DisplayRotationHelper.updateSessionIfNeeded ( ARCoreSharedCamera  session)
inline

Member Data Documentation

◆ cameraManager

final CameraManager com.introlab.rtabmap.DisplayRotationHelper.cameraManager
private

Definition at line 42 of file DisplayRotationHelper.java.

◆ display

final Display com.introlab.rtabmap.DisplayRotationHelper.display
private

Definition at line 40 of file DisplayRotationHelper.java.

◆ displayManager

final DisplayManager com.introlab.rtabmap.DisplayRotationHelper.displayManager
private

Definition at line 41 of file DisplayRotationHelper.java.

◆ viewportChanged

boolean com.introlab.rtabmap.DisplayRotationHelper.viewportChanged
private

Definition at line 37 of file DisplayRotationHelper.java.

◆ viewportHeight

int com.introlab.rtabmap.DisplayRotationHelper.viewportHeight
private

Definition at line 39 of file DisplayRotationHelper.java.

◆ viewportWidth

int com.introlab.rtabmap.DisplayRotationHelper.viewportWidth
private

Definition at line 38 of file DisplayRotationHelper.java.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:26