Class cv::ovis::WindowScene#
#include <opencv2/ovis.hpp>Collaboration diagram for cv::ovis::WindowScene:
Detailed Description#
A 3D viewport and the associated scene
Constructor & Destructor Documentation#
~WindowScene()#
cv::ovis::WindowScene::~WindowScene()
Member Function Documentation#
createCameraEntity()#
Rect2d cv::ovis::WindowScene::createCameraEntity(
const String & name,
InputArray K,
const Size & imsize,
float zFar,
InputArray tvec = noArray(),
InputArray rot = noArray(),
const Scalar & color = Scalar::all(1) )
convenience method to visualize a camera position
Parameters
name— entity nameK— intrinsic matriximsize— image sizezFar— far plane in camera coordinatestvec— translationrot— Rodrigues vector or 3x3 rotation matrixcolor— line color
Returns
the extents of the Frustum at far plane, where the top left corner denotes the principal point offset
Here is the call graph for this function:
createEntity()#
void cv::ovis::WindowScene::createEntity(
const String & name,
const String & meshname,
InputArray tvec = noArray(),
InputArray rot = noArray() )
place an entity of a mesh in the scene
the mesh needs to be created beforehand. Either programmatically by e.g. createPointCloudMesh or by placing the respective file in a resource location.
See also
Parameters
name— entity namemeshname— mesh nametvec— translationrot— Rodrigues vector or 3x3 rotation matrix
Here is the call graph for this function:
createLightEntity()#
void cv::ovis::WindowScene::createLightEntity(
const String & name,
InputArray tvec = noArray(),
InputArray rot = noArray(),
const Scalar & diffuseColor = Scalar::all(1),
const Scalar & specularColor = Scalar::all(1) )
creates a point light in the scene
Parameters
name— entity nametvec— translationrot— Rodrigues vector or 3x3 rotation matrixdiffuseColorspecularColor
Here is the call graph for this function:
fixCameraYawAxis()#
void cv::ovis::WindowScene::fixCameraYawAxis(
bool useFixed,
InputArray up = noArray() )
convenience method to force the “up” axis to stay fixed
works with both programmatic changes and SCENE_INTERACTIVE
Parameters
useFixed— whether to enforce the fixed yaw axisup— the axis to be fixed
Here is the call graph for this function:
getCameraPose()#
void cv::ovis::WindowScene::getCameraPose(
OutputArray R = noArray(),
OutputArray tvec = noArray(),
bool invert = false )
Retrieves the current camera pose
Parameters
R— 3x3 rotation matrixtvec— translation vectorinvert— return the inverted pose
Here is the call graph for this function:
getCompositorTexture()#
void cv::ovis::WindowScene::getCompositorTexture(
const String & compname,
const String & texname,
OutputArray out,
int mrtIndex = 0 )
read back the texture of an active compositor
Parameters
compname— name of the compositortexname— name of the texture inside the compositormrtIndex— if texture is a MRT, specifies the attachmentout— the texture contents
getDepth()#
void cv::ovis::WindowScene::getDepth(OutputArray depth)
get the depth for the current frame.
return the per pixel distance to the camera in world units
getEntityAnimations()#
void cv::ovis::WindowScene::getEntityAnimations(
const String & name,
std::vector< String > & out )
get a list of available entity animations
Parameters
name— entity nameout— the animation names
getEntityPose()#
void cv::ovis::WindowScene::getEntityPose(
const String & name,
OutputArray R = noArray(),
OutputArray tvec = noArray(),
bool invert = false )
Retrieves the current pose of an entity
Parameters
name— entity nameR— 3x3 rotation matrixtvec— translation vectorinvert— return the inverted pose
Here is the call graph for this function:
getEntityProperty()#
void cv::ovis::WindowScene::getEntityProperty(
const String & name,
int prop,
OutputArray value )
get the property of an entity
Parameters
name— entity nameprop— EntityPropertyvalue— the value
getScreenshot()#
void cv::ovis::WindowScene::getScreenshot(OutputArray frame)
read back the image generated by the last call to waitKey
playEntityAnimation()#
void cv::ovis::WindowScene::playEntityAnimation(
const String & name,
const String & animname,
bool loop = true )
play entity animation
See also
Parameters
name— entity nameanimname— animation nameloop— enable or disable animation loop
removeEntity()#
void cv::ovis::WindowScene::removeEntity(const String & name)
remove an entity from the scene
Parameters
name— entity name
setBackground()#
void cv::ovis::WindowScene::setBackground(const Scalar & color)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
setBackground()#
void cv::ovis::WindowScene::setBackground(InputArray image)
set window background to custom image/ color
Parameters
image
setCameraIntrinsics()#
void cv::ovis::WindowScene::setCameraIntrinsics(
InputArray K,
const Size & imsize,
float zNear = -1,
float zFar = -1 )
set intrinsics of the camera
Parameters
setCameraLookAt()#
void cv::ovis::WindowScene::setCameraLookAt(
const String & target,
InputArray offset = noArray() )
convenience method to orient the camera to a specific entity
Parameters
target— entity nameoffset— offset from entity centre
Here is the call graph for this function:
setCameraPose()#
void cv::ovis::WindowScene::setCameraPose(
InputArray tvec = noArray(),
InputArray rot = noArray(),
bool invert = false )
Sets the current camera pose
Parameters
tvec— translationrot— Rodrigues vector or 3x3 rotation matrixinvert— use the inverse of the given pose
Here is the call graph for this function:
setCompositors()#
void cv::ovis::WindowScene::setCompositors(const std::vector< String > & names)
enable an ordered chain of full-screen post processing effects
this way you can add distortion or SSAO effects. The effects themselves must be defined inside Ogre .compositor scripts.
See also
Parameters
names— compositor names that will be applied in order of appearance
setEntityLookAt()#
void cv::ovis::WindowScene::setEntityLookAt(
const String & origin,
const String & target,
InputArray offset = noArray() )
convenience method to orient an entity to a specific entity. If target is an empty string the entity looks at the given offset point
Parameters
origin— entity to make look attarget— name of target entityoffset— offset from entity centre
Here is the call graph for this function:
setEntityPose()#
void cv::ovis::WindowScene::setEntityPose(
const String & name,
InputArray tvec = noArray(),
InputArray rot = noArray(),
bool invert = false )
set entity pose in the world coordinate space.
Parameters
name— enitity nametvec— translationrot— Rodrigues vector or 3x3 rotation matrixinvert— use the inverse of the given pose
Here is the call graph for this function:
setEntityProperty()#
void cv::ovis::WindowScene::setEntityProperty(
const String & name,
int prop,
const Scalar & value )
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
setEntityProperty()#
void cv::ovis::WindowScene::setEntityProperty(
const String & name,
int prop,
const String & value,
int subEntityIdx = -1 )
set the property of an entity to the given value
Parameters
name— entity nameprop— EntityPropertyvalue— the valuesubEntityIdx— index of the sub-entity (default: all)
stopEntityAnimation()#
void cv::ovis::WindowScene::stopEntityAnimation(
const String & name,
const String & animname )
stop entity animation
Parameters
name— enitity nameanimname— animation name
update()#
void cv::ovis::WindowScene::update()
render this window, but do not swap buffers. Automatically called by ovis::waitKey
updateEntityPose()#
void cv::ovis::WindowScene::updateEntityPose(
const String & name,
InputArray tvec = noArray(),
InputArray rot = noArray() )
update entity pose by transformation in the parent coordinate space. (pre-rotation)
Parameters
name— entity nametvec— translationrot— Rodrigues vector or 3x3 rotation matrix
Here is the call graph for this function:
Source file#
The documentation for this class was generated from the following file:
opencv2/ovis.hpp