File: geoclasses.l

package info (click to toggle)
euslisp 9.31%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 55,448 kB
  • sloc: ansic: 41,610; lisp: 3,339; makefile: 286; sh: 238; asm: 138; python: 53
file content (167 lines) | stat: -rw-r--r-- 4,332 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
;;;; Class Definitions for Geometric Modeling
;;	1988
;;	Copyright (c) 1988, 1991,
;;	Toshihiro Matsui, Electrotechnical Laboratory
;;
;;	Dec/1991	symbol names exported to make use of packages
;;			All these classes are defined in GEOMETRY package.

(in-package "GEOMETRY")
;; export class names
(export 
      '(coordinates cascaded-coords bounding-box surrounding-box
	line edge winged-edge plane polygon face hole
	faceset
	body sphere
 	edge-image face-image
	viewing projection viewing2d parallel-viewing
	perspective-viewing stereo-viewing viewport viewer viewsurface))

;; Hirukawa's
(export '(constrained-point constraint-relation))

;; export slot names
(export '(pvert nvert vertices edges faces holes box worldcoords
	  pface nface angle
	  normal distance
	  model-normal model-distance model-vertices 
	  convexp evetedp csg
	  mbody primitive-face id flags))

;; export slot access macros
(export '(bounding-box-minpoint bounding-box-maxpoint
	  line-plist line-pvert line-nvert
	  edge-plist edge-pvert edge-nvert edge-pface edge-nface edge-angle
	  plane-normal plane-distance plane-plist
	  polygon-normal polygon-distance polygon-plist
	  polygon-vertices polygon-edges
	  face-plist face-normal face-distance face-edges face-vertices
	  face-convexp
	  faceset-plist faceset-box faceset-edges faceset-vertices faceset-faces 
	  body-plist body-box body-edges body-vertices body-faces body-csg
	  body-model-vertices body-convexp
	  viewing-viewcoords
	  viewer-eye viewer-port viewer-surface))


;;; Coordinates

(defclass coordinates
  :super propertied-object
  :slots (rot pos))

(defclass cascaded-coords
  :super coordinates
  :slots (parent descendants worldcoords manager changed))

;;; Geopack
(defclass bounding-box
  :super object
  :slots (minpoint maxpoint))

(defclass line :super propertied-object :slots (pvert nvert))

(defclass edge  :super line
  :slots (pface nface
	  (angle :type float)	;angle between adjacent faces
	  (flags :type integer)
	 ))

(defclass winged-edge :super edge
  :slots (pwing pcwing nwing ncwing))

(defclass plane :super propertied-object
  :slots
  ((normal   :type float-vector)	;surface normal #f(a b c)
   (distance :type float)	;distance to self
   ))
(defclass polygon
  :super  plane
  :slots
  (convexp	;if convex, t, concave, nil;
   edges		;profile edge list
   vertices	;profile vertex list
   (model-normal :type float-vector) ;surface-normal before transformation
   (model-distance :type float)
   ))

(defclass face :super polygon
		:slots (holes mbody primitive-face id))

(defclass hole :super polygon :slots (myface))

(defclass faceset :super cascaded-coords
	:slots	(box		;bounding box
		 faces
		 edges
		 vertices
		 model-vertices))

(defclass body  :super faceset
	  :slots (
		 convexp	;
		 evertedp
		 csg
		 ))

;; Hirukawa's constraint motion planning

(defclass constrained-point
  :super object
  :slots (position hisposition hisface myneighborhood condition))


(defclass constraint-relation
  :super object
  :slots (constraining-body constrained-body constraints))



(defclass sphere :super cascaded-coords
		 :slots (radius))

;;; hidden-line
(defclass edge-image
  :super object
  :slots
  ((edge3 :type edge)
   (homo-pvert :type float-vector)
   (homo-nvert :type float-vector) ;projected vertices
   (pvert2 :type float-vector)
   (nvert2 :type float-vector)	;normal coords representation
   segments
   (contourp)
   ))

(defclass face-image :super object
	:slots ((box :type bounding-box)
		edge-images
		(face3d :type face)
		distance))

;;; Viewing, Viewport, Viewsurface, Viewer

(defclass viewing :super cascaded-coords  :slots (viewcoords)) 
(defclass projection :super viewing
	  :slots ((screenx :type float)
		  (screeny :type float)
		  (hither :type float)
		  (yon :type float)
		  projection-matrix))
(defclass viewing2d :super projection)
(defclass parallel-viewing :super projection)
(defclass perspective-viewing :super projection
	  :slots ((viewdistance :type float)))
(defclass stereo-viewing 
  :slots (viewpoint offset target rightview leftview))

(defclass viewport :super coordinates)

(defclass viewer :super propertied-object
	:slots (eye port surface alt-surface))

(defclass viewsurface :super propertied-object)


(provide :geoclasses "@(#)$Id: geoclasses.l,v 1.1.1.1 2003/11/20 07:46:28 eus Exp $")