Commit 37fee6f0 authored by Ken Martin's avatar Ken Martin
Browse files

changed to long file names

parent 854fe755

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
/*=========================================================================
Program: Visualization Toolkit
Module: AGraymap.hh
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 1993-1995 Ken Martin, Will Schroeder, Bill Lorensen.
This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
The following terms apply to all files associated with the software unless
explicitly disclaimed in individual files. This copyright specifically does
not apply to the related textbook "The Visualization Toolkit" ISBN
013199837-4 published by Prentice Hall which is covered by its own copyright.
The authors hereby grant permission to use, copy, and distribute this
software and its documentation for any purpose, provided that existing
copyright notices are retained in all copies and that this notice is included
verbatim in any distributions. Additionally, the authors grant permission to
modify this software and its documentation for any purpose, provided that
such modifications are not distributed without the explicit consent of the
authors and that existing copyright notices are retained in all copies. Some
of the algorithms implemented by this software are patented, observe all
applicable patent law.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME vtkAGraymap - scalar data in intensity + alpha (grayscale + texture) form
// .SECTION Description
// vtkAGraymap is a concrete implementation of vtkScalars. vtkAGraymap
// 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 __vtkAGraymap_h
#define __vtkAGraymap_h
#include "CoScalar.hh"
#include "UCArray.hh"
class vtkAGraymap : public vtkColorScalars
{
public:
vtkAGraymap() {};
~vtkAGraymap() {};
vtkAGraymap(const vtkAGraymap& fs) {this->S = fs.S;};
vtkAGraymap(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 "vtkAGraymap";};
// vtkScalar interface
vtkScalars *MakeObject(int sze, int ext=1000);
int GetNumberOfScalars() {return (this->S.GetMaxId()+1)/2;};
void Squeeze() {this->S.Squeeze();};
int GetNumberOfValuesPerScalar() {return 2;};
// miscellaneous
vtkAGraymap &operator=(const vtkAGraymap& fs);
void operator+=(const vtkAGraymap& 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();
// vtkColorScalar interface.
unsigned char *GetColor(int id);
void GetColor(int id, unsigned char rgba[4]);
void SetColor(int id, unsigned char rgba[4]);
void InsertColor(int id, unsigned char rgba[4]);
int InsertNextColor(unsigned char rgba[4]);
protected:
vtkUnsignedCharArray S;
};
// Description:
// Set a rgba color value at a particular array location. Does not do
// range checking.
inline void vtkAGraymap::SetColor(int i, unsigned char rgba[4])
{
i *= 2;
this->S[i] = (rgba[0] > rgba[1] ? (rgba[0] > rgba[2] ? rgba[0] : rgba[2]) :
(rgba[1] > rgba[2] ? rgba[1] : rgba[2]));
this->S[i+1] = rgba[3];
}
// Description:
// Insert a rgba color value at a particular array location. Does range
// checking and will allocate additional memory if necessary.
inline void vtkAGraymap::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]) :
(rgba[1] > rgba[2] ? rgba[1] : rgba[2]));
}
// Description:
// Insert a rgba color value at the next available slot in the array. Will
// allocate memory if necessary.
inline int vtkAGraymap::InsertNextColor(unsigned char rgba[4])
{
int id = this->S.GetMaxId() + 1;
this->S.InsertValue(id,rgba[3]);
this->S[id-1] = (rgba[0] > rgba[1] ? (rgba[0] > rgba[2] ? rgba[0] : rgba[2]) :
(rgba[1] > rgba[2] ? rgba[1] : rgba[2]));
return id/2;
}
// Description:
// Get pointer to array of data starting at data position "id".
inline unsigned char *vtkAGraymap::GetPtr(const int id)
{
return this->S.GetPtr(2*id);
}
// Description:
// Get pointer to data array. Useful for direct writes of data. MaxId is
// 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 *vtkAGraymap::WritePtr(const int id, const int number)
{
return this->S.WritePtr(2*id,2*number);
}
// Description:
// Terminate direct write of data. Although dummy routine now, reserved for
// future use.
inline void vtkAGraymap::WrotePtr() {}
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: APixmap.hh
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 1993-1995 Ken Martin, Will Schroeder, Bill Lorensen.
This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
The following terms apply to all files associated with the software unless
explicitly disclaimed in individual files. This copyright specifically does
not apply to the related textbook "The Visualization Toolkit" ISBN
013199837-4 published by Prentice Hall which is covered by its own copyright.
The authors hereby grant permission to use, copy, and distribute this
software and its documentation for any purpose, provided that existing
copyright notices are retained in all copies and that this notice is included
verbatim in any distributions. Additionally, the authors grant permission to
modify this software and its documentation for any purpose, provided that
such modifications are not distributed without the explicit consent of the
authors and that existing copyright notices are retained in all copies. Some
of the algorithms implemented by this software are patented, observe all
applicable patent law.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME vtkAPixmap - scalar data in rgba (color + transparency) form
// .SECTION Description
// vtkAPixmap is a concrete implementation of vtkScalars. 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 __vtkAPixmap_h
#define __vtkAPixmap_h
#include "CoScalar.hh"
#include "UCArray.hh"
class vtkAPixmap : public vtkColorScalars
{
public:
vtkAPixmap() {};
~vtkAPixmap() {};
vtkAPixmap(const vtkAPixmap& fs) {this->S = fs.S;};
vtkAPixmap(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 "vtkAPixmap";};
// vtkScalar interface
vtkScalars *MakeObject(int sze, int ext=1000);
int GetNumberOfScalars() {return (this->S.GetMaxId()+1)/4;};
void Squeeze() {this->S.Squeeze();};
int GetNumberOfValuesPerScalar() {return 4;};
// miscellaneous
vtkAPixmap &operator=(const vtkAPixmap& fs);
void operator+=(const vtkAPixmap& 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();
// vtkColorScalar interface.
unsigned char *GetColor(int id);
void GetColor(int id, unsigned char rgba[4]);
void SetColor(int id, unsigned char rgba[4]);
void InsertColor(int id, unsigned char rgba[4]);
int InsertNextColor(unsigned char rgba[4]);
protected:
vtkUnsignedCharArray S;
};
// Description:
// Return a rgba color at array location i.
inline unsigned char *vtkAPixmap::GetColor(int i)
{
return this->S.GetPtr(4*i);
}
// Description:
// Get pointer to array of data starting at data position "id".
inline unsigned char *vtkAPixmap::GetPtr(const int id)
{
return this->S.GetPtr(4*id);
}
// Description:
// Get pointer to data array. Useful for direct writes of data. MaxId is
// 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 *vtkAPixmap::WritePtr(const int id, const int number)
{
return this->S.WritePtr(4*id,4*number);
}
// Description:
// Terminate direct write of data. Although dummy routine now, reserved for
// future use.
inline void vtkAPixmap::WrotePtr() {}
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: Actor.hh
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 1993-1995 Ken Martin, Will Schroeder, Bill Lorensen.
This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
The following terms apply to all files associated with the software unless
explicitly disclaimed in individual files. This copyright specifically does
not apply to the related textbook "The Visualization Toolkit" ISBN
013199837-4 published by Prentice Hall which is covered by its own copyright.
The authors hereby grant permission to use, copy, and distribute this
software and its documentation for any purpose, provided that existing
copyright notices are retained in all copies and that this notice is included
verbatim in any distributions. Additionally, the authors grant permission to
modify this software and its documentation for any purpose, provided that
such modifications are not distributed without the explicit consent of the
authors and that existing copyright notices are retained in all copies. Some
of the algorithms implemented by this software are patented, observe all
applicable patent law.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME vtkActor - an entity in a rendered image
// .SECTION Description
// vtkActor 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)
// Trans(origin) Trans(position).
//
// The actor also maintains a reference to the defining geometry (i.e., the
// mapper), and rendering properties.
#ifndef __vtkActor_hh
#define __vtkActor_hh
#include "Object.hh"
#include "Property.hh"
#include "Texture.hh"
#include "Mapper.hh"
#include "Trans.hh"
class vtkRenderer;
class vtkActor : public vtkObject
{
public:
vtkActor();
~vtkActor();
char *GetClassName() {return "vtkActor";};
void PrintSelf(ostream& os, vtkIndent indent);
void Render(vtkRenderer *ren);
// Description:
// Specify the property object to control rendering surface properties.
void SetProperty(vtkProperty *lut);
void SetProperty(vtkProperty& lut) {this->SetProperty(&lut);};
// Description:
// Get the property object that controls rendering surface properties.
vtkProperty *GetProperty();
// Description:
// Specify the Texture object to control rendering texture.
vtkSetObjectMacro(Texture,vtkTexture);
// Description:
// Get the Texture object that controls rendering texture.
vtkGetObjectMacro(Texture,vtkTexture);
// Description:
// This is the method that is used to connect an actor to the end of a
// visualization pipeline, i.e. the Mapper.
vtkSetObjectMacro(Mapper,vtkMapper);
// Description:
// Returns the Mapper that this actor is getting it's data from.
vtkGetObjectMacro(Mapper,vtkMapper);
// Description:
// Set a user defined matrix to concatenate with.
vtkSetObjectMacro(UserMatrix,vtkMatrix4x4);
// Description:
// Returns the user defined transformation matrix.
vtkGetObjectMacro(UserMatrix,vtkMatrix4x4);
// Description:
// Get the position of the actor.
vtkGetVectorMacro(Position,float,3);
// Description:
// Sets the posiiton of the actor.
vtkSetVector3Macro(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.
vtkGetVectorMacro(Origin,float,3);
// Description:
// Set the origin of the actor. This is the point about which all
// rotations take place.
vtkSetVector3Macro(Origin,float);
// Description:
// Get the scale of the actor. Scaling in performed independently on the
// X,Y and Z axis.
vtkGetVectorMacro(Scale,float,3);
// Description:
// Set the scale of the actor. Scaling in performed independently on the
// X,Y and Z axis.
vtkSetVector3Macro(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.
vtkGetMacro(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.
vtkSetMacro(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.
vtkBooleanMacro(Visibility,int);
// Description:
// Get the pickable instance variable. This determines if the actor can
// be picked (typically using the mouse). Also see dragable.
vtkGetMacro(Pickable,int);
// Description:
// Set the pickable instance variable. This determines if the actor can
// be picked (typically using the mouse). Also see dragable.
vtkSetMacro(Pickable,int);
// Description:
// Set the pickable instance variable. This determines if the actor can
// be picked (typically using the mouse). Also see dragable.
vtkBooleanMacro(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.
vtkGetMacro(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.
vtkSetMacro(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.
vtkBooleanMacro(Dragable,int);
vtkMatrix4x4& GetMatrix();
virtual void GetMatrix(vtkMatrix4x4& m);
float *GetBounds();
float *GetXRange();
float *GetYRange();
float *GetZRange();
void RotateX(float);
void RotateY(float);
void RotateZ(float);
void RotateWXYZ(float,float,float,float);
void SetOrientation(float,float,float);
void SetOrientation(float a[3]);
float *GetOrientation();
void AddOrientation(float,float,float);
void AddOrientation(float a[3]);
protected:
vtkMatrix4x4 *UserMatrix;
vtkProperty *Property;
vtkTexture *Texture;
vtkMapper *Mapper;
float Origin[3];
float Position[3];
float Orientation[3];
float Scale[3];
int Visibility;
int Pickable;
int Dragable;
vtkTransform Transform;
float Bounds[6];
int SelfCreatedProperty;
};
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: ActorC.hh
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 1993-1995 Ken Martin, Will Schroeder, Bill Lorensen.
This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
The following terms apply to all files associated with the software unless
explicitly disclaimed in individual files. This copyright specifically does
not apply to the related textbook "The Visualization Toolkit" ISBN
013199837-4 published by Prentice Hall which is covered by its own copyright.
The authors hereby grant permission to use, copy, and distribute this
software and its documentation for any purpose, provided that existing
copyright notices are retained in all copies and that this notice is included
verbatim in any distributions. Additionally, the authors grant permission to
modify this software and its documentation for any purpose, provided that
such modifications are not distributed without the explicit consent of the
authors and that existing copyright notices are retained in all copies. Some
of the algorithms implemented by this software are patented, observe all
applicable patent law.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME vtkActorCollection - a list of actors
// .SECTION Description
// vtkActorCollection represents and provides methods to manipulate list of
// actors (i.e., vtkActor and subclasses). The list is unsorted and duplicate
// entries are not prevented.
#ifndef __vtkActorC_hh
#define __vtkActorC_hh
#include "Collect.hh"
#include "Actor.hh"
class vtkActorCollection : public vtkCollection
{
public:
char *GetClassName() {return "vtkActorCollection";};
void AddItem(vtkActor *a);
void RemoveItem(vtkActor *a);
int IsItemPresent(vtkActor *a);
vtkActor *GetNextItem();
};
// Description:
// Add an actor to the list.
inline void vtkActorCollection::AddItem(vtkActor *a)
{
this->vtkCollection::AddItem((vtkObject *)a);
}
// Description:
// Remove an actor from the list.
inline void vtkActorCollection::RemoveItem(vtkActor *a)
{
this->vtkCollection::RemoveItem((vtkObject *)a);
}
// Description:
// Determine whether a particular actor is present. Returns its position
// in the list.
inline int vtkActorCollection::IsItemPresent(vtkActor *a)
{
return this->vtkCollection::IsItemPresent((vtkObject *)a);
}
// Description:
// Get the next actor in the list.
inline vtkActor *vtkActorCollection::GetNextItem()
{
return (vtkActor *)(this->vtkCollection::GetNextItem());
}
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: AppendF.hh
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 1993-1995 Ken Martin, Will Schroeder, Bill Lorensen.
This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
The following terms apply to all files associated with the software unless
explicitly disclaimed in individual files. This copyright specifically does
not apply to the related textbook "The Visualization Toolkit" ISBN
013199837-4 published by Prentice Hall which is covered by its own copyright.
The authors hereby grant permission to use, copy, and distribute this
software and its documentation for any purpose, provided that existing
copyright notices are retained in all copies and that this notice is included
verbatim in any distributions. Additionally, the authors grant permission to
modify this software and its documentation for any purpose, provided that
such modifications are not distributed without the explicit consent of the
authors and that existing copyright notices are retained in all copies. Some
of the algorithms implemented by this software are patented, observe all
applicable patent law.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME vtkAppendFilter - appends one or more datasets together into a single unstructured grid
// .SECTION Description
// vtkAppendFilter 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, vecto