Class: Mittsu::TorusKnotGeometry
- Defined in:
- lib/mittsu/extras/geometries/torus_knot_geometry.rb
Instance Attribute Summary
Attributes inherited from Geometry
#bounding_box, #bounding_sphere, #colors, #dynamic, #face_vertex_uvs, #faces, #has_tangents, #id, #line_distances, #morph_colors, #morph_normals, #morph_targets, #name, #skin_indices, #skin_weights, #type, #uuid, #vertices
Instance Method Summary collapse
-
#initialize(radius = 100.0, tube = 40.0, radial_segments = 64, tubular_segments = 8, p_val = 2, q_val = 3) ⇒ TorusKnotGeometry
constructor
A new instance of TorusKnotGeometry.
Methods inherited from Geometry
#apply_matrix, #center, #clone, #compute_bounding_box, #compute_bounding_sphere, #compute_face_normals, #compute_line_distances, #compute_morph_normals, #compute_tangents, #compute_vertex_normals, #dispose, #from_buffer_geometry, #merge, #merge_mesh, #merge_vertices, #to_json
Methods included from EventDispatcher
#add_event_listener, #dispatch_event, #has_event_listener, #remove_event_listener
Constructor Details
#initialize(radius = 100.0, tube = 40.0, radial_segments = 64, tubular_segments = 8, p_val = 2, q_val = 3) ⇒ TorusKnotGeometry
Returns a new instance of TorusKnotGeometry.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/mittsu/extras/geometries/torus_knot_geometry.rb', line 7 def initialize(radius = 100.0, tube = 40.0, radial_segments = 64, tubular_segments = 8, p_val = 2, q_val = 3) super() @type = 'TorusKnotGeometry' @parameters = { radius: radius, tube: tube, radial_segments: radial_segments, tubular_segments: tubular_segments, p_val: p_val, q_val: q_val } from_buffer_geometry(TorusKnotBufferGeometry.new(radius, tube, tubular_segments, radial_segments, p_val, q_val)) merge_vertices end |