X hits on this document

80 views

0 shares

0 downloads

0 comments

18 / 30

0.400000,

0.600000,

0.800000,

1.000000,

breve.createInstances( breve.Step, 1 ).create( breve.vector(

  • -

    0.400000, 0 ), breve.vector( 0.200000, 0.020000, 1 ) ) breve.createInstances( breve.Step, 1 ).create( breve.vector(

  • -

    0.600000, 0 ), breve.vector( 0.200000, 0.020000, 1 ) ) breve.createInstances( breve.Step, 1 ).create( breve.vector(

  • -

    0.800000, 0 ), breve.vector( 0.200000, 0.020000, 1 ) ) breve.createInstances( breve.Step, 1 ).create( breve.vector(

  • -

    1.000000, 0 ), breve.vector( 0.200000, 0.020000, 1 ) ) breve.createInstances( breve.Step, 1 ).create( breve.vector(

2.000000,

  • -

    1.200000, 0 ), breve.vector( 2, 0.020000, 1 ) ) breve.createInstances( breve.Balls, 5 ) self.pointCamera( breve.vector( 1.000000, -0.800000,

  • -

    0.600000 ),

breve.vector( 3.500000, 1.100000, 5.000000 self.enableShadowVolumes() self.addMenu( '''Reset Ball'''

,

)

)

'resetBall'

)

def resetBall( self ): self.theBall.reset()

breve.Gravity = Gravity class Step( breve.Stationary ):

def __init__( self ): breve.Stationary.__init__( self )

def create( self, location, sizeVector ): stepShape = None

stepShape = breve.createInstances( breve.Cube, 1 ).initWith(

sizeVector )

self.setShape( stepShape ) self.move( location )

breve.Step = Step class Ball( breve.Mobile ): def __init__( self ): breve.Mobile.__init Ball.init( self )

__

( self )

def init( self ):

self.setShape( breve.createInstances ( 0.050000 + breve.randomExpression( 0.150000 ) self.enablePhysics() self.reset()

) ( breve.Sphere, 1 ).initWith( ))

def iterate( self ):

if ( self.getLocation().y < -2.000000 ): self.reset()

def reset( self ): self.setColor( breve.randomExpression( breve.vector( 1, 1, 1 ) ) self.move( ( breve.vector( -0.900000, 0.500000, -1 ) + breve.randomExpression( breve.vector( 1.500000, 0.800000, 2 ) ) ) )

)

Document info
Document views80
Page views80
Page last viewedMon Jan 16 20:20:32 UTC 2017
Pages30
Paragraphs495
Words6732

Comments