1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

Compare commits

..

61 Commits

Author SHA1 Message Date
bugmaster
68d403eda6 Test vselect\bugs\bug544 2021-03-27 15:41:34 +03:00
kgv
bbc5899a8c 0032242: Configuration, CMake - USE_GLES2 option does not appear in interactive configurator
USE_D3D, USE_OPENGL and USE_GLES2 options declarations have been reordered.
2021-03-27 13:46:04 +03:00
ifv
bff660919f 0032225: Modeling Data - Wrong result of extrema curve-surface
Extrema_GenExtCS.cxx: subdivision on intervals for periodic c curves is added

Extrema_FuncExtCS.hxx: access to fields mySqDist, myPoint1, myPoint2 is added

bug32225: new test case is added
2021-03-27 13:46:04 +03:00
ifv
c69e0e408f 0028196: Modeling Data - Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case
Extrema_GenLocateExtPS.cxx, Extrema_GenLocateExtPS.hxx:

Adjusting tolerances according to surface sizes is added.
Additional methods for searching solution are added for cases if basic method fails.

Extrema_FuncPSDist.cxx - small bug fixing.

BRepFill_TrimShellCorner.cxx - fixing regression

ChFi3d_Builder_CnCrn.cxx setting parameters for Plate algorithm to improve stability of solution

ProjLib_ComputeApproxOnPolarSurface.cxx - code optimization

Some test cases are modified according to current state of Extrema algorithm
2021-03-27 13:46:03 +03:00
kgv
6c2cf030e2 0032234: Configuration, OSD_Process::UserName() - avoid using getpwuid() unimplemented by Emscripten SDK 2021-03-27 13:46:03 +03:00
kgv
285b5189cd 0032246: Tests, Visualization - unstable test case bugs/vis/bug79 reporting memory leak
Test case has been adjusted to check memory trend after the loop.
2021-03-27 13:46:02 +03:00
osa
e816dce36e 0032086: Visualization - support deferred data loading
1) Extend Poly_Triangulation by mesh purpose, possibility to be cleared and late-load deferred data interfaces.
2) Update BRep_TFace to store list of triangulations istead of single one. And also active one. Update getter and setter of single triangulation and add new methods to interaction with whole triangulations list.
3) Update BRep_Tool to get single triangulation of face according to the input mesh purpose or whole triangulations list.
4) Update BRep_Builder to make face by not only single triangulation but whole triangulations list with specified active one.
5) Add new methods to BRepTools to interact with shape triangulations (Load/Unload/Activate/LoadAll/UnloadAllTriangulation(s))
6) Add new 'tlateload'command for shape to load/unload/activate triangulations.
7) Update 'trinfo' command by '-lods' options to print detailaed information about LODs of this shape
8) Support empty triangulations by selection. Use bounding box selection in this case.
9) Add new 'outdisplist' option to XDispaly command to print list of displayed objects to output variable but not to theDI
10) Add new '-noecho' option to vdisplay command to skip printing of displayed objects to theDI
11) Create new RWMesh_TriangulationSource as mesh data wrapper for delayed triangulation loading.
12) Create new RWMesh_TriangulationReader as base interface for reading primitive array from the buffer.
13) Cache nodes/triangles number defined in glTF file
14) Use RWMesh_TriangulationSource class as base of RWGltf_GltfLatePrimitiveArray one and RWMesh_TriangulationReader class as base of RWGltf_TriangulationReader one
15) Add possibilty to support of LODs by glTF reader. It is possible to skip data loading and load them later
16) Add new '-skiplateloading' (to skip triangulation loading), '-keeplate' (to keep information about deferred storage to load/unload triangulation later),
'-toprintdebuginfo' (to print additional debug information) options to ReadGltf command
17) Add new test of glTF late loading
2021-03-27 13:46:02 +03:00
kgv
6387996871 0032243: Tests - unexpected file artifact s.stl at the root of repository
Several test cases have been corrected to avoid creation
of temporary files s.stl, comp_nonmanifold.step, bug31301_1.stp at unexpected location.
2021-03-26 19:48:51 +03:00
kgv
0d828ac838 0032208: Tests - refactor visualization tests to cover several graphic drivers
Removed testgrids 'bugs/vis' and '3rdparty'; tests have been redistributed across other grids.
Moved testgrid 'v3d/ivtk' into dedicated 'vtk/ivtk'.

Added testgrid 'vselect' dedicated to 3D viewer picking/selection functionality
and filled with tests from 'v3d/vertex', 'v3d/face' and similar groups.

Added testgrid 'opengl' dedicated to OpenGL driver low-level functionality (GLSL programs and similar)
and filled with tests from 'v3d/glsl', 'v3d/raytrace', '3rdparty/fonts', 'bugs/vis' (portion) and similar.

Added testgrid 'opengles3' dedicated to OpenGL ES 3.0 driver low-level functionality
and reusing tests from 'opengl' testgrid.
Subgroup 'opengles3/raytrace' is disabled on Windows, as Ray-Tracing currently requires OpenGL ES 3.2.
while ANGLE library implements only OpenGL ES 3.0.

Added testgrid 'opengles2' dedicated to OpenGL ES 2.0 driver low-level functionality
and reusing a limited subset of passing tests from 'opengl' testgrid.
Currently testgrid is activated only on Windows platform when using ANGLE library
(properietary OpenGL ES drivers do not allow creation of restricted 2.0 context).

Test cases have been cleaned out to put bug description into log,
to properly load necessary plugins and to explicitly dump viewer.
2021-03-25 19:14:33 +03:00
kgv
a076535090 0032237: Visualization, TKOpenGl - fix Gouraud shading within perspective camera projection 2021-03-25 19:14:28 +03:00
kgv
1a96d253a5 0032222: Visualization, V3d_Viewer - use Graphic3d_TOSM_FRAGMENT by default instead of Graphic3d_TOSM_VERTEX 2021-03-25 19:14:27 +03:00
kgv
bbd9292784 0032230: Coding Rules - remove class headers Graphic3d_HighlightStyle.hxx deprecated since OCCT 7.2.0
Removed unused Graphic3d_HighlightStyle, Graphic3d_CTexture, Graphic3d_MapOfZLayerSettings,
Graphic3d_TypeOfComposition, Graphic3d_TypeOfComposition, V3d_Parameter, V3d_ViewPointer, SelectMgr_SequenceOfFilter.

Added missing deprecation statements to SelectBasics_SensitiveEntity, SelectMgr_EntityOwner and PrsMgr_Presentation3d.
2021-03-24 18:32:05 +03:00
kgv
ef188756a0 0032235: Foundation Classes, Message_MsgFile - force initialization of global mutex
Initialization of several global variables has been refactored to a function.
2021-03-22 11:34:52 +03:00
pdn
f7ad1e7e37 0025262: Foundation Classes - Poly package improvements
Improvements of functionality of Poly package:
* Add function to intersect a triangulation by an axis.
* Add function to intersect a triangle by an axis.
* Correct the bugs in the methods RemoveDegenerated, RemoveTriangle and ReplaceNodes of the class Poly_CoherentTriangulation.
2021-03-21 19:15:07 +03:00
jgv
0c2517292f 0032140: Modeling Algorithms - unify same domain calls crossed for opposite vectors
1. Correct unification of circular edges: avoid trying to make an axis with null magnitude.
2. New method UnionPCurves: unify existing pcurves of chain instead of projecting the curve of unified edge onto surfaces
2021-03-21 19:15:06 +03:00
kgv
b8ef513c8f 0032206: Visualization, TKOpenGl - move out OpenGL ES support to dedicated library TKOpenGles
Added TKOpenGles and TKOpenGlesTest toolkits built with HAVE_GLES2 macros.
Added CSF_OpenGlesLibs as alternative to CSF_OpenGlLibs.
2021-03-21 19:15:06 +03:00
emv
e22a91ccc9 0032199: Modeling Algorithms - BOP Cut produces invalid shape
Use section tolerance for checking the valid range.
2021-03-17 19:59:48 +03:00
kgv
b8db9379fe 0032203: Draw Harness, ViewerTest - drop dependency from OpenGL
Added TKOpenGlTest and TKD3DHostTest Draw Harness plugins.
TKOpenGlTest is automatically loaded by ViewerTest::ViewerInit().

Commands vgldebug, vvbo, vcaps and vuserdraw have been moved to TKOpenGlTest.
New command vglshaders lists GLSL programs defined by OpenGl_GraphicDriver,
previously implemented by "vshaderprog -list".

Added new command vdriver for graphic driver selection.
Removed erroneous code from command vstereo.
2021-03-17 19:56:54 +03:00
kgv
655e883cb9 0032221: Visualization, TKD3DHost - fix memory leak within D3DHost_FrameBuffer::Release()
D3DHost_FrameBuffer - added missing color texture release within FBO destruction.
OpenGl_View::RedrawImmediate() - fixed unexpected window buffer swap while rendering into offscreen myFBO.
2021-03-17 19:55:44 +03:00
kgv
9b329b9aa4 0032202: Visualization - XCAFDoc_VisMaterial::FillMaterialAspect() should copy emissive color from PBR definition 2021-03-17 19:54:55 +03:00
kgv
43eddb470f 0032217: Visualization, TKOpenGl - drop propagation of unused FFP functions
OpenGl_GlFunctions no more loads unused FFP functions.
OpenGl_GlCoreXX function tables no more defined two hierarchies with and without FFP functions,
and OpenGl_Context::coreXXback fields have been removed.
Introduced OpenGl_Context::core11ffp as more straightforward naming for obsolete FFP function set.
2021-03-17 19:53:14 +03:00
kgv
b470ebea04 0032200: Visualization, TKOpenGl - unify Phong/PBR light space calculations
Graphic3d_ShaderManager - Phong shading now uses World space calculations.
OpenGl_ShaderManager::pushLightSourceState() - fixed unnormalized direction of headlight source.
2021-03-17 19:53:13 +03:00
kgv
61a05a3658 0032198: Visualization, TKOpenGl - per-vertex lighting ignores back/front material colors
Graphic3d_ShaderManager::stdComputeLighting() now multiplies vertex color by material color.
2021-03-17 19:53:13 +03:00
kgv
941f6cae55 0032201: Visualization, TKOpenGl - unify Phong/PBR material properties getters
Graphic3d_ShaderManager::stdComputeLighting() - implementation has been adjusted
for better consistency between PBR / non-PBR.

OpenGl_Material definition has been modified to join Front/Back pair into a single uniform variable.
Common material definition now occupies 4x2 vec4 instead of 5x2 vec4.

Getters of Common material properties within Declarations.glsl
have been renamed to match PBR material syntax (e.g. take IsFront flag as function argument).
Auxliary macros (like occTextureColor()) has been renamed (like occMaterialBaseColor())
and adjusted to return material property directly instead of taking it as argument.
2021-03-17 19:53:12 +03:00
kgv
a604968547 0032207: Draw Harness, ViewerTest - explicitly close 3D Viewer windows at Tcl interpreter closure 2021-03-17 19:52:22 +03:00
kgv
114db5a5ce 0032218: Visualization - move V3d_View::ShadingModel() property to Graphic3d_RenderingParams 2021-03-17 19:41:25 +03:00
kgv
3ae8c60b87 0032219: Visualization, TKService - drop dependency from OpenGL
Visual selection has been moved out from Xw_Window constructor to OpenGl_GraphicDriver::InitContext().
Default Visual is now stored within Aspect_DisplayConnection.
2021-03-17 19:40:40 +03:00
kgv
442850c032 0032220: Configuration, Aspect_VKeySet - eliminate name collision with X11 macros
Aspect_VKeySet::KeyState::Status field has been renamed to KStatus.
2021-03-17 09:54:47 +03:00
emv
58210e5983 0032136: Modeling Algorithms - Boolean fuse fails and corrupts the argument-shape
Avoid increasing tolerance of the vertex before the check on valid range is passed.
2021-03-05 18:00:28 +03:00
kgv
19ed08fda6 0031794: Visualization - Highlighting of AIS_Shape works incorrectly when AddChild() used
PrsMgr_PresentationManager::Display(), PrsMgr_PresentationManager::Color(),
and SelectMgr_SelectionManager::Activate() now skip children in Erased state.
2021-03-05 17:49:17 +03:00
kgv
e70625d6b1 0030640: Visualization, Graphic3d_Camera - add option creating Projection matrix with [0,1] depth range
Added new property Graphic3d_Camera::IsZeroToOneDepth() and OpenGl_Caps::useZeroToOneDepth
for activating [0,1] depth range instead of [-1,1] range using glClipControl() within OpenGL 4.5+.
2021-03-05 17:41:27 +03:00
mkrylova
395d00e058 0032144: Draw Harness - add -silent option to command Close
- Extended command Close with an option -silent
- Extended command Close to handle */-ALL for closing ALL document
- Replaced catch {Close D} by Close D -silent in tests
2021-03-05 17:31:07 +03:00
kgv
d6e050ac44 0032008: Modeling Algorithms - disallow implicit copy of Extrema algorithms
Extrema_GenExtPS now prefers resizing of Array2 tables instead of managing tables by extra handles.
Removed unsafe casts to Adaptor3d_SurfacePtr/Adaptor3d_CurvePtr in Extrema classes.
Removed unsafe casts to curve adaptors in Extrema_ExtCC, Extrema_ExtCC2d classes.

Extrema_GenExtPS, Extrema_GenExtSS, Extrema_ExtCS -
copies by value are now disallowed;
several unexpected places copying the object have been fixed.

IntTools_Context - maps of void* have been replaced by typed maps.
2021-03-05 17:31:07 +03:00
mpv
6498be7036 0032109: Application Framework: Test case bugs caf bug31546 works extremely unstable
In test it should be taken into account that
  lappend listmem [meminfo h]
  checktrend $listmem 0 0 "Memory leak"
also gets memory (also about 100 bytes per iteration).
2021-03-04 19:49:35 +03:00
kgv
952a0565d7 0032192: Visualization, TKOpenGl - load OpenGL 4.6 functions within OpenGl_Context
glext.h has been updated to include latest fixes and new definitions.
2021-03-04 19:44:57 +03:00
mkrylova
e3d4b87912 0031779: Visualization, AIS_ViewController - controller should handle selection schemes
Added AIS_ViewController::MouseSelectionSchemes() property defining map of selection schemes for mouse+modifier combinations.
IsXOR flag has been replaced by AIS_SelectionScheme in interfaces.

Rubber-band selection with Shift key pressed now applies XOR selection scheme in in Draw Harness.
Command vselect has been extended to specify selection scheme by name.
2021-03-04 19:43:13 +03:00
Chris Hennes (chennes)
329e5df986 0032181: Modeling Algorithms - ChFi3d missing error checking
Throughout the ChFi3d fillet creation functions there are two sets of unchecked
errors that can result in segmentation faults when geometry-creation problems
occur.

The first is that the functions ChFi3d_cherche_* may fail to find the requested
item: they silently return without setting the required reference, which is
then accessed by the algorithms. This can be caught with a conditional at the
end of the function that throws an exception if the required item was not
found.

The second class of unchecked error is the use of BRep_Tool::CurveOnSurface,
which may fail to create the required curve, returning a null handle. In many
cases in the existing fillet code this is not checked. This can be dealt with
by checking the returned handle using IsNull() and throwing an exception
if the call did not result in valid geometry.
2021-03-04 19:42:05 +03:00
kgv
7fd4958d45 0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_TypeOfBackfacingModel
Graphic3d_Aspects::ToSuppressBackFaces() bool flag has been replaced by
Graphic3d_Aspects::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

Graphic3d_TypeOfBackfacingModel_Auto corresponds to old ToSuppressBackFaces()==TRUE;
Graphic3d_TypeOfBackfacingModel_DoubleSided corresponds to old ToSuppressBackFaces()==FALSE;
Graphic3d_TypeOfBackfacingModel_BackCulled allows enabling back face culling regardless of Graphic3d_Group::IsClosed() flag.

XCAFDoc_VisMaterial::IsDoubleSided() bool flag has been replaced by
XCAFDoc_VisMaterial::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

glTF reader now maps "doubleSided" material flag into
Graphic3d_TypeOfBackfacingModel_BackCulled (forced back face culling) and
Graphic3d_TypeOfBackfacingModel_Auto (e.g. practically doubleSided as there is no closed/open info in glTF).

glTF writer by default writes materials as "doubleSided" save the Graphic3d_TypeOfBackfacingModel_BackCulled property set
(in future, extra logic might written for automatically defining singleSided materials for Solid B-Rep objects).

Removed obsolete unused types V3d_TypeOfPickCamera, V3d_TypeOfPickLight, V3d_TypeOfRepresentation, and V3d_Coordinate.
Deprecated types V3d_TypeOfBackfacingModel, V3d_TypeOfLight, and V3d_TypeOfShadingModel.
2021-03-04 19:40:23 +03:00
kgv
42ddd0028c 0032184: Visualization - remove ambiguous AIS_GlobalStatus constructor
Auxiliary AIS_GlobalStatus constructor has been removed.
AIS_InteractiveContext::setObjectStatus() no more adds
an invalid -1 mode to AIS_GlobalStatus.

Never updated property AIS_GlobalStatus::GetLayerIndex() has been removed;
AIS_InteractiveContext::SetTransformPersistence() has been corrected to use
ZLayer defined within object itself.
2021-03-04 19:39:20 +03:00
kgv
33425a46b8 0032143: Visualization - add option excluding transparent object from sorting
Added option Graphic3d_AlphaMode_MaskBlend combining Mask (no sorting)
and Blend (enable blending with background) behavior.
2021-03-04 19:38:16 +03:00
kgv
ba590cbf15 0032180: Visualization - StdSelect_BRepOwner::SetLocation() does not update selected sub-shape
StdSelect_BRepOwner::SetLocation() now propagates location to sub-shape presentation instead of invalidating it.
2021-02-27 15:36:19 +03:00
osa
bc0711a5c3 0032171: Data Exchange - RWGltf_TriangulationReader doesn't copy cached bounding box
Save cached bounding box in loaded triangulation getting it from "proxy" late-loaded object.
2021-02-26 17:31:02 +03:00
kgv
53219061ca 0032165: Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer() 2021-02-26 10:56:32 +03:00
kgv
decbff0dfd 0032161: Coding Rules - deprecate obsolete alias PrsMgr_PresentationManager3d 2021-02-26 10:56:31 +03:00
kgv
1507ccda40 0032168: Visualization - Wrong computation of screen axis in V3d_View::SetTwist method
Fixed wrong axis check.
2021-02-26 10:56:31 +03:00
kgv
478862fcc2 0032160: Coding Rules - merge AIS_InteractiveContext_*.cxx into single file
Removed redundant .lxx files from API package.

AIS_InteractiveContext_1.cxx,AIS_InteractiveContext_2.cxx,AIS_InteractiveContext_3.cxx
have been merged into AIS_InteractiveContext.cxx.
V3d_View_2.cxx,V3d_View_3.cxx,V3d_View_4.cxx have been merged into V3d_View.cxx
V3d_View_4.cxx has been merged into V3d_View.cxx.
2021-02-25 18:58:50 +03:00
kgv
39e6123e3b 0032162: Visualization - move AIS_DisplayStatus from AIS_GlobalStatus to PrsMgr_PresentableObject
AIS_DisplayStatus has been renamed to PrsMgr_DisplayStatus
and moved from AIS_GlobalStatus class field to PrsMgr_PresentableObject.

0032167: Visualization, AIS_InteractiveContext - setObjectStatus sets wrong status when AIS_DS_Erased

AIS_InteractiveContext::setObjectStatus() Fixed setting unexpected Displayed status to Erased objects.
2021-02-25 18:58:49 +03:00
kgv
79d49683d6 0032155: Tests - remove broken command OCC280
Command OCC280 and a couple of useless tests have been removed.
Test case bug349 has been updated to reproduce scenario using standard commands.
2021-02-25 18:55:30 +03:00
kgv
72ed06442e 0032154: Tests - include vglinfo into Tests Summary
Command testgrid now includes vglinfo into summary.
Command vinit has been extended by -virtual option creating an offscreen window.
Command vglinfo now splits long values into multiple lines.
Added test case v3d/glsl/glinfo dumping OpenGL context creation info.

OpenGl_Window - fixed initialization of OpenGL 4.6 Core Profile (was limited to 4.5).
2021-02-25 18:55:29 +03:00
kgv
02a2beaad9 0032153: Visualization, Graphic3d_ArrayOfPrimitives - share common allocator
Added method Graphic3d_Buffer::DefaultAllocator(), which is now used across code.
2021-02-25 18:55:28 +03:00
kgv
4bf072e4eb 0032152: Visualization - move out GLSL program generator from OpenGl_ShaderManager to Graphic3d_ShaderManager 2021-02-25 18:55:27 +03:00
kgv
4464c6b591 0032149: Draw Harness, ViewerTest - remove obsolete command vfeedback 2021-02-25 18:55:27 +03:00
kgv
9299697997 0032150: Visualization, TKOpenGl - ignore OpenGl_Caps::ffpEnable when FFP is unavailable
OpenGl_Workspace::Activate() now implicitly disables OpenGl_Caps::ffpEnable when it is unsupported.
OpenGl_AspectsSprite::build() now ignores OpenGl_Caps::pntSpritesDisable when Display Lists are unsupported.
2021-02-24 20:59:43 +03:00
kgv
93cdaa76da 0031196: Visualization, TKOpenGl - enable Ray-Tracing using OpenGL ES 3.2
OpenGl_Context now activates Ray-Tracing and arbTboRGB32 for GLES 3.2.
Removed initialization of some uniforms from GLSL code.
Fixed implicit casts within Ray-Tracing shaders.
2021-02-24 20:58:38 +03:00
kgv
127330f9d7 0032147: Documentation - drop mentioning of WOK from build_3rdparty 2021-02-20 19:00:34 +03:00
kgv
374dffea0b 0032139: Visualization - support single-precision floating point data within Poly_Triangulation
Introduced NCollection_AliasedArray collection defining a general byte array
to be aliased as array of elements of mutable type.

Poly_ArrayOfNodes specializes this interface for collecting 2d/3d points with single/double precision.
Poly_Triangulation relies on this new class for definition of 3D nodes and UV coordinates
using gp_Pnt and gp_Pnt2d by default as before.

RWGltf_CafReader now fills in triangulation using single precision by default (as stored in the file).
2021-02-20 18:58:56 +03:00
kgv
e44b849de9 0032145: Coding Rules - move GL functions loading to OpenGl_GlFunctions.cxx 2021-02-20 18:57:49 +03:00
asuraven
a13df0fee0 0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
Save/Restore interface has been moved to Draw_Drawable3D base class.
Create a singleton Draw_Params class for DRAW parameters
2021-02-20 10:43:32 +03:00
dpasukhi
930b466c9b 0032087: Data Exchange, STEPCAFControl_Reader - NULL representation of shape for DGT
- Fixed problem with find a Path for the DimensionType_Location_WithPath
- Added check for the null object within FindShapeIndexForDGT
2021-02-20 10:43:17 +03:00
vro
a8b605eb5e 0032133: Modeling Data - Restriction of access to internal arrays for Poly_Triangulation, revision of API
Removed methods from Poly_Triangulation/Poly_PolygonOnTriangulation giving access to internal arrays of 2d and 3d nodes, triangles and normals.
2021-02-18 18:55:21 +03:00
kgv
008210c3e2 0032129: Visualization, TKOpenGl - shadowmap is broken for ZLayer having non-zero origin
OpenGl_LayerList::renderLayer() - fixed usage of wrong camera while rendering shadowmap,
and apply Z-Layer origin shift to shadowmap matrix while applying shadow.
2021-02-14 01:11:37 +03:00
2625 changed files with 27176 additions and 27454 deletions

View File

@@ -366,10 +366,14 @@ endif()
# whether use optional 3rdparty or not
if (APPLE)
set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
else()
set (USE_GLX OFF)
endif()
if (WIN32)
set (USE_D3D OFF CACHE BOOL "${USE_D3D_DESCR}")
else()
set (USE_D3D OFF)
endif()
# Enable/Disable the floating point exceptions (FPE) during runtime.
@@ -383,6 +387,15 @@ else()
set (BUILD_ENABLE_FPE_SIGNAL_HANDLER 0)
endif()
# OpenGL
if (ANDROID OR IOS OR EMSCRIPTEN OR "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
set (USE_OPENGL OFF)
set (USE_GLES2 ON)
else()
set (USE_OPENGL ON CACHE BOOL "${USE_OPENGL_DESCR}")
set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
endif()
# include the patched or original list of modules
# list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
# list <OCCT_MODULES> will contain all modules
@@ -414,10 +427,6 @@ if (NOT DEFINED BUILD_DOC_Overview)
set (BUILD_DOC_Overview ${CAN_DOXYGEN_BE_USED} CACHE BOOL "${BUILD_DOC_Overview_DESCR}")
endif()
if (NOT USE_D3D)
list (REMOVE_ITEM Visualization_TOOLKITS TKD3DHost)
endif()
# accumulate used toolkits (first level) in BUILD_TOOLKITS variable
list (APPEND BUILD_TOOLKITS ${BUILD_ADDITIONAL_TOOLKITS})
@@ -485,7 +494,8 @@ endif()
OCCT_IS_PRODUCT_REQUIRED (CSF_FreeImagePlus CAN_USE_FREEIMAGE)
OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE USE_FREETYPE)
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_GLES2)
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlLibs CAN_USE_OPENGL)
OCCT_IS_PRODUCT_REQUIRED (CSF_OpenGlesLibs CAN_USE_GLES2)
OCCT_IS_PRODUCT_REQUIRED (CSF_TBB CAN_USE_TBB)
OCCT_IS_PRODUCT_REQUIRED (CSF_EIGEN CAN_USE_EIGEN)
@@ -532,14 +542,6 @@ else()
endif()
endif()
# D3D
if (USE_D3D)
add_definitions (-DHAVE_D3D)
#if(MSVC_VERSION LESS 1700)
#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
#endif()
endif()
# GLX
if (USE_GLX)
add_definitions (-DMACOSX_USE_GLX)
@@ -547,7 +549,6 @@ if (USE_GLX)
endif()
# FREEIMAGE
if (CAN_USE_FREEIMAGE)
set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}")
@@ -606,23 +607,31 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_FFMPEG")
endif()
# OpenGL
if (CAN_USE_OPENGL)
if (USE_OPENGL)
add_definitions (-DHAVE_OPENGL_EXT)
else()
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGl)
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlTest)
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_OPENGL")
endif()
# OpenGL ES 2.0
if (CAN_USE_GLES2)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
set (USE_GLES2 ON)
else()
set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
endif()
if (USE_GLES2)
add_definitions (-DHAVE_GLES2)
add_definitions (-DHAVE_GLES2_EXT)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2")
OCCT_CHECK_AND_UNSET ("INSTALL_EGL")
OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGles)
list (REMOVE_ITEM BUILD_TOOLKITS TKOpenGlesTest)
endif()
else()
OCCT_CHECK_AND_UNSET ("USE_GLES2")
@@ -633,6 +642,17 @@ else()
OCCT_CHECK_AND_UNSET ("INSTALL_GLES2")
endif()
# D3D
if (USE_D3D)
add_definitions (-DHAVE_D3D)
#if(MSVC_VERSION LESS 1700)
#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/d3d")
#endif()
else()
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHost)
list (REMOVE_ITEM BUILD_TOOLKITS TKD3DHostTest)
endif()
# TBB
if (NOT DEFINED ANDROID AND CAN_USE_TBB)
set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
@@ -1139,6 +1159,9 @@ foreach (OCCT_TOOLKIT ${BUILD_TOOLKITS})
endforeach()
list (REMOVE_DUPLICATES OCCT_MODULES_ENABLED)
list (REMOVE_DUPLICATES OCCT_COMPILE_DEFINITIONS)
# these macros are defined for specific tookits, not globalwise
list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_OPENGL)
list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_GLES2)
# export compile definitions and C/C++ flags for each configuration to OpenCASCADE config files
foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})

View File

@@ -1,7 +1,7 @@
FoundationClasses TKernel TKMath
ModelingData TKG2d TKG3d TKGeomBase TKBRep
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
Visualization TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost
Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE

View File

@@ -207,6 +207,7 @@ n Image
n Media
n MeshVS
n OpenGl
n OpenGles
n D3DHost
n Prs3d
n PrsMgr
@@ -224,6 +225,7 @@ r Shaders
r XRResources
t TKMeshVS
t TKOpenGl
t TKOpenGles
t TKD3DHost
t TKService
t TKV3d
@@ -402,6 +404,9 @@ n HLRTest
n MeshTest
n SWDRAW
n TObjDRAW
n OpenGlTest
n OpenGlesTest
n D3DHostTest
n ViewerTest
n XDEDRAW
n XSDRAW
@@ -413,6 +418,9 @@ t TKDCAF
t TKDraw
t TKTObjDRAW
t TKTopTest
t TKOpenGlTest
t TKOpenGlesTest
t TKD3DHostTest
t TKViewerTest
t TKXDEDRAW
t TKXSDRAW

View File

@@ -1,3 +1,3 @@
# EGL
THIRDPARTY_PRODUCT("EGL" "EGL/egl.h" "CSF_OpenGlLibs" "")
THIRDPARTY_PRODUCT("EGL" "EGL/egl.h" "CSF_OpenGlesLibs" "")

View File

@@ -1,3 +1,3 @@
# OpenGL ES 2.0
THIRDPARTY_PRODUCT("GLES2" "GLES2/gl2.h" "CSF_OpenGlLibs" "")
THIRDPARTY_PRODUCT("GLES2" "GLES2/gl2.h" "CSF_OpenGlesLibs" "")

View File

@@ -74,12 +74,8 @@ if (WIN32)
set (CSF_psapi "psapi.lib")
set (CSF_winmm "winmm.lib")
set (CSF_d3d9 "D3D9.lib")
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
set (CSF_OpenGlLibs "libEGL libGLESv2")
else()
set (CSF_OpenGlLibs "opengl32.lib")
endif()
set (CSF_OpenGlLibs "opengl32.lib")
set (CSF_OpenGlesLibs "libEGL libGLESv2")
else()
if (APPLE)
@@ -100,9 +96,9 @@ else()
OCCT_CHECK_AND_UNSET (IOKit_LIB)
if (IOS)
find_library (OpenGlLibs_LIB NAMES OpenGLES)
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
find_library (OpenGlesLibs_LIB NAMES OpenGLES)
set (CSF_OpenGlesLibs ${OpenGlesLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlesLibs_LIB)
elseif (USE_GLX)
set (CSF_OpenGlLibs GL)
set (CSF_XwLibs "X11 Xext Xmu Xi")
@@ -111,18 +107,15 @@ else()
set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
endif()
elseif (ANDROID)
set (CSF_ThreadLibs "c")
set (CSF_OpenGlLibs "EGL GLESv2")
set (CSF_OpenGlesLibs "EGL GLESv2")
set (CSF_androidlog "log")
elseif (UNIX)
set (CSF_ThreadLibs "pthread rt stdc++")
if (USE_GLES2)
set (CSF_OpenGlLibs "EGL GLESv2")
else()
set (CSF_OpenGlLibs "GL")
endif()
set (CSF_OpenGlLibs "GL")
set (CSF_OpenGlesLibs "EGL GLESv2")
set (CSF_XwLibs "X11 Xext Xmu Xi")
set (CSF_dl "dl")
set (CSF_fontconfig "fontconfig")

View File

@@ -303,6 +303,13 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS})
else() # get CSF_ value
set (CURRENT_CSF ${${USED_ITEM}})
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlLibs")
add_definitions (-DHAVE_OPENGL)
endif()
if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlesLibs")
add_definitions (-DHAVE_GLES2)
endif()
set (LIBRARY_FROM_CACHE 0)
separate_arguments (CURRENT_CSF)
foreach (CSF_LIBRARY ${CURRENT_CSF})

View File

@@ -174,9 +174,10 @@ set (USE_EGL_DESCR
"Indicates whether EGL should be used in OCCT visualization
module instead of conventional OpenGL context creation APIs")
set (USE_OPENGL_DESCR
"Indicates whether OpenGL desktop should be used in OCCT visualization module")
set (USE_GLES2_DESCR
"Indicates whether OpenGL ES 2.0 should be used in OCCT visualization
module instead of desktop OpenGL")
"Indicates whether OpenGL ES 2.0 should be used in OCCT visualization module")
set (USE_TBB_DESCR
"Indicates whether TBB is used or not. TBB stands for Threading Building Blocks,

View File

@@ -1461,9 +1461,7 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
set aLibsMap(CSF_netapi32) "netapi32"
set aLibsMap(CSF_winmm) "winmm"
set aLibsMap(CSF_OpenGlLibs) "opengl32"
if { "$::HAVE_GLES2" == "true" } {
set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
}
set aLibsMap(CSF_OpenGlesLibs) "libEGL libGLESv2"
set aLibsMap(CSF_psapi) "Psapi"
set aLibsMap(CSF_d3d9) "d3d9"
@@ -1484,14 +1482,18 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
}
} else {
set aLibsMap(CSF_dl) "dl"
set aLibsMap(CSF_OpenGlLibs) "GL"
set aLibsMap(CSF_OpenGlesLibs) "EGL GLESv2"
if { "$theOS" == "mac" || "$theOS" == "ios" } {
set aLibsMap(CSF_objc) "objc"
set aLibsMap(CSF_objc) "objc"
set aLibsMap(CSF_OpenGlLibs) ""
set aLibsMap(CSF_OpenGlesLibs) ""
set aFrmsMap(CSF_OpenGlLibs) "OpenGL"
set aFrmsMap(CSF_OpenGlesLibs) "OpenGLES"
if { "$theOS" == "ios" } {
set aFrmsMap(CSF_Appkit) "UIKit"
set aFrmsMap(CSF_OpenGlLibs) "OpenGLES"
set aFrmsMap(CSF_Appkit) "UIKit"
} else {
set aFrmsMap(CSF_Appkit) "AppKit"
set aFrmsMap(CSF_OpenGlLibs) "OpenGL"
set aFrmsMap(CSF_Appkit) "AppKit"
}
set aFrmsMap(CSF_IOKit) "IOKit"
set aFrmsMap(CSF_TclLibs) "Tcl"
@@ -1500,24 +1502,17 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
set aLibsMap(CSF_TclTkLibs) ""
set aLibsMap(CSF_QT) "QtCore QtGui"
} elseif { "$theOS" == "android" } {
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
set aLibsMap(CSF_androidlog) "log"
} else {
set aLibsMap(CSF_fontconfig) "fontconfig"
if { "$theOS" == "qnx" } {
# CSF_ThreadLibs - pthread API is part of libc on QNX
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
} else {
set aLibsMap(CSF_ThreadLibs) "pthread rt"
set aLibsMap(CSF_OpenGlLibs) "GL"
set aLibsMap(CSF_TclTkLibs) "X11 tk8.6"
set aLibsMap(CSF_XwLibs) "X11 Xext Xmu Xi"
set aLibsMap(CSF_MotifLibs) "X11"
}
if { "$::HAVE_GLES2" == "true" } {
set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
}
}
}
}
@@ -1785,9 +1780,14 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
global path
set aHasQtDep "false"
set aTkDefines ""
foreach aCsfElem [osutils:tk:csfInExternlib "$path/$theSrcDir/${theToolKit}/EXTERNLIB"] {
if { "$aCsfElem" == "CSF_QT" } {
set aHasQtDep "true"
} elseif { "$aCsfElem" == "CSF_OpenGlLibs" } {
set aTkDefines "$aTkDefines;HAVE_OPENGL"
} elseif { "$aCsfElem" == "CSF_OpenGlesLibs" } {
set aTkDefines "$aTkDefines;HAVE_GLES2"
}
}
set theProjTmpl [osutils:vcproj:readtemplate $theVcVer $isUWP 0]
@@ -1822,9 +1822,9 @@ proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
# depending on VC version
regsub -all -- {__TKDEP__} $theProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] theProjTmpl
regsub -all -- {__TKDEP_DEBUG__} $theProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] theProjTmpl
regsub -all -- {__TKDEFINES__} $theProjTmpl $aTkDefines theProjTmpl
set anIncPaths "..\\..\\..\\inc"
# set aTKDefines ""
set aFilesSection ""
set aVcFilesCxx(units) ""
set aVcFilesHxx(units) ""
@@ -2108,6 +2108,7 @@ proc osutils:vcprojx { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir
set aVCRTVer [string range $theVcVer 0 3]
regsub -all -- {__TKDEP__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] aProjTmpl
regsub -all -- {__TKDEP_DEBUG__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] aProjTmpl
regsub -all -- {__TKDEFINES__} $aProjTmpl "" aProjTmpl
set aFilesSection ""
set aVcFilesCxx(units) ""

View File

@@ -153,5 +153,4 @@ win32 {
}
}
#OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}/$${TARGET}
OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}
OBJECTS_DIR = $$DESTDIR/../obj$${MY_BUILDTYPE}/$${TARGET}

View File

@@ -15,8 +15,14 @@ for (aModuleIter, aModuleList) {
equals (aToolKit, $$OCC_MODULE_NAME) { toSkipToolkit = 1 }
!HAVE_VTK:equals (aToolKit, "TKIVtk") { toSkipToolkit = 1 }
!HAVE_VTK:equals (aToolKit, "TKIVtkDraw") { toSkipToolkit = 1 }
#!HAVE_OPENGL: equals (aToolKit, "TKOpenGl") { toSkipToolkit = 1 }
#!HAVE_OPENGL: equals (aToolKit, "TKOpenGlTest") { toSkipToolkit = 1 }
!HAVE_GLES2: equals (aToolKit, "TKOpenGles") { toSkipToolkit = 1 }
!HAVE_GLES2: equals (aToolKit, "TKOpenGlesTest") { toSkipToolkit = 1 }
!win32: equals (aToolKit, "TKD3DHost") { toSkipToolkit = 1 }
!win32: equals (aToolKit, "TKD3DHostTest") { toSkipToolkit = 1 }
equals (toSkipToolkit, 0) {
#warning(aToolKit($$OCC_MODULE_NAME)=$$aToolKit)
eval(occtkgen_$${aToolKit}.input = $$_PRO_FILE_PWD_/../OccToolkit.pro.in)
eval(occtkgen_$${aToolKit}.output = $$_PRO_FILE_PWD_/$${aToolKit}/$${aToolKit}.pro)

View File

@@ -36,7 +36,7 @@ win32 {
CSF_wsock32 = -lwsock32
CSF_netapi32 = -lnetapi32
CSF_OpenGlLibs = -lopengl32
HAVE_GLES2 { CSF_OpenGlLibs = -llibEGL -llibGLESv2 }
CSF_OpenGlesLibs = -llibEGL -llibGLESv2
CSF_psapi = -lPsapi
CSF_winmm = -lwinmm
CSF_d3d9 = -ld3d9
@@ -46,12 +46,12 @@ win32 {
} else:mac {
CSF_dl = -ldl
CSF_objc = -lobjc
CSF_OpenGlLibs = -framework OpenGL
CSF_OpenGlesLibs = -framework OpenGLES
iphoneos {
CSF_Appkit = -framework UIKit
CSF_OpenGlLibs = -framework OpenGLES
} else {
CSF_Appkit = -framework AppKit
CSF_OpenGlLibs = -framework OpenGL
}
CSF_IOKit = -framework IOKit
CSF_TclLibs = -framework Tcl
@@ -60,17 +60,19 @@ win32 {
CSF_dl = -ldl
CSF_ThreadLibs = -lpthread -lrt
CSF_OpenGlLibs = -lGL
CSF_OpenGlesLibs = -lEGL -lGLESv2
CSF_TclTkLibs = -lX11 -ltk8.6
CSF_XwLibs = -lX11 -lXext -lXmu -lXi
CSF_MotifLibs = -lX11
CSF_fontconfig = -lfontconfig
HAVE_GLES2 { CSF_OpenGlLibs = -lEGL -lGLESv2 }
}
for (aCfgIter, CONFIG) {
aRes = $$find(aCfgIter, "^HAVE_")
count(aRes, 1) {
DEFINES += $$aCfgIter
!equals(aCfgIter, "HAVE_GLES2") {
count(aRes, 1) {
DEFINES += $$aCfgIter
}
}
}
@@ -103,6 +105,12 @@ for (anExternLib, anExternLibs) {
count(hasCsf, 1) {
aList = $$split($$anExternLib, "\n")
LIBS += $$aList
equals(anExternLib, "CSF_OpenGlLibs") {
DEFINES += "HAVE_OPENGL"
}
equals(anExternLib, "CSF_OpenGlesLibs") {
DEFINES += "HAVE_GLES2"
}
} else {
LIBS += -l$$anExternLib
}

View File

@@ -185,7 +185,7 @@ if ["%HAVE_OPENCL%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DH
if ["%HAVE_FREEIMAGE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE" & set "CSF_DEFINES=HAVE_FREEIMAGE;%CSF_DEFINES%"
if ["%HAVE_FFMPEG%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FFMPEG" & set "CSF_DEFINES=HAVE_FFMPEG;%CSF_DEFINES%"
if ["%HAVE_VTK%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_VTK" & set "CSF_DEFINES=HAVE_VTK;%CSF_DEFINES%"
if ["%HAVE_GLES2%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GLES2" & set "CSF_DEFINES=HAVE_GLES2;%CSF_DEFINES%"
if ["%HAVE_GLES2%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GLES2_EXT" & set "CSF_DEFINES=HAVE_GLES2_EXT;%CSF_DEFINES%"
if ["%HAVE_D3D%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_D3D" & set "CSF_DEFINES=HAVE_D3D;%CSF_DEFINES%"
if ["%HAVE_ZLIB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_ZLIB" & set "CSF_DEFINES=HAVE_ZLIB;%CSF_DEFINES%"
if ["%HAVE_LIBLZMA%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_LIBLZMA" & set "CSF_DEFINES=HAVE_LIBLZMA;%CSF_DEFINES%"

View File

@@ -102,7 +102,7 @@ if [ "$HAVE_TBB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -D
if [ "$HAVE_OPENCL" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_OPENCL"; fi
if [ "$HAVE_FREEIMAGE" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FREEIMAGE"; fi
if [ "$HAVE_FFMPEG" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_FFMPEG"; fi
if [ "$HAVE_GLES2" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GLES2"; fi
if [ "$HAVE_GLES2" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GLES2_EXT"; fi
if [ "$HAVE_VTK" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_VTK"; fi
if [ "$HAVE_ZLIB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_ZLIB"; fi
if [ "$HAVE_LIBLZMA" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_LIBLZMA"; fi

View File

@@ -90,7 +90,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -107,7 +107,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
@@ -138,7 +138,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
@@ -156,7 +156,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
@@ -186,7 +186,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -203,7 +203,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
@@ -234,7 +234,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__TKNAM__/</AssemblerListingLocation>
@@ -252,7 +252,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>

View File

@@ -85,7 +85,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -100,7 +100,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
@@ -130,7 +130,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win32\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
@@ -146,7 +146,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>
@@ -175,7 +175,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -190,7 +190,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;No_Exception;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP__</AdditionalDependencies>
@@ -219,7 +219,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>.\..\..\..\win64\__VCVER__\objd\__XQTNAM__/</AssemblerListingLocation>
@@ -235,7 +235,7 @@
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>__TKDEP_DEBUG__</AdditionalDependencies>

View File

@@ -94,6 +94,7 @@ GeomAdaptor_HCurve GeomAdaptor_Curve
GeomAdaptor_HSurface GeomAdaptor_Surface
GeomAdaptor_HSurfaceOfLinearExtrusion GeomAdaptor_SurfaceOfLinearExtrusion
GeomAdaptor_HSurfaceOfRevolution GeomAdaptor_SurfaceOfRevolution
PrsMgr_PresentationManager3d PrsMgr_PresentationManager
[tcollection]
AdvApp2Var_SequenceOfNode

View File

@@ -446,12 +446,7 @@ Download the necessary archive from https://www.vtk.org/VTK/resources/software.h
All 3rd-party products required for building of OCCT could be installed
from official repositories. You may install them from console using apt-get utility:
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libxt-dev libxmu-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libfreeimage-dev libtbb-dev
To launch binaries built with WOK you need to install C shell and 32-bit libraries on x86_64 distributives:
# you may need to add i386 if not done already by command "dpkg --add-architecture i386"
sudo apt-get install csh libstdc++6:i386 libxt6:i386 libxext6:i386 libxmu6:i386
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libxt-dev libxmu-dev libxi-dev libgl1-mesa-dev libfreeimage-dev
Building is possible with C++ compliant compiler:

View File

@@ -15,8 +15,6 @@ On OS X we recommend to use native libraries.
This article describes the **CMake**-based build process, which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 2.8.12 or later*.
@note Compared to the previous (6.x) releases of Open CASCADE Technology, OCCT 7.x has a complete set of CMake scripts and projects, so that there is no need to use WOK anymore. Moreover, CMake gives you a powerful configuration tool, which allows to control many aspects of OCCT deployment. At the same time this tool is quite intuitive, which is a significant advantage over the legacy WOK utilities.
Here we describe the build procedure on the example of Windows platform with Visual Studio 2010.
However, CMake is cross-platform and can be used to build OCCT on Linux and OS X in essentially the same way.

View File

@@ -391,7 +391,7 @@ Ray tracing requires OpenGL 4.0+ or OpenGL 3.3+ with *GL_ARB_texture_buffer_obje
Textures within ray tracing will be available only when *GL_ARB_bindless_texture extension* is provided by driver.
On mobile platforms, OpenGL ES 2.0+ is required for 3D viewer (OpenGL ES 3.1+ is recommended).
The ray tracing is not yet available on mobile platforms.
Ray tracing requires OpenGL ES 3.2.
Some old hardware might be unable to execute complex GLSL programs (e.g. with high number of light sources, clipping planes).
OCCT 3D Viewer, in general, supports wide range of graphics hardware - from very old to new.

View File

@@ -884,7 +884,7 @@ Old APIs based on global callback functions for creating *UserDraw* objects and
class UserDrawElement : public OpenGl_Element {};
//! Implementation of virtual method AIS_InteractiveObject::Compute().
void UserDrawObject::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
void UserDrawObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
@@ -2210,3 +2210,30 @@ BRep and Binary BRep Shape formats (only in case of triangulation-only Faces, wi
Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape).
Files written with the new version will not be readable by applications of old versions.
@subsection upgrade_occt760_poly Changes in *Poly* package and *Poly_Triangulation* class
*Poly_Triangulation* does no more provide access to internal array structures: methods Nodes(), ChangeNode(), Triangles(), ChangeTriangle(), UVNodes(), ChangeUVNode(), Normals() have been removed.
Methods of *Poly_Triangulation* for accessing individual nodal properties / triangles by index and implementing copy semantics should be used instead.
The same is applicable to *Poly_PolygonOnTriangulation* interface.
@subsection upgrade_occt760_glsl Custom GLSL programs
Accessors to standard materials have been modified within *Declarations.glsl* (*occFrontMaterial_Diffuse()* -> *occMaterial_Diffuse(bool)* and similar).
Applications defining custom GLSL programs should take into account syntax changes.
@subsection upgrade_occt760_noral_colors Nodal color modulation
Nodal color vertex attribute is now modulated in the same way as a color texture - color is multiplied by material coefficients (diffuse/ambient/specular in case of a common material definition).
Existing code defining nodal colors should be updated to:
- Use *Graphic3d_TOSM_UNLIT* shading model when lighting is not needed.
- Adjust diffuse/ambient material coefficients, which have been previously ignored.
- Remove code multiplying nodal colors, intended to compensate over-brightness due to addition of specular color from material definition, as specular component is now also modulated by a vertex color.
@subsection upgrade_occt760_tkopengles TKOpenGles library
OCCT now provides two separate toolkits - *TKOpenGl* depending on desktop OpenGL and *TKOpenGles* depending on OpenGL ES.
Both libraries can be now built simultaneously on systems providing both APIs (like desktop Linux).
Existing applications depending on OpenGL ES (mobile projects first of all) should be adjusted to link against *TKOpenGles*.
Note that both *TKOpenGl* and *TKOpenGles* keep exporting classes with the same name, so applications should not attempt to link both libraries simultaneously.

View File

@@ -1465,17 +1465,6 @@ vchangeselected shape
~~~~~
Adds a shape to selection or removes one from it.
@subsubsection occt_draw_4_2_15 vzclipping
Syntax:
~~~~~
vzclipping [mode] [depth width]
~~~~~
Gets or sets ZClipping mode, width and depth, where
- *mode = OFF|BACK|FRONT|SLICE*
- *depth* is a real value from segment [0,1]
- *width* is a real value from segment [0,1]
@subsubsection occt_draw_4_2_16 vnbselected
Syntax:
@@ -1484,14 +1473,6 @@ vnbselected
~~~~~
Returns the number of selected objects in the interactive context.
@subsubsection occt_draw_4_2_18 vpurgedisplay
Syntax:
~~~~~
vpurgedisplay [CollectorToo = 0|1]
~~~~~
Removes structures which do not belong to objects displayed in neutral point.
@subsubsection occt_draw_4_2_19 vhlr
Syntax:

View File

@@ -551,7 +551,7 @@ If you are creating your own type of interactive object, you must implement the
#### For 3D:
~~~~~{.cpp}
void PackageName_ClassName::Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
void PackageName_ClassName::Compute (const Handle(PrsMgr_PresentationManager)& thePresentationManager,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode);
~~~~~
@@ -650,7 +650,7 @@ Standard_Boolean myPk_IShape::AcceptDisplayMode (const Standard_Integer theMode)
return theMode == 0 || theMode == 1;
}
void myPk_IShape::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
void myPk_IShape::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
@@ -2096,7 +2096,7 @@ i.e. in hidden line removal and wireframe modes.
Let us look at the example of compute methods
~~~~~{.cpp}
void MyPresentableObject::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsManager,
void MyPresentableObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsManager,
const Handle(Graphic3d_Structure)& thePrs,
const Standard_Integer theMode)
(

View File

@@ -46,7 +46,7 @@ AdaptorCurve2d_AIS::AdaptorCurve2d_AIS (const Handle(Geom2d_Curve)& theGeom2dCur
//
}
void AdaptorCurve2d_AIS::Compute (const Handle(PrsMgr_PresentationManager3d)&,
void AdaptorCurve2d_AIS::Compute (const Handle(PrsMgr_PresentationManager)&,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -53,7 +53,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -26,7 +26,7 @@
#include <StdPrs_PoleCurve.hxx>
#include <StdPrs_Curve.hxx>
void AdaptorCurve_AIS::Compute (const Handle(PrsMgr_PresentationManager3d)&,
void AdaptorCurve_AIS::Compute (const Handle(PrsMgr_PresentationManager)&,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -37,7 +37,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0 || theMode == 1; }
//! Compute presentation.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -24,7 +24,7 @@
#include <Geom_CartesianPoint.hxx>
#include <StdPrs_Point.hxx>
void AdaptorPnt2d_AIS::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
void AdaptorPnt2d_AIS::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -40,7 +40,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -39,7 +39,7 @@ AdaptorVec_AIS::AdaptorVec_AIS (const gp_Pnt2d& thePnt1,
myLength = aVec.Magnitude();
}
void AdaptorVec_AIS::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
void AdaptorVec_AIS::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -101,7 +101,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -219,7 +219,7 @@ void Sample2D_Face::FillData(Standard_Boolean isSizesRecompute)
}
}
void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode)
{
@@ -303,7 +303,7 @@ void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
thePresentation->CurrentGroup()->AddPrimitiveArray(myExternalArray);
}
void Sample2D_Face::HilightSelected (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
void Sample2D_Face::HilightSelected (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const SelectMgr_SequenceOfOwner& theOwners)
{
Handle(Prs3d_Presentation) aSelectionPrs = GetSelectPresentation (thePrsMgr);
@@ -368,7 +368,7 @@ void Sample2D_Face::ClearSelected()
}
}
void Sample2D_Face::HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
void Sample2D_Face::HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager)& thePM,
const Handle(Prs3d_Drawer)& theStyle,
const Handle(SelectMgr_EntityOwner)& theOwner)
{

View File

@@ -56,7 +56,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
@@ -67,11 +67,11 @@ private:
virtual void ClearSelected() Standard_OVERRIDE;
//! Method for advanced customizable selection of picked object
virtual void HilightSelected (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
virtual void HilightSelected (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const SelectMgr_SequenceOfOwner& theOwners) Standard_OVERRIDE;
//! Method for advanced customizable highlighting of picked object.
virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager)& thePM,
const Handle(Prs3d_Drawer)& theStyle,
const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE;

View File

@@ -54,7 +54,7 @@ Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition,
myArrayOfPoints = theArrayOfPoints;
}
void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -61,7 +61,7 @@ private:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
virtual void Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -70,14 +70,9 @@ void TriangulationSamples::Triangulation3dSample()
TopLoc_Location aLocation;
Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation(aFace, aLocation);
TColgp_Array1OfPnt aTriangNodes(1, (aTriangulation->NbNodes()));
aTriangNodes = aTriangulation->Nodes();
Poly_Array1OfTriangle aTriangles(1, aTriangulation->NbTriangles());
aTriangles = aTriangulation->Triangles();
for (Standard_Integer i = 1; i <= (aTriangulation->NbTriangles()); i++)
for (Standard_Integer i = 1; i <= aTriangulation->NbTriangles(); i++)
{
Poly_Triangle trian = aTriangles.Value(i);
const Poly_Triangle trian = aTriangulation->Triangle (i);
Standard_Integer index1, index2, index3, M = 0, N = 0;
trian.Get(index1, index2, index3);
@@ -96,7 +91,7 @@ void TriangulationSamples::Triangulation3dSample()
M = index2;
}
BRepBuilderAPI_MakeEdge anEdgeMaker(aTriangNodes.Value(M), aTriangNodes.Value(N));
BRepBuilderAPI_MakeEdge anEdgeMaker(aTriangulation->Node (M), aTriangulation->Node (N));
if (anEdgeMaker.IsDone())
{
aBuilder.Add(aCompound, anEdgeMaker.Edge());

View File

@@ -32,7 +32,7 @@
0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */; };
0A7DEE371E2D2AE000267B9B /* libTKXDESTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */; };
0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE021E2D2A7F00267B9B /* libTKBO.a */; };
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE091E2D2A9700267B9B /* libTKOpenGl.a */; };
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */; };
0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */; };
0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE1D1E2D2ADC00267B9B /* libTKXSBase.a */; };
0AAE0DE61EAF816E00C1F65B /* screw.step in Resources */ = {isa = PBXBuildFile; fileRef = 0AAE0DE51EAF816D00C1F65B /* screw.step */; };
@@ -82,7 +82,7 @@
0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKIGES.a; path = ../occt/lib/libTKIGES.a; sourceTree = "<group>"; };
0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKMeshVS.a; path = ../occt/lib/libTKMeshVS.a; sourceTree = "<group>"; };
0A7DEE081E2D2A9300267B9B /* libTKOffset.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOffset.a; path = ../occt/lib/libTKOffset.a; sourceTree = "<group>"; };
0A7DEE091E2D2A9700267B9B /* libTKOpenGl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOpenGl.a; path = ../occt/lib/libTKOpenGl.a; sourceTree = "<group>"; };
0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOpenGles.a; path = ../occt/lib/libTKOpenGles.a; sourceTree = "<group>"; };
0A7DEE0A1E2D2A9A00267B9B /* libTKPrim.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKPrim.a; path = ../occt/lib/libTKPrim.a; sourceTree = "<group>"; };
0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKService.a; path = ../occt/lib/libTKService.a; sourceTree = "<group>"; };
0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStd.a; path = ../occt/lib/libTKStd.a; sourceTree = "<group>"; };
@@ -135,7 +135,7 @@
0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */,
0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */,
0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */,
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGl.a in Frameworks */,
0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */,
0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */,
0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */,
0A7DEE2E1E2D2AE000267B9B /* libTKSTEP.a in Frameworks */,
@@ -234,7 +234,7 @@
0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */,
0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */,
0A7DEE081E2D2A9300267B9B /* libTKOffset.a */,
0A7DEE091E2D2A9700267B9B /* libTKOpenGl.a */,
0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */,
0A7DEE0A1E2D2A9A00267B9B /* libTKPrim.a */,
0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */,
0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */,

View File

@@ -147,7 +147,7 @@ public class OcctJniActivity extends Activity implements OnClickListener
|| !loadLibVerbose ("TKService", aLoaded, aFailed)
|| !loadLibVerbose ("TKHLR", aLoaded, aFailed)
|| !loadLibVerbose ("TKV3d", aLoaded, aFailed)
|| !loadLibVerbose ("TKOpenGl", aLoaded, aFailed)
|| !loadLibVerbose ("TKOpenGles", aLoaded, aFailed)
// application code
|| !loadLibVerbose ("TKJniSample", aLoaded, aFailed))
{

View File

@@ -11,7 +11,7 @@ set (anOcctLibs
TKIGES
TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP
# OCCT Visualization
TKService TKHLR TKV3d TKOpenGl
TKService TKHLR TKV3d TKOpenGles
)
set(aLibDeps "")

View File

@@ -1217,14 +1217,12 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
"\n"
" if(!aTr.IsNull())\n"
" { \n"
" // takes the array of nodes for this triangulation\n"
" const TColgp_Array1OfPnt& aNodes = aTr->Nodes(); \n"
" nbNodes = aNodes.Length();\n"
" nbNodes = aTr->NbNodes();\n"
"\n"
" for( Standard_Integer i = 1; i <= nbNodes; i++)\n"
" {\n"
" // create seguence of node points in absolute coordinate system\n"
" gp_Pnt aPnt = aNodes(i).Transformed(aLocation);\n"
" gp_Pnt aPnt = aTr->Node (i).Transformed (aLocation);\n"
" aPoints.Append(aPnt);\n"
" \n"
" }\n"
@@ -1371,13 +1369,12 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
if(!aTr.IsNull())
{
// takes the array of nodes for this triangulation
const TColgp_Array1OfPnt& aNodes = aTr->Nodes();
nbNodes = aNodes.Length();
nbNodes = aTr->NbNodes();
for( Standard_Integer i = 1; i <= nbNodes; i++)
{
// create seguence of node points in absolute coordinate system
gp_Pnt aPnt = aNodes(i).Transformed(aLocation);
gp_Pnt aPnt = aTr->Node (i).Transformed (aLocation);
aPoints.Append(aPnt);
}

View File

@@ -26,7 +26,7 @@ ISession2D_Curve::ISession2D_Curve(const Handle(Geom2d_Curve) aGeom2dCurve,
myradiusratio = 1;
}
void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
void ISession2D_Curve::Compute(const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer )
{

View File

@@ -63,7 +63,7 @@ private:
// Methods PRIVATE
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const { return theMode == 0; }
virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
// Fields PRIVATE

View File

@@ -14,7 +14,7 @@ IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
static char THIS_FILE[]=__FILE__;
#endif
void ISession_Curve::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
void ISession_Curve::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -17,7 +17,7 @@ public:
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
private:

View File

@@ -69,7 +69,7 @@ ISession_Direction::~ISession_Direction()
}
void ISession_Direction::Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
void ISession_Direction::Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -30,7 +30,7 @@ public:
private:
void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
void Compute (const Handle(PrsMgr_PresentationManager)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode);
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;

View File

@@ -41,7 +41,7 @@ ISession_Point::~ISession_Point()
}
void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -26,7 +26,7 @@ public:
private :
void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
void Compute (const Handle(PrsMgr_PresentationManager)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode);

View File

@@ -18,7 +18,7 @@ static char THIS_FILE[]=__FILE__;
IMPLEMENT_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
void ISession_Surface::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
void ISession_Surface::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -17,7 +17,7 @@ public:
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0);
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0);
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
private:

View File

@@ -215,7 +215,7 @@
#include <Prs3d_Text.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_PointAspect.hxx>

View File

@@ -31,7 +31,7 @@ ISession_Direction::ISession_Direction(const gp_Pnt& aPnt,const gp_Vec& aVec)
}
void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -28,7 +28,7 @@ public:
private:
void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
void Compute (const Handle(PrsMgr_PresentationManager)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode);

View File

@@ -31,7 +31,7 @@ ISession_Curve::~ISession_Curve()
{
}
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -23,7 +23,7 @@ public:
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
Handle(Geom_Curve) myCurve;

View File

@@ -31,7 +31,7 @@ ISession_Curve::~ISession_Curve()
{
}
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -23,7 +23,7 @@ public:
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
Handle(Geom_Curve) myCurve;

View File

@@ -126,15 +126,10 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
" if(!aTr.IsNull()) // if this triangulation is not NULL" EOL
" { " EOL
" // takes the array of nodes for this triangulation:" EOL
" const TColgp_Array1OfPnt& aNodes = aTr->Nodes();" EOL
" // takes the array of triangles for this triangulation:" EOL
" const Poly_Array1OfTriangle& triangles = aTr->Triangles();" EOL EOL
" // create array of node points in absolute coordinate system" EOL
" TColgp_Array1OfPnt aPoints(1, aNodes.Length());" EOL
" for( Standard_Integer i = 1; i < aNodes.Length()+1; i++)" EOL
" aPoints(i) = aNodes(i).Transformed(aLocation);" EOL EOL
" TColgp_Array1OfPnt aPoints(1, aTr->NbNodes());" EOL
" for( Standard_Integer i = 1; i < aTr->NbNodes()+1; i++)" EOL
" aPoints(i) = aTr->Node (i).Transformed (aLocation);" EOL EOL
" // Takes the node points of each triangle of this triangulation." EOL
" // takes a number of triangles:" EOL
@@ -143,7 +138,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
" for( nt = 1 ; nt < nnn+1 ; nt++)" EOL
" {" EOL
" // takes the node indices of each triangle in n1,n2,n3:" EOL
" triangles(nt).Get(n1,n2,n3);" EOL
" aTr->Triangle (nt).Get (n1,n2,n3);" EOL
" // takes the node points:" EOL
" gp_Pnt aPnt1 = aPoints(n1);" EOL
" gp_Pnt aPnt2 = aPoints(n2);" EOL
@@ -211,11 +206,9 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
if(!aTr.IsNull())
{
const TColgp_Array1OfPnt& aNodes = aTr->Nodes();
aNumOfNodes += aTr->NbNodes();
//Standard_Integer aLower = aNodes.Lower();
//Standard_Integer anUpper = aNodes.Upper();
const Poly_Array1OfTriangle& triangles = aTr->Triangles();
aNumOfTriangles += aTr->NbTriangles();
if(aCount == aNumOfFace)
@@ -251,8 +244,8 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
Standard_Integer aLower = aNodesOfPol.Lower(), anUpper = aNodesOfPol.Upper();
for( int i = aLower; i < anUpper ; i++)
{
gp_Pnt aPnt1 = aNodes(aNodesOfPol(i)).Transformed(aLocation);
gp_Pnt aPnt2 = aNodes(aNodesOfPol(i+1)).Transformed(aLocation);
gp_Pnt aPnt1 = aTr->Node (aNodesOfPol (i)).Transformed (aLocation);
gp_Pnt aPnt2 = aTr->Node (aNodesOfPol (i+1)).Transformed (aLocation);
TopoDS_Vertex aVertex1 = BRepBuilderAPI_MakeVertex (aPnt1);
TopoDS_Vertex aVertex2 = BRepBuilderAPI_MakeVertex (aPnt2);
@@ -283,9 +276,9 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
TopTools_DataMapOfIntegerShape aEdges;
TopTools_SequenceOfShape aVertices;
for( Standard_Integer i = 1; i < aNodes.Length()+1; i++)
for( Standard_Integer i = 1; i < aTr->NbNodes()+1; i++)
{
gp_Pnt aPnt = aNodes(i).Transformed(aLocation);
gp_Pnt aPnt = aTr->Node (i).Transformed (aLocation);
TopoDS_Vertex aVertex = BRepBuilderAPI_MakeVertex(aPnt);
if(!aVertex.IsNull())
@@ -302,7 +295,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
for( nt = 1 ; nt < nnn+1 ; nt++)
{
triangles(nt).Get(n1,n2,n3);
aTr->Triangle (nt).Get (n1,n2,n3);
Standard_Integer key[3];

View File

@@ -157,13 +157,9 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) {
TopoDS_Face F =TopoDS::Face(ex.Current());
TopLoc_Location L;
Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L);
TColgp_Array1OfPnt tab(1,(facing->NbNodes()));
tab = facing->Nodes();
Poly_Array1OfTriangle tri(1,facing->NbTriangles());
tri = facing->Triangles();
for (Standard_Integer i=1;i<=(facing->NbTriangles());i++) {
Poly_Triangle trian = tri.Value(i);
const Poly_Triangle trian = facing->Triangle (i);
Standard_Integer index1,index2,index3,M = 0, N = 0;
trian.Get(index1,index2,index3);
@@ -180,7 +176,7 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) {
M = index2;
}
BRepBuilderAPI_MakeEdge ME(tab.Value(M),tab.Value(N));
BRepBuilderAPI_MakeEdge ME(facing->Node (M), facing->Node (N));
if (ME.IsDone()) {
builder.Add(Comp,ME.Edge());
}
@@ -210,13 +206,9 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { \n\
TopoDS_Face F =TopoDS::Face(ex.Current()); \n\
TopLoc_Location L; \n\
Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); \n\
TColgp_Array1OfPnt tab(1,(facing->NbNodes())); \n\
tab = facing->Nodes(); \n\
Poly_Array1OfTriangle tri(1,facing->NbTriangles()); \n\
tri = facing->Triangles(); \n\
\n\
\n\
for (Standard_Integer i=1;i<=(facing->NbTriangles());i++) { \n\
Poly_Triangle trian = tri.Value(i); \n\
Poly_Triangle trian = facing->Triangle (i); \n\
Standard_Integer index1,index2,index3,M,N; \n\
trian.Get(index1,index2,index3); \n\
\n\
@@ -233,7 +225,7 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { \n\
M = index2; \n\
} \n\
\n\
BRepBuilderAPI_MakeEdge ME(tab.Value(M),tab.Value(N)); \n\
BRepBuilderAPI_MakeEdge ME(facing->Node (M),facing->Node (N)); \n\
if (ME.IsDone()) { \n\
builder.Add(Comp,ME.Edge()); \n\
} \n\

View File

@@ -31,7 +31,7 @@ ISession_Curve::~ISession_Curve()
{
}
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -23,7 +23,7 @@ public:
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
Handle(Geom_Curve) myCurve;

View File

@@ -75,7 +75,7 @@ void ISession2D_Shape::BuildPolyAlgo()
myPolyAlgo->Update();
}
void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/,
void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager)& /*thePresentationManager*/,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode)
{

View File

@@ -51,7 +51,7 @@ private:
const TopoDS_Shape& theCompound,
const Handle(Prs3d_LineAspect) theAspect);
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePresentationManager,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode = 0);

View File

@@ -171,7 +171,7 @@ void Sample2D_Face::FillData(Standard_Boolean isSizesRecompute)
}
}
void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/,
void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager)& /*thePresentationManager*/,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer /*theMode*/)
{
@@ -257,7 +257,7 @@ void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
//Method for advanced customizable selection of picked object
void Sample2D_Face::HilightSelected
( const Handle(PrsMgr_PresentationManager3d)& thePM,
( const Handle(PrsMgr_PresentationManager)& thePM,
const SelectMgr_SequenceOfOwner& theOwners)
{
Handle( Prs3d_Presentation ) aSelectionPrs;
@@ -329,7 +329,7 @@ void Sample2D_Face::ClearSelected ()
//Method for advanced customizable highlighting of picked object
void Sample2D_Face::HilightOwnerWithColor ( const Handle(PrsMgr_PresentationManager3d)& thePM,
void Sample2D_Face::HilightOwnerWithColor ( const Handle(PrsMgr_PresentationManager)& thePM,
const Handle(Prs3d_Drawer)& theStyle,
const Handle(SelectMgr_EntityOwner)& theOwner)
{

View File

@@ -49,14 +49,14 @@ private:
//private methods
void FillData(Standard_Boolean isSizesRecomputed = Standard_False);
void ClearSelected ();
void HilightSelected( const Handle(PrsMgr_PresentationManager3d)& thePM,
void HilightSelected( const Handle(PrsMgr_PresentationManager)& thePM,
const SelectMgr_SequenceOfOwner& theOwners);
void HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
void HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager)& thePM,
const Handle(Prs3d_Drawer)& theStyle,
const Handle(SelectMgr_EntityOwner)& theOwner);
void Compute ( const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
void Compute ( const Handle(PrsMgr_PresentationManager)& thePresentationManager,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode);

View File

@@ -36,7 +36,7 @@ Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition,
}
void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
{

View File

@@ -37,7 +37,7 @@ DEFINE_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject)
private:
virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
virtual void Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/,
const Standard_Integer /*aMode*/);

View File

@@ -70,7 +70,7 @@
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_Text.hxx>

View File

@@ -11,7 +11,7 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
#include <Graphic3d_ArrayOfTriangles.hxx>
#include <Graphic3d_StructureManager.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <StdPrs_ToolTriangulatedShape.hxx>
#include <Poly_Connect.hxx>
#include <TColgp_Array1OfPnt.hxx>
@@ -49,7 +49,7 @@ AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependant)
myColor = Quantity_NOC_KHAKI4;
}
void User_Cylinder::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
void User_Cylinder::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode )
{
@@ -158,10 +158,6 @@ case 6: //color
return;
}
const TColgp_Array1OfPnt& Nodes= myT->Nodes();
const Poly_Array1OfTriangle& triangles = myT->Triangles();
Standard_Integer nnn = myT->NbTriangles(); // nnn : nombre de triangles
Standard_Integer nt, n1, n2, n3 = 0;// nt : triangle courant
// ni : sommet i du triangle courant
@@ -171,15 +167,15 @@ case 6: //color
// triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2
else
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3
if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) )
if (TriangleIsValid (myT->Node (n1), myT->Node (n2), myT->Node (n3)) )
{ // Associates a vertexNT to each node
gp_Pnt p = Nodes(n1).Transformed(myLocation.Transformation());
gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation());
gp_Pnt r = Nodes(n3).Transformed(myLocation.Transformation());
gp_Pnt p = myT->Node (n1).Transformed (myLocation.Transformation());
gp_Pnt q = myT->Node (n2).Transformed (myLocation.Transformation());
gp_Pnt r = myT->Node (n3).Transformed (myLocation.Transformation());
if (p.Z() > H.Z()) H=p;
if (q.Z() > H.Z()) H=q;
@@ -213,12 +209,13 @@ case 6: //color
return;
}
Poly_Connect pc(myT);
const TColgp_Array1OfPnt& Nodes= myT->Nodes();
TColgp_Array1OfPnt Nodes (1, myT->NbNodes());
for (Standard_Integer in = 1; in <= myT->NbNodes(); in++)
{
Nodes.SetValue(in, myT->Node (in));
}
BAR = GProp_PGProps::Barycentre(Nodes);
//const TColgp_Array1OfPnt2d& UVNodes = myT->UVNodes();
const Poly_Array1OfTriangle& triangles = myT->Triangles();
TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper());
StdPrs_ToolTriangulatedShape::Normal(myFace, pc, myNormal);
@@ -238,15 +235,15 @@ case 6: //color
{
// triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2
else
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3
if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) )
{ // Associates a vertexNT to each node
gp_Pnt p = Nodes(n1).Transformed(myLocation.Transformation());
gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation());
gp_Pnt r = Nodes(n3).Transformed(myLocation.Transformation());
gp_Pnt p = myT->Node(n1).Transformed(myLocation.Transformation());
gp_Pnt q = myT->Node(n2).Transformed(myLocation.Transformation());
gp_Pnt r = myT->Node(n3).Transformed(myLocation.Transformation());
}
}
@@ -258,18 +255,18 @@ case 6: //color
std::cout << "On traite actuellement le triangle : "<< nt <<"\n";
#endif
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2
else
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3
if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) )
{ // Associates a vertexNT to each node
TColgp_Array1OfPnt Points(1,3);
gp_Pnt p = Nodes(n1).Transformed(myLocation.Transformation());
gp_Pnt q = Nodes(n2).Transformed(myLocation.Transformation());
gp_Pnt r = Nodes(n3).Transformed(myLocation.Transformation());
gp_Pnt p = myT->Node(n1).Transformed(myLocation.Transformation());
gp_Pnt q = myT->Node(n2).Transformed(myLocation.Transformation());
gp_Pnt r = myT->Node(n3).Transformed(myLocation.Transformation());
Points(1).SetCoord(p.X(), p.Y(), p.Z());
Points(2).SetCoord(q.X(), q.Y(), q.Z());

View File

@@ -25,7 +25,7 @@ public:
void SetColor(const Quantity_Color &aColor);
private:
void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,

View File

@@ -38,7 +38,7 @@ LIBS += -lTKernel \
-lTKMesh \
-lTKHLR \
-lTKV3d \
-lTKOpenGl
-lTKOpenGles
# IMPORTANT. load libraries in a proper order
ANDROID_EXTRA_LIBS = $$3rdparty_lib_path/libfreeimage.so \
@@ -56,4 +56,4 @@ ANDROID_EXTRA_LIBS = $$3rdparty_lib_path/libfreeimage.so \
$$occt_lib_path/libTKMesh.so \
$$occt_lib_path/libTKHLR.so \
$$occt_lib_path/libTKV3d.so \
$$occt_lib_path/libTKOpenGl.so
$$occt_lib_path/libTKOpenGles.so

View File

@@ -3,7 +3,7 @@
#Category: Modeling
#Title: Snowflake - creation of 2d drawing
pload MODELING AISV
pload MODELING VISUALIZATION
puts "Generating sample drawing of snowflake..."

View File

@@ -64,7 +64,7 @@ else()
set(OCCT_BIN_DIR)
endif()
set(OpenCASCADE_LIBS TKRWMesh TKBinXCAF TKBin TKBinL TKOpenGl TKXCAF TKVCAF TKCAF TKV3d TKHLR TKMesh TKService TKShHealing TKPrim TKTopAlgo TKGeomAlgo TKBRep TKGeomBase TKG3d TKG2d TKMath TKLCAF TKCDF TKernel)
set(OpenCASCADE_LIBS TKRWMesh TKBinXCAF TKBin TKBinL TKOpenGles TKXCAF TKVCAF TKCAF TKV3d TKHLR TKMesh TKService TKShHealing TKPrim TKTopAlgo TKGeomAlgo TKBRep TKGeomBase TKG3d TKG2d TKMath TKLCAF TKCDF TKernel)
add_executable(${APP_TARGET} ${SOURCES})
target_link_libraries(

View File

@@ -710,7 +710,7 @@ EM_BOOL WasmOcctView::onTouchEvent (int theEventType, const EmscriptenTouchEvent
myDoubleTapTimer.Stop();
myDoubleTapTimer.Reset();
myDoubleTapTimer.Start();
SelectInViewer (Graphic3d_Vec2i (myClickTouch.From), false);
SelectInViewer (Graphic3d_Vec2i (myClickTouch.From), AIS_SelectionScheme_Replace);
}
}
hasUpdates = true;

View File

@@ -42,11 +42,8 @@ DEFINE_STANDARD_HANDLE(AIS_AttributeFilter, SelectMgr_Filter)
//! filters, which are in position when a local context is open.
class AIS_AttributeFilter : public SelectMgr_Filter
{
public:
//! Constructs an empty attribute filter object.
//! This filter object determines whether selectable
//! interactive objects have a non-null owner.
@@ -65,29 +62,33 @@ public:
//! Indicates that the Interactive Object has the color
//! setting specified by the argument aCol at construction time.
Standard_Boolean HasColor() const;
Standard_Boolean HasColor() const { return hasC; }
//! Indicates that the Interactive Object has the width
//! setting specified by the argument aWidth at
//! construction time.
Standard_Boolean HasWidth() const;
//! Sets the color aCol.
//! This must be chosen from the list of colors in Quantity_NameOfColor.
void SetColor (const Quantity_NameOfColor aCol);
//! Sets the line width aWidth.
void SetWidth (const Standard_Real aWidth);
Standard_Boolean HasWidth() const { return hasW; }
//! Sets the color.
void SetColor (const Quantity_NameOfColor theCol)
{
myCol = theCol;
hasC = Standard_True;
}
//! Sets the line width.
void SetWidth (const Standard_Real theWidth)
{
myWid = theWidth;
hasW = Standard_True;
}
//! Removes the setting for color from the filter.
void UnsetColor();
void UnsetColor() { hasC = Standard_False; }
//! Removes the setting for width from the filter.
void UnsetWidth();
void UnsetWidth() { hasW = Standard_False; }
//! Indicates that the selected Interactive Object passes
//! the filter. The owner, anObj, can be either direct or
//! user. A direct owner is the corresponding
@@ -98,32 +99,15 @@ public:
//! the mouse, the object is kept; if not, it is rejected.
Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anObj) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(AIS_AttributeFilter,SelectMgr_Filter)
protected:
private:
Quantity_NameOfColor myCol;
Standard_Real myWid;
Standard_Boolean hasC;
Standard_Boolean hasW;
};
#include <AIS_AttributeFilter.lxx>
#endif // _AIS_AttributeFilter_HeaderFile

View File

@@ -1,33 +0,0 @@
// Created on: 1997-03-04
// Created by: Robert COUBLANC
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
inline void AIS_AttributeFilter::SetColor(const Quantity_NameOfColor aCol)
{myCol = aCol;hasC = Standard_True;}
inline void AIS_AttributeFilter::SetWidth(const Standard_Real aWid)
{myWid=aWid;hasW = Standard_True;}
inline void AIS_AttributeFilter::UnsetColor()
{hasC = Standard_False;}
inline void AIS_AttributeFilter::UnsetWidth()
{hasW = Standard_False;}
inline Standard_Boolean AIS_AttributeFilter::HasColor() const
{return hasC;}
inline Standard_Boolean AIS_AttributeFilter::HasWidth() const
{return hasW;}

View File

@@ -161,24 +161,23 @@ void AIS_Axis::SetAxis1Placement(const Handle(Geom_Axis1Placement)& anAxis)
//function : Compute
//purpose :
//=======================================================================
void AIS_Axis::Compute(const Handle(PrsMgr_PresentationManager3d)&,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer)
void AIS_Axis::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer )
{
aPresentation->SetInfiniteState (myInfiniteState);
aPresentation->SetDisplayPriority(5);
if (!myIsXYZAxis ){
GeomAdaptor_Curve curv(myComponent);
StdPrs_Curve::Add(aPresentation,curv,myDrawer);
thePrs->SetInfiniteState (myInfiniteState);
thePrs->SetDisplayPriority(5);
if (!myIsXYZAxis)
{
GeomAdaptor_Curve curv (myComponent);
StdPrs_Curve::Add (thePrs, curv, myDrawer);
}
else
{
DsgPrs_XYZAxisPresentation::Add (aPresentation,myLineAspect,myDir,myVal,
DsgPrs_XYZAxisPresentation::Add (thePrs, myLineAspect, myDir, myVal,
myDrawer->DatumAspect()->ToDrawLabels() ? myText : "",
myPfirst, myPlast);
}
}
//=======================================================================

View File

@@ -98,10 +98,13 @@ public:
private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeFields();
private:

View File

@@ -229,9 +229,9 @@ void AIS_CameraFrustum::fillBorders()
//function : Compute
//purpose :
//=======================================================================
void AIS_CameraFrustum::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
void AIS_CameraFrustum::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
thePrs->SetInfiniteState (true);
if (myTriangles.IsNull())

View File

@@ -58,9 +58,9 @@ public:
protected:
//! Computes presentation of camera frustum.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
//! Compute selection.
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,

View File

@@ -72,15 +72,14 @@ AIS_Circle::AIS_Circle(const Handle(Geom_Circle)& theComponent,
//function : Compute
//purpose :
//=======================================================================
void AIS_Circle::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer /*aMode*/)
void AIS_Circle::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer )
{
aPresentation->SetDisplayPriority(5);
if (myCircleIsArc) ComputeArc(aPresentation);
else ComputeCircle(aPresentation);
thePrs->SetDisplayPriority (5);
if (myCircleIsArc) { ComputeArc (thePrs); }
else { ComputeCircle (thePrs); }
}
//=======================================================================

View File

@@ -92,16 +92,19 @@ public:
private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& theprs,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeCircle (const Handle(Prs3d_Presentation)& aPresentation);
Standard_EXPORT void ComputeArc (const Handle(Prs3d_Presentation)& aPresentation);
Standard_EXPORT void ComputeCircleSelection (const Handle(SelectMgr_Selection)& aSelection);
Standard_EXPORT void ComputeArcSelection (const Handle(SelectMgr_Selection)& aSelection);
//! Replace aspects of already computed groups with the new value.

View File

@@ -545,7 +545,7 @@ void AIS_ColorScale::updateTextAspect()
//function : Compute
//purpose :
//=======================================================================
void AIS_ColorScale::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
void AIS_ColorScale::Compute (const Handle(PrsMgr_PresentationManager)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{

View File

@@ -392,7 +392,7 @@ public:
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
//! Compute presentation.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePresentation,
const Standard_Integer theMode) Standard_OVERRIDE;

View File

@@ -33,7 +33,7 @@
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <Standard_ErrorHandler.hxx>
#include <StdSelect_BRepSelectionTool.hxx>
#include <StdPrs_ShadedShape.hxx>
@@ -349,9 +349,9 @@ void AIS_ColoredShape::SetMaterial (const Graphic3d_MaterialAspect& theMaterial)
//function : Compute
//purpose :
//=======================================================================
void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
if (myshape.IsNull())
{

View File

@@ -95,9 +95,9 @@ public:
protected: //! @name override presentation computation
//! Compute presentation considering sub-shape color map.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
//! Compute selection considering sub-shape hidden state.
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,

View File

@@ -110,9 +110,9 @@ void AIS_ConnectedInteractive::Disconnect()
//function : Compute
//purpose :
//=======================================================================
void AIS_ConnectedInteractive::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
void AIS_ConnectedInteractive::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
if (HasConnection())
{

View File

@@ -103,7 +103,9 @@ protected:
//! compute anything, but just uses the
//! presentation of this last object, with
//! a transformation if there's one stored.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& theprs,
const Standard_Integer theMode) Standard_OVERRIDE;
//! Computes the presentation according to a point of view.
Standard_EXPORT virtual void computeHLR (const Handle(Graphic3d_Camera)& theProjector,

View File

@@ -17,12 +17,9 @@
#ifndef _AIS_DisplayStatus_HeaderFile
#define _AIS_DisplayStatus_HeaderFile
#include <PrsMgr_DisplayStatus.hxx>
//! To give the display status of an Interactive Object.
enum AIS_DisplayStatus
{
AIS_DS_Displayed, //!< the Interactive Object is displayed in the main viewer
AIS_DS_Erased, //!< the Interactive Object is hidden in main viewer
AIS_DS_None //!< the Interactive Object is nowhere displayed
};
typedef PrsMgr_DisplayStatus AIS_DisplayStatus;
#endif // _AIS_DisplayStatus_HeaderFile

View File

@@ -28,7 +28,6 @@
#include <TColStd_ListOfInteger.hxx>
class SelectMgr_EntityOwner;
class AIS_ExclusionFilter;
DEFINE_STANDARD_HANDLE(AIS_ExclusionFilter, SelectMgr_Filter)
@@ -79,43 +78,26 @@ public:
Standard_EXPORT Standard_Boolean Remove (const AIS_KindOfInteractive TypeToExclude, const Standard_Integer SignatureInType);
Standard_EXPORT void Clear();
Standard_Boolean IsExclusionFlagOn() const;
void SetExclusionFlag (const Standard_Boolean Status);
Standard_Boolean IsExclusionFlagOn() const { return myIsExclusionFlagOn; }
void SetExclusionFlag (const Standard_Boolean theStatus) { myIsExclusionFlagOn = theStatus; }
Standard_EXPORT Standard_Boolean IsStored (const AIS_KindOfInteractive aType) const;
Standard_EXPORT void ListOfStoredTypes (TColStd_ListOfInteger& TheList) const;
Standard_EXPORT void ListOfSignature (const AIS_KindOfInteractive aType, TColStd_ListOfInteger& TheStoredList) const;
DEFINE_STANDARD_RTTIEXT(AIS_ExclusionFilter,SelectMgr_Filter)
protected:
private:
Standard_EXPORT Standard_Boolean IsSignatureIn (const AIS_KindOfInteractive aType, const Standard_Integer aSignature) const;
Standard_Boolean myIsExclusionFlagOn;
TColStd_DataMapOfIntegerListOfInteger myStoredTypes;
};
#include <AIS_ExclusionFilter.lxx>
#endif // _AIS_ExclusionFilter_HeaderFile

View File

@@ -1,26 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
inline Standard_Boolean AIS_ExclusionFilter::IsExclusionFlagOn() const
{
return myIsExclusionFlagOn;
}
inline void AIS_ExclusionFilter::SetExclusionFlag(const Standard_Boolean Status)
{
myIsExclusionFlagOn = Status;
}

View File

@@ -16,62 +16,15 @@
#include <AIS_GlobalStatus.hxx>
#include <AIS_DisplayMode.hxx>
#include <Standard_Type.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
IMPLEMENT_STANDARD_RTTIEXT(AIS_GlobalStatus, Standard_Transient)
AIS_GlobalStatus::AIS_GlobalStatus():
myStatus(AIS_DS_None),
myDispMode(AIS_WireFrame),
myLayerIndex(0),
myIsHilit(Standard_False),
mySubInt(Standard_False)
// =======================================================================
// function : AIS_GlobalStatus
// purpose :
// =======================================================================
AIS_GlobalStatus::AIS_GlobalStatus()
: myDispMode (0),
myIsHilit(Standard_False),
mySubInt (Standard_False)
{
}
AIS_GlobalStatus::AIS_GlobalStatus(const AIS_DisplayStatus DS,
const Standard_Integer DMode,
const Standard_Integer SMode,
const Standard_Boolean /*ishilighted*/,
const Standard_Integer Layer):
myStatus(DS),
myDispMode(DMode),
myLayerIndex(Layer),
myIsHilit(Standard_False),
mySubInt(Standard_False)
{
mySelModes.Append(SMode);
}
void AIS_GlobalStatus::RemoveSelectionMode(const Standard_Integer aMode)
{
TColStd_ListIteratorOfListOfInteger anIt (mySelModes);
for (; anIt.More(); anIt.Next())
{
if (anIt.Value() == aMode)
{
mySelModes.Remove (anIt);
return;
}
}
}
void AIS_GlobalStatus::ClearSelectionModes()
{
mySelModes.Clear();
}
Standard_Boolean AIS_GlobalStatus::IsSModeIn(const Standard_Integer aMode) const
{
TColStd_ListIteratorOfListOfInteger anIt (mySelModes);
for (; anIt.More(); anIt.Next())
{
if (anIt.Value() == aMode)
{
return Standard_True;
}
}
return Standard_False;
}

View File

@@ -29,34 +29,25 @@
DEFINE_STANDARD_HANDLE(AIS_GlobalStatus, Standard_Transient)
//! Stores information about objects in graphic context:
//! - Status Of Display : in the main viewer
//! hidden in the main viewer
//! - Displayed Modes
//! - Active Selection Modes
//! - is the Interactive Object Current ?
//! - Layer Index
//! Stores information about objects in graphic context:
class AIS_GlobalStatus : public Standard_Transient
{
DEFINE_STANDARD_RTTIEXT(AIS_GlobalStatus, Standard_Transient)
public:
//! Default constructor.
Standard_EXPORT AIS_GlobalStatus();
Standard_EXPORT AIS_GlobalStatus(const AIS_DisplayStatus aStat, const Standard_Integer aDispMode, const Standard_Integer aSelMode, const Standard_Boolean ishilighted = Standard_False, const Standard_Integer aLayerIndex = 0);
void SetGraphicStatus (const AIS_DisplayStatus theStatus) { myStatus = theStatus; }
void AddSelectionMode (const Standard_Integer theMode) { if (!IsSModeIn (theMode)) mySelModes.Append (theMode); }
//! Sets display mode.
void SetDisplayMode (const Standard_Integer theMode) { myDispMode = theMode; }
//! Returns the display mode.
Standard_Integer DisplayMode() const { return myDispMode; }
void SetLayerIndex (const Standard_Integer theIndex) { myLayerIndex = theIndex; }
//! Sets display mode.
void SetDisplayMode (const Standard_Integer theMode) { myDispMode = theMode; }
//! Returns TRUE if object is highlighted
Standard_Boolean IsHilighted() const { return myIsHilit; }
//! Sets highlighted state.
void SetHilightStatus (const Standard_Boolean theStatus) { myIsHilit = theStatus; }
//! Changes applied highlight style for a particular object
@@ -65,39 +56,47 @@ public:
//! Returns applied highlight style for a particular object
const Handle(Prs3d_Drawer)& HilightStyle() const { return myHiStyle; }
//! Returns active selection modes of the object.
const TColStd_ListOfInteger& SelectionModes() const { return mySelModes; }
//! Return TRUE if selection mode was registered.
Standard_Boolean IsSModeIn (Standard_Integer theMode) const
{
return mySelModes.Contains (theMode);
}
//! Add selection mode.
Standard_Boolean AddSelectionMode (const Standard_Integer theMode)
{
if (!mySelModes.Contains (theMode))
{
mySelModes.Append (theMode);
return Standard_True;
}
return Standard_False;
}
//! Remove selection mode.
Standard_Boolean RemoveSelectionMode (const Standard_Integer theMode)
{
return mySelModes.Remove (theMode);
}
//! Remove all selection modes.
void ClearSelectionModes()
{
mySelModes.Clear();
}
Standard_Boolean IsSubIntensityOn() const { return mySubInt; }
void SubIntensityOn() { mySubInt = Standard_True; }
void SubIntensityOff() { mySubInt = Standard_False; }
Standard_EXPORT void RemoveSelectionMode (const Standard_Integer aMode);
Standard_EXPORT void ClearSelectionModes();
AIS_DisplayStatus GraphicStatus() const { return myStatus; }
//! keeps the active selection modes of the object
//! in the main viewer.
const TColStd_ListOfInteger& SelectionModes() const { return mySelModes; }
Standard_Boolean IsHilighted() const { return myIsHilit; }
Standard_EXPORT Standard_Boolean IsSModeIn (const Standard_Integer aMode) const;
//! Returns layer index.
Standard_Integer GetLayerIndex() const
{
return myLayerIndex;
}
void SetSubIntensity (Standard_Boolean theIsOn) { mySubInt = theIsOn; }
private:
TColStd_ListOfInteger mySelModes;
Handle(Prs3d_Drawer) myHiStyle;
AIS_DisplayStatus myStatus;
Standard_Integer myDispMode;
Standard_Integer myLayerIndex;
Standard_Boolean myIsHilit;
Standard_Boolean mySubInt;

File diff suppressed because it is too large Load Diff

View File

@@ -33,13 +33,11 @@
#include <Graphic3d_Vec2.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_TypeOfHighlight.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <SelectMgr_AndOrFilter.hxx>
#include <SelectMgr_IndexedMapOfOwner.hxx>
#include <SelectMgr_ListOfFilter.hxx>
#include <SelectMgr_PickingStrategy.hxx>
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <StdSelect_ViewerSelector3d.hxx>
#include <TCollection_AsciiString.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
@@ -84,7 +82,7 @@ public: //! @name object display management
//! - AIS_DS_Erased hidden in main viewer
//! - AIS_DS_Temporary temporarily displayed
//! - AIS_DS_None nowhere displayed.
Standard_EXPORT AIS_DisplayStatus DisplayStatus (const Handle(AIS_InteractiveObject)& anIobj) const;
Standard_EXPORT PrsMgr_DisplayStatus DisplayStatus (const Handle(AIS_InteractiveObject)& anIobj) const;
//! Returns the status of the Interactive Context for the view of the Interactive Object.
Standard_EXPORT void Status (const Handle(AIS_InteractiveObject)& anObj, TCollection_ExtendedString& astatus) const;
@@ -112,7 +110,7 @@ public: //! @name object display management
const Standard_Integer theDispMode,
const Standard_Integer theSelectionMode,
const Standard_Boolean theToUpdateViewer,
const AIS_DisplayStatus theDispStatus = AIS_DS_None);
const PrsMgr_DisplayStatus theDispStatus = PrsMgr_DisplayStatus_None);
//! Allows you to load the Interactive Object with a given selection mode,
//! and/or with the desired decomposition option, whether the object is visualized or not.
@@ -125,7 +123,7 @@ public: //! @name object display management
const Standard_Integer theSelectionMode,
const Standard_Boolean theToUpdateViewer,
const Standard_Boolean theToAllowDecomposition,
const AIS_DisplayStatus theDispStatus = AIS_DS_None)
const PrsMgr_DisplayStatus theDispStatus = PrsMgr_DisplayStatus_None)
{
(void )theToAllowDecomposition;
Display (theIObj, theDispMode, theSelectionMode, theToUpdateViewer, theDispStatus);
@@ -793,16 +791,16 @@ public: //! @name Selection Filters management
{ myFilters->SetFilterType (theFilterType); }
//! Returns the list of filters active in a local context.
Standard_EXPORT const SelectMgr_ListOfFilter& Filters() const;
const SelectMgr_ListOfFilter& Filters() const { return myFilters->StoredFilters(); }
//! Allows you to add the filter.
Standard_EXPORT void AddFilter (const Handle(SelectMgr_Filter)& theFilter);
void AddFilter (const Handle(SelectMgr_Filter)& theFilter) { myFilters->Add (theFilter); }
//! Removes a filter from context.
Standard_EXPORT void RemoveFilter (const Handle(SelectMgr_Filter)& theFilter);
void RemoveFilter (const Handle(SelectMgr_Filter)& theFilter) { myFilters->Remove (theFilter); }
//! Remove all filters from context.
Standard_EXPORT void RemoveFilters();
void RemoveFilters() { myFilters->Clear(); }
//! Return picking strategy; SelectMgr_PickingStrategy_FirstAcceptable by default.
//! @sa MoveTo()/Filters()
@@ -836,7 +834,7 @@ public: //! @name common properties
const Handle(SelectMgr_SelectionManager)& SelectionManager() const { return mgrSelector; }
const Handle(PrsMgr_PresentationManager3d)& MainPrsMgr() const { return myMainPM; }
const Handle(PrsMgr_PresentationManager)& MainPrsMgr() const { return myMainPM; }
const Handle(StdSelect_ViewerSelector3d)& MainSelector() const { return myMainSel; }
@@ -861,11 +859,14 @@ public: //! @name common properties
//! Returns the list theListOfIO of objects with indicated display status particular Type WhichKind and Signature WhichSignature.
//! By Default, WhichSignature equals 1. This means that there is a check on type only.
Standard_EXPORT void ObjectsByDisplayStatus (const AIS_DisplayStatus theStatus, AIS_ListOfInteractive& theListOfIO) const;
Standard_EXPORT void ObjectsByDisplayStatus (const PrsMgr_DisplayStatus theStatus, AIS_ListOfInteractive& theListOfIO) const;
//! gives the list of objects with indicated display status
//! Type and signature by Default, <WhichSignature> = -1 means control only on <WhichKind>.
Standard_EXPORT void ObjectsByDisplayStatus (const AIS_KindOfInteractive WhichKind, const Standard_Integer WhichSignature, const AIS_DisplayStatus theStatus, AIS_ListOfInteractive& theListOfIO) const;
Standard_EXPORT void ObjectsByDisplayStatus (const AIS_KindOfInteractive WhichKind,
const Standard_Integer WhichSignature,
const PrsMgr_DisplayStatus theStatus,
AIS_ListOfInteractive& theListOfIO) const;
//! fills <aListOfIO> with objects of a particular Type and Signature with no consideration of display status.
//! by Default, <WhichSignature> = -1 means control only on <WhichKind>.
@@ -881,12 +882,10 @@ public: //! @name common properties
Standard_EXPORT void Disconnect (const Handle(AIS_InteractiveObject)& theAssembly, const Handle(AIS_InteractiveObject)& theObjToDisconnect = NULL);
//! Query objects visible or hidden in specified view due to affinity mask.
Standard_EXPORT void ObjectsForView (AIS_ListOfInteractive& theListOfIO, const Handle(V3d_View)& theView, const Standard_Boolean theIsVisibleInView, const AIS_DisplayStatus theStatus = AIS_DS_None) const;
//! Clears all the structures which don't belong to objects displayed at neutral point
//! only effective when no Local Context is opened...
//! returns the number of removed structures from the viewers.
Standard_EXPORT Standard_Integer PurgeDisplay();
Standard_EXPORT void ObjectsForView (AIS_ListOfInteractive& theListOfIO,
const Handle(V3d_View)& theView,
const Standard_Boolean theIsVisibleInView,
const PrsMgr_DisplayStatus theStatus = PrsMgr_DisplayStatus_None) const;
//! Return rotation gravity point.
Standard_EXPORT virtual gp_Pnt GravityPoint (const Handle(V3d_View)& theView) const;
@@ -1245,8 +1244,6 @@ protected: //! @name internal methods
const Standard_Boolean theToUpdateViewer);
Standard_EXPORT void InitAttributes();
Standard_EXPORT Standard_Integer PurgeViewer (const Handle(V3d_Viewer)& Vwr);
//! Helper function to unhighlight all entity owners currently highlighted with seleciton color.
Standard_EXPORT void unselectOwners (const Handle(AIS_InteractiveObject)& theObject);
@@ -1399,7 +1396,7 @@ protected: //! @name internal methods
//! @param theObj [in] the object to change status
//! @param theStatus status, if NULL, unbind object
Standard_EXPORT void setObjectStatus (const Handle(AIS_InteractiveObject)& theIObj,
const AIS_DisplayStatus theStatus,
const PrsMgr_DisplayStatus theStatus,
const Standard_Integer theDispyMode,
const Standard_Integer theSelectionMode);
@@ -1407,7 +1404,7 @@ protected: //! @name internal fields
AIS_DataMapOfIOStatus myObjects;
Handle(SelectMgr_SelectionManager) mgrSelector;
Handle(PrsMgr_PresentationManager3d) myMainPM;
Handle(PrsMgr_PresentationManager) myMainPM;
Handle(V3d_Viewer) myMainVwr;
Handle(StdSelect_ViewerSelector3d) myMainSel;
V3d_View* myLastActiveView;

File diff suppressed because it is too large Load Diff

View File

@@ -1,456 +0,0 @@
// Created on: 1997-01-29
// Created by: Robert COUBLANC
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <AIS_DataMapIteratorOfDataMapOfIOStatus.hxx>
#include <AIS_GlobalStatus.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Selection.hxx>
#include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
#include <Graphic3d_MapOfStructure.hxx>
#include <Graphic3d_Structure.hxx>
#include <Graphic3d_StructureManager.hxx>
#include <Prs3d_BasicAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Quantity_Color.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <SelectMgr_Filter.hxx>
#include <SelectMgr_OrFilter.hxx>
#include <SelectMgr_SelectionManager.hxx>
#include <Standard_Transient.hxx>
#include <StdSelect_ViewerSelector3d.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS_Shape.hxx>
#include <V3d_View.hxx>
#include <V3d_Viewer.hxx>
//=======================================================================
//function : SetSelectionModeActive
//purpose :
//=======================================================================
void AIS_InteractiveContext::SetSelectionModeActive (const Handle(AIS_InteractiveObject)& theObj,
const Standard_Integer theMode,
const Standard_Boolean theIsActive,
const AIS_SelectionModesConcurrency theActiveFilter,
const Standard_Boolean theIsForce)
{
if (theObj.IsNull())
{
return;
}
const Handle(AIS_GlobalStatus)* aStat = myObjects.Seek (theObj);
if (aStat == NULL)
{
return;
}
if (!theIsActive
|| (theMode == -1
&& theActiveFilter == AIS_SelectionModesConcurrency_Single))
{
if ((*aStat)->GraphicStatus() == AIS_DS_Displayed
|| theIsForce)
{
if (theMode == -1)
{
for (TColStd_ListIteratorOfListOfInteger aModeIter ((*aStat)->SelectionModes()); aModeIter.More(); aModeIter.Next())
{
mgrSelector->Deactivate (theObj, aModeIter.Value());
}
}
else
{
mgrSelector->Deactivate (theObj, theMode);
}
}
if (theMode == -1)
{
(*aStat)->ClearSelectionModes();
}
else
{
(*aStat)->RemoveSelectionMode (theMode);
}
return;
}
else if (theMode == -1)
{
return;
}
if ((*aStat)->SelectionModes().Size() == 1
&& (*aStat)->SelectionModes().First() == theMode)
{
return;
}
if ((*aStat)->GraphicStatus() == AIS_DS_Displayed
|| theIsForce)
{
switch (theActiveFilter)
{
case AIS_SelectionModesConcurrency_Single:
{
for (TColStd_ListIteratorOfListOfInteger aModeIter ((*aStat)->SelectionModes()); aModeIter.More(); aModeIter.Next())
{
mgrSelector->Deactivate (theObj, aModeIter.Value());
}
(*aStat)->ClearSelectionModes();
break;
}
case AIS_SelectionModesConcurrency_GlobalOrLocal:
{
const Standard_Integer aGlobSelMode = theObj->GlobalSelectionMode();
TColStd_ListOfInteger aRemovedModes;
for (TColStd_ListIteratorOfListOfInteger aModeIter ((*aStat)->SelectionModes()); aModeIter.More(); aModeIter.Next())
{
if ((theMode == aGlobSelMode && aModeIter.Value() != aGlobSelMode)
|| (theMode != aGlobSelMode && aModeIter.Value() == aGlobSelMode))
{
mgrSelector->Deactivate (theObj, aModeIter.Value());
aRemovedModes.Append (aModeIter.Value());
}
}
if (aRemovedModes.Size() == (*aStat)->SelectionModes().Size())
{
(*aStat)->ClearSelectionModes();
}
else
{
for (TColStd_ListIteratorOfListOfInteger aModeIter (aRemovedModes); aModeIter.More(); aModeIter.Next())
{
(*aStat)->RemoveSelectionMode (aModeIter.Value());
}
}
break;
}
case AIS_SelectionModesConcurrency_Multiple:
{
break;
}
}
mgrSelector->Activate (theObj, theMode);
}
(*aStat)->AddSelectionMode (theMode);
}
// ============================================================================
// function : Activate
// purpose :
// ============================================================================
void AIS_InteractiveContext::Activate (const Standard_Integer theMode,
const Standard_Boolean theIsForce)
{
AIS_ListOfInteractive aDisplayedObjects;
DisplayedObjects (aDisplayedObjects);
for (AIS_ListIteratorOfListOfInteractive anIter (aDisplayedObjects); anIter.More(); anIter.Next())
{
Load (anIter.Value(), -1);
Activate (anIter.Value(), theMode, theIsForce);
}
}
// ============================================================================
// function : Deactivate
// purpose :
// ============================================================================
void AIS_InteractiveContext::Deactivate (const Standard_Integer theMode)
{
AIS_ListOfInteractive aDisplayedObjects;
DisplayedObjects (aDisplayedObjects);
for (AIS_ListIteratorOfListOfInteractive anIter (aDisplayedObjects); anIter.More(); anIter.Next())
{
Deactivate (anIter.Value(), theMode);
}
}
// ============================================================================
// function : Deactivate
// purpose :
// ============================================================================
void AIS_InteractiveContext::Deactivate()
{
AIS_ListOfInteractive aDisplayedObjects;
DisplayedObjects (aDisplayedObjects);
for (AIS_ListIteratorOfListOfInteractive anIter (aDisplayedObjects); anIter.More(); anIter.Next())
{
Deactivate (anIter.Value());
}
}
//=======================================================================
//function : ActivatedModes
//purpose :
//=======================================================================
void AIS_InteractiveContext::ActivatedModes (const Handle(AIS_InteractiveObject)& theObj,
TColStd_ListOfInteger& theList) const
{
const Handle(AIS_GlobalStatus)* aStatus = myObjects.Seek (theObj);
if (aStatus != NULL)
{
for (TColStd_ListIteratorOfListOfInteger aModeIter ((*aStatus)->SelectionModes()); aModeIter.More(); aModeIter.Next())
{
theList.Append (aModeIter.Value());
}
}
}
//=======================================================================
//function : SubIntensityOn
//purpose :
//=======================================================================
void AIS_InteractiveContext::
SubIntensityOn(const Handle(AIS_InteractiveObject)& anIObj,
const Standard_Boolean updateviewer)
{
turnOnSubintensity (anIObj);
if (updateviewer)
myMainVwr->Update();
}
//=======================================================================
//function : SubIntensityOff
//purpose :
//=======================================================================
void AIS_InteractiveContext::SubIntensityOff (const Handle(AIS_InteractiveObject)& theObj,
const Standard_Boolean theToUpdateViewer)
{
const Handle(AIS_GlobalStatus)* aStatus = myObjects.Seek (theObj);
if (aStatus == NULL
|| !(*aStatus)->IsSubIntensityOn())
{
return;
}
(*aStatus)->SubIntensityOff();
Standard_Boolean toUpdateMain = Standard_False;
if ((*aStatus)->GraphicStatus() == AIS_DS_Displayed)
{
myMainPM->Unhighlight (theObj);
toUpdateMain = Standard_True;
}
if (IsSelected (theObj))
{
highlightSelected (theObj->GlobalSelOwner());
}
if (theToUpdateViewer && toUpdateMain)
{
myMainVwr->Update();
}
}
//=======================================================================
//function : AddFilter
//purpose :
//=======================================================================
void AIS_InteractiveContext::AddFilter(const Handle(SelectMgr_Filter)& aFilter)
{
myFilters->Add(aFilter);
}
//=======================================================================
//function : RemoveFilter
//purpose :
//=======================================================================
void AIS_InteractiveContext::RemoveFilter(const Handle(SelectMgr_Filter)& aFilter)
{
myFilters->Remove(aFilter);
}
//=======================================================================
//function : RemoveFilters
//purpose :
//=======================================================================
void AIS_InteractiveContext::RemoveFilters()
{
myFilters->Clear();
}
//=======================================================================
//function : Filters
//purpose :
//=======================================================================
const SelectMgr_ListOfFilter& AIS_InteractiveContext::Filters() const
{
return myFilters->StoredFilters();
}
//=======================================================================
//function : DisplayActiveSensitive
//purpose :
//=======================================================================
void AIS_InteractiveContext::DisplayActiveSensitive(const Handle(V3d_View)& aviou)
{
myMainSel->DisplaySensitive(aviou);
}
//=======================================================================
//function : DisplayActiveSensitive
//purpose :
//=======================================================================
void AIS_InteractiveContext::DisplayActiveSensitive(const Handle(AIS_InteractiveObject)& theObj,
const Handle(V3d_View)& theView)
{
const Handle(AIS_GlobalStatus)* aStatus = myObjects.Seek (theObj);
if (aStatus == NULL)
{
return;
}
for (TColStd_ListIteratorOfListOfInteger aModeIter ((*aStatus)->SelectionModes()); aModeIter.More(); aModeIter.Next())
{
const Handle(SelectMgr_Selection)& aSel = theObj->Selection (aModeIter.Value());
myMainSel->DisplaySensitive (aSel, theObj->Transformation(), theView, Standard_False);
}
}
//=======================================================================
//function : ClearActiveSensitive
//purpose :
//=======================================================================
void AIS_InteractiveContext::ClearActiveSensitive (const Handle(V3d_View)& theView)
{
myMainSel->ClearSensitive (theView);
}
//=======================================================================
//function : PurgeDisplay
//purpose :
//=======================================================================
Standard_Integer AIS_InteractiveContext::PurgeDisplay()
{
Standard_Integer NbStr = PurgeViewer(myMainVwr);
myMainVwr->Update();
return NbStr;
}
//=======================================================================
//function : PurgeViewer
//purpose :
//=======================================================================
Standard_Integer AIS_InteractiveContext::PurgeViewer(const Handle(V3d_Viewer)& Vwr)
{
Handle(Graphic3d_StructureManager) GSM = Vwr->StructureManager();
Standard_Integer NbCleared(0);
Graphic3d_MapOfStructure SOS;
GSM->DisplayedStructures(SOS);
Handle(Graphic3d_Structure) G;
for(Graphic3d_MapIteratorOfMapOfStructure It(SOS); It.More();It.Next()){
G = It.Key();
Standard_Address Add = G->Owner();
if(Add==NULL){
G->Erase();
G->Clear();// it means that it is not referenced as a presentation of InterfactiveObject...
NbCleared++;
}
Handle(AIS_InteractiveObject) IO = (AIS_InteractiveObject*)Add;
if(!myObjects.IsBound(IO)){
G->Erase();
NbCleared++;
}
}
return NbCleared;
}
//=======================================================================
//function : IsImmediateModeOn
//purpose :
//=======================================================================
Standard_Boolean AIS_InteractiveContext::IsImmediateModeOn() const
{
return myMainPM->IsImmediateModeOn();
}
//=======================================================================
//function : BeginImmediateDraw
//purpose :
//=======================================================================
Standard_Boolean AIS_InteractiveContext::BeginImmediateDraw()
{
if (myMainPM->IsImmediateModeOn())
{
myMainPM->BeginImmediateDraw();
return Standard_True;
}
return Standard_False;
}
//=======================================================================
//function : ImmediateAdd
//purpose :
//=======================================================================
Standard_Boolean AIS_InteractiveContext::ImmediateAdd (const Handle(AIS_InteractiveObject)& theObj,
const Standard_Integer theMode)
{
if (!myMainPM->IsImmediateModeOn())
{
return Standard_False;
}
myMainPM->AddToImmediateList (myMainPM->Presentation (theObj, theMode));
return Standard_True;
}
//=======================================================================
//function : EndImmediateDraw
//purpose :
//=======================================================================
Standard_Boolean AIS_InteractiveContext::EndImmediateDraw (const Handle(V3d_View)& theView)
{
if (!myMainPM->IsImmediateModeOn())
{
return Standard_False;
}
myMainPM->EndImmediateDraw (theView->Viewer());
return Standard_True;
}
//=======================================================================
//function : EndImmediateDraw
//purpose :
//=======================================================================
Standard_Boolean AIS_InteractiveContext::EndImmediateDraw()
{
if (!myMainPM->IsImmediateModeOn())
{
return Standard_False;
}
myMainPM->EndImmediateDraw (myMainVwr);
return Standard_True;
}

View File

@@ -1,126 +0,0 @@
// Created on: 2001-01-09
// Created by: Sergey Altukhov
// Copyright (c) 2001-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
// Modified: 22/03/04 ; SAN : OCC4895 High-level interface for controlling polygon offsets
#include <AIS_GlobalStatus.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <Prs3d_BasicAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Quantity_Color.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <SelectMgr_Filter.hxx>
#include <SelectMgr_SelectionManager.hxx>
#include <Standard_Transient.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS_Shape.hxx>
#include <V3d_View.hxx>
#include <V3d_Viewer.hxx>
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
//=======================================================================
//function : SetPolygonOffsets
//purpose :
//=======================================================================
void AIS_InteractiveContext::SetPolygonOffsets(
const Handle(AIS_InteractiveObject)& anObj,
const Standard_Integer aMode,
const Standard_ShortReal aFactor,
const Standard_ShortReal aUnits,
const Standard_Boolean updateviewer)
{
if ( anObj.IsNull() )
return;
setContextToObject (anObj);
anObj->SetPolygonOffsets( aMode, aFactor, aUnits );
if ( updateviewer ) {
if( myObjects.IsBound( anObj ) ) {
Handle(AIS_GlobalStatus) STATUS = myObjects(anObj);
if ( STATUS->GraphicStatus() == AIS_DS_Displayed )
myMainVwr->Update();
}
}
}
//=======================================================================
//function : HasPolygonOffsets
//purpose :
//=======================================================================
Standard_Boolean AIS_InteractiveContext::HasPolygonOffsets(const Handle(AIS_InteractiveObject)& anObj) const
{
return ( !anObj.IsNull() && anObj->HasPolygonOffsets() );
}
//=======================================================================
//function : PolygonOffsets
//purpose :
//=======================================================================
void AIS_InteractiveContext::PolygonOffsets(
const Handle(AIS_InteractiveObject)& anObj,
Standard_Integer& aMode,
Standard_ShortReal& aFactor,
Standard_ShortReal& aUnits) const
{
if ( HasPolygonOffsets( anObj ) )
anObj->PolygonOffsets( aMode, aFactor, aUnits );
}
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AIS_InteractiveContext::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myObjects.Size())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mgrSelector.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainPM.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainVwr.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainSel.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastActiveView)
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastPicked.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToHilightSelected)
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mySelection.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myFilters.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myDefaultDrawer.get())
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Selected])
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Dynamic])
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalSelected])
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalDynamic])
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_SubIntensity])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedSeq.Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurDetected)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurHighlighted)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPickingStrategy)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAutoActivateSelMode)
}

View File

@@ -97,6 +97,15 @@ void AIS_InteractiveObject::SetContext (const Handle(AIS_InteractiveContext)& th
}
}
//=======================================================================
//function : SetDisplayStatus
//purpose :
//=======================================================================
void AIS_InteractiveObject::SetDisplayStatus (PrsMgr_DisplayStatus theStatus)
{
myDisplayStatus = theStatus;
}
//=======================================================================
//function : HasPresentation
//purpose :

View File

@@ -143,6 +143,9 @@ protected:
//! may have a presentation dependant of the view of Display.
Standard_EXPORT AIS_InteractiveObject(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView);
//! Set presentation display status.
Standard_EXPORT void SetDisplayStatus (PrsMgr_DisplayStatus theStatus);
protected:
AIS_InteractiveContext* myCTXPtr; //!< pointer to Interactive Context, where object is currently displayed; @sa SetContext()

Some files were not shown because too many files have changed in this diff Show More