pub struct Solid {
pub abstract_solid: AbstractSolid,
/* private fields */
}Expand description
A 3-D geometry bounded by one or more surfaces.
Corresponds to gml:Solid in OGC 07-036 §10.6.4. The bounding surfaces are
stored as ShellProperty members and may be of any AbstractSurfaceKind.
Fields§
§abstract_solid: AbstractSolidImplementations§
Source§impl Solid
impl Solid
Sourcepub fn new(exterior: Option<ShellProperty>) -> Result<Self, Error>
pub fn new(exterior: Option<ShellProperty>) -> Result<Self, Error>
Creates a new Solid from its bounding surfaces.
§Errors
Returns Error::TooFewElements if members is empty.
pub fn from_abstract_solid( abstract_solid: AbstractSolid, exterior: Option<ShellProperty>, ) -> Self
pub fn exterior(&self) -> Option<&ShellProperty>
pub fn interior(&self) -> &[ShellProperty]
pub fn set_interior(&mut self, interior: Vec<ShellProperty>)
pub fn push_interior(&mut self, interior: ShellProperty)
pub fn extend_interiors( &mut self, interiors: impl IntoIterator<Item = ShellProperty>, )
Source§impl Solid
impl Solid
pub fn points(&self) -> Vec<&DirectPosition>
Sourcepub fn volume_3d(&self) -> Result<f64, Error>
pub fn volume_3d(&self) -> Result<f64, Error>
Returns the volume of this solid.
§Errors
Returns Error::MissingExteriorShell if the solid has no exterior shell property.
Returns Error::UnresolvedShellReference if the shell property carries only an
xlink:href that has not been resolved into an inline object.
Propagates any error from triangulating the bounding surfaces.
Trait Implementations§
Source§impl ApplyTransform for Solid
impl ApplyTransform for Solid
fn apply_transform(&mut self, transform: Transform3<f64>)
fn apply_isometry(&mut self, isometry: Isometry3<f64>)
fn apply_translation(&mut self, vector: Vector3<f64>)
fn apply_rotation(&mut self, rotation: Rotation3<f64>)
fn apply_scale(&mut self, scale: Scale3<f64>)
Source§impl AsAbstractGeometricPrimitive for Solid
impl AsAbstractGeometricPrimitive for Solid
Source§fn abstract_geometric_primitive(&self) -> &AbstractGeometricPrimitive
fn abstract_geometric_primitive(&self) -> &AbstractGeometricPrimitive
AbstractGeometricPrimitive base data.Source§impl AsAbstractGeometricPrimitiveMut for Solid
impl AsAbstractGeometricPrimitiveMut for Solid
Source§fn abstract_geometric_primitive_mut(
&mut self,
) -> &mut AbstractGeometricPrimitive
fn abstract_geometric_primitive_mut( &mut self, ) -> &mut AbstractGeometricPrimitive
AbstractGeometricPrimitive base data.Source§impl AsAbstractGeometry for Solid
impl AsAbstractGeometry for Solid
Source§fn abstract_geometry(&self) -> &AbstractGeometry
fn abstract_geometry(&self) -> &AbstractGeometry
AbstractGeometry base data.fn srs_name(&self) -> Option<&String>
fn srs_dimension(&self) -> Option<u32>
Source§impl AsAbstractGeometryMut for Solid
impl AsAbstractGeometryMut for Solid
Source§fn abstract_geometry_mut(&mut self) -> &mut AbstractGeometry
fn abstract_geometry_mut(&mut self) -> &mut AbstractGeometry
AbstractGeometry base data.fn set_srs_name(&mut self, srs_name: impl Into<String>)
fn set_srs_name_opt(&mut self, srs_name: Option<String>)
fn clear_srs_name(&mut self)
fn set_srs_dimension(&mut self, srs_dimension: u32)
fn set_srs_dimension_opt(&mut self, srs_dimension: Option<u32>)
fn clear_srs_dimension(&mut self)
Source§impl AsAbstractGml for Solid
impl AsAbstractGml for Solid
Source§fn abstract_gml(&self) -> &AbstractGml
fn abstract_gml(&self) -> &AbstractGml
AbstractGml base data.Source§impl AsAbstractGmlMut for Solid
impl AsAbstractGmlMut for Solid
Source§fn abstract_gml_mut(&mut self) -> &mut AbstractGml
fn abstract_gml_mut(&mut self) -> &mut AbstractGml
AbstractGml base data.Source§fn set_id_opt(&mut self, id: Option<Id>)
fn set_id_opt(&mut self, id: Option<Id>)
fn set_names(&mut self, names: Vec<Code>)
fn push_name(&mut self, name: Code)
fn extend_names(&mut self, names: impl IntoIterator<Item = Code>)
Source§impl AsAbstractObject for Solid
impl AsAbstractObject for Solid
fn abstract_object(&self) -> &AbstractObject
Source§impl AsAbstractObjectMut for Solid
impl AsAbstractObjectMut for Solid
fn abstract_object_mut(&mut self) -> &mut AbstractObject
Source§impl AsAbstractSolid for Solid
impl AsAbstractSolid for Solid
fn abstract_solid(&self) -> &AbstractSolid
Source§impl AsAbstractSolidMut for Solid
impl AsAbstractSolidMut for Solid
fn abstract_solid_mut(&mut self) -> &mut AbstractSolid
Source§impl ComputeEnvelope for Solid
impl ComputeEnvelope for Solid
Source§fn compute_envelope(&self) -> Option<Envelope>
fn compute_envelope(&self) -> Option<Envelope>
Returns the union of the bounding boxes of all surface members.
Source§impl<'a> From<&'a Solid> for AbstractSolidKindRef<'a>
impl<'a> From<&'a Solid> for AbstractSolidKindRef<'a>
Source§impl<'a> From<&'a Solid> for AbstractGeometricPrimitiveKindRef<'a>
impl<'a> From<&'a Solid> for AbstractGeometricPrimitiveKindRef<'a>
Source§impl<'a> From<&'a Solid> for AbstractGeometryKindRef<'a>
impl<'a> From<&'a Solid> for AbstractGeometryKindRef<'a>
Source§impl From<Solid> for AbstractSolidKind
impl From<Solid> for AbstractSolidKind
Source§impl From<Solid> for AbstractGeometricPrimitiveKind
impl From<Solid> for AbstractGeometricPrimitiveKind
Source§impl From<Solid> for AbstractGeometryKind
impl From<Solid> for AbstractGeometryKind
Source§impl From<Solid> for AbstractGmlKind
impl From<Solid> for AbstractGmlKind
Source§impl From<Solid> for AbstractObjectKind
impl From<Solid> for AbstractObjectKind
Source§impl HasGeometryType for Solid
impl HasGeometryType for Solid
fn geometry_type(&self) -> GeometryType
Source§impl IterGeometries for Solid
impl IterGeometries for Solid
fn iter_geometries( &self, ) -> Box<dyn Iterator<Item = AbstractGeometryKindRef<'_>> + '_>
impl StructuralPartialEq for Solid
Source§impl Triangulate for Solid
impl Triangulate for Solid
Source§fn triangulate(&self) -> Result<Triangulation, Error>
fn triangulate(&self) -> Result<Triangulation, Error>
Triangulates the exterior shell and all interior shells into a single
TriangulatedSurface covering the full boundary of this solid.
§Errors
Returns Error::MissingExteriorShell if the solid has no exterior shell.
Returns Error::UnresolvedShellReference if any shell property carries only
an xlink:href that has not been resolved into an inline object.
Propagates any error from [Shell::triangulate].
Source§impl<'a> TryFrom<AbstractGeometricPrimitiveKindRef<'a>> for &'a Solid
impl<'a> TryFrom<AbstractGeometricPrimitiveKindRef<'a>> for &'a Solid
Source§impl TryFrom<AbstractGeometryKind> for Solid
impl TryFrom<AbstractGeometryKind> for Solid
Source§impl<'a> TryFrom<AbstractGeometryKindRef<'a>> for &'a Solid
impl<'a> TryFrom<AbstractGeometryKindRef<'a>> for &'a Solid
Source§impl TryFrom<AbstractGmlKind> for Solid
impl TryFrom<AbstractGmlKind> for Solid
Source§impl TryFrom<AbstractObjectKind> for Solid
impl TryFrom<AbstractObjectKind> for Solid
Source§impl TryFrom<AbstractSolidKind> for Solid
impl TryFrom<AbstractSolidKind> for Solid
Auto Trait Implementations§
impl Freeze for Solid
impl RefUnwindSafe for Solid
impl Send for Solid
impl Sync for Solid
impl Unpin for Solid
impl UnsafeUnpin for Solid
impl UnwindSafe for Solid
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.