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

Required Methods

Provided Methods

set window background to custom image/ color

Parameters
  • image:

set window background to custom image/ color

Parameters
  • image:
Overloaded parameters

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.

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

addResourceLocation

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 the respective file in a resource location.

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

addResourceLocation

C++ default parameters
  • tvec: noArray()
  • rot: noArray()

remove an entity from the scene

Parameters
  • name: entity name

set the property of an entity to the given value

Parameters
  • name: entity name
  • prop: @ref EntityProperty
  • value: the value
  • subEntityIdx: index of the sub-entity (default: all)
C++ default parameters
  • sub_entity_idx: -1

set the property of an entity to the given value

Parameters
  • name: entity name
  • prop: @ref EntityProperty
  • value: the value
  • subEntityIdx: index of the sub-entity (default: all)
Overloaded parameters

get the property of an entity

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

convenience method to visualize a camera position

Parameters
  • name: entity name
  • K: intrinsic matrix
  • imsize: image size
  • zFar: far plane in camera coordinates
  • tvec: translation
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • 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)

creates a point light in the scene

Parameters
  • name: entity name
  • tvec: translation
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • diffuseColor:
  • specularColor:
C++ default parameters
  • tvec: noArray()
  • rot: noArray()
  • diffuse_color: Scalar::all(1)
  • specular_color: Scalar::all(1)

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

Parameters
  • name: entity name
  • tvec: translation
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
C++ default parameters
  • tvec: noArray()
  • rot: noArray()

set entity pose in the world coordinate space.

Parameters
  • name: enitity name
  • tvec: translation
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • invert: use the inverse of the given pose
C++ default parameters
  • tvec: noArray()
  • rot: noArray()
  • invert: false

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

get a list of available entity animations

Parameters
  • name: entity name
  • out: the animation names

play entity animation

Parameters
  • name: entity name
  • animname: animation name
  • loop: enable or disable animation loop
See also

getEntityAnimations

C++ default parameters
  • loop_: true

stop entity animation

Parameters
  • name: enitity name
  • animname: animation name

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

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

get the depth for the current frame.

return the per pixel distance to the camera in world units

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()

Sets the current camera pose

Parameters
  • tvec: translation
  • rot: @ref Rodrigues vector or 3x3 rotation matrix
  • invert: use the inverse of the given pose
C++ default parameters
  • tvec: noArray()
  • rot: noArray()
  • invert: false

convenience method to orient the camera to a specific entity

Parameters
  • target: entity name
  • offset: offset from entity centre
C++ default parameters
  • 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 at
  • target: name of target entity
  • offset: offset from entity centre
C++ default parameters
  • offset: noArray()

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

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

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

Implementors