omni::graph::exec::unstable::cast

Defined in omni/graph/exec/unstable/IBase.h

template<typename T, typename U>
inline T *omni::graph::exec::unstable::cast(omni::core::ObjectPtr<U> ptr) noexcept

Casts the given pointer to the given interface (e.g. T).

nullptr is accepted.

Unlike omni::core::cast(), this function does not call omni::core::IObject::acquire() on the returned pointer.

Returns

A valid pointer is returned if the given pointer implements the given interface. Otherwise, nullptr is returned.