2022-03-02 20:11:01 +01:00
|
|
|
Class {
|
|
|
|
#name : #DiyaRectangle,
|
2022-03-06 18:33:10 +01:00
|
|
|
#superclass : #Diya2DPrimShape,
|
2022-03-02 20:11:01 +01:00
|
|
|
#category : #'Diya-Graphics'
|
|
|
|
}
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
2022-03-06 19:50:19 +01:00
|
|
|
DiyaRectangle >> initialize [
|
|
|
|
super initialize.
|
|
|
|
self extent:10@10.
|
|
|
|
translation := nil.
|
|
|
|
vbuffer := FFIExternalArray externalNewType: GLfloat size:24.
|
|
|
|
vbuffer autoRelease.
|
|
|
|
nvertices := 6
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
DiyaRectangle >> update [
|
2022-03-05 11:55:20 +01:00
|
|
|
{
|
2022-03-06 18:33:10 +01:00
|
|
|
0.0. extent y. 0.0. 0.0.
|
|
|
|
0. 0. 0.0. 1.0.
|
|
|
|
extent x. 0.0. 1.0. 1.0.
|
|
|
|
0.0. extent y. 0.0. 0.0.
|
|
|
|
extent x. 0.0. 1.0. 1.0.
|
|
|
|
extent x. extent y. 1.0. 0.0.
|
2022-03-06 19:50:19 +01:00
|
|
|
} doWithIndex: [:e :i| vbuffer at: i put: e].
|
|
|
|
^true
|
2022-03-02 20:11:01 +01:00
|
|
|
]
|