Panda3D
panda
src
parametrics
nurbsVertex.I
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file nurbsVertex.I
10
* @author drose
11
* @date 2002-12-04
12
*/
13
14
/**
15
*
16
*/
17
INLINE NurbsVertex::
18
NurbsVertex() {
19
_vertex.set(0, 0, 0, 1);
20
}
21
22
/**
23
*
24
*/
25
INLINE NurbsVertex::
26
NurbsVertex(
const
NurbsVertex
©) :
27
_vertex(copy._vertex),
28
_space(copy._space),
29
_space_path(copy._space_path)
30
{
31
}
32
33
/**
34
*
35
*/
36
INLINE
void
NurbsVertex::
37
operator = (
const
NurbsVertex
©) {
38
_vertex = copy._vertex;
39
_space = copy._space;
40
_space_path = copy._space_path;
41
}
42
43
/**
44
*
45
*/
46
INLINE NurbsVertex::
47
~NurbsVertex() {
48
}
49
50
/**
51
*
52
*/
53
INLINE
void
NurbsVertex::
54
set_vertex(
const
LVecBase4 &vertex) {
55
_vertex = vertex;
56
}
57
58
/**
59
*
60
*/
61
INLINE
const
LVecBase4 &NurbsVertex::
62
get_vertex()
const
{
63
return
_vertex;
64
}
65
66
/**
67
* Sets the space of this vertex as a fixed NodePath.
68
*/
69
INLINE
void
NurbsVertex::
70
set_space
(
const
NodePath
&space) {
71
_space = space;
72
_space_path = std::string();
73
}
74
75
/**
76
* Sets the space of this vertex as a relative path from the rel_to node.
77
*/
78
INLINE
void
NurbsVertex::
79
set_space
(
const
std::string &space) {
80
_space =
NodePath
();
81
_space_path = space;
82
}
83
84
/**
85
*
86
*/
87
INLINE
NodePath
NurbsVertex::
88
get_space(
const
NodePath
&rel_to)
const
{
89
if
(_space_path.empty()) {
90
return
_space;
91
}
else
{
92
return
rel_to.
find
(_space_path);
93
}
94
}
NurbsVertex
This represents a single control vertex in a NurbsEvaluator.
Definition:
nurbsVertex.h:32
NodePath::find
NodePath find(const std::string &path) const
Searches for a node below the referenced node that matches the indicated string.
Definition:
nodePath.cxx:314
NodePath
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition:
nodePath.h:159
NurbsVertex::set_space
void set_space(const NodePath &space)
Sets the space of this vertex as a fixed NodePath.
Definition:
nurbsVertex.I:70
Generated on Sat Jan 11 2020 15:15:17 for Panda3D by
1.8.17