0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / Select3D / Select3D_SensitiveCurve.cxx
CommitLineData
b311480e 1// Created on: 1995-03-13
2// Created by: Robert COUBLANC
3// Copyright (c) 1995-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
f751596e 17#include <Select3D_SensitiveCurve.hxx>
7f24b768 18
7fd59977 19#include <Precision.hxx>
f751596e 20#include <TColgp_Array1OfPnt.hxx>
7fd59977 21
92efcf78 22IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveCurve,Select3D_SensitivePoly)
23
7fd59977 24//==================================================
25// Function: Creation
26// Purpose :
27//==================================================
0ef04197 28Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId,
f751596e 29 const Handle(TColgp_HArray1OfPnt)& thePoints)
2157d6ac 30: Select3D_SensitivePoly (theOwnerId, thePoints, Standard_True)
ac04d101 31
7fd59977 32{
3bf9a45f 33 SetSensitivityFactor (3);
7fd59977 34}
35
36//==================================================
f751596e 37// Function: Creation
7fd59977 38// Purpose :
39//==================================================
0ef04197 40Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId,
f751596e 41 const TColgp_Array1OfPnt& thePoints)
2157d6ac 42: Select3D_SensitivePoly (theOwnerId, thePoints, Standard_True)
ac04d101 43{
3bf9a45f 44 SetSensitivityFactor (3);
7fd59977 45}
46
ac04d101
SA
47//=======================================================================
48//function : GetConnected
aec37c15 49//purpose :
50//=======================================================================
f751596e 51Handle(Select3D_SensitiveEntity) Select3D_SensitiveCurve::GetConnected()
ac04d101 52{
7f24b768 53 Handle(TColgp_HArray1OfPnt) aPoints = new TColgp_HArray1OfPnt (1, myPolyg.Size());
54 for (Standard_Integer anIndex = 1; anIndex <= myPolyg.Size(); ++anIndex)
ac04d101 55 {
7f24b768 56 aPoints->SetValue (anIndex, myPolyg.Pnt (anIndex-1));
ac04d101 57 }
7f24b768 58 Handle(Select3D_SensitiveEntity) aNewEntity = new Select3D_SensitiveCurve (myOwnerId, aPoints);
ac04d101 59 return aNewEntity;
7f24b768 60}