mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027832: Visualization - Scaled zbuffer trihedron
Code cleanup and test case modified.
This commit is contained in:
@@ -415,9 +415,9 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
|
||||
Standard_Real anAxialX = anAxialScale.X();
|
||||
Standard_Real anAxialY = anAxialScale.Y();
|
||||
Standard_Real anAxialZ = anAxialScale.Z();
|
||||
if (anAxialX > 0 && anAxialY > 0 && anAxialZ > 0)
|
||||
if (anAxialX > 0.0 && anAxialY > 0.0 && anAxialZ > 0.0)
|
||||
{
|
||||
Graphic3d_TransformUtils::Scale(aWorldView, 1.0 / anAxialX, 1.0 / anAxialY, 1.0 / anAxialZ);
|
||||
Graphic3d_TransformUtils::Scale (aWorldView, 1.0 / anAxialX, 1.0 / anAxialY, 1.0 / anAxialZ);
|
||||
}
|
||||
|
||||
Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z());
|
||||
|
@@ -1,16 +1,22 @@
|
||||
puts "========"
|
||||
puts "0025340: 0027832: Visualization - Scaled zbuffer trihedron"
|
||||
puts "0027832: Visualization - Scaled zbuffer trihedron"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
pload ALL
|
||||
pload MODELING VISUALIZATION
|
||||
vinit
|
||||
box b 10 10 10
|
||||
vdisplay b
|
||||
vfit
|
||||
vsetdispmode 1
|
||||
vzbufftrihedron -on
|
||||
#draw initial picture of box without visual scale
|
||||
vdump $imagedir/${casename}_unscaled.png
|
||||
|
||||
#draw picture of box after visual scale
|
||||
#and zoomed out
|
||||
vscale 1 3 10
|
||||
vzoom 0.99
|
||||
|
||||
set color_1 [vreadpixel 55 360 -rgb -name]
|
||||
set color_2 [vreadpixel 50 350 -rgb -name]
|
||||
@@ -37,4 +43,4 @@ if {$color_3 != "GREEN3"} {
|
||||
puts " current color is: $color_3"
|
||||
}
|
||||
|
||||
vdump $imagedir/${casename}.png
|
||||
vdump $imagedir/${casename}_scaled.png
|
||||
|
Reference in New Issue
Block a user