N-Quad

#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------

Gnome::Graphene::N-Quad

Description

A 4 vertex quadrilateral, as represented by four Gnome::Graphene::N-Point.

The contents of a Gnome::Graphene::N-Quad are private and should never be accessed directly.

#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------

Class initialization

new

:native-object

Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object :$native-object! )

#-------------------------------------------------------------------------------

alloc

Allocates a new Gnome::Graphene::N-Quad instance.

The contents of the returned instance are undefined.

method alloc ( --> Gnome::Graphene::Quad \)

#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------

Methods

#-------------------------------------------------------------------------------

bounds

Computes the bounding rectangle of $q and places it into $r.

method bounds ( CArray[N-Rect] $r )
  • $r; return location for a Gnome::Graphene::N-Rect.

#-------------------------------------------------------------------------------

contains This function is not yet available

Checks if the given Gnome::Graphene::N-Quad contains the given Gnome::Graphene::N-Point.

method contains ( CArray[N-Point] $p )
  • $p; a Gnome::Graphene::N-Point.

#-------------------------------------------------------------------------------

free

Frees the resources allocated by .alloc()

method free ( )

#-------------------------------------------------------------------------------

get-point This function is not yet available

Retrieves the point of a Gnome::Graphene::N-Quad at the given index.

method get-point ( … --> CArray[N-Point] )
  • index; the index of the point to retrieve. Note that each argument must be specified as a type followed by its value!

Return value; a Gnome::Graphene::N-Point.

#-------------------------------------------------------------------------------

init

Initializes a Gnome::Graphene::N-Quad with the given points.

method init ( CArray[N-Point] $p1, CArray[N-Point] $p2, CArray[N-Point] $p3, CArray[N-Point] $p4 --> CArray[N-Quad] )
  • $p1; the first point of the quadrilateral.

  • $p2; the second point of the quadrilateral.

  • $p3; the third point of the quadrilateral.

  • $p4; the fourth point of the quadrilateral.

Return value; the initialized Gnome::Graphene::N-Quad.

#-------------------------------------------------------------------------------

init-from-points

Initializes a Gnome::Graphene::N-Quad using an array of points.

method init-from-points ( CArray[N-Point] $points --> CArray[N-Quad] )
  • $points; an array of 4 Gnome::Graphene::N-Point.

Return value; the initialized Gnome::Graphene::N-Quad.

#-------------------------------------------------------------------------------

init-from-rect

Initializes a Gnome::Graphene::N-Quad using the four corners of the given Gnome::Graphene::N-Rect.

method init-from-rect ( CArray[N-Rect] $r --> CArray[N-Quad] )
  • $r; a Gnome::Graphene::N-Rect.

Return value; the initialized Gnome::Graphene::N-Quad.

Gnome::Graphene v0.1.11

Graphene is a library of data types commonly used to implement 2D-in-3D or full 3D canvases

Authors

  • Marcel Timmerman

License

Artistic-2.0

Dependencies

Gnome::GObject:api<2>Gnome::Glib:api<2>Gnome::N:api<2>

Test Dependencies

Provides

  • Gnome::Graphene::N-Box
  • Gnome::Graphene::N-Euler
  • Gnome::Graphene::N-Frustum
  • Gnome::Graphene::N-Matrix
  • Gnome::Graphene::N-Plane
  • Gnome::Graphene::N-Point
  • Gnome::Graphene::N-Point3D
  • Gnome::Graphene::N-Quad
  • Gnome::Graphene::N-Quaternion
  • Gnome::Graphene::N-Ray
  • Gnome::Graphene::N-Rect
  • Gnome::Graphene::N-Size
  • Gnome::Graphene::N-Sphere
  • Gnome::Graphene::N-Triangle
  • Gnome::Graphene::N-Vec2
  • Gnome::Graphene::N-Vec3
  • Gnome::Graphene::N-Vec4
  • Gnome::Graphene::T-box
  • Gnome::Graphene::T-config
  • Gnome::Graphene::T-euler
  • Gnome::Graphene::T-frustum
  • Gnome::Graphene::T-matrix
  • Gnome::Graphene::T-plane
  • Gnome::Graphene::T-point
  • Gnome::Graphene::T-point3d
  • Gnome::Graphene::T-quad
  • Gnome::Graphene::T-quaternion
  • Gnome::Graphene::T-ray
  • Gnome::Graphene::T-rect
  • Gnome::Graphene::T-size
  • Gnome::Graphene::T-sphere
  • Gnome::Graphene::T-triangle
  • Gnome::Graphene::T-vec

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.