def __init__(self, name): GeomNode.__init__(self, name) ls = LineSegs() ls.setThickness(5) ls.drawTo(Point3(0, 0, 0)) ls.drawTo(Point3(100, 100, 100)) self.addGeomsFrom(ls.create()) print ls
def __init__(self, name, halfedge_mesh, color, wireframe=False): GeomNode.__init__(self, name) self._halfedge_mesh = halfedge_mesh self._color = color self._wireframe = wireframe self._create_vertex_data() self._create_geoms() # set visualisation parameters if self._wireframe: self.setAttrib(RenderModeAttrib.make(RenderModeAttrib.MWireframe, 2, 1)) self.setAttrib(CullFaceAttrib.make(CullFaceAttrib.MCullNone))
def __init__(self, name, points, color=(1.0,1.0,1.0,1.0)): GeomNode.__init__(self, name) self._points = points self._color = color self._create_vertex_data() self._create_geom_primitives() self._create_geoms() # set visualisation parameters #if self._wireframe: # self.setAttrib(RenderModeAttrib.make(RenderModeAttrib.MWireframe, 2, 1)) #self.setAttrib(CullFaceAttrib.make(CullFaceAttrib.MCullNone)) self.setAttrib(RenderModeAttrib.make(RenderModeAttrib.MWireframe, 2, 0))
def __init__(self, name, surface, color, wireframe=False): GeomNode.__init__(self, name) self._surface = surface self._color = color self._wireframe = wireframe self._init_tables() self._create_vertex_data() self._create_geoms() # set visualisation parameters if self._wireframe: self.setAttrib(RenderModeAttrib.make(RenderModeAttrib.MWireframe, 2, 1)) else: self.setAttrib(RenderModeAttrib.make(RenderModeAttrib.MFilledFlat, 2, 1)) self.setAttrib(CullFaceAttrib.make(CullFaceAttrib.MCullNone))
def __init__(self, name, width, height, points, normals=[], color=(1.0,1.0,1.0,1.0), wireframe=False): GeomNode.__init__(self, name) self._width = width self._height = height assert(len(points) == self._width * self._height) if normals: assert(len(normals) == self._width * self._height) self._points = points self._normals = normals self._color = color self._wireframe = wireframe self._create_vertex_data() self._create_geom_primitives() self._create_geoms() # set visualisation parameters if self._wireframe: self.setAttrib(RenderModeAttrib.make(RenderModeAttrib.MWireframe, 2, 1)) self.setAttrib(CullFaceAttrib.make(CullFaceAttrib.MCullNone))