0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
[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 <Standard_Boolean.hxx>
42cf5bc1 25#include <Standard_Real.hxx>
26#include <Prs3d_Drawer.hxx>
1b9f5d95 27#include <Prs3d_NListOfSequenceOfPnt.hxx>
28
42cf5bc1 29class TopoDS_Shape;
30class Prs3d_Presentation;
42cf5bc1 31
32//! The Prs3d package provides the following services
33//! - a presentation object (the context for all
34//! modifications to the display, its presentation will be
35//! displayed in every view of an active viewer)
36//! - an attribute manager governing how objects such
37//! as color, width, and type of line are displayed;
38//! these are generic objects, whereas those in
39//! StdPrs are specific geometries and topologies.
40//! - generic algorithms providing default settings for
41//! objects such as points, curves, surfaces and shapes
42//! - a root object which provides the abstract
43//! framework for the DsgPrs definitions at work in
44//! display of dimensions, relations and trihedra.
45class Prs3d
46{
47public:
48
49 DEFINE_STANDARD_ALLOC
42cf5bc1 50
51 //! draws an arrow at a given location, with respect
52 //! to a given direction.
ee2be2a8 53 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 54
55 //! Computes the absolute deflection value depending on
56 //! the type of deflection in theDrawer:
57 //! <ul>
58 //! <li><b>Aspect_TOD_RELATIVE</b>: the absolute deflection is computed using the relative
59 //! deviation coefficient from theDrawer and the shape's bounding box;</li>
60 //! <li><b>Aspect_TOD_ABSOLUTE</b>: the maximal chordial deviation from theDrawer is returned.</li>
61 //! </ul>
62 //! In case of the type of deflection in theDrawer computed relative deflection for shape
63 //! is stored as absolute deflection. It is necessary to use it later on for sub-shapes.
64 //! This function should always be used to compute the deflection value for building
65 //! discrete representations of the shape (triangualtion, wireframe) to avoid incosistencies
66 //! between different representations of the shape and undesirable visual artifacts.
67 Standard_EXPORT static Standard_Real GetDeflection (const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer);
68
1b9f5d95 69 //! Assembles array of primitives for sequence of polylines.
70 //! @param thePoints [in] the polylines sequence
71 //! @return array of primitives
72 Standard_EXPORT static Handle(Graphic3d_ArrayOfPrimitives) PrimitivesFromPolylines (const Prs3d_NListOfSequenceOfPnt& thePoints);
42cf5bc1 73
1b9f5d95 74 //! Add primitives into new group in presentation and clear the list of polylines.
75 Standard_EXPORT static void AddPrimitivesGroup (const Handle(Prs3d_Presentation)& thePrs,
76 const Handle(Prs3d_LineAspect)& theAspect,
77 Prs3d_NListOfSequenceOfPnt& thePolylines);
42cf5bc1 78
79};
80
42cf5bc1 81#endif // _Prs3d_HeaderFile