VTK
|
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems More...
#include <vtkCoordinate.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
vtkCoordinate * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. More... | |
const char * | GetCoordinateSystemAsString () |
double * | GetComputedDoubleViewportValue (vtkViewport *) |
double * | GetComputedDoubleDisplayValue (vtkViewport *) |
double * | GetComputedValue (vtkViewport *) |
GetComputedValue() will return either World, Viewport or Display based on what has been set as the coordinate system. More... | |
virtual double * | GetComputedUserDefinedValue (vtkViewport *) |
GetComputedUserDefinedValue() is to be used only when the coordinate system is VTK_USERDEFINED. More... | |
virtual void | SetCoordinateSystem (int) |
Set/get the coordinate system which this coordinate is defined in. More... | |
virtual int | GetCoordinateSystem () |
Set/get the coordinate system which this coordinate is defined in. More... | |
void | SetCoordinateSystemToDisplay () |
Set/get the coordinate system which this coordinate is defined in. More... | |
void | SetCoordinateSystemToNormalizedDisplay () |
Set/get the coordinate system which this coordinate is defined in. More... | |
void | SetCoordinateSystemToViewport () |
Set/get the coordinate system which this coordinate is defined in. More... | |
void | SetCoordinateSystemToNormalizedViewport () |
Set/get the coordinate system which this coordinate is defined in. More... | |
void | SetCoordinateSystemToView () |
Set/get the coordinate system which this coordinate is defined in. More... | |
void | SetCoordinateSystemToWorld () |
Set/get the coordinate system which this coordinate is defined in. More... | |
virtual void | SetValue (double, double, double) |
Set/get the value of this coordinate. More... | |
virtual void | SetValue (double[3]) |
Set/get the value of this coordinate. More... | |
virtual double * | GetValue () |
Set/get the value of this coordinate. More... | |
virtual void | GetValue (double &, double &, double &) |
Set/get the value of this coordinate. More... | |
virtual void | GetValue (double[3]) |
Set/get the value of this coordinate. More... | |
void | SetValue (double a, double b) |
Set/get the value of this coordinate. More... | |
virtual void | SetReferenceCoordinate (vtkCoordinate *) |
If this coordinate is relative to another coordinate, then specify that coordinate as the ReferenceCoordinate. More... | |
virtual vtkCoordinate * | GetReferenceCoordinate () |
If this coordinate is relative to another coordinate, then specify that coordinate as the ReferenceCoordinate. More... | |
void | SetViewport (vtkViewport *viewport) |
If you want this coordinate to be relative to a specific vtkViewport (vtkRenderer) then you can specify that here. More... | |
virtual vtkViewport * | GetViewport () |
If you want this coordinate to be relative to a specific vtkViewport (vtkRenderer) then you can specify that here. More... | |
double * | GetComputedWorldValue (vtkViewport *) |
Return the computed value in a specified coordinate system. More... | |
int * | GetComputedViewportValue (vtkViewport *) |
Return the computed value in a specified coordinate system. More... | |
int * | GetComputedDisplayValue (vtkViewport *) |
Return the computed value in a specified coordinate system. More... | |
int * | GetComputedLocalDisplayValue (vtkViewport *) |
Return the computed value in a specified coordinate system. More... | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. More... | |
virtual void | DebugOff () |
Turn debugging output off. More... | |
bool | GetDebug () |
Get the value of the debug flag. More... | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. More... | |
virtual void | Modified () |
Update the modification time for this object. More... | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. More... | |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
int | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
int | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More... | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More... | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. More... | |
int | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. More... | |
int | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. More... | |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
Return the class name as a string. More... | |
virtual void | Delete () |
Delete a VTK object. More... | |
virtual void | FastDelete () |
Delete a reference to this object. More... | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. More... | |
virtual void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). More... | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). More... | |
int | GetReferenceCount () |
Return the current reference count of this object. More... | |
void | SetReferenceCount (int) |
Sets the reference count. More... | |
void | PrintRevisions (ostream &) |
Legacy. More... | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkCoordinate * | SafeDownCast (vtkObjectBase *o) |
static vtkCoordinate * | New () |
Creates an instance of this class with the following defaults: value of (0,0,0) in world coordinates. More... | |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. More... | |
static void | SetGlobalWarningDisplay (int val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static int | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. More... | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkCoordinate () | |
~vtkCoordinate () | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
These methods allow a command to exclusively grab all events. More... | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. More... | |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
double | Value [3] |
int | CoordinateSystem |
vtkCoordinate * | ReferenceCoordinate |
vtkViewport * | Viewport |
double | ComputedWorldValue [3] |
int | ComputedDisplayValue [2] |
int | ComputedViewportValue [2] |
int | Computing |
double | ComputedDoubleDisplayValue [2] |
double | ComputedDoubleViewportValue [2] |
double | ComputedUserDefinedValue [3] |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
vtkCoordinate represents position in a variety of coordinate systems, and converts position to other coordinate systems. It also supports relative positioning, so you can create a cascade of vtkCoordinate objects (no loops please!) that refer to each other. The typical usage of this object is to set the coordinate system in which to represent a position (e.g., SetCoordinateSystemToNormalizedDisplay()), set the value of the coordinate (e.g., SetValue()), and then invoke the appropriate method to convert to another coordinate system (e.g., GetComputedWorldValue()).
The coordinate systems in vtk are as follows:
DISPLAY - x-y pixel values in window NORMALIZED DISPLAY - x-y (0,1) normalized values VIEWPORT - x-y pixel values in viewport NORMALIZED VIEWPORT - x-y (0,1) normalized value in viewport VIEW - x-y-z (-1,1) values in camera coordinates. (z is depth) WORLD - x-y-z global coordinate values USERDEFINED - x-y-z in User defined space
If you cascade vtkCoordinate objects, you refer to another vtkCoordinate object which in turn can refer to others, and so on. This allows you to create composite groups of things like vtkActor2D that are positioned relative to one another. Note that in cascaded sequences, each vtkCoordinate object may be specified in different coordinate systems!
Definition at line 70 of file vtkCoordinate.h.
typedef vtkObject vtkCoordinate::Superclass |
Definition at line 73 of file vtkCoordinate.h.
|
protected |
|
protected |
|
static |
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class.
Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObjectBase.
|
static |
|
protectedvirtual |
vtkCoordinate* vtkCoordinate::NewInstance | ( | ) | const |
|
overridevirtual |
|
static |
Creates an instance of this class with the following defaults: value of (0,0,0) in world coordinates.
|
virtual |
Set/get the coordinate system which this coordinate is defined in.
The options are Display, Normalized Display, Viewport, Normalized Viewport, View, and World.
|
virtual |
Set/get the coordinate system which this coordinate is defined in.
The options are Display, Normalized Display, Viewport, Normalized Viewport, View, and World.
|
inline |
Set/get the coordinate system which this coordinate is defined in.
The options are Display, Normalized Display, Viewport, Normalized Viewport, View, and World.
Definition at line 90 of file vtkCoordinate.h.
|
inline |
Set/get the coordinate system which this coordinate is defined in.
The options are Display, Normalized Display, Viewport, Normalized Viewport, View, and World.
Definition at line 92 of file vtkCoordinate.h.
|
inline |
Set/get the coordinate system which this coordinate is defined in.
The options are Display, Normalized Display, Viewport, Normalized Viewport, View, and World.
Definition at line 94 of file vtkCoordinate.h.
|
inline |
Set/get the coordinate system which this coordinate is defined in.
The options are Display, Normalized Display, Viewport, Normalized Viewport, View, and World.
Definition at line 96 of file vtkCoordinate.h.
|
inline |
Set/get the coordinate system which this coordinate is defined in.
The options are Display, Normalized Display, Viewport, Normalized Viewport, View, and World.
Definition at line 98 of file vtkCoordinate.h.
|
inline |
Set/get the coordinate system which this coordinate is defined in.
The options are Display, Normalized Display, Viewport, Normalized Viewport, View, and World.
Definition at line 100 of file vtkCoordinate.h.
const char* vtkCoordinate::GetCoordinateSystemAsString | ( | ) |
Set/get the value of this coordinate.
This can be thought of as the position of this coordinate in its coordinate system.
|
virtual |
Set/get the value of this coordinate.
This can be thought of as the position of this coordinate in its coordinate system.
|
virtual |
Set/get the value of this coordinate.
This can be thought of as the position of this coordinate in its coordinate system.
Set/get the value of this coordinate.
This can be thought of as the position of this coordinate in its coordinate system.
|
virtual |
Set/get the value of this coordinate.
This can be thought of as the position of this coordinate in its coordinate system.
Set/get the value of this coordinate.
This can be thought of as the position of this coordinate in its coordinate system.
Definition at line 113 of file vtkCoordinate.h.
|
virtual |
If this coordinate is relative to another coordinate, then specify that coordinate as the ReferenceCoordinate.
If this is NULL the coordinate is assumed to be absolute.
|
virtual |
If this coordinate is relative to another coordinate, then specify that coordinate as the ReferenceCoordinate.
If this is NULL the coordinate is assumed to be absolute.
void vtkCoordinate::SetViewport | ( | vtkViewport * | viewport | ) |
If you want this coordinate to be relative to a specific vtkViewport (vtkRenderer) then you can specify that here.
NOTE: this is a raw pointer, not a weak pointer nor a reference counted object, to avoid reference cycle loop between rendering classes and filter classes.
|
virtual |
If you want this coordinate to be relative to a specific vtkViewport (vtkRenderer) then you can specify that here.
NOTE: this is a raw pointer, not a weak pointer nor a reference counted object, to avoid reference cycle loop between rendering classes and filter classes.
double* vtkCoordinate::GetComputedWorldValue | ( | vtkViewport * | ) |
Return the computed value in a specified coordinate system.
int* vtkCoordinate::GetComputedViewportValue | ( | vtkViewport * | ) |
Return the computed value in a specified coordinate system.
int* vtkCoordinate::GetComputedDisplayValue | ( | vtkViewport * | ) |
Return the computed value in a specified coordinate system.
int* vtkCoordinate::GetComputedLocalDisplayValue | ( | vtkViewport * | ) |
Return the computed value in a specified coordinate system.
double* vtkCoordinate::GetComputedDoubleViewportValue | ( | vtkViewport * | ) |
double* vtkCoordinate::GetComputedDoubleDisplayValue | ( | vtkViewport * | ) |
double* vtkCoordinate::GetComputedValue | ( | vtkViewport * | ) |
GetComputedValue() will return either World, Viewport or Display based on what has been set as the coordinate system.
This is good for objects like vtkLineSource, where the user might want to use them as World or Viewport coordinates
|
inlinevirtual |
GetComputedUserDefinedValue() is to be used only when the coordinate system is VTK_USERDEFINED.
The user must subclass vtkCoordinate and override this function, when set as the TransformCoordinate in 2D-Mappers, the user can customize display of 2D polygons
Definition at line 167 of file vtkCoordinate.h.
|
protected |
Definition at line 174 of file vtkCoordinate.h.
|
protected |
Definition at line 175 of file vtkCoordinate.h.
|
protected |
Definition at line 176 of file vtkCoordinate.h.
|
protected |
Definition at line 177 of file vtkCoordinate.h.
|
protected |
Definition at line 178 of file vtkCoordinate.h.
|
protected |
Definition at line 179 of file vtkCoordinate.h.
|
protected |
Definition at line 180 of file vtkCoordinate.h.
|
protected |
Definition at line 181 of file vtkCoordinate.h.
|
protected |
Definition at line 183 of file vtkCoordinate.h.
|
protected |
Definition at line 184 of file vtkCoordinate.h.
|
protected |
Definition at line 185 of file vtkCoordinate.h.