git-svn-id: svn://db.shs.com.ru/libs@695 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -264,10 +264,10 @@ Mesh * Primitive::cylinder(int segments, float radius, float height, float end_a
|
|||||||
|
|
||||||
|
|
||||||
Mesh * Primitive::arrow(int segments, float thick, float angle) {
|
Mesh * Primitive::arrow(int segments, float thick, float angle) {
|
||||||
double cone_r = 2. * thick;
|
double cone_r = 1.5 * thick;
|
||||||
double cone_h = 1.5 * cone_r / tan(angle * deg2rad);
|
double cone_h = 1.5 * cone_r / tan(angle * deg2rad);
|
||||||
Mesh * ret = new Mesh();
|
Mesh * ret = new Mesh();
|
||||||
Mesh * m = Primitive::cylinder(segments, thick, 1. - cone_h);
|
Mesh * m = Primitive::cylinder(segments, thick / 2., 1. - cone_h);
|
||||||
ret->append(m);
|
ret->append(m);
|
||||||
delete m;
|
delete m;
|
||||||
m = Primitive::cone(segments, cone_r, cone_h);
|
m = Primitive::cone(segments, cone_r, cone_h);
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ RendererService::RendererService(Renderer * r_): r(r_) {
|
|||||||
size_vp_scale = size_full_scale = 1.;
|
size_vp_scale = size_full_scale = 1.;
|
||||||
box_mesh = Primitive::cube(0.8, 0.8, 0.8);
|
box_mesh = Primitive::cube(0.8, 0.8, 0.8);
|
||||||
box_mesh_f = Primitive::cubeFrame(0.8, 0.8, 0.8);
|
box_mesh_f = Primitive::cubeFrame(0.8, 0.8, 0.8);
|
||||||
omni_mesh = Primitive::ellipsoid(2, 1);
|
omni_mesh = Primitive::ellipsoid(2, 1, 0.5);
|
||||||
omni_mesh_f = Primitive::ellipsoidFrame(2, 1);
|
omni_mesh_f = Primitive::ellipsoidFrame(2, 1, 0.5);
|
||||||
omni_mesh ->scalePoints(1.5);
|
omni_mesh ->scalePoints(1.5);
|
||||||
omni_mesh_f->scalePoints(1.5);
|
omni_mesh_f->scalePoints(1.5);
|
||||||
cone_mesh = Primitive::cone(8, 0.5, 1.);
|
cone_mesh = Primitive::cone(8, 0.5, 1.);
|
||||||
|
|||||||
Reference in New Issue
Block a user