Package Documentation

Object: GLOBAL-POLYGON-PROJECTION (The :GEOM-BASE Package)
Mixins: IFS-OUTPUT-MIXIN, BASE-OBJECT

Description

A polygon ``extruded'' for a given distance along a single vector. For planar polygons, the projection vector must not be orthogonal to the normal of the plane of the polygon. The vertices and projection-vector are given in the global coordinate system, so the local center and orientation do not affect the positioning or orientation of this part.


Input Slots (required)

PROJECTION-DEPTH number

The resultant distance from the two end faces of the extrusion.


VERTEX-LIST list of 3d points

The vertex list making up the polyline, same as the input for global-polyline.



Input Slots (optional)

HIDDEN? [from VANILLA-MIXIN*] boolean

Indicates whether the object should effectively be a hidden-object even if specified in :objects. Default is nil.


IMAGE-FILE [from BASE-OBJECT] pathname or string

Points to a pre-existing image file to be displayed instead of actual geometry for this object. Defaults to nil


LOCAL-BOX [from BASE-OBJECT] list of two 3d points

The left front bottom and right rear top corners, in global coordinates, of the rectangular volume bounding this geometric object.


OBLIQUENESS [from BASE-OBJECT] 3x3 orthonormal matrix of double-float numbers

This is synonymous with the orientation.


OFFSET keyword symbol

The direction of extrusion with respect to the vertices in vertex-list and the projection-vector:

  • :up Indicates to start from current location of vertices and move in the direction of the projection-vector.
  • :down Indicates to start from current location of vertices and move in the direction opposite the projection-vector.
  • :center Indicates to start from current location of vertices and move in the direction of the projection-vector and opposite the projection-vector, going half the projection-depth in each direction.


ONCLICK-FUNCTION [from BASE-OBJECT] lambda function of zero arguments, or nil

If non-nil, this function gets invoked when the user clicks the object in graphics front-ends which support this functionality, e.g. SVG/Raphael and X3DOM.


PROJECTION-VECTOR 3d vector

Indicates the straight path along which the extrusion should occur.


ROOT [from VANILLA-MIXIN*] gdl instance

The root-level node in this object's ``tree'' (instance hierarchy).


SAFE-CHILDREN [from VANILLA-MIXIN*] list of gdl instances

All objects from the :objects specification, including elements of sequences as flat lists. Any children which throw errors come back as a plist with error information


STRINGS-FOR-DISPLAY [from VANILLA-MIXIN*] string or list of strings

Determines how the name of objects of this type will be printed in most places. This defaults to the name-for-display (generally the part's name as specified in its parent), followed by an index number if the part is an element of a sequence.


VISIBLE-CHILDREN [from VANILLA-MIXIN*] list of gdl instances

Additional objects to display in Tatu tree. Typically this would be a subset of hidden-children. Defaults to NIL.



Input Slots (optional, defaulting)

CENTER [from BASE-OBJECT] 3d point

Indicates in global coordinates where the center of the reference box of this object should be located.


DISPLAY-CONTROLS [from BASE-OBJECT] plist

May contain keywords and values indicating display characteristics for this object. The following keywords are recognized currently:

:color
color keyword from the *color-table* parameter, or an HTML-style hexidecimal RGB string value, e.g. "#FFFFFF" for pure white. Defaults to :black.
:line-thickness
an integer, defaulting to 1, indicating relative line thickness for wireframe representations of this object.
:dash-pattern
(currently PDF/PNG/JPEG only). This is a list of two or three numbers which indicate the length, in pixels, of the dashes and blank spaces in a dashed line. The optional third number indicates how far into the line or curve to start the dash pattern.


HEIGHT [from BASE-OBJECT] number

Z-axis dimension of the reference box. Defaults to zero.


LENGTH [from BASE-OBJECT] number

Y-axis dimension of the reference box. Defaults to zero.


ORIENTATION [from BASE-OBJECT] 3x3 matrix of double-float numbers

Indicates the absolute Rotation Matrix used to create the coordinate system of this object. This matrix is given in absolute terms (i.e. with respect to the root's orientation), and is generally created with the alignment function. It should be an orthonormal matrix, meaning each row is a vector with a magnitude of one (1.0).


WIDTH [from BASE-OBJECT] number

X-axis dimension of the reference box. Defaults to zero.



Computed Slots

BOUNDING-BOX [from BASE-OBJECT] list of two 3d points

The left front bottom and right rear top corners, in global coordinates, of the rectangular volume bounding the tree of geometric objects rooted at this object.


Examples


  (in-package :gdl-user)

  (define-object global-polygon-projection-sample (global-polygon-projection)
    :computed-slots
    ((display-controls (list :color :gold-old :transparency 0.3))
     (projection-depth 5)
     (vertex-list (list (make-point 0 0 0)
                        (make-point 10 10 0)
                        (make-point 30 10 0)
                        (make-point 40 0 0)
                        (make-point 30 -10 0)
                        (make-point 10 -10 0)
                        (make-point 0 0 0)))))

  (generate-sample-drawing :objects (make-object 'global-polygon-projection-sample)
                           :projection-direction (getf *standard-views* :trimetric))  

  

Package Documentation