NAME
vtkProp - represents an object for placement in a rendered scene
SYNOPSIS
#include "/opt/vtk-c++/graphics/vtkProp.h"
class VTK_EXPORT vtkProp : public vtkObject
vtkProp();
const char *GetClassName() {return "vtkProp";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual void Render(vtkRenderer *ren) = 0;
vtkProp &operator=(const vtkProp& Prop);
void SetPosition(float, float, float);
void SetPosition(float *);
float *GetPosition();
void GetPosition(float data[3]);
void AddPosition(float deltaPosition[3]);
void AddPosition(float deltaX,float deltaY,float deltaZ);
void SetOrigin(float, float, float);
void SetOrigin(float *);
float *GetOrigin();
void GetOrigin(float data[3]);
void SetVisibility(int);
int GetVisibility();
void VisibilityOn();
void VisibilityOff();
void SetPickable(int);
int GetPickable();
void PickableOn();
void PickableOff();
void SetDragable(int);
int GetDragable();
void DragableOn();
void DragableOff();
vtkMatrix4x4& GetMatrix();
virtual void GetMatrix(vtkMatrix4x4& m) = 0;
virtual float *GetBounds() = 0;
void GetBounds(float bounds[6]);
float *GetCenter();
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();
float *GetOrientationWXYZ();
void AddOrientation(float,float,float);
void AddOrientation(float a[3]);
DESCRIPTION
vtkProp is an abstract class used to represent an entity in a rendering scene. It handles functions related to the position, orientation and scaling. It combines these instance variables into one 4x4 transformation 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). Both vtkActor and vtkVolume are specializations of class vtkProp.
SUMMARY
void SetPosition(float, float, float)
void SetPosition(float *)
Set/Get/Add the position of the Prop in world coordinates.
void SetOrigin(float, float, float)
void SetOrigin(float *)
Set/Get the origin of the Prop. This is the point about which all rotations take place.
void SetVisibility(int)
Set/Get the visibility of the Prop. Visibility is like a light switch for Props. Use it to turn them on or off.
void SetPickable(int)
Set/Get the pickable instance variable. This determines if the Prop can be picked (typically using the mouse). Also see dragable.
void SetDragable(int)
Set/Get the value of the dragable instance variable. This determines if an Prop, 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, which will continue to work. It is just intended to prevent some Props from being dragged from within a user interface.
vtkProp()
Construct with the following defaults: origin(0,0,0) position=(0,0,0) visibility=1 pickable=1 dragable=1 orientation=(0,0,0). No user defined matrix and no texture map.
vtkProp& operator=(const vtkProp& prop)
Shallow copy of an prop.
void AddPosition (float deltaX,float deltaY,float deltaZ) Incrementally change the position of the prop.
void SetOrientation (float x,float y,float z)
Sets the orientation of the prop. Orientation is specified as X,Y and Z rotations in that order, but they are performed as RotateZ, RotateX, and finally RotateY.
float *GetOrientation ()
Returns the orientation of the prop as s vector of X,Y and Z rotation. The ordering in which these rotations must be done to generate the same matrix is RotateZ, RotateX, and finally RotateY. See also SetOrientation.
float *GetOrientationWXYZ()
Returns the WXYZ orientation of the prop.
void AddOrientation (float a1,float a2,float a3)
Add to the current orientation. See SetOrientation and GetOrientation for more details. This basically does a GetOrientation, adds the passed in arguments, and then calls SetOrientation.
void RotateX (float angle)
Rotate the prop in degrees about the X axis using the right hand rule. The axis is the prop's X axis, which can change as other rotations are performed. To rotate about the world X axis use RotateWXYZ (angle, 1, 0, 0). This rotation is applied before all others in the current transformation matrix.
void RotateY (float angle)
Rotate the prop in degrees about the Y axis using the right hand rule. The axis is the prop's Y axis, which can change as other rotations are performed. To rotate about the world Y axis use RotateWXYZ (angle, 0, 1, 0). This rotation is applied before all others in the current transformation matrix.
void RotateZ (float angle)
Rotate the prop in degrees about the Z axis using the right hand rule. The axis is the prop's Z axis, which can change as other rotations are performed. To rotate about the world Z axis use RotateWXYZ (angle, 0, 0, 1). This rotation is applied before all others in the current transformation matrix.
void RotateWXYZ (float degree, float x, float y, float z) Rotate the prop in degrees about an arbitrary axis specified by the last three arguments. The axis is specified in world coordinates. To rotate an about its model axes, use RotateX, RotateY, RotateZ.
void GetMatrix(vtkMatrix4x4& result)
Copy the prop's composite 4x4 matrix into the matrix provided.
vtkMatrix4x4& GetMatrix()
Return a reference to the prop's 4x4 composite matrix.
void GetBounds(float bounds[6])
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
float *GetCenter()
Get the center of the bounding box in world coordinates.
float *GetXRange()
Get the prop's x range in world coordinates.
float *GetYRange()
Get the prop's y range in world coordinates.
float *GetZRange()
Get the prop's z range in world coordinates.