| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Waterfall.Solids
Synopsis
- data Solid
- emptySolid :: Solid
- unitCube :: Solid
- centeredCube :: Solid
- box :: V3 Double -> Solid
- unitSphere :: Solid
- unitCylinder :: Solid
- centeredCylinder :: Solid
- unitCone :: Solid
- torus :: Double -> Double -> Solid
- tetrahedron :: Solid
- octahedron :: Solid
- dodecahedron :: Solid
- icosahedron :: Solid
- prism :: Double -> Shape -> Solid
- volume :: Solid -> Double
- centerOfMass :: Solid -> V3 Double
- momentOfInertia :: V3 Double -> V3 Double -> Solid -> Double
Documentation
The Boundary Representation of a solid object.
Alternatively, a region of 3d Space.
Under the hood, this is represented by an OpenCascade Shape.
The underlying shape should either be a Solid, or a CompSolid.
While you shouldn't need to know what this means to use the library,
please feel free to report a bug if you're able to construct a Solid
where this isnt' the case (without using internal functions).
Instances
| Monoid Solid Source # | |
| Semigroup Solid Source # | While The Semigroup from |
| BoundedJoinSemiLattice Solid Source # | |
Defined in Waterfall.Internal.Solid | |
| Lattice Solid Source # | |
| Boolean Solid Source # | |
| Transformable Solid Source # | |
Defined in Waterfall.Transforms | |
emptySolid :: Solid Source #
An empty solid
Be warned that complement emptySolid does not appear to work correctly.
A cube with side lengths of 1, one vertex on the origin, another on \( (1, 1, 1) \)
centeredCube :: Solid Source #
A cube with side lengths of 1, centered on the origin
unitSphere :: Solid Source #
A sphere with radius of 1, centered on the origin
unitCylinder :: Solid Source #
A cylinder with radius 1, length 1, one of it's circular faces centered on the origin, the other centered on \( (0, 0, 1) \)
centeredCylinder :: Solid Source #
A cylinder with radius 1, length 1, centered on the origin,
A cone With a point at the origin and a circular face with Radius 1, centered on \( (0, 0, 1) \)
Arguments
| :: Double | The Major Radius (Distance from center of torus to center of cube) |
| -> Double | The Minor Radius (Distance from center of torus to center of ) |
| -> Solid |
A Torus, with the axis of revolution about the Z axis
Warning, this will generate malformed geometry if asked to generate a Spindle Torus (when the Major Radius is smaller than the Minor Radius)
tetrahedron :: Solid Source #
Regular Tetrahedron with unit side lengths
One vertex is in the Z direction
octahedron :: Solid Source #
Regular Octahedron with unit side lengths
The vertices of the Octahedra lie on the X, Y and Z axes
dodecahedron :: Solid Source #
Regular Dodecahedron with unit side lengths
icosahedron :: Solid Source #
Regular Icosahedron with unit side lengths