cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstMesh
msh3DirPDTreeMesh.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
// ****************************************************************************
4
//
5
// Copyright (c) 2014, Seth Billings, Russell Taylor, Johns Hopkins University
6
// All rights reserved.
7
//
8
// Redistribution and use in source and binary forms, with or without
9
// modification, are permitted provided that the following conditions are
10
// met:
11
//
12
// 1. Redistributions of source code must retain the above copyright
13
// notice, this list of conditions and the following disclaimer.
14
//
15
// 2. Redistributions in binary form must reproduce the above copyright
16
// notice, this list of conditions and the following disclaimer in the
17
// documentation and/or other materials provided with the distribution.
18
//
19
// 3. Neither the name of the copyright holder nor the names of its
20
// contributors may be used to endorse or promote products derived from
21
// this software without specific prior written permission.
22
//
23
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
//
35
// ****************************************************************************
36
37
#ifndef _msh3DirPDTreeMesh_h
38
#define _msh3DirPDTreeMesh_h
39
40
#include <
cisstMesh/msh3DirPDTreeBase.h
>
41
#include <
cisstMesh/msh3Mesh.h
>
42
43
// Always include last!
44
#include <
cisstMesh/mshExport.h
>
45
46
class
CISST_EXPORT
msh3DirPDTreeMesh
:
public
msh3DirPDTreeBase
47
{
48
// Here we define the datum type of the directed covariance
49
// tree to be a triangle and we represent the underlying
50
// datum data using a mesh.
51
52
// NOTE: for function overrides, be sure "const" type is same as the base class otherwise,
53
// the base class function will be treated as a different function and not actually
54
// be overridden!
55
56
public
:
57
msh3Mesh
Mesh
;
58
msh3BoundingBox
Bounds
;
59
60
//-- Methods --//
61
62
// constructor
63
// mesh - mesh from which to construct the tree
64
// (each datum in the tree is a triangle of the mesh)
65
// nThresh - min number of datums in subdivided node
66
// diagThreh - min physical size of subdivided node
67
msh3DirPDTreeMesh
(
msh3Mesh
mesh,
int
nThresh,
double
diagThresh);
68
69
// destructor
70
virtual
~ msh3DirPDTreeMesh();
71
72
//-- Base Class Method Overrides --//
73
74
virtual
vct3
DatumSortPoint
(
int
datum);
// return sort point of this datum
75
76
virtual
vct3
DatumNorm
(
int
datum);
// return normal orientation of this datum
77
78
virtual
void
EnlargeBounds
(
const
vctFrm3
& F)
const
;
79
virtual
void
EnlargeBounds
(
const
vctFrm3
& F,
msh3DirPDTreeNode
*pNode)
const
;
80
virtual
void
EnlargeBounds
(
const
vctFrm3
& F,
int
datum,
msh3BoundingBox
& BB)
const
;
81
82
//--- Noise Model Methods ---//
83
84
vct3x3
&
DatumCov
(
int
datum)
// return measurement noise model for this datum
85
{
86
return
Mesh
.
TriangleCov
[datum];
87
}
88
vct3x3
*
DatumCovPtr
(
int
datum)
// return measurement noise model for this datum
89
{
90
return
&(
Mesh
.
TriangleCov
[datum]);
91
}
92
93
vct3
&
DatumCovEig
(
int
datum)
// return measurement noise model for this datum
94
{
95
return
Mesh
.
TriangleCovEig
[datum];
96
}
97
vct3
*
DatumCovEigPtr
(
int
datum)
// return measurement noise model for this datum
98
{
99
return
&(
Mesh
.
TriangleCovEig
[datum]);
100
}
101
102
};
103
104
#endif
msh3DirPDTreeBase::msh3DirPDTreeBase
msh3DirPDTreeBase()
Definition
msh3DirPDTreeBase.h:93
msh3DirPDTreeBase::msh3DirPDTreeNode
friend class msh3DirPDTreeNode
Definition
msh3DirPDTreeBase.h:67
msh3DirPDTreeMesh::DatumCov
vct3x3 & DatumCov(int datum)
Definition
msh3DirPDTreeMesh.h:84
msh3DirPDTreeMesh::msh3DirPDTreeMesh
msh3DirPDTreeMesh(msh3Mesh mesh, int nThresh, double diagThresh)
msh3DirPDTreeMesh::Mesh
msh3Mesh Mesh
Definition
msh3DirPDTreeMesh.h:57
msh3DirPDTreeMesh::EnlargeBounds
virtual void EnlargeBounds(const vctFrm3 &F, msh3DirPDTreeNode *pNode) const
msh3DirPDTreeMesh::DatumNorm
virtual vct3 DatumNorm(int datum)
msh3DirPDTreeMesh::DatumCovPtr
vct3x3 * DatumCovPtr(int datum)
Definition
msh3DirPDTreeMesh.h:88
msh3DirPDTreeMesh::Bounds
msh3BoundingBox Bounds
Definition
msh3DirPDTreeMesh.h:58
msh3DirPDTreeMesh::DatumCovEigPtr
vct3 * DatumCovEigPtr(int datum)
Definition
msh3DirPDTreeMesh.h:97
msh3DirPDTreeMesh::DatumSortPoint
virtual vct3 DatumSortPoint(int datum)
msh3DirPDTreeMesh::DatumCovEig
vct3 & DatumCovEig(int datum)
Definition
msh3DirPDTreeMesh.h:93
msh3DirPDTreeMesh::EnlargeBounds
virtual void EnlargeBounds(const vctFrm3 &F, int datum, msh3BoundingBox &BB) const
msh3DirPDTreeMesh::EnlargeBounds
virtual void EnlargeBounds(const vctFrm3 &F) const
msh3Mesh
Definition
msh3Mesh.h:57
msh3Mesh::TriangleCov
vctDynamicVector< vct3x3 > TriangleCov
Definition
msh3Mesh.h:79
msh3Mesh::TriangleCovEig
vctDynamicVector< vct3 > TriangleCovEig
Definition
msh3Mesh.h:80
CISST_EXPORT
#define CISST_EXPORT
Definition
cmnExportMacros.h:50
msh3BoundingBox
vctBoundingBox3 msh3BoundingBox
Definition
msh3BoundingBox.h:42
msh3DirPDTreeBase.h
msh3Mesh.h
mshExport.h
Macros to export the symbols of cisstMesh (in a Dll).
vct3x3
vctFixedSizeMatrix< double, 3, 3 > vct3x3
Definition
vctFixedSizeMatrixTypes.h:59
vct3
vctFixedSizeVector< double, 3 > vct3
Definition
vctFixedSizeVectorTypes.h:46
vctFrm3
vctFrameBase< vctRot3 > vctFrm3
Definition
vctTransformationTypes.h:137
Generated by
1.18.0