1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

210 Commits

Author SHA1 Message Date
osa
3bffef5524 0022582: Visualization - provide an API for dumping a sub-region of the viewport
Graphic3d_Camera definition has been exended by optional Tile property (Graphic3d_CameraTile structure).
V3d_View::ToPixMap() now performs tiled dump when image size exceeds hardware limits.

OpenGl_View::Redraw() - fixed dump of immediate Z layers in no stereo and no MSAA case.

OpenGl_Context now tracks viewport values.
Draw Harness command vdump has been extended with new argument -tileSize.
2016-09-01 13:19:11 +03:00
kgv
3e05329c4c 0027751: Visualization, Graphic3d_ClipPlane - add option to inherit material from object
Graphic3d_ClipPlane - Graphic3d_AspectFillArea3d is now stored as class field.
OpenGl_CappingAlgo::RenderCapping() now handles special mode
preserving material from rendered object.

MeshVS_ElementalColorPrsBuilder::Build() now creates single primitives group
for triangles, thus Closed flag is correctly applied.

Redundant methods OpenGl_Structure::DrawGroups() and ::renderClosedGeometry()
have been removed.

Draw Harness, ViewerTest - vaspects now preserves display mode
and location when assigning sub-shape aspects.
The syntax of command vclipplane has been revised
(preserving compatibility with old syntax):
- Use "-param" style syntax for all arguments.
- Eliminate redundant arguments "change", "view", "object".
- Allow passing multiple parameters withing single call.
- Do not require "create" command - create new plane implicitly.
- "maxplanes" argument does not require view name anymore.
- "delete" does not throws TCL exception for non-existing plane.
- "view" argument without list now applies to active view.
- Handle * and ALL withing "delete" to remove all defined planes.

update test case bugs/vis/bug26028
2016-08-11 13:55:33 +03:00
kgv
521b0d7f81 0027755: Visualization, V3d_View::ToPixMap() - fix image dump with MSAA turned on
OpenGl_View::Redraw() now handles correctly myTransientDrawToFront
with MSAA turned on and resolution not equal to window size.
2016-08-11 12:37:01 +03:00
kgv
30c1ef75af 0027727: Visualization, Graphic3d_ArrayOfPrimitives::SetVertexColor() - define opaque color for RGB input 2016-08-04 11:20:12 +03:00
kgv
be3752526f 0027715: Visualization - turn off deprecated OpenGL fixed-function pipeline by default
OpenGl_Caps - flag ffpEnable is now initialized to false on desktop OpenGL.
OpenGl_Context::init() - now prints error if OpenGL version does not support GLSL
and switches OpenGl_Caps::ffpEnable to true.

update test cases
2016-07-28 15:14:12 +03:00
kgv
f9ba5c4ddd 0027617: Visualization, TKOpenGl - apply highlighting color without disabling lighting
Update colors in test cases
2016-06-23 18:15:04 +03:00
aba
91d9637224 0027536: Visualization - incorrect behavior of zoom persisted objects
1) Zoom persistence mode now fixes object in pixel coordinates and  is independent on view size

2) Used gp_GTrsf instead of gp_Trsf SelectMgr_ViewerSelector to store  Graphic3d_Mat4d

3) Zoom persisted objects changed behavior (become bigger) therefore test cases were updated according to new state.

4) Corrected scale for rectangular frustum

Updated test for manipulator
2016-06-09 12:29:09 +03:00
apl
625e195819 0027038: Visualization - add new presentation for object manipulation
AIS_Manipulator class has been created to provide interactive services for manipulating with mouse local transformations of other interactive objects.

The class features three kinds of transformation modes for attached objects:
- translation of through axis
- scaling within axis
- rotation around axis

For more details please have a look at description of the class in reference manual or in header file.

The patch includes DRAW test workbench for evaluating the AIS_Manipulator features.

Clang warning (override)
2016-06-02 14:23:22 +03:00
kgv
f68acbf47a 0027286: Visualization, TKOpenGl - avoid using light index within built-in GLSL programs for simplest configuration
OpenGl_ShaderManager::stdComputeLighting() - handle single directional light specifically
for compatibility with broken OpenGL ES drivers.

Added test cases using built-in GLSL shading programs.
2016-03-28 17:31:04 +03:00
ski
4b3541c68b 0027176: Configuration, CMake - INSTALL_DIR is a common prefix for all other install variables
Possibility to customize layout of installation of OCCT is introduced by:
- variable INSTALL_DIR_LAYOUT - select one of the two predefined layouts: either Windows (classic OCCT layout) or Unix (Linux standard)
- variables INSTALL_DIR_* (BIN, LIB, INCLUDE, RESOURCE, DOC, TESTS, SCRIPT, SAMPLES, DATA) - specify locations of relevant components
- variable INSTALL_DIR_WITH_VERSION (bool) - specifies whether full version of OCCT should be used in paths in Unix layout

Files LICENSE_LGPL_21.txt and OCCT_LGPL_EXCEPTION.txt are always installed.

Environment is extended to support non-default layouts.
For that, environment variables "CSF_OCCT*Path" are defined, corresponding to CMake variables INSTALL_DIR_* described above.
Visual Studio environment, DRAW, tests, samples are amended to use these variables instead of (or as alternative to) CASROOT.

Settings of Products-specific vars are removed from environment scripts.

File genconf.bat was corrected to avoid error message for the case when path to TCL contains spaces.

Product name in rc files changed to "Open CASCADE Technology".
2016-03-18 09:44:11 +03:00
kgv
3c4b62a436 0026711: Visualization, TKOpenGl - support creation of multisampling off-screen FBOs
OpenGl_Texture::Init2DMultisample() - new method to initialize multisampled texture.
Graphic3d_RenderingParams::NbMsaaSamples - add option defining MSAA samples number.

RayTracing will keep using FBO without MSAA, however it is possible to combine
MSAA for rasterization and FSAA for RayTracing.

OpenGl_FrameBuffer constructor has been changed to do not take arguments.
OpenGl_FrameBuffer::Init() method has been extended with mandatory parameters
defining Color and Depth attachment formats
and optional parameter defining number of MSAA parameters.

Draw Harness, add option -msaa to vrenderparams.
2015-10-29 13:28:11 +03:00
apl
bf02aa7d7d 0026617: Visualization, Ray Tracing - adopt progressive rendering Path Tracing for rendering stereoscopic pair
- Use two different FBOs for accumulating frames for left/right eye projection.
- Added equality checks to camera modification methods to avoid camera updates when performing identity operations.
2015-10-22 11:00:08 +03:00
kgv
79f4f03618 0026122: Visualization, TKOpenGl - clipping and capping is broken when ffp is disabled on Linux
OpenGl_Clipping - do not setup clipping planes using FFP when it is disabled.

OpenGl_ShaderManager - apply 2d texture coordinates transformation in GLSL programs.
OpenGl_Context::SetTextureMatrix() - move texture matrix assignment from OpenGl_Workspace::setTextureParams() to OpenGl_Context.

Add test case demo/samples/dimensionsglsl with FFP turned OFF.
Add test case v3d/glsl/texture_trsf applying texture transformation.

Small correction of test case for issue CR26122
2015-10-22 10:28:59 +03:00
kgv
6ce0df1e78 0026765: Visualization - drop TKVoxel toolkit 2015-10-15 10:58:58 +03:00
isk
27af30526d 0025777: the standard views are defined incorrectly and mismatch the old display.
Old vright equals new vfront, old vfront equals new vright, old vleft equals new vback, old vback equals new vleft.
2015-09-10 16:36:40 +03:00
isk
6fb1a930e2 0024387: Tests - use system-independent fonts in test cases
Add a new parameter "-font FontName" to the command "vdimension".
Tuning of test-cases
2015-08-27 15:30:18 +03:00
isk
ac84fcf602 0024272: Provide basic text formatting routines for Font_BRepFont
Add new class Font_BRepTextBuilder for generation of formatted BRep text.
Delete method Font_BRepFont::RenderText(), which should be replaced by Font_BRepTextBuilder::Perform().
2015-08-27 15:30:11 +03:00
isz
61b0191c54 0026490: Visualization - implement draw commands 'voverlaytext' and 'vlayerline' using AIS_InteractiveObject class
Command 'voverlaytext' was removed, its functionality was transfered to command 'vdrawtext'. Corresponding test cases were updated.
Command 'vlayerline' was implemented on AIS.
2015-08-13 10:59:10 +03:00
kgv
f978241fb6 0025556: Visualization - support stereo pair formats recognized by consumer display devices
Graphic3d_StereoMode - add new enumeration for stereoscopic outputs:
- Graphic3d_StereoMode_QuadBuffer
- Graphic3d_StereoMode_Anaglyph
- Graphic3d_StereoMode_RowInterlaced
- Graphic3d_StereoMode_ColumnInterlaced
- Graphic3d_StereoMode_ChessBoard
- Graphic3d_StereoMode_SideBySide
- Graphic3d_StereoMode_OverUnder

Graphic3d_RenderingParams - add new options controlling stereo output:
- StereoMode
- ToReverseStereo
- AnaglyphFilter

OpenGl_ShaderManager - add predefined GLSL programs for new stereo outputs.
OpenGl_Workspace::Redraw() - do not implicitly disable stereo to allow stereo dump as is.
OpenGl_Caps - add flag swapInterval to control VSync.
OpenGl_Workspace::BufferDump() - handle cases with non-applicable GL_PACK_ROW_LENGTH.

CALL_DEF_WINDOW - drop unused fields; add fields "left" and "top"
to reverse stereo pair for interlaced output depending on window position.

Draw Harness, ViewerTest:
- Extend syntax of command vstereo to setup stereo.
- Extend vdump command to allow dump of stereoscopic pair in different formats.
- Extend command vcaps with option vsync.
- Use mouse scroll to zoom and adjust ZFocus in WinAPI.
- Use "/" and "*" to adjust IOD.

v3d/glsl/stereo - add test case for stereo modes.

Cocoa_LocalPool, OSD_EnvironmentIterator - fix compilation issues on OS X Snow Leopard.
2015-06-20 16:08:12 +03:00
isk
ac116c221f 0025305: Visualization, TKOpenGl - support stipple line aspects within built-in GLSL programs
OpenGl_LineAttributes - drop display lists for stipple lines.
OpenGl_Context - add methods OpenGl_Context::SetTypeOfLine() and OpenGl_Context::SetLineWidth() to setup line aspects.
OpenGl_ShaderManager::prepareStdProgramFlat() - support new bit OpenGl_PO_StippleLine.

vaspects command - add -setlinetype option.
2015-06-10 11:06:05 +03:00
dbp
189f85a3fd 0025201: Visualization - Implementing soft shadows and ambient occlusion in OCCT ray-tracing core 2015-06-10 10:56:24 +03:00
dln
e837410dac 0024927: Getting rid of "Persistent" functionality -- Tests
All uses of "MDTV-Standard" and "MDTV-Design" in tests changed to "BinOcaf", and "MDTV-XCAF" changed to "BinXCAF".
Formats changed: .std to .cbf, .dxc to .dbf.

Test groups renamed accordingly:
xcaf: brep_to_dxc -> brep_to_xbf, igs_to_dxc -> igs_to_xbf, stp_to_dxc -> stp_to_xbf, dxc -> xbf/A1, dxc_add_CL -> xbf_add_CL
xml: ocaf_std -> ocaf_cbf, xcaf_dxc -> xcaf_xbf
2015-05-21 14:52:32 +03:00
isk
29e2c6d247 0022785: Draw Harness - add possibility to remove a text drawn by the command vdrawtext
AIS_TextLabel - new public class to display simple text labels (based on MyTextClass private class from Draw Harness).
ViewerTest::Display() - add more reliable replacement for VDisplayAISObject() with no viewer update flag.

vdrawtext command redesign:
- Use new AIS_TextLabel class instead of private MyTextClass.
- Take object name and allow to clear labels from the Viewer.
- Use parameter name + parameter value syntax instead of strict list of mandatory arguments.
- Use [0; 1] range for colors and accept names.
- Drop redundant argument "isMultiByte".
- Support argument -noupdate to skip Viewer update.

Update test cases to new syntax of vdrawtext.
2015-05-06 15:06:47 +03:00
dbp
cf537aacf7 0026070: Ray tracing with reflections is poor on rotated presentation
Test case for issue CR26070
2015-04-16 11:05:37 +03:00
vpa
f751596e46 0024623: Visualization - improve selection mechanism
Redesign of selection mechanism:
- implemented 3-level BVH tree for selection;
- selection now calculates in 3D space;
- intersection tests were moved to SelectMgr_BaseFrustum descendants;
- removed .cdl files in Select3D and .cdl related to selection in MeshVS;
- SelectMgr_ViewerSelectors are now shared between local and global contexts;
- transformations of sensitive entities are now stored in SelectMgr_SelectableObject only. Sensitive entities are independent from transformations, it is applied to SelectMgr_SelectingVolumeManager instance only;
- connected and multiple connected interactive objects are now represented by their child objects only for SelectMgr_SelectionManager;
- if interactive object has child objects, they will be stored as separate objects in SelectMgr_SelectionManager now.
- test cases bugs/vis/bug24623_1, bug24623_2, bug24623_3, bug24623_4 to test performance and memory issues.
2015-04-06 17:27:38 +03:00
dbp
1804bb99a6 0025833: Visualization, ray tracing - Problems with the backside of triangles
Backside triangles are handled correctly by implementing two-sided lighting model. Ray-tracing shader was optimized (up to 25% performance increase).

Test case for CR25833
2015-04-02 14:38:42 +03:00
osa
4c5133866b 0023200: Visualization - prevent multiple triangulating of a shape that already has been triangulated
Add new flag IsAutoTriangulated to Prs3d_Drawer. It is True by default.
If this flag is True automatic re-triangulation with deflection-check logic will be applied.
Else this feature will be disable and triangulation is expected to be computed by application itself.

Change the syntax of vdefalts command.
Add new parameter -autoTriang for check of AutoTriangulated functionality.

Adjust camera position in test case bugs/xde/bug23969
2015-03-05 14:49:32 +03:00
kgv
95b2678c73 0025822: Visualization, TKOpenGl - front material should be used instead of back material within distinguish mode turned off
add test case v3d/glsl/distinguish_off
2015-02-12 15:50:25 +03:00
isk
4ca4bbe8bd 0025436: Visualization - AIS_InteractiveContext::HilightPreviousDetected() should switch from first value in the list to the last 2014-11-21 14:02:43 +03:00
dbp
25ef750e44 025306: Visualization, TKOpenGl - support texturing within RayTracing
Fix bug with overlay OpenGL text.
2014-10-23 16:20:36 +04:00
kgv
6b62b2da81 0025291: Draw Harness, ViewerTest - replace command vchangecamera to vcamera and improve syntax
Make vcamera command syntax more clear.
Restore command vraytrace as alias to vrenderparams.
Replace occurencies of atof() by Draw::Atof() in ViewerTest_ViewerCommands.cxx.
2014-10-02 14:25:55 +04:00
vro
8e7c8ccf3a 0025098: Visualization, Select3D_SensitiveCurve - fix computation of the depth
Draw Harness, add option -entities to command vstate.
Within new option command displays information about detection entities.
2014-10-02 13:50:03 +04:00
abv
476e84b169 Added info on VTK availability in dversion command; VTK tests are corrected to report SKIPPED status if VIS is not available 2014-09-26 17:29:03 +04:00
anv
709e97a0c1 0024961: MeshVS: revision of DRAW commands
meshfromstl - display MeshVS_Mesh object in a way consistent with vdisplay command
meshdel - deleted, vremove to be used instead
meshshowall - set empty maps of hidden IDs instead of null handles
meshhidesel - initialize the maps of hidden IDs to avoid exception
meshmat - add optional transparency argument and enable transparency in the viewer if not yet done
meshvectors - command for testing VectorPrsBuilder added

MeshVS: DRAW commands improving
Updating test cases due to previous changes
Small bug in MeshVS_ElementalColorPrsBuilder fixed
vselmode fix
Small correction of test cases for issue CR24961
2014-09-26 16:27:01 +04:00
apl
d33222c108 0025129: Visualization - add interactive object for Points Cloud objects
New class AIS_PointCloud for displaying point sets.
Update Graphic3d_ArrayOfPoints, OpenGl_PrimitiveArray and OpenGl_VertexBuffer classes to be able to use normals for points.

Add Draw Harness command vpointcloud.
Add test case v3d/point_cloud/sphere.

Move protected method AIS_Shape::DisplayBox() to public function StdPrs_WFDeflectionRestrictedFace::AddBox().

Small correction of grids.list for v3d tests
2014-09-25 15:58:15 +04:00
aba
52f99d93a9 0022877: Implementation of DRAW commands for non-regression testing:
- TKIVtkDraw toolkit provides IVtk packages functionality in DRAW.

- it allows to create VTK interactive view in regular or virtual mode (virtual windows),
  display OCC objects and dump them.

- TKIVtkDraw provides also test commands: ivtlinit, ivtkdisplay, ivtkerase, ivtksetdispmode,
   ivtksetselmode, ivtkmoveto, ivtkselect, ivtkfit, ivtkdump, ivtkbgcolor.

Corrected offscreen rendering mode.

Moved vinit command from /v3d/begin script to avoid unused occ view in ivtk tests.
2014-09-11 13:39:44 +04:00
duv
0717ddc132 0024837: Visualization - revise design and implementation of connected Interactive Objects
0023422: Selection problems when using SetLocation.
0024756: AIS_ConnectedInteractive does not support nested AIS_ConnectedInteractive
0025103: Visualization - Regression in interactive detection

Each PrsMgr_PresentableObject has list of PrsMgr _PresentableObject called myChildren.
Transformation PrsMgr_PresentableObject applied to its children every time when its own transformation affected. This hierarchy does not propagate to Graphic3d level and below.

PrsMgr_PresentableObject send its combined (according to hierarchy) transform down to Graphic3d_Structure.

AIS_ConnectedInteractive and AIS_MultiplyConnectedInteractive are reused but behavior has been changed.

AIS_ConnectedInteractive now is an instance of object. It reuses geometry of connected object but have own transformation, material, visibility flag etc. This connection propagated down to OpenGl level to OpenGl_Structure. For this task old “connected” mechanism has been reused.

AIS_MultiplyConnectedInteractive represents assembly which doesn’t have its own presentation. Assemblies are able to participate is scene hierarchy and intended to handle a grouped set of instanced objects. It behaves as single object in terms of selection. It applies high level transform to all sub-elements since it located above in the hierarchy.

All AIS_MultiplyConnectedInteractive are able to have child assemblies. Deep copy of object instances performed when one assembly attached to another.

Correction test cases for CR24837

Test cases for issue CR23422

Test cases for issue CR24756

Test cases for issue CR25103

Viewer3d sample fixed.
2014-08-28 17:38:17 +04:00
duv
0e330c8cf5 0024872: Support of emission color in Phong shader and ray-tracing
Test cases for issue CR24872
2014-07-24 12:59:19 +04:00
osa
a89742cf17 0024819: TKOpenGl - extend the ray-tracing core by visualization of lines, text and point sprites
OpenGl_GraphicDriver::Redraw() - do not recompute structures more than required
OpenGl_Workspace::Raytrace() - bind proper FBO before clearing it
Visual3d_View::Redraw() - perform automatic 2nd redraw on device lost
2014-07-03 15:50:27 +04:00
dbp
bc8c79bbd5 0024887: Visualization - revise and extend Raytracing controls
Fix material test case.
Fix ray-tracing test case and sample.
2014-05-22 19:00:18 +04:00
duv
dc9ef964d2 0024864: Implementing refractions in ray-tracing
Refraction index passed to raytrace shader.
For transparent objects implemented ray refraction according to refraction index.
Transparent materials modified to look better with refractions.
2014-05-22 18:19:18 +04:00
dbp
44c7c33eb0 0024855: Revision of parameters of standard materials
Improve consistency and visual appearance of predefined OCCT materials in various rendering modes, including ray-tracing:
- Increase the specular exponents (shininesses) for metallic surfaces: Brass, Bronze, Copper, Gold, Pewter, Silver, Steel, Chrome, Aluminum.
- Revise specular colors for metals: Copper, Gold, Aluminum, Silver (according to "Real-Time Rendering, 3rd Edition", AK Peters 2008).
- Increase diffuse reflection of metals: Silver, Aluminum, Chrome (to make them brighter in OpenGL mode).
- Extend Material definition by Refraction Index.
  Advanced rendering methods based on shaders or ray-tracing can utilize it to produce refraction effects.

In addition:
- Introduce three translucent materials: Water, Glass, and Diamond.
- Add Charcoal for modeling dark diffuse surfaces.

Add new TCL-based sample (materials.tcl) and test case (tests/v3d/materials/bug24855).
2014-05-15 19:59:28 +04:00
dbp
fc73a20256 0024739: TKOpenGl - port ray-tracing from OpenCL to GLSL for better integration and portability
RayTracing - disable reflections by default
Fix possible compilation issue on Mac OS X.
2014-04-04 14:15:08 +04:00
kgv
34db9c0093 0024688: Draw Harness - vdump command makes snapshot only for the first view 2014-03-13 14:27:58 +04:00
apl
197ac94e72 0024413: Visualization - get rid of projection shift from orthographic camera definition
From now on, the panning behavior of V3d_View completely corresponds to equal operations with camera. There is no more confusing "Center" property and "ProjectionShift" which were used to introduce composite panning, while respecting view referential points: At, Eye unchanged. The V3d_View::FitAll approach has been rewritten to do "fit all" geometrically, operating with frustum, to make it working for both orthographic and perspective projections.

1) Getting rid of ProjectionShift and Center property:
- Removed ProjectionShift property of Graphic3d_Camera.
- Removed confusing Center property of V3d_View (related to projection shift).
- Removed redundant code related to the Center property of V3d_View.
- Removed WindowLimit method of Graphic3d_Camera - no more used.

2) Improvements of fit all and selector:
- Improved FitAll operation of V3d_View and reused it in NIS_View - the perspective projection is now handled correctly.
- Revised code of Select3D_Projector class - can be defined with any given projection and model-view matrices.
- Modified StdSelect_ViewerSelector3d and ensured that panning, zooming and going into the view do not lead to unwanted re-projection of sensitives. The handling of perspective selection is revised.
- Take into account graphical boundaries of infinite structure on ZFitAll.

3) Improvements of camera:
- Introduced new z range scale parameter for V3d_View::AutoZFit. See, V3d_View::AutoZFitMode.
- Allow negative ZNear, ZFar for orthographic camera to avoid clipping of viewed model.
- Moved camera ZNear, ZFar validity checks to V3d_View level.
- Use more meaningful Standard_ShortReal relative precision for ZNear, ZFar ranges computed by ZFitAll.
- Use Standard_Real type for camera projection and orientation matrices.
- Extended camera to generate both Standard_Real and Standard_ShortReal transformation matrices using the same matrix evaluation methods and converted input parameters.

Correcting picking tests for perspective view

Modify v3d face test cases for 1px changes in face picking

Modified test cases for new arguments of vviewparams DRAWEXE command
2014-03-06 15:50:33 +04:00
dbp
265d4508bd 0024503: TKOpenGl - Porting ray-tracing component on BVH package
Updated test case v3d/raytrace/bug24130. The new version checks correctness of shadows.
2014-01-30 12:55:06 +04:00
duv
b5ac8292b0 0024001: Stereographic rendering support
Deleted TODOs which were used when branch was built without OpenCL.
Modified test case bugs/vis/bug23747_2 (changed textured shape)
2014-01-23 14:46:06 +04:00
bugmaster
2bc29cdf9e Correction test cases for adequate behavior for platforms with OpenCL 2013-11-22 14:49:51 +04:00
apn
d04f068b7f Correction of test cases due to fix for issue 24130 2013-11-22 12:49:29 +04:00
kgv
d5af86261d 0024353: TKOpenGl - crash in IsRaytracedStructure when clearing mutli-connected presentation
Correction of test cases for issue CR24353
2013-11-21 13:29:53 +04:00