| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Graphene.Structs.Ray
Description
A ray emitted from an origin in a given direction.
The contents of the graphene_ray_t structure are private, and should not
be modified directly.
Since: 1.4
Synopsis
- newtype Ray = Ray (ManagedPtr Ray)
- newZeroRay :: MonadIO m => m Ray
- noRay :: Maybe Ray
- rayAlloc :: (HasCallStack, MonadIO m) => m Ray
- rayEqual :: (HasCallStack, MonadIO m) => Ray -> Ray -> m Bool
- rayFree :: (HasCallStack, MonadIO m) => Ray -> m ()
- rayGetClosestPointToPoint :: (HasCallStack, MonadIO m) => Ray -> Point3D -> m Point3D
- rayGetDirection :: (HasCallStack, MonadIO m) => Ray -> m Vec3
- rayGetDistanceToPlane :: (HasCallStack, MonadIO m) => Ray -> Plane -> m Float
- rayGetDistanceToPoint :: (HasCallStack, MonadIO m) => Ray -> Point3D -> m Float
- rayGetOrigin :: (HasCallStack, MonadIO m) => Ray -> m Point3D
- rayGetPositionAt :: (HasCallStack, MonadIO m) => Ray -> Float -> m Point3D
- rayInit :: (HasCallStack, MonadIO m) => Ray -> Maybe Point3D -> Maybe Vec3 -> m Ray
- rayInitFromRay :: (HasCallStack, MonadIO m) => Ray -> Ray -> m Ray
- rayInitFromVec3 :: (HasCallStack, MonadIO m) => Ray -> Maybe Vec3 -> Maybe Vec3 -> m Ray
Exported types
Memory-managed wrapper type.
Constructors
| Ray (ManagedPtr Ray) |
Methods
Overloaded methods
alloc
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m Ray | Returns: the newly allocated |
equal
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ray |
|
| -> Ray |
|
| -> m Bool | Returns: |
Checks whether the two given Ray are equal.
Since: 1.4
free
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ray |
|
| -> m () |
Frees the resources allocated by rayAlloc.
Since: 1.4
getClosestPointToPoint
rayGetClosestPointToPoint Source #
Computes the point on the given Ray that is closest to the
given point p.
Since: 1.4
getDirection
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ray |
|
| -> m Vec3 |
Retrieves the direction of the given Ray.
Since: 1.4
getDistanceToPlane
rayGetDistanceToPlane Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ray |
|
| -> Plane |
|
| -> m Float | Returns: the distance of the origin of the ray from the plane |
Computes the distance of the origin of the given Ray from the
given plane.
If the ray does not intersect the plane, this function returns INFINITY.
Since: 1.4
getDistanceToPoint
rayGetDistanceToPoint Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ray |
|
| -> Point3D |
|
| -> m Float | Returns: the distance of the point |
Computes the distance from the origin of the given ray to the given point.
Since: 1.4
getOrigin
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ray |
|
| -> m Point3D |
Retrieves the origin of the given Ray.
Since: 1.4
getPositionAt
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ray |
|
| -> Float |
|
| -> m Point3D |
Retrieves the coordinates of a point at the distance t along the
given Ray.
Since: 1.4
init
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ray |
|
| -> Maybe Point3D |
|
| -> Maybe Vec3 |
|
| -> m Ray | Returns: the initialized ray |
Initializes the given Ray using the given origin
and direction values.
Since: 1.4