File: VisualCueInfo.code

package info (click to toggle)
paraview 4.1.0%2Bdfsg%2B1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 278,136 kB
  • ctags: 340,527
  • sloc: cpp: 2,314,053; ansic: 817,139; python: 245,770; xml: 68,996; tcl: 48,285; fortran: 39,116; yacc: 5,713; java: 3,827; perl: 3,108; sh: 2,045; lex: 1,809; makefile: 935; asm: 471; pascal: 228
file content (152 lines) | stat: -rw-r--r-- 4,111 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Function: SetPointF
Declaration: void SetPointF(int i, const float *pt);
Definition:
// ****************************************************************************
// Method: VisualCueInfo::SetPointF
//
// Purpose: Set a specific entry (the ith point) in the vector of
//          points for this VisualCueInfo.
//
//          Points are stored in a double vector. Each successive group
//          of 3 entries in the vector is a single point.
//
// Programmer: Mark C. Miller
// Creation:   June 3, 2004
// 
// ****************************************************************************
void
VisualCueInfo::SetPointF(int i, const float *pt)
{
    // extend vector of points as necessary
    while (points.size() < 3*(i+1))
        points.push_back(0.0);

    points[3*i+0] = pt[0];
    points[3*i+1] = pt[1];
    points[3*i+2] = pt[2];

    Select(0,(void*)&points);
}

Function: GetPointF
Declaration: bool GetPointF(int i, float *pt) const;
Definition:
// ****************************************************************************
// Method: VisualCueInfo::GetPointF
//
// Purpose: Get a specific entry (the ith point) in the vector of
//          points for this VisualCueInfo.
//
//          Return false if an ith entry does not exist
///
// Programmer: Mark C. Miller
// Creation:   June 3, 2004
// 
// ****************************************************************************
bool
VisualCueInfo::GetPointF(int i, float *pt) const
{
    if (points.size() < 3*i)
        return false;

    pt[0] = (float) points[3*i+0];
    pt[1] = (float) points[3*i+1];
    pt[2] = (float) points[3*i+2];

    return true;
}

Function: SetFromP
Declaration: void SetFromP(const PickAttributes *pa);
Definition:
void
VisualCueInfo::SetFromP(const PickAttributes *pa)
{
    if (pa == 0)
        return;

    SetCueType(PickPoint);
    SetPointD(0,pa->GetPickPoint());
    SetLabel(pa->GetPickLetter());
    if ((pa->GetPickType() != PickAttributes::Zone) &&
        (pa->GetPickType() != PickAttributes::DomainZone))
        SetGlyphType("Square");
}

Function: SetFromL
Declaration: void SetFromL(const Line *line);
Definition:
void
VisualCueInfo::SetFromL(const Line *line)
{
    if (line == 0)
        return;

    SetCueType(RefLine);
    SetPointD(0,line->GetPoint1());
    SetPointD(1,line->GetPoint2());
    SetLabel(line->GetDesignator());
    SetShowLabel(line->GetReflineLabels());
    SetLineWidth(line->GetLineWidth());
    SetLineStyle(line->GetLineStyle());
    SetColor(line->GetColor());
}

Function: SetPointD
Declaration: void SetPointD(int i, const double *pt);
Definition:
// ****************************************************************************
// Method: VisualCueInfo::SetPointD
//
// Purpose: Set a specific entry (the ith point) in the vector of
//          points for this VisualCueInfo.
//
//          Points are stored in a double vector. Each successive group
//          of 3 entries in the vector is a single point.
//
// Programmer: Mark C. Miller
// Creation:   June 3, 2004
// 
// ****************************************************************************
void
VisualCueInfo::SetPointD(int i, const double *pt)
{
    // extend vector of points as necessary
    while (points.size() < 3*(i+1))
        points.push_back(0.0);

    points[3*i+0] = pt[0];
    points[3*i+1] = pt[1];
    points[3*i+2] = pt[2];

    Select(0,(void*)&points);
}

Function: GetPointD
Declaration: bool GetPointD(int i, double *pt) const;
Definition:
// ****************************************************************************
// Method: VisualCueInfo::GetPointD
//
// Purpose: Get a specific entry (the ith point) in the vector of
//          points for this VisualCueInfo.
//
//          Return false if an ith entry does not exist
///
// Programmer: Mark C. Miller
// Creation:   June 3, 2004
// 
// ****************************************************************************
bool
VisualCueInfo::GetPointD(int i, double *pt) const
{
    if (points.size() < 3*i)
        return false;

    pt[0] = points[3*i+0];
    pt[1] = points[3*i+1];
    pt[2] = points[3*i+2];

    return true;
}