pub struct b2RayCastCallbackWrapperCpp { /* private fields */ }Implementations§
Source§impl b2RayCastCallbackWrapperCpp
impl b2RayCastCallbackWrapperCpp
Sourcepub fn new(
peer: CppSubclassRustPeerHolder<b2RayCastCallbackWrapper>,
) -> impl New<Output = Self>
pub fn new( peer: CppSubclassRustPeerHolder<b2RayCastCallbackWrapper>, ) -> impl New<Output = Self>
Synthesized default constructor.
Source§impl b2RayCastCallbackWrapperCpp
impl b2RayCastCallbackWrapperCpp
pub fn b2RayCastCallbackWrapperCpp_remove_ownership(&self)
pub fn As_b2RayCastCallback(&self) -> &b2RayCastCallback
pub fn As_b2RayCastCallback_mut( self: Pin<&mut Self>, ) -> Pin<&mut b2RayCastCallback>
Sourcepub unsafe fn ReportParticle_super(
self: Pin<&mut Self>,
particleSystem: *const b2ParticleSystem,
index: c_int,
point: &b2Vec2,
normal: &b2Vec2,
fraction: f32,
) -> f32
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.
Sourcepub unsafe fn ShouldQueryParticleSystem_super(
self: Pin<&mut Self>,
particleSystem: *const b2ParticleSystem,
) -> bool
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
impl CppPeerConstructor<b2RayCastCallbackWrapperCpp> for b2RayCastCallbackWrapper
Source§fn make_peer(
&mut self,
peer_holder: CppSubclassRustPeerHolder<Self>,
) -> UniquePtr<b2RayCastCallbackWrapperCpp>
fn make_peer( &mut self, peer_holder: CppSubclassRustPeerHolder<Self>, ) -> UniquePtr<b2RayCastCallbackWrapperCpp>
make_unique method on the
<my subclass name>Cpp type, passing peer_holder as the first
argument.Source§impl CppSubclass<b2RayCastCallbackWrapperCpp> for b2RayCastCallbackWrapper
impl CppSubclass<b2RayCastCallbackWrapperCpp> for b2RayCastCallbackWrapper
Source§fn peer_holder(&self) -> &CppSubclassCppPeerHolder<b2RayCastCallbackWrapperCpp>
fn peer_holder(&self) -> &CppSubclassCppPeerHolder<b2RayCastCallbackWrapperCpp>
is_subclass macro, but you’re welcome to
implement it yourself if you prefer.Source§fn peer_holder_mut(
&mut self,
) -> &mut CppSubclassCppPeerHolder<b2RayCastCallbackWrapperCpp>
fn peer_holder_mut( &mut self, ) -> &mut CppSubclassCppPeerHolder<b2RayCastCallbackWrapperCpp>
is_subclass macro, but you’re welcome to
implement it yourself if you prefer.Source§fn peer(&self) -> &CppPeer
fn peer(&self) -> &CppPeer
Source§fn peer_mut(&mut self) -> Pin<&mut CppPeer>
fn peer_mut(&mut self) -> Pin<&mut CppPeer>
Source§fn new_cpp_owned(me: Self) -> UniquePtr<CppPeer>
fn new_cpp_owned(me: Self) -> UniquePtr<CppPeer>
cxx::UniquePtr and thus would typically be returned immediately
to C++ such that it can be owned on the C++ side.