Skip to main content

b2RayCastCallbackWrapperCpp

Struct b2RayCastCallbackWrapperCpp 

Source
pub struct b2RayCastCallbackWrapperCpp { /* private fields */ }

Implementations§

Source§

impl b2RayCastCallbackWrapperCpp

Source

pub fn new( peer: CppSubclassRustPeerHolder<b2RayCastCallbackWrapper>, ) -> impl New<Output = Self>

Synthesized default constructor.

Source§

impl b2RayCastCallbackWrapperCpp

Source

pub fn b2RayCastCallbackWrapperCpp_remove_ownership(&self)

Source

pub fn As_b2RayCastCallback(&self) -> &b2RayCastCallback

Source

pub fn As_b2RayCastCallback_mut( self: Pin<&mut Self>, ) -> Pin<&mut b2RayCastCallback>

Source

pub unsafe fn ReportParticle_super( self: Pin<&mut Self>, particleSystem: *const b2ParticleSystem, index: c_int, point: &b2Vec2, normal: &b2Vec2, fraction: f32, ) -> f32

Called for each particle found in the query. You control how the ray cast proceeds by returning a float: return <=0: ignore the remaining particles in this particle system return fraction: ignore particles that are ‘fraction’ percent farther along the line from ‘point1’ to ‘point2’. Note that ‘point1’ and ‘point2’ are parameters to b2World::RayCast. @param particleSystem the particle system containing the particle @param index the index of the particle in particleSystem @param point the point of intersection bt the ray and the particle @param normal the normal vector at the point of intersection @param fraction percent (0.0~1.0) from ‘point0’ to ‘point1’ along the ray. Note that ‘point1’ and ‘point2’ are parameters to b2World::RayCast. @return <=0 to ignore rest of particle system, fraction to ignore particles that are farther away.

Source

pub unsafe fn ShouldQueryParticleSystem_super( self: Pin<&mut Self>, particleSystem: *const b2ParticleSystem, ) -> bool

Cull an entire particle system from b2World::RayCast. Ignored in b2ParticleSystem::RayCast. @return true if you want to include particleSystem in the RayCast, or false to cull particleSystem from the RayCast.

Trait Implementations§

Source§

impl CppPeerConstructor<b2RayCastCallbackWrapperCpp> for b2RayCastCallbackWrapper

Source§

fn make_peer( &mut self, peer_holder: CppSubclassRustPeerHolder<Self>, ) -> UniquePtr<b2RayCastCallbackWrapperCpp>

Create the C++ peer. This method will be automatically generated for you except in cases where the superclass has multiple constructors, or its only constructor takes parameters. In such a case you’ll need to implement this by calling a make_unique method on the <my subclass name>Cpp type, passing peer_holder as the first argument.
Source§

impl CppSubclass<b2RayCastCallbackWrapperCpp> for b2RayCastCallbackWrapper

Source§

fn peer_holder(&self) -> &CppSubclassCppPeerHolder<b2RayCastCallbackWrapperCpp>

Return the field which holds the C++ peer object. This is normally implemented by the #is_subclass macro, but you’re welcome to implement it yourself if you prefer.
Source§

fn peer_holder_mut( &mut self, ) -> &mut CppSubclassCppPeerHolder<b2RayCastCallbackWrapperCpp>

Return the field which holds the C++ peer object. This is normally implemented by the #is_subclass macro, but you’re welcome to implement it yourself if you prefer.
Source§

fn peer(&self) -> &CppPeer

Return a reference to the C++ part of this object pair. This can be used to register listeners, etc.
Source§

fn peer_mut(&mut self) -> Pin<&mut CppPeer>

Return a mutable reference to the C++ part of this object pair. This can be used to register listeners, etc.
Source§

fn new_cpp_owned(me: Self) -> UniquePtr<CppPeer>

Creates a new instance of this subclass. This instance is owned by the returned cxx::UniquePtr and thus would typically be returned immediately to C++ such that it can be owned on the C++ side.
Source§

fn new_rust_owned(me: Self) -> Rc<RefCell<Self>>

Creates a new instance of this subclass. This instance is not owned by C++, and therefore will be deleted when it goes out of scope in Rust.
Source§

impl ExternType for b2RayCastCallbackWrapperCpp

Source§

type Kind = Opaque

Source§

type Id

A type-level representation of the type’s C++ namespace and type name. Read more
Source§

impl MakeCppStorage for b2RayCastCallbackWrapperCpp

Source§

unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2RayCastCallbackWrapperCpp

Allocates heap space for this type in C++ and return a pointer to that space, but do not initialize that space (i.e. do not yet call a constructor). Read more
Source§

unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2RayCastCallbackWrapperCpp)

Frees a C++ allocation which has not yet had a constructor called. Read more
Source§

impl SharedPtrTarget for b2RayCastCallbackWrapperCpp

Source§

impl UniquePtrTarget for b2RayCastCallbackWrapperCpp

Source§

impl WeakPtrTarget for b2RayCastCallbackWrapperCpp

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.