pub struct JsEdgeLines { /* private fields */ }Expand description
Edge polylines for wireframe rendering, exposed to JavaScript.
Positions are flattened to [x, y, z, x, y, z, ...] format.
Offsets are float-array indices into positions (already multiplied by 3).
Implementations§
Source§impl JsEdgeLines
impl JsEdgeLines
Sourcepub fn offsets(&self) -> Vec<u32>
pub fn offsets(&self) -> Vec<u32>
Start index into the flattened positions array for each edge polyline.
The i-th edge’s positions span from positions[offsets[i]] to
positions[offsets[i+1]] (or to the end for the last edge).
Each offset is already a float-array index (vertex index × 3).
Sourcepub fn edge_count(&self) -> u32
pub fn edge_count(&self) -> u32
Number of edges.
Sourcepub fn packed_buffer(&self) -> Vec<u8> ⓘ
pub fn packed_buffer(&self) -> Vec<u8> ⓘ
Return all data in a single packed buffer for efficient FFI transfer.
Layout: [pos_bytes: u32 LE, off_bytes: u32 LE, positions: f64 LE..., offsets: u32 LE...]
Trait Implementations§
Source§impl Debug for JsEdgeLines
impl Debug for JsEdgeLines
Source§impl From<EdgeLines> for JsEdgeLines
impl From<EdgeLines> for JsEdgeLines
Source§impl From<JsEdgeLines> for JsValue
impl From<JsEdgeLines> for JsValue
Source§fn from(value: JsEdgeLines) -> Self
fn from(value: JsEdgeLines) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsEdgeLines
impl FromWasmAbi for JsEdgeLines
Source§impl IntoWasmAbi for JsEdgeLines
impl IntoWasmAbi for JsEdgeLines
Source§impl LongRefFromWasmAbi for JsEdgeLines
impl LongRefFromWasmAbi for JsEdgeLines
Source§type Abi = WasmPtr<WasmRefCell<JsEdgeLines>>
type Abi = WasmPtr<WasmRefCell<JsEdgeLines>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<JsEdgeLines>
type Anchor = RcRef<JsEdgeLines>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for JsEdgeLines
impl OptionFromWasmAbi for JsEdgeLines
Source§impl OptionIntoWasmAbi for JsEdgeLines
impl OptionIntoWasmAbi for JsEdgeLines
Source§impl RefFromWasmAbi for JsEdgeLines
impl RefFromWasmAbi for JsEdgeLines
Source§type Abi = WasmPtr<WasmRefCell<JsEdgeLines>>
type Abi = WasmPtr<WasmRefCell<JsEdgeLines>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<JsEdgeLines>
type Anchor = RcRef<JsEdgeLines>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for JsEdgeLines
impl RefMutFromWasmAbi for JsEdgeLines
Source§type Abi = WasmPtr<WasmRefCell<JsEdgeLines>>
type Abi = WasmPtr<WasmRefCell<JsEdgeLines>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<JsEdgeLines>
type Anchor = RcRefMut<JsEdgeLines>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for JsEdgeLines
impl SupportsInstanceProperty for JsEdgeLines
impl SupportsStaticProperty for JsEdgeLines
Source§impl TryFromJsValue for JsEdgeLines
impl TryFromJsValue for JsEdgeLines
Source§impl VectorFromWasmAbi for JsEdgeLines
impl VectorFromWasmAbi for JsEdgeLines
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsEdgeLines]>
Source§impl VectorIntoWasmAbi for JsEdgeLines
impl VectorIntoWasmAbi for JsEdgeLines
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsEdgeLines]>) -> Self::Abi
Source§impl WasmDescribeVector for JsEdgeLines
impl WasmDescribeVector for JsEdgeLines
Auto Trait Implementations§
impl Freeze for JsEdgeLines
impl RefUnwindSafe for JsEdgeLines
impl Send for JsEdgeLines
impl Sync for JsEdgeLines
impl Unpin for JsEdgeLines
impl UnsafeUnpin for JsEdgeLines
impl UnwindSafe for JsEdgeLines
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.