Object: WEB-DRAWING (The :GWL Package) |
Mixins: RENDERER-MIXIN, BASE-DRAWING |
Input Slots (optional) | |
3D-BOX [from RENDERER-MIXIN] list of two 3d points | |
The left-front-lower and right-rear-upper corners of the axis-aligned bounding box of the object-roots and objects. | |
3D-BOX-CENTER [from RENDERER-MIXIN] 3d point | |
The effective view center for the scene contained in this view object. Defaults to the center of the bounding sphere of all the objects in the scene, consisting of the object-roots and the objects. | |
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. | |
BOUNDING-SPHERE [from RENDERER-MIXIN] plist containing keys: :center and :radius | |
This plist represents the tightest-fitting sphere around all the objects listed in the object-roots and the objects | |
FIELD-OF-VIEW-DEFAULT [from RENDERER-MIXIN] number in angular degrees | |
The maximum angle of the view frustrum for perspective views. Defaults to 0.1 (which results in a near parallel projection with virtually no perspective effect). | |
HEIGHT [from BASE-OBJECT] number | |
Z-axis dimension of the reference box. Defaults to zero. | |
HIDDEN? [from VANILLA-MIXIN*] boolean | |
Indicates whether the object should effectively be a hidden-object even if specified in :objects. Default is nil. | |
IMMUNE-OBJECTS list of gdl objects | |
These objects are not used in computing the scale or centering for the display list. Defaults to nil. | |
LENGTH [from BASE-OBJECT] number | |
Y-axis dimension of the reference box. Defaults to zero. | |
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. | |
OBJECT-ROOTS list of gdl objects | |
The leaves of each of these objects will be included in the geometry display. Defaults to nil. | |
OBJECTS list of gdl objects | |
These nodes (not their leaves but the actual objects) will be included in the geometry display. Defaults to nil. | |
OBLIQUENESS [from BASE-OBJECT] 3x3 orthonormal matrix of double-float numbers | |
This is synonymous with the orientation. | |
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. | |
PAGE-LENGTH [from BASE-DRAWING] number in pdf points | |
Front-to-back (or top-to-bottom) length of the paper being represented by this drawing. The default is (* 11 72) points, or 11 inches, corresponding to US standard letter-size paper. | |
PAGE-WIDTH [from BASE-DRAWING] number in pdf points | |
Left-to-right width of the paper being represented by this drawing. The default is (* 8.5 72) points, or 8.5 inches, corresponding to US standard letter-size paper. | |
PROJECTION-VECTOR 3d vector | |
This is the normal vector of the view plane onto which to project the 3D objects. Defaults to (getf *standard-views* :top). | |
RAPHAEL-CANVAS-ID string | |
Unique ID on the page for the raphael canvas div. By default this is passed in from the base-ajax-graphics-sheet and based on its root-path, but can be specified manually if you are making a web-drawing on your own. Defaults (in the standalone case) to "RaphaelCanvas" | |
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. | |
SVG-CLASS [from BASE-DRAWING] string with css classes | |
These classes will be included in any svg tag outputted from this drawing. | |
VIEW-VECTORS [from RENDERER-MIXIN] plist | |
Keys indicate view vector names (e.g. :trimetric), and values contain the 3D vectors. Defaults to the parameter *standard-views*, but with the key corresponding to current (the view) ordered first in the plist. This list of view-vectors is used to construct the default viewpoints. | |
VIEWPOINTS [from RENDERER-MIXIN] list of plists | |
Each plist contains, based on each entry in the view-vectors, keys:
| |
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. | |
WIDTH [from BASE-OBJECT] number | |
X-axis dimension of the reference box. Defaults to zero. | |
Input Slots (optional, defaulting) | |
DISPLAY-CONTROLS [from BASE-OBJECT] plist | |
May contain keywords and values indicating display characteristics for this object. The following keywords are recognized currently:
| |
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). | |
Computed Slots | |
CENTER [from BASE-OBJECT] 3d point | |
Indicates in global coordinates where the center of the reference box of this object should be located. | |
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 | |
Objects | |
MAIN-VIEW gdl object of type geom-base:base-view | |
This is the actual drawing view which is used to present the geometry. Defaults to an internally-computed object, this should not be overridden in user code. | |
(in-package :gwl-user) (define-object test-html-graphics-sheet (base-html-graphics-sheet) :objects ((b-splines :type 'test-b-spline-curves) (boxed-spline :type 'surf:boxed-curve :curve-in (the b-splines (curves 0)) :orientation (alignment :top (the (face-normal-vector :rear))) :show-box? t) (view-object :type 'web-drawing :page-length (the graphics-height value) :page-width (the graphics-width value) :projection-vector (getf *standard-views* (the view)) :object-roots (the ui-display-roots)) (graphics-height :type 'text-form-control :default 350) (graphics-width :type 'text-form-control :default 500) (bg-color :type 'text-form-control :default :black) (fg-color :type 'text-form-control :default :white)) :computed-slots ((background-color (lookup-color (the :bg-color value) :format :decimal)) (foreground-color (lookup-color (the :fg-color value) :format :decimal)) (view :trimetric :settable) ("list of gdl objects. Objects to be displayed in the graphics window." ui-display-roots (list (the b-splines) (the boxed-spline))))) (define-lens (html-format test-html-graphics-sheet)() :output-functions ((main-sheet () (with-html-output (*html-stream* nil :indent t) (:html (:head (:title "Test HTML Graphics Sheet")) (:body (when gwl:*developing?* (the write-development-links)) (:h2 (:center "Test HTML Graphics Sheet")) (with-html-form (:cl-who? t) (:table (:tr (:td (:ul (:li (str (the graphics-height html-string))) (:li (str (the graphics-width html-string))) (:li (str (the bg-color html-string))) (:li (str (the fg-color html-string)))) (:p (:input :type :submit :value " OK "))) (:td (write-the geometry))))))))))) (publish :path "/t-h-g-s" :function #'(lambda(req ent) (gwl-make-object req ent "gwl-user::test-html-graphics-sheet"))) (define-object test-b-spline-curves (base-object) :input-slots ((control-points (list (make-point 0 0 0) (make-point 2 3.0 0.0) (make-point 4 2.0 0.0) (make-point 5 0.0 0.0) (make-point 4 -2.0 0.0) (make-point 2 -3.0 0.0) (make-point 0 0 0)))) :objects ((curves :type 'surf:b-spline-curve :sequence (:size 6) :control-points (the control-points) :degree (1+ (the-child :index)) :display-controls (list :line-thickness (* 0.3 (the-child index)) :color (ecase (the-child index) (0 :red) (1 :orange) (2 :yellow) (3 :green) (4 :blue) (5 :red-violet)))) (points :type 'point :sequence (:size (length (rest (the control-points)))) :center (nth (the-child index) (rest (the control-points))) :display-controls (list :color :green))))