def CreateCircle( self, colour, radius ): # Create a circle arc = Arc( radius, numSegs=64, axis=Vec3(0, 1, 0) ) arc.setColorScale( colour ) arc.setLightOff() arc.reparentTo( self ) # Set the billboard effect arc.setBillboardPointEye() return arc
def CreateRing( self, vector, colour, lookAt ): # Create the billboard effect bbe = BillboardEffect.make( vector, False, True, 0, lookAt, (0, 0, 0) ) # Create an arc arc = Arc( numSegs=32, degrees=180, axis=Vec3(0, 0, 1) ) arc.setH( 180 ) arc.setEffect( bbe ) # Create the axis from the arc axis = Axis( self.name, vector, colour ) axis.AddGeometry( arc, sizeStyle=SCALE ) axis.AddCollisionSolid( self.collSphere, sizeStyle=SCALE ) axis.reparentTo( self ) return axis