pub struct Tetrahedron3D { /* private fields */ }Expand description
Concrete 3D tetrahedron implementation backed by four point ids.
Implementations§
Source§impl Tetrahedron3D
impl Tetrahedron3D
Sourcepub fn new(
a_id: PointId,
b_id: PointId,
c_id: PointId,
d_id: PointId,
vertex_table: SharedGeometryTable<PointId, CoordinateVector3D>,
) -> Self
pub fn new( a_id: PointId, b_id: PointId, c_id: PointId, d_id: PointId, vertex_table: SharedGeometryTable<PointId, CoordinateVector3D>, ) -> Self
Creates a tetrahedron from four point ids and a shared point table.
Sourcepub fn a(&self) -> Option<CoordinateVector3D>
pub fn a(&self) -> Option<CoordinateVector3D>
Resolves the first vertex from the shared point table.
Sourcepub fn b(&self) -> Option<CoordinateVector3D>
pub fn b(&self) -> Option<CoordinateVector3D>
Resolves the second vertex from the shared point table.
Sourcepub fn c(&self) -> Option<CoordinateVector3D>
pub fn c(&self) -> Option<CoordinateVector3D>
Resolves the third vertex from the shared point table.
Sourcepub fn d(&self) -> Option<CoordinateVector3D>
pub fn d(&self) -> Option<CoordinateVector3D>
Resolves the fourth vertex from the shared point table.
Sourcepub fn faces(&self) -> [Triangle3D; 4]
pub fn faces(&self) -> [Triangle3D; 4]
Returns the four triangular boundary faces of the tetrahedron.
Sourcepub fn face_count(&self) -> usize
pub fn face_count(&self) -> usize
Returns the number of triangular faces.
Sourcepub fn surface_area(&self) -> GeometryMeasure
pub fn surface_area(&self) -> GeometryMeasure
Returns the total surface area of the tetrahedron.
Sourcepub fn signed_volume(&self) -> GeometryMeasure
pub fn signed_volume(&self) -> GeometryMeasure
Returns the signed volume of the tetrahedron.
Sourcepub fn volume(&self) -> GeometryMeasure
pub fn volume(&self) -> GeometryMeasure
Returns the absolute tetrahedron volume.
Trait Implementations§
Source§impl CanMirror for Tetrahedron3D
impl CanMirror for Tetrahedron3D
Source§impl CanRotate for Tetrahedron3D
impl CanRotate for Tetrahedron3D
Source§impl CanShear for Tetrahedron3D
impl CanShear for Tetrahedron3D
Source§impl CanTranslate for Tetrahedron3D
impl CanTranslate for Tetrahedron3D
Source§impl Canonicalize for Tetrahedron3D
impl Canonicalize for Tetrahedron3D
Source§fn canonicalize(&mut self)
fn canonicalize(&mut self)
Converts the primitive to a canonical representation.
Source§impl Clone for Tetrahedron3D
impl Clone for Tetrahedron3D
Source§impl Debug for Tetrahedron3D
impl Debug for Tetrahedron3D
Source§impl Display for Tetrahedron3D
impl Display for Tetrahedron3D
impl Eq for Tetrahedron3D
impl GeometricPrimitive for Tetrahedron3D
impl GeometricPrimitive3D for Tetrahedron3D
Source§impl HasCentroid for Tetrahedron3D
impl HasCentroid for Tetrahedron3D
Source§impl HasEdges for Tetrahedron3D
impl HasEdges for Tetrahedron3D
Source§impl HasMeasure for Tetrahedron3D
impl HasMeasure for Tetrahedron3D
Source§fn measure(&self) -> GeometryMeasure
fn measure(&self) -> GeometryMeasure
Returns the primitive’s primary measure, such as length or area.
Source§impl<'a> HasVertices<'a> for Tetrahedron3D
impl<'a> HasVertices<'a> for Tetrahedron3D
Source§type Vertex = CoordinateVector3D
type Vertex = CoordinateVector3D
Point primitive stored in the vertex table.
Source§type VertexTable = Rc<RefCell<HashGeometryTable<PointId, CoordinateVector3D>>>
type VertexTable = Rc<RefCell<HashGeometryTable<PointId, CoordinateVector3D>>>
Borrowed point-table type.
Source§fn vertex_table(&self) -> &Self::VertexTable
fn vertex_table(&self) -> &Self::VertexTable
Returns an immutable reference to the vertex table.
Source§fn vertex_table_mut(&mut self) -> &mut Self::VertexTable
fn vertex_table_mut(&mut self) -> &mut Self::VertexTable
Returns a mutable reference to the vertex table.
Source§fn set_vertex_table(&mut self, table: &'a mut Self::VertexTable)
fn set_vertex_table(&mut self, table: &'a mut Self::VertexTable)
Rebinds the implementor to a different borrowed vertex table.
Source§fn vertex_table_size(&self) -> usize
fn vertex_table_size(&self) -> usize
Returns the number of entries in the vertex table.
Source§fn contains_vertex(&self, id: &PointId) -> bool
fn contains_vertex(&self, id: &PointId) -> bool
Returns
true if the vertex table contains id.Source§impl Hash for Tetrahedron3D
impl Hash for Tetrahedron3D
Source§impl<'a> IsTetrahedron<'a, CoordinateVector3D, UnitVector3D> for Tetrahedron3D
impl<'a> IsTetrahedron<'a, CoordinateVector3D, UnitVector3D> for Tetrahedron3D
Source§fn set_a_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>
fn set_a_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>
Sets the point-table id of the first vertex.
Source§fn set_b_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>
fn set_b_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>
Sets the point-table id of the second vertex.
Source§fn set_c_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>
fn set_c_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>
Sets the point-table id of the third vertex.
Source§fn set_d_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>
fn set_d_id(&mut self, point_id: PointId) -> Result<(), ErrorsJSL>
Sets the point-table id of the fourth vertex.
Source§fn faces(&self) -> [Triangle3D; 4]
fn faces(&self) -> [Triangle3D; 4]
Returns the four derived triangular faces of the tetrahedron.
Source§fn face_count(&self) -> usize
fn face_count(&self) -> usize
Returns the number of triangular faces.
Source§fn surface_area(&self) -> GeometryMeasure
fn surface_area(&self) -> GeometryMeasure
Returns the total surface area of the tetrahedron.
Source§fn signed_volume(&self) -> GeometryMeasure
fn signed_volume(&self) -> GeometryMeasure
Returns the signed volume of the tetrahedron.
Source§fn volume(&self) -> GeometryMeasure
fn volume(&self) -> GeometryMeasure
Returns the absolute tetrahedron volume.
Source§impl IsValid for Tetrahedron3D
impl IsValid for Tetrahedron3D
Source§impl PartialEq for Tetrahedron3D
impl PartialEq for Tetrahedron3D
Auto Trait Implementations§
impl !RefUnwindSafe for Tetrahedron3D
impl !Send for Tetrahedron3D
impl !Sync for Tetrahedron3D
impl !UnwindSafe for Tetrahedron3D
impl Freeze for Tetrahedron3D
impl Unpin for Tetrahedron3D
impl UnsafeUnpin for Tetrahedron3D
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