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
a5adc668
Commit
a5adc668
authored
Jun 29, 1995
by
Ken Martin
Browse files
changed vl to vtk
parent
bf4064de
Changes
484
Hide whitespace changes
Inline
Side-by-side
include/AGraymap.hh
View file @
a5adc668
/*=========================================================================
Program: Visualization
Library
Program: Visualization
Toolkit
Module: AGraymap.hh
Language: C++
Date: $Date$
Version: $Revision$
This file is part of the Visualization
Library
. No part of this file
This file is part of the Visualization
Toolkit
. 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 v
l
AGraymap - scalar data in intensity + alpha (grayscale + texture) form
// .NAME v
tk
AGraymap - scalar data in intensity + alpha (grayscale + texture) form
// .SECTION Description
// v
l
AGraymap is a concrete implementation of v
l
Scalars. v
l
AGraymap
// v
tk
AGraymap is a concrete implementation of v
tk
Scalars. v
tk
AGraymap
// represents scalars using using one value for intensity (grayscale) and
// one value for alpha (transparency). The intensity and alpha values range
// between (0,255) (i.e., an unsigned char value).
#ifndef __v
l
AGraymap_h
#define __v
l
AGraymap_h
#ifndef __v
tk
AGraymap_h
#define __v
tk
AGraymap_h
#include
"CoScalar.hh"
#include
"CArray.hh"
class
v
l
AGraymap
:
public
v
l
ColorScalars
class
v
tk
AGraymap
:
public
v
tk
ColorScalars
{
public:
v
l
AGraymap
()
{};
~
v
l
AGraymap
()
{};
v
l
AGraymap
(
const
v
l
AGraymap
&
fs
)
{
this
->
S
=
fs
.
S
;};
v
l
AGraymap
(
const
int
sz
,
const
int
ext
=
1000
)
:
S
(
2
*
sz
,
2
*
ext
){};
v
tk
AGraymap
()
{};
~
v
tk
AGraymap
()
{};
v
tk
AGraymap
(
const
v
tk
AGraymap
&
fs
)
{
this
->
S
=
fs
.
S
;};
v
tk
AGraymap
(
const
int
sz
,
const
int
ext
=
1000
)
:
S
(
2
*
sz
,
2
*
ext
){};
int
Allocate
(
const
int
sz
,
const
int
ext
=
1000
)
{
return
this
->
S
.
Allocate
(
2
*
sz
,
2
*
ext
);};
void
Initialize
()
{
this
->
S
.
Initialize
();};
char
*
GetClassName
()
{
return
"v
l
AGraymap"
;};
char
*
GetClassName
()
{
return
"v
tk
AGraymap"
;};
// v
l
Scalar interface
v
l
Scalars
*
MakeObject
(
int
sze
,
int
ext
=
1000
);
// v
tk
Scalar interface
v
tk
Scalars
*
MakeObject
(
int
sze
,
int
ext
=
1000
);
int
GetNumberOfScalars
()
{
return
(
this
->
S
.
GetMaxId
()
+
1
)
/
2
;};
void
Squeeze
()
{
this
->
S
.
Squeeze
();};
int
GetNumberOfValuesPerScalar
()
{
return
2
;};
// miscellaneous
v
l
AGraymap
&
operator
=
(
const
v
l
AGraymap
&
fs
);
void
operator
+=
(
const
v
l
AGraymap
&
fs
)
{
this
->
S
+=
fs
.
S
;};
v
tk
AGraymap
&
operator
=
(
const
v
tk
AGraymap
&
fs
);
void
operator
+=
(
const
v
tk
AGraymap
&
fs
)
{
this
->
S
+=
fs
.
S
;};
void
Reset
()
{
this
->
S
.
Reset
();};
unsigned
char
*
GetPtr
(
const
int
id
);
unsigned
char
*
WritePtr
(
const
int
id
,
const
int
number
);
void
WrotePtr
();
// v
l
ColorScalar interface.
// v
tk
ColorScalar interface.
unsigned
char
*
GetColor
(
int
id
);
void
GetColor
(
int
id
,
unsigned
char
rgba
[
4
]);
void
SetColor
(
int
id
,
unsigned
char
rgba
[
4
]);
...
...
@@ -60,13 +60,13 @@ public:
int
InsertNextColor
(
unsigned
char
rgba
[
4
]);
protected:
v
l
CharArray
S
;
v
tk
CharArray
S
;
};
// Description:
// Set a rgba color value at a particular array location. Does not do
// range checking.
inline
void
v
l
AGraymap
::
SetColor
(
int
i
,
unsigned
char
rgba
[
4
])
inline
void
v
tk
AGraymap
::
SetColor
(
int
i
,
unsigned
char
rgba
[
4
])
{
i
*=
2
;
this
->
S
[
i
]
=
(
rgba
[
0
]
>
rgba
[
1
]
?
(
rgba
[
0
]
>
rgba
[
2
]
?
rgba
[
0
]
:
rgba
[
2
])
:
...
...
@@ -77,7 +77,7 @@ inline void vlAGraymap::SetColor(int i, unsigned char rgba[4])
// Description:
// Insert a rgba color value at a particular array location. Does range
// checking and will allocate additional memory if necessary.
inline
void
v
l
AGraymap
::
InsertColor
(
int
i
,
unsigned
char
rgba
[
4
])
inline
void
v
tk
AGraymap
::
InsertColor
(
int
i
,
unsigned
char
rgba
[
4
])
{
this
->
S
.
InsertValue
(
2
*
i
+
1
,
rgba
[
3
]);
this
->
S
[
2
*
i
]
=
(
rgba
[
0
]
>
rgba
[
1
]
?
(
rgba
[
0
]
>
rgba
[
2
]
?
rgba
[
0
]
:
rgba
[
2
])
:
...
...
@@ -87,7 +87,7 @@ inline void vlAGraymap::InsertColor(int i, unsigned char rgba[4])
// Description:
// Insert a rgba color value at the next available slot in the array. Will
// allocate memory if necessary.
inline
int
v
l
AGraymap
::
InsertNextColor
(
unsigned
char
rgba
[
4
])
inline
int
v
tk
AGraymap
::
InsertNextColor
(
unsigned
char
rgba
[
4
])
{
int
id
=
this
->
S
.
GetMaxId
()
+
1
;
this
->
S
.
InsertValue
(
id
,
rgba
[
3
]);
...
...
@@ -99,7 +99,7 @@ inline int vlAGraymap::InsertNextColor(unsigned char rgba[4])
// Description:
// Get pointer to array of data starting at data position "id".
inline
unsigned
char
*
v
l
AGraymap
::
GetPtr
(
const
int
id
)
inline
unsigned
char
*
v
tk
AGraymap
::
GetPtr
(
const
int
id
)
{
return
this
->
S
.
GetPtr
(
2
*
id
);
}
...
...
@@ -109,7 +109,7 @@ inline unsigned char *vlAGraymap::GetPtr(const int id)
// bumped by number (and memory allocated if necessary). Id is the
// location you wish to write into; number is the number of scalars to
// write. Use the method WrotePtr() to mark completion of write.
inline
unsigned
char
*
v
l
AGraymap
::
WritePtr
(
const
int
id
,
const
int
number
)
inline
unsigned
char
*
v
tk
AGraymap
::
WritePtr
(
const
int
id
,
const
int
number
)
{
return
this
->
S
.
WritePtr
(
2
*
id
,
2
*
number
);
}
...
...
@@ -117,7 +117,7 @@ inline unsigned char *vlAGraymap::WritePtr(const int id, const int number)
// Description:
// Terminate direct write of data. Although dummy routine now, reserved for
// future use.
inline
void
v
l
AGraymap
::
WrotePtr
()
{}
inline
void
v
tk
AGraymap
::
WrotePtr
()
{}
#endif
include/APixmap.hh
View file @
a5adc668
/*=========================================================================
Program: Visualization
Library
Program: Visualization
Toolkit
Module: APixmap.hh
Language: C++
Date: $Date$
Version: $Revision$
This file is part of the Visualization
Library
. No part of this file
This file is part of the Visualization
Toolkit
. 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 v
l
APixmap - scalar data in rgba (color + transparency) form
// .NAME v
tk
APixmap - scalar data in rgba (color + transparency) form
// .SECTION Description
// v
l
APixmap is a concrete implementation of v
l
Scalars. Scalars are
// v
tk
APixmap is a concrete implementation of v
tk
Scalars. Scalars are
// represented using three values for color (red, green, blue) plus alpha
// transparency value. Each of r,g,b,a components ranges from (0,255) (i.e.,
// an unsigned char value).
#ifndef __v
l
APixmap_h
#define __v
l
APixmap_h
#ifndef __v
tk
APixmap_h
#define __v
tk
APixmap_h
#include
"CoScalar.hh"
#include
"CArray.hh"
class
v
l
APixmap
:
public
v
l
ColorScalars
class
v
tk
APixmap
:
public
v
tk
ColorScalars
{
public:
v
l
APixmap
()
{};
~
v
l
APixmap
()
{};
v
l
APixmap
(
const
v
l
APixmap
&
fs
)
{
this
->
S
=
fs
.
S
;};
v
l
APixmap
(
const
int
sz
,
const
int
ext
=
1000
)
:
S
(
4
*
sz
,
4
*
ext
){};
v
tk
APixmap
()
{};
~
v
tk
APixmap
()
{};
v
tk
APixmap
(
const
v
tk
APixmap
&
fs
)
{
this
->
S
=
fs
.
S
;};
v
tk
APixmap
(
const
int
sz
,
const
int
ext
=
1000
)
:
S
(
4
*
sz
,
4
*
ext
){};
int
Allocate
(
const
int
sz
,
const
int
ext
=
1000
)
{
return
this
->
S
.
Allocate
(
4
*
sz
,
4
*
ext
);};
void
Initialize
()
{
this
->
S
.
Initialize
();};
char
*
GetClassName
()
{
return
"v
l
APixmap"
;};
char
*
GetClassName
()
{
return
"v
tk
APixmap"
;};
// v
l
Scalar interface
v
l
Scalars
*
MakeObject
(
int
sze
,
int
ext
=
1000
);
// v
tk
Scalar interface
v
tk
Scalars
*
MakeObject
(
int
sze
,
int
ext
=
1000
);
int
GetNumberOfScalars
()
{
return
(
this
->
S
.
GetMaxId
()
+
1
)
/
4
;};
void
Squeeze
()
{
this
->
S
.
Squeeze
();};
int
GetNumberOfValuesPerScalar
()
{
return
4
;};
// miscellaneous
v
l
APixmap
&
operator
=
(
const
v
l
APixmap
&
fs
);
void
operator
+=
(
const
v
l
APixmap
&
fs
)
{
this
->
S
+=
fs
.
S
;};
v
tk
APixmap
&
operator
=
(
const
v
tk
APixmap
&
fs
);
void
operator
+=
(
const
v
tk
APixmap
&
fs
)
{
this
->
S
+=
fs
.
S
;};
void
Reset
()
{
this
->
S
.
Reset
();};
unsigned
char
*
GetPtr
(
const
int
id
);
unsigned
char
*
WritePtr
(
const
int
id
,
const
int
number
);
void
WrotePtr
();
// v
l
ColorScalar interface.
// v
tk
ColorScalar interface.
unsigned
char
*
GetColor
(
int
id
);
void
GetColor
(
int
id
,
unsigned
char
rgba
[
4
]);
void
SetColor
(
int
id
,
unsigned
char
rgba
[
4
]);
...
...
@@ -59,19 +59,19 @@ public:
int
InsertNextColor
(
unsigned
char
rgba
[
4
]);
protected:
v
l
CharArray
S
;
v
tk
CharArray
S
;
};
// Description:
// Return a rgba color at array location i.
inline
unsigned
char
*
v
l
APixmap
::
GetColor
(
int
i
)
inline
unsigned
char
*
v
tk
APixmap
::
GetColor
(
int
i
)
{
return
this
->
S
.
GetPtr
(
4
*
i
);
}
// Description:
// Get pointer to array of data starting at data position "id".
inline
unsigned
char
*
v
l
APixmap
::
GetPtr
(
const
int
id
)
inline
unsigned
char
*
v
tk
APixmap
::
GetPtr
(
const
int
id
)
{
return
this
->
S
.
GetPtr
(
4
*
id
);
}
...
...
@@ -81,7 +81,7 @@ inline unsigned char *vlAPixmap::GetPtr(const int id)
// bumped by number (and memory allocated if necessary). Id is the
// location you wish to write into; number is the number of scalars to
// write. Use the method WrotePtr() to mark completion of write.
inline
unsigned
char
*
v
l
APixmap
::
WritePtr
(
const
int
id
,
const
int
number
)
inline
unsigned
char
*
v
tk
APixmap
::
WritePtr
(
const
int
id
,
const
int
number
)
{
return
this
->
S
.
WritePtr
(
4
*
id
,
4
*
number
);
}
...
...
@@ -89,6 +89,6 @@ inline unsigned char *vlAPixmap::WritePtr(const int id, const int number)
// Description:
// Terminate direct write of data. Although dummy routine now, reserved for
// future use.
inline
void
v
l
APixmap
::
WrotePtr
()
{}
inline
void
v
tk
APixmap
::
WrotePtr
()
{}
#endif
include/Actor.hh
View file @
a5adc668
/*=========================================================================
Program: Visualization
Library
Program: Visualization
Toolkit
Module: Actor.hh
Language: C++
Date: $Date$
Version: $Revision$
This file is part of the Visualization
Library
. No part of this file or its
This file is part of the Visualization
Toolkit
. 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 v
l
Actor - an entity in a rendered image
// .NAME v
tk
Actor - an entity in a rendered image
// .SECTION Description
// v
l
Actor is used to represent an entity in a rendering scene. It handles
// v
tk
Actor is used to represent an entity in a rendering scene. It handles
// functions related to the actors position, orientation and scaling. It
// combines these instance variables into one matrix as follows: [x y z 1]
// = [x y z 1] Translate(-origin) Scale(scale) Rot(y) Rot(x) Rot (z)
...
...
@@ -24,8 +24,8 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
// The actor also maintains a reference to the defining geometry (i.e., the
// mapper), and rendering properties.
#ifndef __v
l
Actor_hh
#define __v
l
Actor_hh
#ifndef __v
tk
Actor_hh
#define __v
tk
Actor_hh
#include
"Object.hh"
#include
"Property.hh"
...
...
@@ -33,122 +33,122 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
#include
"Mapper.hh"
#include
"Trans.hh"
class
v
l
Renderer
;
class
v
tk
Renderer
;
class
v
l
Actor
:
public
v
l
Object
class
v
tk
Actor
:
public
v
tk
Object
{
public:
v
l
Actor
();
~
v
l
Actor
();
char
*
GetClassName
()
{
return
"v
l
Actor"
;};
void
PrintSelf
(
ostream
&
os
,
v
l
Indent
indent
);
v
tk
Actor
();
~
v
tk
Actor
();
char
*
GetClassName
()
{
return
"v
tk
Actor"
;};
void
PrintSelf
(
ostream
&
os
,
v
tk
Indent
indent
);
void
Render
(
v
l
Renderer
*
ren
);
void
Render
(
v
tk
Renderer
*
ren
);
// Description:
// Specify the property object to control rendering surface properties.
void
SetProperty
(
v
l
Property
*
lut
);
void
SetProperty
(
v
l
Property
&
lut
)
{
this
->
SetProperty
(
&
lut
);};
void
SetProperty
(
v
tk
Property
*
lut
);
void
SetProperty
(
v
tk
Property
&
lut
)
{
this
->
SetProperty
(
&
lut
);};
// Description:
// Get the property object that controls rendering surface properties.
v
l
Property
*
GetProperty
();
v
tk
Property
*
GetProperty
();
// Description:
// Specify the Texture object to control rendering texture.
v
l
SetObjectMacro
(
Texture
,
v
l
Texture
);
v
tk
SetObjectMacro
(
Texture
,
v
tk
Texture
);
// Description:
// Get the Texture object that controls rendering texture.
v
l
GetObjectMacro
(
Texture
,
v
l
Texture
);
v
tk
GetObjectMacro
(
Texture
,
v
tk
Texture
);
// Description:
// This is the method that is used to connect an actor to the end of a
// visualization pipeline, i.e. the Mapper.
v
l
SetObjectMacro
(
Mapper
,
v
l
Mapper
);
v
tk
SetObjectMacro
(
Mapper
,
v
tk
Mapper
);
// Description:
// Returns the Mapper that this actor is getting it's data from.
v
l
GetObjectMacro
(
Mapper
,
v
l
Mapper
);
v
tk
GetObjectMacro
(
Mapper
,
v
tk
Mapper
);
// Description:
// Set a user defined matrix to concatenate with.
v
l
SetObjectMacro
(
UserMatrix
,
v
l
Matrix4x4
);
v
tk
SetObjectMacro
(
UserMatrix
,
v
tk
Matrix4x4
);
// Description:
// Returns the user defined transformation matrix.
v
l
GetObjectMacro
(
UserMatrix
,
v
l
Matrix4x4
);
v
tk
GetObjectMacro
(
UserMatrix
,
v
tk
Matrix4x4
);
// Description:
// Get the position of the actor.
v
l
GetVectorMacro
(
Position
,
float
,
3
);
v
tk
GetVectorMacro
(
Position
,
float
,
3
);
// Description:
// Sets the posiiton of the actor.
v
l
SetVector3Macro
(
Position
,
float
);
v
tk
SetVector3Macro
(
Position
,
float
);
void
AddPosition
(
float
deltaPosition
[
3
]);
void
AddPosition
(
float
deltaX
,
float
deltaY
,
float
deltaZ
);
// Description:
// Get the origin of the actor. This is the point about which all
// rotations take place.
v
l
GetVectorMacro
(
Origin
,
float
,
3
);
v
tk
GetVectorMacro
(
Origin
,
float
,
3
);
// Description:
// Set the origin of the actor. This is the point about which all
// rotations take place.
v
l
SetVector3Macro
(
Origin
,
float
);
v
tk
SetVector3Macro
(
Origin
,
float
);
// Description:
// Get the scale of the actor. Scaling in performed independently on the
// X,Y and Z axis.
v
l
GetVectorMacro
(
Scale
,
float
,
3
);
v
tk
GetVectorMacro
(
Scale
,
float
,
3
);
// Description:
// Set the scale of the actor. Scaling in performed independently on the
// X,Y and Z axis.
v
l
SetVector3Macro
(
Scale
,
float
);
v
tk
SetVector3Macro
(
Scale
,
float
);
// Description:
// Get the visibility of the actor. Visibility is like a light switch
// for actors. Use it to turn them on or off.
v
l
GetMacro
(
Visibility
,
int
);
v
tk
GetMacro
(
Visibility
,
int
);
// Description:
// Set the visibility of the actor. Visibility is like a light switch
// for actors. Use it to turn them on or off.
v
l
SetMacro
(
Visibility
,
int
);
v
tk
SetMacro
(
Visibility
,
int
);
// Description:
// Set the visibility of the actor. Visibility is like a light switch
// for actors. Use it to turn them on or off.
v
l
BooleanMacro
(
Visibility
,
int
);
v
tk
BooleanMacro
(
Visibility
,
int
);
// Description:
// Get the pickable instance variable. This determines if the actor can
// be picked (typically using the mouse). Also see dragable.
v
l
GetMacro
(
Pickable
,
int
);
v
tk
GetMacro
(
Pickable
,
int
);
// Description:
// Set the pickable instance variable. This determines if the actor can
// be picked (typically using the mouse). Also see dragable.
v
l
SetMacro
(
Pickable
,
int
);
v
tk
SetMacro
(
Pickable
,
int
);
// Description:
// Set the pickable instance variable. This determines if the actor can
// be picked (typically using the mouse). Also see dragable.
v
l
BooleanMacro
(
Pickable
,
int
);
v
tk
BooleanMacro
(
Pickable
,
int
);
// Description:
// Get the value of the dragable instance variable. This determines if
// an actor once picked, can be dragged (translated) through space.
// This is typically done through an interactive mouse interface.
// This does not affect methods such as SetPosition.
v
l
GetMacro
(
Dragable
,
int
);
v
tk
GetMacro
(
Dragable
,
int
);
// Description:
// Set the value of the dragable instance variable. This determines if
// an actor once picked, can be dragged (translated) through space.
// This is typically done through an interactive mouse interface.
// This does not affect methods such as SetPosition.
v
l
SetMacro
(
Dragable
,
int
);
v
tk
SetMacro
(
Dragable
,
int
);
// Description:
// Turn on/off the dragable instance variable. This determines if
// an actor once picked, can be dragged (translated) through space.
// This is typically done through an interactive mouse interface.
// This does not affect methods such as SetPosition.
v
l
BooleanMacro
(
Dragable
,
int
);
v
tk
BooleanMacro
(
Dragable
,
int
);
v
l
Matrix4x4
&
GetMatrix
();
virtual
void
GetMatrix
(
v
l
Matrix4x4
&
m
);
v
tk
Matrix4x4
&
GetMatrix
();
virtual
void
GetMatrix
(
v
tk
Matrix4x4
&
m
);
float
*
GetBounds
();
float
*
GetXRange
();
...
...
@@ -167,10 +167,10 @@ class vlActor : public vlObject
void
AddOrientation
(
float
a
[
3
]);
protected:
v
l
Matrix4x4
*
UserMatrix
;
v
l
Property
*
Property
;
v
l
Texture
*
Texture
;
v
l
Mapper
*
Mapper
;
v
tk
Matrix4x4
*
UserMatrix
;
v
tk
Property
*
Property
;
v
tk
Texture
*
Texture
;
v
tk
Mapper
*
Mapper
;
float
Origin
[
3
];
float
Position
[
3
];
float
Orientation
[
3
];
...
...
@@ -178,7 +178,7 @@ protected:
int
Visibility
;
int
Pickable
;
int
Dragable
;
v
l
Transform
Transform
;
v
tk
Transform
Transform
;
float
Bounds
[
6
];
int
SelfCreatedProperty
;
};
...
...
include/ActorC.hh
View file @
a5adc668
/*=========================================================================
Program: Visualization
Library
Program: Visualization
Toolkit
Module: ActorC.hh
Language: C++
Date: $Date$
Version: $Revision$
This file is part of the Visualization
Library
. No part of this file or its
This file is part of the Visualization
Toolkit
. 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 v
l
ActorCollection - a list of actors
// .NAME v
tk
ActorCollection - a list of actors
// .SECTION Description
// v
l
ActorCollection represents and provides methods to manipulate list of
// actors (i.e., v
l
Actor and subclasses). The list is unsorted and duplicate
// v
tk
ActorCollection represents and provides methods to manipulate list of
// actors (i.e., v
tk
Actor and subclasses). The list is unsorted and duplicate
// entries are not prevented.
#ifndef __v
l
ActorC_hh
#define __v
l
ActorC_hh
#ifndef __v
tk
ActorC_hh
#define __v
tk
ActorC_hh
#include
"Collect.hh"
#include
"Actor.hh"
class
v
l
ActorCollection
:
public
v
l
Collection
class
v
tk
ActorCollection
:
public
v
tk
Collection
{
public:
char
*
GetClassName
()
{
return
"v
l
ActorCollection"
;};
char
*
GetClassName
()
{
return
"v
tk
ActorCollection"
;};
void
AddItem
(
v
l
Actor
*
a
);
void
RemoveItem
(
v
l
Actor
*
a
);
int
IsItemPresent
(
v
l
Actor
*
a
);
v
l
Actor
*
GetNextItem
();
void
AddItem
(
v
tk
Actor
*
a
);
void
RemoveItem
(
v
tk
Actor
*
a
);
int
IsItemPresent
(
v
tk
Actor
*
a
);
v
tk
Actor
*
GetNextItem
();
};
// Description:
// Add an actor to the list.
inline
void
v
l
ActorCollection
::
AddItem
(
v
l
Actor
*
a
)
inline
void
v
tk
ActorCollection
::
AddItem
(
v
tk
Actor
*
a
)
{
this
->
v
l
Collection
::
AddItem
((
v
l
Object
*
)
a
);
this
->
v
tk
Collection
::
AddItem
((
v
tk
Object
*
)
a
);
}
// Description:
// Remove an actor from the list.
inline
void
v
l
ActorCollection
::
RemoveItem
(
v
l
Actor
*
a
)
inline
void
v
tk
ActorCollection
::
RemoveItem
(
v
tk
Actor
*
a
)
{
this
->
v
l
Collection
::
RemoveItem
((
v
l
Object
*
)
a
);
this
->
v
tk
Collection
::
RemoveItem
((
v
tk
Object
*
)
a
);
}
// Description:
// Determine whether a particular actor is present. Returns its position
// in the list.
inline
int
v
l
ActorCollection
::
IsItemPresent
(
v
l
Actor
*
a
)
inline
int
v
tk
ActorCollection
::
IsItemPresent
(
v
tk
Actor
*
a
)
{
return
this
->
v
l
Collection
::
IsItemPresent
((
v
l
Object
*
)
a
);
return
this
->
v
tk
Collection
::
IsItemPresent
((
v
tk
Object
*
)
a
);
}
// Description:
// Get the next actor in the list.
inline
v
l
Actor
*
v
l
ActorCollection
::
GetNextItem
()
inline
v
tk
Actor
*
v
tk
ActorCollection
::
GetNextItem
()
{
return
(
v
l
Actor
*
)(
this
->
v
l
Collection
::
GetNextItem
());
return
(
v
tk
Actor
*
)(
this
->
v
tk
Collection
::
GetNextItem
());
}
#endif
...
...
include/AppendF.hh
View file @
a5adc668
/*=========================================================================
Program: Visualization
Library
Program: Visualization
Toolkit
Module: AppendF.hh
Language: C++
Date: $Date$
Version: $Revision$
This file is part of the Visualization
Library
. No part of this file
This file is part of the Visualization
Toolkit
. 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 v
l
AppendFilter - appends one or more datasets together into a single unstructured grid
// .NAME v
tk
AppendFilter - appends one or more datasets together into a single unstructured grid
// .SECTION Description
// v
l
AppendFilter is a filter that appends one of more datasets into a single
// v
tk
AppendFilter is a filter that appends one of more datasets into a single
// unstructured grid. All geometry is extracted and appended, but point
// attributes (i.e., scalars, vectors, normals) are extracted and appended
// only if all datasets have the point attributes available. (For example,
// if one dataset has scalars but another does not, scalars will not be
// appended.)
#ifndef __v
l
AppendFilter_h
#define __v
l
AppendFilter_h
#ifndef __v
tk
AppendFilter_h
#define __v
tk
AppendFilter_h
#include
"UGrid.hh"
#include
"Filter.hh"
#include
"DataSetC.hh"
class
v
l
AppendFilter
:
public
v
l
UnstructuredGrid
,
public
v
l
Filter
class
v
tk
AppendFilter
:
public
v
tk
UnstructuredGrid
,
public
v
tk
Filter
{
public:
v
l
AppendFilter
();
~
v
l
AppendFilter
();
char
*
GetClassName
()
{
return
"v
l
AppendFilter"
;};
void
PrintSelf
(
ostream
&
os
,
v
l
Indent
indent
);
v
tk
AppendFilter
();
~
v
tk
AppendFilter
();
char
*
GetClassName
()
{
return
"v
tk
AppendFilter"
;};
void
PrintSelf
(
ostream
&
os
,
v
tk
Indent
indent
);
void
AddInput
(
v
l
DataSet
*
in
);
void
AddInput
(
v
l
DataSet
&
in
)
{
this
->
AddInput
(
&
in
);};
void
RemoveInput
(
v
l
DataSet
*
in
);
void
RemoveInput
(
v
l
DataSet
&
in
)
{
this
->
RemoveInput
(
&
in
);};
v
l
DataSetCollection
*
GetInput
()
{
return
&
(
this
->
InputList
);};
void
AddInput
(
v
tk
DataSet
*
in
);
void
AddInput
(
v
tk
DataSet
&
in
)
{
this
->
AddInput
(
&
in
);};
void
RemoveInput
(
v
tk
DataSet
*
in
);
void
RemoveInput
(
v
tk
DataSet
&
in
)
{
this
->
RemoveInput
(
&
in
);};
v
tk
DataSetCollection
*
GetInput
()
{
return
&
(
this
->
InputList
);};
// filter interface
void
Update
();
...
...
@@ -50,7 +50,7 @@ protected:
// Usual data generation method
void
Execute
();
// list of data sets to append together
v
l
DataSetCollection
InputList
;
v
tk
DataSetCollection
InputList
;
//Filter interface