def revalidate_bounding_box(self): GLGeometricBase.revalidate_bounding_box(self) radius = self.get_radius() self.bounding_box.extend_with_corners(numpy.array([ [-radius, -radius, -radius], [ radius, radius, radius] ]))
def draw(self): GLGeometricBase.draw(self) vb = context.application.vis_backend vb.push_matrix() for i in range(2): for i in range(4): self.draw_spike() vb.rotate(90, 1.0, 0.0, 0.0) vb.rotate(180, 0.0, 1.0, 0.0) vb.pop_matrix()
def draw(self): GLGeometricBase.draw(self) ColorMixin.draw(self) vb = context.application.vis_backend x, y, z = numpy.identity(3) sides = numpy.array([(x, y, z, z), (x, y, -z, -z), (y, z, x, x), (y, z, -x, -x), (z, x, y, y), (z, x, -y, -y)], float) sides[:, :3] *= 0.5 * self.size vb.draw_quads(*[(normal, [ a + b + c, a - b + c, -a - b + c, -a + b + c, ]) for a, b, c, normal in sides])
def draw(self): GLGeometricBase.draw(self) ColorMixin.draw(self) vb = context.application.vis_backend x,y,z = numpy.identity(3) sides = numpy.array([(x,y,z,z), (x,y,-z,-z), (y,z,x,x), (y,z,-x,-x), (z,x,y,y), (z,x,-y,-y)], float) sides[:,:3] *= 0.5*self.size vb.draw_quads(*[ ( normal, [ a+b+c, a-b+c, -a-b+c, -a+b+c, ] ) for a,b,c,normal in sides ])
def draw(self): GLGeometricBase.draw(self) ColorMixin.draw(self) vb = context.application.vis_backend vb.draw_sphere(self.radius, self.quality)
def initnonstate(self): GLGeometricBase.initnonstate(self, Translation)
def revalidate_bounding_box(self): GLGeometricBase.revalidate_bounding_box(self) self.bounding_box.extend_with_corners([-self.radius*numpy.ones(3, float), self.radius*numpy.ones(3, float)])
def initnonstate(self): GLGeometricBase.initnonstate(self, Complete)
def revalidate_bounding_box(self): GLGeometricBase.revalidate_bounding_box(self) self.bounding_box.extend_with_corners( numpy.array([-0.5 * self.size, 0.5 * self.size]))
def revalidate_bounding_box(self): GLGeometricBase.revalidate_bounding_box(self) self.bounding_box.extend_with_corners(numpy.array([ [-self.spike_length, -self.spike_length, -self.spike_length], [ self.spike_length, self.spike_length, self.spike_length] ]))
def revalidate_bounding_box(self): GLGeometricBase.revalidate_bounding_box(self) self.bounding_box.extend_with_corners(numpy.array([ [-self.radius, -self.radius, -self.radius], [ self.radius, self.radius, self.radius] ]))
def revalidate_bounding_box(self): GLGeometricBase.revalidate_bounding_box(self) self.bounding_box.extend_with_corners( numpy.array( [[-self.spike_length, -self.spike_length, -self.spike_length], [self.spike_length, self.spike_length, self.spike_length]]))
def revalidate_bounding_box(self): GLGeometricBase.revalidate_bounding_box(self) self.bounding_box.extend_with_corners(numpy.array([-0.5*self.size, 0.5*self.size]))
def revalidate_bounding_box(self): GLGeometricBase.revalidate_bounding_box(self) radius = self.get_radius() self.bounding_box.extend_with_corners( numpy.array([[-radius, -radius, -radius], [radius, radius, radius]]))