| Copyright | (c) 2011 diagrams-lib team (see LICENSE) |
|---|---|
| License | BSD-style (see LICENSE) |
| Maintainer | diagrams-discuss@googlegroups.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Diagrams.ThreeD.Shapes
Description
Various three-dimensional shapes.
- class Skinned t where
- data Ellipsoid n = Ellipsoid (Transformation V3 n)
- sphere :: Num n => Ellipsoid n
- data Box n = Box (Transformation V3 n)
- cube :: Num n => Box n
- data Frustum n = Frustum n n (Transformation V3 n)
- frustum :: Num n => n -> n -> Frustum n
- cone :: Num n => Frustum n
- cylinder :: Num n => Frustum n
- data CSG n
- = CsgEllipsoid (Ellipsoid n)
- | CsgBox (Box n)
- | CsgFrustum (Frustum n)
- | CsgUnion [CSG n]
- | CsgIntersection [CSG n]
- | CsgDifference (CSG n) (CSG n)
- union :: (CsgPrim a, CsgPrim b) => a n -> b n -> CSG n
- intersection :: (CsgPrim a, CsgPrim b) => a n -> b n -> CSG n
- difference :: (CsgPrim a, CsgPrim b) => a n -> b n -> CSG n
Skinned class
class Skinned t where Source #
Types which can be rendered as 3D Diagrams.
Minimal complete definition
Methods
skin :: (Renderable t b, N t ~ n, TypeableFloat n) => t -> QDiagram b V3 n Any Source #
Basic 3D shapes
Constructors
| Ellipsoid (Transformation V3 n) |
Instances
| OrderedField n => Enveloped (Ellipsoid n) Source # | |
| OrderedField n => Traced (Ellipsoid n) Source # | |
| Fractional n => Transformable (Ellipsoid n) Source # | |
| OrderedField n => Skinned (Ellipsoid n) Source # | |
| Fractional n => Renderable (Ellipsoid n) NullBackend Source # | |
| (Num n, Ord n) => HasQuery (Ellipsoid n) Any Source # | |
| type V (Ellipsoid n) Source # | |
| type N (Ellipsoid n) Source # | |
Constructors
| Box (Transformation V3 n) |
Instances
| OrderedField n => Enveloped (Box n) Source # | |
| (Fractional n, Ord n) => Traced (Box n) Source # | |
| Fractional n => Transformable (Box n) Source # | |
| OrderedField n => Skinned (Box n) Source # | |
| Fractional n => Renderable (Box n) NullBackend Source # | |
| (Num n, Ord n) => HasQuery (Box n) Any Source # | |
| type V (Box n) Source # | |
| type N (Box n) Source # | |
cube :: Num n => Box n Source #
A cube with side length 1, in the positive octant, with one vertex at the origin.
Constructors
| Frustum n n (Transformation V3 n) |
Instances
| (OrderedField n, RealFloat n) => Enveloped (Frustum n) Source # | |
| (RealFloat n, Ord n) => Traced (Frustum n) Source # | |
| Fractional n => Transformable (Frustum n) Source # | |
| Skinned (Frustum n) Source # | |
| Fractional n => Renderable (Frustum n) NullBackend Source # | |
| OrderedField n => HasQuery (Frustum n) Any Source # | |
| type V (Frustum n) Source # | |
| type N (Frustum n) Source # | |
cone :: Num n => Frustum n Source #
A cone with its base centered on the origin, with radius 1 at the base, height 1, and it's apex on the positive Z axis.
cylinder :: Num n => Frustum n Source #
A circular cylinder of radius 1 with one end cap centered on the origin, and extending to Z=1.
Constructive solid geometry
A tree of Constructive Solid Geometry operations and the primitives that can be used in them.
Constructors
| CsgEllipsoid (Ellipsoid n) | |
| CsgBox (Box n) | |
| CsgFrustum (Frustum n) | |
| CsgUnion [CSG n] | |
| CsgIntersection [CSG n] | |
| CsgDifference (CSG n) (CSG n) |
Instances
| RealFloat n => Enveloped (CSG n) Source # | The Envelope for an Intersection or Difference is simply the Envelope of the Union. This is wrong but easy to implement. |
| (RealFloat n, Ord n) => Traced (CSG n) Source # | |
| Fractional n => Transformable (CSG n) Source # | |
| (RealFloat n, Ord n) => Skinned (CSG n) Source # | |
| (Floating n, Ord n) => HasQuery (CSG n) Any Source # | |
| type V (CSG n) Source # | |
| type N (CSG n) Source # | |
intersection :: (CsgPrim a, CsgPrim b) => a n -> b n -> CSG n Source #
difference :: (CsgPrim a, CsgPrim b) => a n -> b n -> CSG n Source #