diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-30 07:57:54 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-30 07:57:54 -0500 |
commit | 642c0c594a8abe05be1cb887110ed3e602cd0e48 (patch) | |
tree | 2f4aced5b03abb0b8e4532f2676a18f8387895f7 /src/core-units/container.lisp | |
parent | 099c3f927c11fe7ae4d12933d6f72abc0b53e973 (diff) |
[structure] renamed some asd modules
Diffstat (limited to 'src/core-units/container.lisp')
-rw-r--r-- | src/core-units/container.lisp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/core-units/container.lisp b/src/core-units/container.lisp deleted file mode 100644 index af01ff1..0000000 --- a/src/core-units/container.lisp +++ /dev/null @@ -1,32 +0,0 @@ -;;;; units/container.lisp - -(in-package #:wheelwork) - - -(defclass/std container (unit) - ((units :with :a)) - (:documentation "Just a list of units. Made into a class so that - transformation affine transformations methods can be specialzied on - whole groups of units")) - -(defmethod drop-unit ((unit unit)) - "Removes a unit from its container. Returns T if the unit actually was removed." - (when-let (container (unit-container unit)) - (setf - (container-units container) (delete unit (container-units container)) - (unit-container unit) nil) - t)) - -(defmethod add-unit ((container container) (unit unit)) - "Adds a unit to the end of a container (thus affecting render -order). Makes sure to remove the unit from its current container if -necessary." - (when (unit-container unit) - (drop-unit unit)) - (push unit (container-units container)) - (setf (unit-container unit) container) - unit) - -(defmethod cleanup ((container container)) - (dolist (u (container-units container)) - (cleanup u))) |