pub struct b2EdgeShape { /* private fields */ }Expand description
A line segment (edge) shape. These can be connected in chains or loops to other edge shapes. Edges created independently are two-sided and do no provide smooth movement across junctions.
Implementations§
Source§impl b2EdgeShape
impl b2EdgeShape
pub fn new() -> impl New<Output = Self>
Sourcepub unsafe fn Clone(
self: &b2EdgeShape,
allocator: *mut b2BlockAllocator,
) -> *mut b2Shape
pub unsafe fn Clone( self: &b2EdgeShape, allocator: *mut b2BlockAllocator, ) -> *mut b2Shape
Implement b2Shape.
Sourcepub fn GetChildCount(self: &b2EdgeShape) -> c_int
pub fn GetChildCount(self: &b2EdgeShape) -> c_int
@see b2Shape::GetChildCount
Sourcepub fn TestPoint(
self: &b2EdgeShape,
transform: &b2Transform,
p: &b2Vec2,
) -> bool
pub fn TestPoint( self: &b2EdgeShape, transform: &b2Transform, p: &b2Vec2, ) -> bool
@see b2Shape::TestPoint
pub unsafe fn ComputeDistance( self: &b2EdgeShape, xf: &b2Transform, p: &b2Vec2, distance: *mut f32, normal: *mut b2Vec2, childIndex: c_int, )
Sourcepub unsafe fn RayCast(
self: &b2EdgeShape,
output: *mut b2RayCastOutput,
input: &b2RayCastInput,
transform: &b2Transform,
childIndex: c_int,
) -> bool
pub unsafe fn RayCast( self: &b2EdgeShape, output: *mut b2RayCastOutput, input: &b2RayCastInput, transform: &b2Transform, childIndex: c_int, ) -> bool
Implement b2Shape.
Sourcepub unsafe fn ComputeAABB(
self: &b2EdgeShape,
aabb: *mut b2AABB,
transform: &b2Transform,
childIndex: c_int,
)
pub unsafe fn ComputeAABB( self: &b2EdgeShape, aabb: *mut b2AABB, transform: &b2Transform, childIndex: c_int, )
@see b2Shape::ComputeAABB
Sourcepub unsafe fn ComputeMass(
self: &b2EdgeShape,
massData: *mut b2MassData,
density: f32,
)
pub unsafe fn ComputeMass( self: &b2EdgeShape, massData: *mut b2MassData, density: f32, )
@see b2Shape::ComputeMass
Source§impl b2EdgeShape
impl b2EdgeShape
Sourcepub fn SetOneSided(
self: Pin<&mut Self>,
v0: &b2Vec2,
v1: &b2Vec2,
v2: &b2Vec2,
v3: &b2Vec2,
)
pub fn SetOneSided( self: Pin<&mut Self>, v0: &b2Vec2, v1: &b2Vec2, v2: &b2Vec2, v3: &b2Vec2, )
Set this as a part of a sequence. Vertex v0 precedes the edge and vertex v3 follows. These extra vertices are used to provide smooth movement across junctions. This also makes the collision one-sided. The edge normal points to the right looking from v1 to v2.
Sourcepub fn SetTwoSided(self: Pin<&mut Self>, v1: &b2Vec2, v2: &b2Vec2)
pub fn SetTwoSided(self: Pin<&mut Self>, v1: &b2Vec2, v2: &b2Vec2)
Set this as an isolated edge. Collision is two-sided.
Trait Implementations§
Source§impl AsRef<b2Shape> for b2EdgeShape
impl AsRef<b2Shape> for b2EdgeShape
Source§fn as_ref(self: &b2EdgeShape) -> &b2Shape
fn as_ref(self: &b2EdgeShape) -> &b2Shape
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl CopyNew for b2EdgeShape
impl CopyNew for b2EdgeShape
Source§unsafe fn copy_new(
other: &b2EdgeShape,
this: Pin<&mut MaybeUninit<b2EdgeShape>>,
)
unsafe fn copy_new( other: &b2EdgeShape, this: Pin<&mut MaybeUninit<b2EdgeShape>>, )
Synthesized copy constructor.
Source§impl Drop for b2EdgeShape
impl Drop for b2EdgeShape
Source§fn drop(self: &mut b2EdgeShape)
fn drop(self: &mut b2EdgeShape)
Synthesized destructor.
Source§impl ExternType for b2EdgeShape
impl ExternType for b2EdgeShape
Source§impl MakeCppStorage for b2EdgeShape
impl MakeCppStorage for b2EdgeShape
Source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2EdgeShape
unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2EdgeShape
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 b2EdgeShape)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2EdgeShape)
Frees a C++ allocation which has not yet
had a constructor called. Read more
impl UniquePtrTarget for b2EdgeShape
impl WeakPtrTarget for b2EdgeShape
Auto Trait Implementations§
impl Freeze for b2EdgeShape
impl RefUnwindSafe for b2EdgeShape
impl !Send for b2EdgeShape
impl !Sync for b2EdgeShape
impl !Unpin for b2EdgeShape
impl UnwindSafe for b2EdgeShape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more