Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.Graphene.Structs.Point3D
Description
A point with three components: X, Y, and Z.
Since: 1.0
Synopsis
- newtype Point3D = Point3D (ManagedPtr Point3D)
- newZeroPoint3D :: MonadIO m => m Point3D
- point3DAlloc :: (HasCallStack, MonadIO m) => m Point3D
- point3DCross :: (HasCallStack, MonadIO m) => Point3D -> Point3D -> m Point3D
- point3DDistance :: (HasCallStack, MonadIO m) => Point3D -> Point3D -> m (Float, Vec3)
- point3DDot :: (HasCallStack, MonadIO m) => Point3D -> Point3D -> m Float
- point3DEqual :: (HasCallStack, MonadIO m) => Point3D -> Point3D -> m Bool
- point3DFree :: (HasCallStack, MonadIO m) => Point3D -> m ()
- point3DInit :: (HasCallStack, MonadIO m) => Point3D -> Float -> Float -> Float -> m Point3D
- point3DInitFromPoint :: (HasCallStack, MonadIO m) => Point3D -> Point3D -> m Point3D
- point3DInitFromVec3 :: (HasCallStack, MonadIO m) => Point3D -> Vec3 -> m Point3D
- point3DInterpolate :: (HasCallStack, MonadIO m) => Point3D -> Point3D -> Double -> m Point3D
- point3DLength :: (HasCallStack, MonadIO m) => Point3D -> m Float
- point3DNear :: (HasCallStack, MonadIO m) => Point3D -> Point3D -> Float -> m Bool
- point3DNormalize :: (HasCallStack, MonadIO m) => Point3D -> m Point3D
- point3DNormalizeViewport :: (HasCallStack, MonadIO m) => Point3D -> Rect -> Float -> Float -> m Point3D
- point3DScale :: (HasCallStack, MonadIO m) => Point3D -> Float -> m Point3D
- point3DToVec3 :: (HasCallStack, MonadIO m) => Point3D -> m Vec3
- point3DZero :: (HasCallStack, MonadIO m) => m Point3D
- getPoint3DX :: MonadIO m => Point3D -> m Float
- setPoint3DX :: MonadIO m => Point3D -> Float -> m ()
- getPoint3DY :: MonadIO m => Point3D -> m Float
- setPoint3DY :: MonadIO m => Point3D -> Float -> m ()
- getPoint3DZ :: MonadIO m => Point3D -> m Float
- setPoint3DZ :: MonadIO m => Point3D -> Float -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Point3D Source # | |
GBoxed Point3D Source # | |
Defined in GI.Graphene.Structs.Point3D | |
ManagedPtrNewtype Point3D Source # | |
Defined in GI.Graphene.Structs.Point3D Methods toManagedPtr :: Point3D -> ManagedPtr Point3D | |
TypedObject Point3D Source # | |
Defined in GI.Graphene.Structs.Point3D | |
HasParentTypes Point3D Source # | |
Defined in GI.Graphene.Structs.Point3D | |
tag ~ 'AttrSet => Constructible Point3D tag Source # | |
IsGValue (Maybe Point3D) Source # | Convert |
Defined in GI.Graphene.Structs.Point3D Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Point3D -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Point3D) | |
type ParentTypes Point3D Source # | |
Defined in GI.Graphene.Structs.Point3D |
Methods
Click to display all available methods, including inherited ones
Methods
cross, distance, dot, equal, free, init, initFromPoint, initFromVec3, interpolate, length, near, normalize, normalizeViewport, scale, toVec3.
Getters
None.
Setters
None.
alloc
Arguments
:: (HasCallStack, MonadIO m) | |
=> m Point3D | Returns: the newly allocated structure.
Use |
Allocates a Point3D
structure.
Since: 1.0
cross
Computes the cross product of the two given Point3D
.
Since: 1.0
distance
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> Point3D |
|
-> m (Float, Vec3) | Returns: the distance between two points |
Computes the distance between the two given Point3D
.
Since: 1.4
dot
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> Point3D |
|
-> m Float | Returns: the value of the dot product |
Computes the dot product of the two given Point3D
.
Since: 1.0
equal
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> Point3D |
|
-> m Bool | Returns: |
Checks whether two given points are equal.
Since: 1.0
free
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> m () |
Frees the resources allocated via point3DAlloc
.
Since: 1.0
init
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m Point3D | Returns: the initialized |
Initializes a Point3D
with the given coordinates.
Since: 1.0
initFromPoint
initFromVec3
interpolate
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> Point3D |
|
-> Double |
|
-> m Point3D |
Linearly interpolates each component of a
and b
using the
provided factor
, and places the result in res
.
Since: 1.0
length
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> m Float | Returns: the length of the vector represented by the point |
Computes the length of the vector represented by the
coordinates of the given Point3D
.
Since: 1.0
near
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> Point3D |
|
-> Float |
|
-> m Bool | Returns: |
Checks whether the two points are near each other, within
an epsilon
factor.
Since: 1.0
normalize
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> m Point3D |
Computes the normalization of the vector represented by the
coordinates of the given Point3D
.
Since: 1.0
normalizeViewport
point3DNormalizeViewport Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> Rect |
|
-> Float |
|
-> Float |
|
-> m Point3D |
scale
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> Float |
|
-> m Point3D |
Scales the coordinates of the given Point3D
by
the given factor
.
Since: 1.0
toVec3
Arguments
:: (HasCallStack, MonadIO m) | |
=> Point3D |
|
-> m Vec3 |
zero
Arguments
:: (HasCallStack, MonadIO m) | |
=> m Point3D | Returns: a zero point |
Retrieves a constant point with all three coordinates set to 0.
Since: 1.0
Properties
x
the X coordinate
getPoint3DX :: MonadIO m => Point3D -> m Float Source #
Get the value of the “x
” field.
When overloading is enabled, this is equivalent to
get
point3D #x
setPoint3DX :: MonadIO m => Point3D -> Float -> m () Source #
Set the value of the “x
” field.
When overloading is enabled, this is equivalent to
set
point3D [ #x:=
value ]
y
the Y coordinate
getPoint3DY :: MonadIO m => Point3D -> m Float Source #
Get the value of the “y
” field.
When overloading is enabled, this is equivalent to
get
point3D #y
setPoint3DY :: MonadIO m => Point3D -> Float -> m () Source #
Set the value of the “y
” field.
When overloading is enabled, this is equivalent to
set
point3D [ #y:=
value ]
z
the Z coordinate
getPoint3DZ :: MonadIO m => Point3D -> m Float Source #
Get the value of the “z
” field.
When overloading is enabled, this is equivalent to
get
point3D #z
setPoint3DZ :: MonadIO m => Point3D -> Float -> m () Source #
Set the value of the “z
” field.
When overloading is enabled, this is equivalent to
set
point3D [ #z:=
value ]