1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0031431: Visualization, PrsMgr_PresentableObject - simplify HLR computing interface

Multiple PrsMgr_PresentableObject::Compute() methods have been replaced by single one
PrsMgr_PresentableObject::computeHLR().
Dummy implementations of previously declared methods have been removed
from AIS classes not implementng HLR presentation.
Class Prs3d_Projector has been removed and Graphic3d_Camera is now passed directly,
so that redundant dependency from HLRAlgo_Projector in Prs3d interfaces has been eliminated.
StdPrs_HLRShape and StdPrs_HLRPolyShape now implement common interface StdPrs_HLRShapeI.
This commit is contained in:
kgv
2020-03-14 20:34:46 +03:00
parent 29263c947e
commit b5163d2f8d
90 changed files with 220 additions and 1248 deletions

View File

@@ -35,8 +35,6 @@ Prs3d_PointAspect.hxx
Prs3d_Presentation.hxx
Prs3d_PresentationShadow.cxx
Prs3d_PresentationShadow.hxx
Prs3d_Projector.cxx
Prs3d_Projector.hxx
Prs3d_Root.hxx
Prs3d_ShadingAspect.cxx
Prs3d_ShadingAspect.hxx

View File

@@ -1,57 +0,0 @@
// Copyright (c) 1995-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 <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Trsf.hxx>
#include <HLRAlgo_Projector.hxx>
#include <Prs3d_Projector.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Prs3d_Projector,Standard_Transient)
Prs3d_Projector::Prs3d_Projector (const HLRAlgo_Projector& HLPr): MyProjector(HLPr)
{}
Prs3d_Projector::Prs3d_Projector (const Standard_Boolean Pers,
const Standard_Real Focus,
const Standard_Real DX,
const Standard_Real DY,
const Standard_Real DZ,
const Standard_Real XAt,
const Standard_Real YAt,
const Standard_Real ZAt,
const Standard_Real XUp,
const Standard_Real YUp,
const Standard_Real ZUp)
{
gp_Pnt At (XAt,YAt,ZAt);
gp_Dir Zpers (DX,DY,DZ);
gp_Dir Ypers (XUp,YUp,ZUp);
gp_Dir Xpers = Ypers.Crossed(Zpers);
gp_Ax3 Axe (At, Zpers, Xpers);
gp_Trsf T;
T.SetTransformation(Axe);
MyProjector = HLRAlgo_Projector(T,Pers,Focus);
}
HLRAlgo_Projector Prs3d_Projector::Projector () const
{
return MyProjector;
}

View File

@@ -1,64 +0,0 @@
// Created on: 1993-03-19
// Created by: Jean-Louis FRENKEL
// Copyright (c) 1993-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.
#ifndef _Prs3d_Projector_HeaderFile
#define _Prs3d_Projector_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <HLRAlgo_Projector.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Boolean.hxx>
class Prs3d_Projector;
DEFINE_STANDARD_HANDLE(Prs3d_Projector, Standard_Transient)
//! A projector object.
//! This object defines the parameters of a view for a
//! visualization algorithm. It is, for example, used by the
//! hidden line removal algorithms.
class Prs3d_Projector : public Standard_Transient
{
public:
Standard_EXPORT Prs3d_Projector(const HLRAlgo_Projector& Pr);
//! Constructs a projector framework from the following parameters
//! - Pers is true if the view is a perspective view and
//! false if it is an axonometric one;
//! - Focus is the focal length if a perspective view is defined;
//! - DX, DY and DZ are the coordinates of the
//! projection vector;
//! - XAt, YAt and ZAt are the coordinates of the view point;
//! - XUp, YUp and ZUp are the coordinates of the
//! vertical direction vector.
Standard_EXPORT Prs3d_Projector(const Standard_Boolean Pers, const Standard_Real Focus, const Standard_Real DX, const Standard_Real DY, const Standard_Real DZ, const Standard_Real XAt, const Standard_Real YAt, const Standard_Real ZAt, const Standard_Real XUp, const Standard_Real YUp, const Standard_Real ZUp);
//! Returns a projector object for use in a hidden line removal algorithm.
Standard_EXPORT HLRAlgo_Projector Projector() const;
DEFINE_STANDARD_RTTIEXT(Prs3d_Projector,Standard_Transient)
private:
HLRAlgo_Projector MyProjector;
};
#endif // _Prs3d_Projector_HeaderFile