#include <polymesh.hpp>
Inherits renderstack::shapes::polymesh.
Public Member Functions | |
cube (double r=1.0) |
Definition at line 95 of file polymesh.hpp.
renderstack::shapes::cube::cube | ( | double | r = 1.0 |
) |
Definition at line 1004 of file polymesh.cpp.
01005 { 01006 push_point(-r / sq3, r / sq3, r / sq3); 01007 push_point( r / sq3, r / sq3, r / sq3); 01008 push_point( r / sq3, -r / sq3, r / sq3); 01009 push_point(-r / sq3, -r / sq3, r / sq3); 01010 push_point(-r / sq3, r / sq3, -r / sq3); 01011 push_point( r / sq3, r / sq3, -r / sq3); 01012 push_point( r / sq3, -r / sq3, -r / sq3); 01013 push_point(-r / sq3, -r / sq3, -r / sq3); 01014 01015 make_polygon( 0, 1, 2, 3 ); 01016 make_polygon( 0, 3, 7, 4 ); 01017 make_polygon( 0, 4, 5, 1 ); 01018 make_polygon( 6, 7, 4, 5 ); 01019 make_polygon( 6, 5, 1, 2 ); 01020 make_polygon( 6, 2, 3, 7 ); 01021 01022 build_mesh_from_geometry(); 01023 }