Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Andrew Bauer
VTK
Commits
66a6f8eb
Commit
66a6f8eb
authored
Aug 12, 1994
by
Will Schroeder
Browse files
*** empty log message ***
parent
a7d191a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/IdList.hh
View file @
66a6f8eb
//
// List of id's. Used for passing information back and forth between objects.
//
/*=========================================================================
Program: Visualization Library
Module: IdList.hh
Language: C++
Date: $Date$
Version: $Revision$
This file is part of the Visualization Library. No part of this file
or its contents may be copied, reproduced or altered in any way
without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlIdList - list of point or cell ids
// .SECTION Description
// vlIdLIst is used to represent and pass data id's between objects. vlIdList
// may represent any type of integer id but usually represent point and
// cell ids.
#ifndef vlIdList_h
#define vlIdList_h
...
...
@@ -18,22 +36,31 @@ public:
void
SetId
(
const
int
i
,
const
int
id
)
{
this
->
Ia
[
i
]
=
id
;};
void
InsertId
(
const
int
i
,
const
int
id
)
{
this
->
Ia
.
InsertValue
(
i
,
id
);};
int
InsertNextId
(
const
int
id
)
{
return
this
->
Ia
.
InsertNextValue
(
id
);};
int
getChunk
(
const
int
sz
)
{
// get chunk of memory
int
pos
=
this
->
Ia
.
GetMaxId
()
+
1
;
this
->
Ia
.
InsertValue
(
pos
+
sz
-
1
,
0
);
return
pos
;
}
int
getChunk
(
const
int
sz
);
void
Reset
()
{
this
->
Ia
.
Reset
();};
// special set operations
void
DeleteId
(
int
Id
);
void
IntersectWith
(
vlIdList
&
otherIds
);
int
IsId
(
int
id
)
{
for
(
int
i
=
0
;
i
<
this
->
GetNumberOfIds
();
i
++
)
if
(
id
==
this
->
GetId
(
i
))
return
1
;
return
0
;}
int
IsId
(
int
id
);
protected:
vlIntArray
Ia
;
};
inline
int
vlIdList
::
getChunk
(
const
int
sz
)
{
// get chunk of memory
int
pos
=
this
->
Ia
.
GetMaxId
()
+
1
;
this
->
Ia
.
InsertValue
(
pos
+
sz
-
1
,
0
);
return
pos
;
}
inline
int
vlIdList
::
IsId
(
int
id
)
{
for
(
int
i
=
0
;
i
<
this
->
GetNumberOfIds
();
i
++
)
if
(
id
==
this
->
GetId
(
i
))
return
1
;
return
0
;
}
#endif
include/ImpFunc.hh
View file @
66a6f8eb
...
...
@@ -28,10 +28,14 @@ class vlImplicitFunction : public vlObject
public:
char
*
GetClassName
()
{
return
"vlImplicitFunction"
;};
// Description:
// Evaluate function at position x-y-z and return value.
virtual
float
Evaluate
(
float
x
,
float
y
,
float
z
)
=
0
;
// Description:
// Evaluate function normal at position x-y-z and pass back vector.
virtual
void
EvaluateNormal
(
float
x
,
float
y
,
float
z
,
float
n
[
3
])
=
0
;
};
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment