'From Squeak3.1alpha of 28 February 2001 [latest update: #4119] on 3 June 2001 at 1:56:55 pm'! "Change Set: RenamePoohActor Date: 3 June 2001 Author: Andreas Raab Automatically name Pooh created objects as 'sketch'."! !WonderlandCameraMorph methodsFor: 'pooh' stamp: 'ar 6/3/2001 13:55'! createPoohActor | actor pointList box scale center subdivision mesh tex | pointList _ self outline. pointList reset. pointList _ pointList contents. pointList size < 2 ifTrue:[ self clearStroke. ^errorSound play]. pointList _ self simplify: pointList. pointList _ self smoothen: pointList length: 10. pointList _ self regularize: pointList. box _ Rectangle encompassing: pointList. scale _ bounds extent y * 0.5. scale _ 1.0 / (scale @ scale negated). center _ box origin + box corner * 0.5. pointList _ pointList collect:[:each| each - center * scale]. subdivision _ PoohSubdivision constraintOutline: pointList. mesh _ subdivision build3DObject. mesh ifNil:[ errorSound play. ] ifNotNil:[ actor _ self getWonderland makeActorNamed: 'sketch'. actor setProperty: #handmade toValue: true; setBackfaceCulling: #ccw; setMesh: mesh; setColor: gray. Preferences twoSidedPoohTextures ifTrue:[tex _ (Form extent: 256@512 depth: 32) asTexture fillColor: Color white] ifFalse:[tex _ (Form extent: 256@256 depth: 32) asTexture fillColor: Color white]. actor setTexturePointer: tex. actor setComposite: (myCamera getMatrixFromRoot composedWithLocal: (B3DMatrix4x4 withOffset: 0@0@2)). actor scaleByMatrix: (B3DRotation axis: 0@1@0 angle: 90) asMatrix4x4. actor rotateByMatrix: (B3DRotation axis: 0@1@0 angle:-90) asMatrix4x4. ]. self clearStroke. self mode: nil. Cursor normal show. ! !