0031313: Foundation Classes - Dump improvement for classes
[occt.git] / src / Prs3d / Prs3d.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-08-26
2// Created by: Jean Louis FRENKEL
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _Prs3d_HeaderFile
18#define _Prs3d_HeaderFile
19
1b9f5d95 20#include <Graphic3d_ArrayOfPrimitives.hxx>
42cf5bc1 21#include <Standard.hxx>
22#include <Standard_DefineAlloc.hxx>
23#include <Standard_Handle.hxx>
42cf5bc1 24#include <Prs3d_Drawer.hxx>
1b9f5d95 25#include <Prs3d_NListOfSequenceOfPnt.hxx>
7dd7c146 26#include <Prs3d_Presentation.hxx>
1b9f5d95 27
42cf5bc1 28class TopoDS_Shape;
42cf5bc1 29
30//! The Prs3d package provides the following services
31//! - a presentation object (the context for all
32//! modifications to the display, its presentation will be
33//! displayed in every view of an active viewer)
34//! - an attribute manager governing how objects such
35//! as color, width, and type of line are displayed;
36//! these are generic objects, whereas those in
37//! StdPrs are specific geometries and topologies.
38//! - generic algorithms providing default settings for
39//! objects such as points, curves, surfaces and shapes
40//! - a root object which provides the abstract
41//! framework for the DsgPrs definitions at work in
42//! display of dimensions, relations and trihedra.
43class Prs3d
44{
45public:
46
47 DEFINE_STANDARD_ALLOC
42cf5bc1 48
49 //! draws an arrow at a given location, with respect
50 //! to a given direction.
ee2be2a8 51 Standard_EXPORT static Standard_Boolean MatchSegment (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const gp_Pnt& p1, const gp_Pnt& p2, Standard_Real& dist);
42cf5bc1 52
53 //! Computes the absolute deflection value depending on
54 //! the type of deflection in theDrawer:
55 //! <ul>
56 //! <li><b>Aspect_TOD_RELATIVE</b>: the absolute deflection is computed using the relative
57 //! deviation coefficient from theDrawer and the shape's bounding box;</li>
58 //! <li><b>Aspect_TOD_ABSOLUTE</b>: the maximal chordial deviation from theDrawer is returned.</li>
59 //! </ul>
60 //! In case of the type of deflection in theDrawer computed relative deflection for shape
61 //! is stored as absolute deflection. It is necessary to use it later on for sub-shapes.
62 //! This function should always be used to compute the deflection value for building
63 //! discrete representations of the shape (triangualtion, wireframe) to avoid incosistencies
64 //! between different representations of the shape and undesirable visual artifacts.
65 Standard_EXPORT static Standard_Real GetDeflection (const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer);
66
1b9f5d95 67 //! Assembles array of primitives for sequence of polylines.
68 //! @param thePoints [in] the polylines sequence
69 //! @return array of primitives
70 Standard_EXPORT static Handle(Graphic3d_ArrayOfPrimitives) PrimitivesFromPolylines (const Prs3d_NListOfSequenceOfPnt& thePoints);
42cf5bc1 71
1b9f5d95 72 //! Add primitives into new group in presentation and clear the list of polylines.
73 Standard_EXPORT static void AddPrimitivesGroup (const Handle(Prs3d_Presentation)& thePrs,
74 const Handle(Prs3d_LineAspect)& theAspect,
75 Prs3d_NListOfSequenceOfPnt& thePolylines);
42cf5bc1 76
77};
78
42cf5bc1 79#endif // _Prs3d_HeaderFile