cp_tracking_area

Struct cp_tracking_area 

Source
pub struct cp_tracking_area { /* private fields */ }
Available on crate feature tracking_area only.
Expand description

Implementations§

Source§

impl cp_tracking_area

Source

pub unsafe fn render_value( tracking_area: cp_tracking_area_t, ) -> cp_tracking_area_render_value

Returns the render value for the tracking area.

  • Parameters:
  • tracking_area: The tracking area for a frame.
  • Returns: The render value for the tracking area for this frame. This value is what should be used in this frames render pass to identify the tracking area of given identifier.

Use the returned value in the render pass of cp_drawable_get_tracking_areas_texture for the pixel value of the tracking area identifier.

§Safety

tracking_area must be a valid pointer.

Source

pub unsafe fn identifier( tracking_area: cp_tracking_area_t, ) -> cp_tracking_area_identifier

Returns the identifier for the tracking area.

  • Parameters:
  • tracking_area: The tracking area for a frame.
  • Returns: The identifier for the tracking area. This should be a unique value for this tracking area and consistent for the rendered mesh/object across frames.
§Safety

tracking_area must be a valid pointer.

Source

pub unsafe fn add_automatic_hover_effect( tracking_area: cp_tracking_area_t, ) -> cp_hover_effect_t

Returns the hover effect opaque object for the tracking area for this frame.

  • Parameters:
  • tracking_area: The tracking area for a frame.
  • Returns: The hover effect for the tracking area.

The hover effect contains information used to render the hover effect using the tracking area textures and gaze once application render pass has completed. Can only create 1 hover effect per-tracking area, to destroy and disable the hover effect see cp_hover_effect_destroy

§Safety

tracking_area must be a valid pointer.

Trait Implementations§

Source§

impl Debug for cp_tracking_area

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl RefEncode for cp_tracking_area

Source§

const ENCODING_REF: Encoding

The Objective-C type-encoding for a reference of this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,