[][src]Trait opencv::hub_prelude::WindowScene

pub trait WindowScene {
    pub fn as_raw_WindowScene(&self) -> *const c_void;
pub fn as_raw_mut_WindowScene(&mut self) -> *mut c_void; pub fn set_background(&mut self, image: &dyn ToInputArray) -> Result<()> { ... }
pub fn set_background_color(&mut self, color: Scalar) -> Result<()> { ... }
pub fn set_compositors(&mut self, names: &Vector<String>) -> Result<()> { ... }
pub fn create_entity(
        &mut self,
        name: &str,
        meshname: &str,
        tvec: &dyn ToInputArray,
        rot: &dyn ToInputArray
    ) -> Result<()> { ... }
pub fn remove_entity(&mut self, name: &str) -> Result<()> { ... }
pub fn set_entity_property(
        &mut self,
        name: &str,
        prop: i32,
        value: Scalar
    ) -> Result<()> { ... }
pub fn set_entity_property_1(
        &mut self,
        name: &str,
        prop: i32,
        value: &str,
        sub_entity_idx: i32
    ) -> Result<()> { ... }
pub fn get_entity_property(
        &mut self,
        name: &str,
        prop: i32,
        value: &mut dyn ToOutputArray
    ) -> Result<()> { ... }
pub fn create_camera_entity(
        &mut self,
        name: &str,
        k: &dyn ToInputArray,
        imsize: Size,
        z_far: f32,
        tvec: &dyn ToInputArray,
        rot: &dyn ToInputArray,
        color: Scalar
    ) -> Result<Rect2d> { ... }
pub fn create_light_entity(
        &mut self,
        name: &str,
        tvec: &dyn ToInputArray,
        rot: &dyn ToInputArray,
        diffuse_color: Scalar,
        specular_color: Scalar
    ) -> Result<()> { ... }
pub fn update_entity_pose(
        &mut self,
        name: &str,
        tvec: &dyn ToInputArray,
        rot: &dyn ToInputArray
    ) -> Result<()> { ... }
pub fn set_entity_pose(
        &mut self,
        name: &str,
        tvec: &dyn ToInputArray,
        rot: &dyn ToInputArray,
        invert: bool
    ) -> Result<()> { ... }
pub fn get_entity_pose(
        &mut self,
        name: &str,
        r: &mut dyn ToOutputArray,
        tvec: &mut dyn ToOutputArray,
        invert: bool
    ) -> Result<()> { ... }
pub fn get_entity_animations(
        &mut self,
        name: &str,
        out: &mut Vector<String>
    ) -> Result<()> { ... }
pub fn play_entity_animation(
        &mut self,
        name: &str,
        animname: &str,
        loop_: bool
    ) -> Result<()> { ... }
pub fn stop_entity_animation(
        &mut self,
        name: &str,
        animname: &str
    ) -> Result<()> { ... }
pub fn get_screenshot(
        &mut self,
        frame: &mut dyn ToOutputArray
    ) -> Result<()> { ... }
pub fn get_compositor_texture(
        &mut self,
        compname: &str,
        texname: &str,
        out: &mut dyn ToOutputArray,
        mrt_index: i32
    ) -> Result<()> { ... }
pub fn get_depth(&mut self, depth: &mut dyn ToOutputArray) -> Result<()> { ... }
pub fn fix_camera_yaw_axis(
        &mut self,
        use_fixed: bool,
        up: &dyn ToInputArray
    ) -> Result<()> { ... }
pub fn set_camera_pose(
        &mut self,
        tvec: &dyn ToInputArray,
        rot: &dyn ToInputArray,
        invert: bool
    ) -> Result<()> { ... }
pub fn set_camera_look_at(
        &mut self,
        target: &str,
        offset: &dyn ToInputArray
    ) -> Result<()> { ... }
pub fn set_entity_look_at(
        &mut self,
        origin: &str,
        target: &str,
        offset: &dyn ToInputArray
    ) -> Result<()> { ... }
pub fn get_camera_pose(
        &mut self,
        r: &mut dyn ToOutputArray,
        tvec: &mut dyn ToOutputArray,
        invert: bool
    ) -> Result<()> { ... }
pub fn set_camera_intrinsics(
        &mut self,
        k: &dyn ToInputArray,
        imsize: Size,
        z_near: f32,
        z_far: f32
    ) -> Result<()> { ... }
pub fn update(&mut self) -> Result<()> { ... } }

A 3D viewport and the associated scene

Required methods

Loading content...

Provided methods

pub fn set_background(&mut self, image: &dyn ToInputArray) -> Result<()>[src]

set window background to custom image

Parameters

  • image:

pub fn set_background_color(&mut self, color: Scalar) -> Result<()>[src]

set window background to custom image

Parameters

  • image:

Overloaded parameters

pub fn set_compositors(&mut self, names: &Vector<String>) -> Result<()>[src]

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

addResourceLocation

Parameters

  • names: compositor names that will be applied in order of appearance

pub fn create_entity(
    &mut self,
    name: &str,
    meshname: &str,
    tvec: &dyn ToInputArray,
    rot: &dyn ToInputArray
) -> Result<()>
[src]

place an entity of a mesh in the scene

the mesh needs to be created beforehand. Either programmatically by e.g. @ref createPointCloudMesh or by placing an Ogre .mesh file in a resource location.

See also

addResourceLocation

Parameters

  • name: entity name
  • meshname: mesh name
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • tvec: translation

C++ default parameters

  • tvec: noArray()
  • rot: noArray()

pub fn remove_entity(&mut self, name: &str) -> Result<()>[src]

remove an entity from the scene

Parameters

  • name: entity name

pub fn set_entity_property(
    &mut self,
    name: &str,
    prop: i32,
    value: Scalar
) -> Result<()>
[src]

set the property of an entity to the given value

Parameters

  • name: entity name
  • prop: @ref EntityProperty
  • value: the value

pub fn set_entity_property_1(
    &mut self,
    name: &str,
    prop: i32,
    value: &str,
    sub_entity_idx: i32
) -> Result<()>
[src]

set the property of an entity to the given value

Parameters

  • name: entity name
  • prop: @ref EntityProperty
  • value: the value

Overloaded parameters

C++ default parameters

  • sub_entity_idx: -1

pub fn get_entity_property(
    &mut self,
    name: &str,
    prop: i32,
    value: &mut dyn ToOutputArray
) -> Result<()>
[src]

get the property of an entity

Parameters

  • name: entity name
  • prop: @ref EntityProperty
  • value: the value

pub fn create_camera_entity(
    &mut self,
    name: &str,
    k: &dyn ToInputArray,
    imsize: Size,
    z_far: f32,
    tvec: &dyn ToInputArray,
    rot: &dyn ToInputArray,
    color: Scalar
) -> Result<Rect2d>
[src]

convenience method to visualize a camera position

Parameters

  • name: entity name
  • K: intrinsic matrix
  • imsize: image size
  • zFar: far plane in camera coordinates
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • tvec: translation
  • color: line color

Returns

the extents of the Frustum at far plane, where the top left corner denotes the principal point offset

C++ default parameters

  • tvec: noArray()
  • rot: noArray()
  • color: Scalar::all(1)

pub fn create_light_entity(
    &mut self,
    name: &str,
    tvec: &dyn ToInputArray,
    rot: &dyn ToInputArray,
    diffuse_color: Scalar,
    specular_color: Scalar
) -> Result<()>
[src]

creates a point light in the scene

Parameters

  • name: entity name
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • tvec: translation
  • diffuseColor:
  • specularColor:

C++ default parameters

  • tvec: noArray()
  • rot: noArray()
  • diffuse_color: Scalar::all(1)
  • specular_color: Scalar::all(1)

pub fn update_entity_pose(
    &mut self,
    name: &str,
    tvec: &dyn ToInputArray,
    rot: &dyn ToInputArray
) -> Result<()>
[src]

update entity pose by transformation in the parent coordinate space. (pre-rotation)

Parameters

  • name: entity name
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • tvec: translation

C++ default parameters

  • tvec: noArray()
  • rot: noArray()

pub fn set_entity_pose(
    &mut self,
    name: &str,
    tvec: &dyn ToInputArray,
    rot: &dyn ToInputArray,
    invert: bool
) -> Result<()>
[src]

set entity pose in the world coordinate space.

Parameters

  • name: enitity name
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • tvec: translation
  • invert: use the inverse of the given pose

C++ default parameters

  • tvec: noArray()
  • rot: noArray()
  • invert: false

pub fn get_entity_pose(
    &mut self,
    name: &str,
    r: &mut dyn ToOutputArray,
    tvec: &mut dyn ToOutputArray,
    invert: bool
) -> Result<()>
[src]

Retrieves the current pose of an entity

Parameters

  • name: entity name
  • R: 3x3 rotation matrix
  • tvec: translation vector
  • invert: return the inverted pose

C++ default parameters

  • r: noArray()
  • tvec: noArray()
  • invert: false

pub fn get_entity_animations(
    &mut self,
    name: &str,
    out: &mut Vector<String>
) -> Result<()>
[src]

get a list of available entity animations

Parameters

  • name: entity name
  • out: the animation names

pub fn play_entity_animation(
    &mut self,
    name: &str,
    animname: &str,
    loop_: bool
) -> Result<()>
[src]

play entity animation

Parameters

  • name: entity name
  • animname: animation name
  • loop: enable or disable animation loop

See also

getEntityAnimations

C++ default parameters

  • loop_: true

pub fn stop_entity_animation(
    &mut self,
    name: &str,
    animname: &str
) -> Result<()>
[src]

stop entity animation

Parameters

  • name: enitity name
  • animname: animation name

pub fn get_screenshot(&mut self, frame: &mut dyn ToOutputArray) -> Result<()>[src]

read back the image generated by the last call to @ref waitKey

pub fn get_compositor_texture(
    &mut self,
    compname: &str,
    texname: &str,
    out: &mut dyn ToOutputArray,
    mrt_index: i32
) -> Result<()>
[src]

read back the texture of an active compositor

Parameters

  • compname: name of the compositor
  • texname: name of the texture inside the compositor
  • mrtIndex: if texture is a MRT, specifies the attachment
  • out: the texture contents

C++ default parameters

  • mrt_index: 0

pub fn get_depth(&mut self, depth: &mut dyn ToOutputArray) -> Result<()>[src]

get the depth for the current frame.

return the per pixel distance to the camera in world units

pub fn fix_camera_yaw_axis(
    &mut self,
    use_fixed: bool,
    up: &dyn ToInputArray
) -> Result<()>
[src]

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 axis
  • up: the axis to be fixed

C++ default parameters

  • up: noArray()

pub fn set_camera_pose(
    &mut self,
    tvec: &dyn ToInputArray,
    rot: &dyn ToInputArray,
    invert: bool
) -> Result<()>
[src]

Sets the current camera pose

Parameters

  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • tvec: translation
  • invert: use the inverse of the given pose

C++ default parameters

  • tvec: noArray()
  • rot: noArray()
  • invert: false

pub fn set_camera_look_at(
    &mut self,
    target: &str,
    offset: &dyn ToInputArray
) -> Result<()>
[src]

convenience method to orient the camera to a specific entity

Parameters

  • target: entity name
  • offset: offset from entity centre

C++ default parameters

  • offset: noArray()

pub fn set_entity_look_at(
    &mut self,
    origin: &str,
    target: &str,
    offset: &dyn ToInputArray
) -> Result<()>
[src]

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 at
  • target: name of target entity
  • offset: offset from entity centre

C++ default parameters

  • offset: noArray()

pub fn get_camera_pose(
    &mut self,
    r: &mut dyn ToOutputArray,
    tvec: &mut dyn ToOutputArray,
    invert: bool
) -> Result<()>
[src]

Retrieves the current camera pose

Parameters

  • R: 3x3 rotation matrix
  • tvec: translation vector
  • invert: return the inverted pose

C++ default parameters

  • r: noArray()
  • tvec: noArray()
  • invert: false

pub fn set_camera_intrinsics(
    &mut self,
    k: &dyn ToInputArray,
    imsize: Size,
    z_near: f32,
    z_far: f32
) -> Result<()>
[src]

set intrinsics of the camera

Parameters

  • K: intrinsic matrix or noArray(). If noArray() is specified, imsize is ignored and zNear/ zFar can be set separately.
  • imsize: image size
  • zNear: near clip distance or -1 to keep the current
  • zFar: far clip distance or -1 to keep the current

C++ default parameters

  • z_near: -1
  • z_far: -1

pub fn update(&mut self) -> Result<()>[src]

render this window, but do not swap buffers. Automatically called by @ref ovis::waitKey

Loading content...

Implementors

Loading content...