pub struct VoidField {
pub nx: u32,
pub ny: u32,
pub nz: u32,
pub origin: Option<Vec3>,
pub spacing: Option<Vec3>,
pub phi: Vec<f32>,
pub threshold: f32,
}Expand description
A void distance field on a regular grid: phi[xnynz + y*nz + z] is the
distance from the nearest atom surface (>= 0 inside a void, sentinel-
negative on exterior/masked cells). The host forwards it to viso, which
meshes the isosurface at threshold. Row-major, x-major.
Fields§
§nx: u32§ny: u32§nz: u32§origin: Option<Vec3>world position of grid cell (0,0,0)
spacing: Option<Vec3>Angstrom per voxel, per axis (dx, dy, dz)
phi: Vec<f32>nxnynz values, x-major row-major
threshold: f32iso level (Angstrom) at which the void surface is drawn
Trait Implementations§
Source§impl Message for VoidField
impl Message for VoidField
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for VoidField
Auto Trait Implementations§
impl Freeze for VoidField
impl RefUnwindSafe for VoidField
impl Send for VoidField
impl Sync for VoidField
impl Unpin for VoidField
impl UnsafeUnpin for VoidField
impl UnwindSafe for VoidField
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