VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkOpenGLContextDevice3D Class Reference

OpenGL class drawing 3D primitives. More...

#include <vtkOpenGLContextDevice3D.h>

Inheritance diagram for vtkOpenGLContextDevice3D:
[legend]
Collaboration diagram for vtkOpenGLContextDevice3D:
[legend]

Public Types

typedef vtkContextDevice3D Superclass
 
typedef vtkContextDevice3D Superclass
 
- Public Types inherited from vtkContextDevice3D
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkOpenGLContextDevice3DNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void DrawPoly (const float *verts, int n, const unsigned char *colors, int nc)
 
void DrawLines (const float *verts, int n, const unsigned char *colors, int nc)
 
void ApplyPen (vtkPen *pen)
 
void ApplyBrush (vtkBrush *brush)
 
void SetMatrix (vtkMatrix4x4 *m)
 
void GetMatrix (vtkMatrix4x4 *m)
 
void MultiplyMatrix (vtkMatrix4x4 *m)
 
void PushMatrix ()
 
void PopMatrix ()
 
void SetClipping (const vtkRecti &rect)
 
void EnableClipping (bool enable)
 
virtual int IsA (const char *type)
 
vtkOpenGLContextDevice3DNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void DrawPoly (const float *verts, int n, const unsigned char *colors, int nc)
 
void DrawLines (const float *verts, int n, const unsigned char *colors, int nc)
 
void ApplyPen (vtkPen *pen)
 
void ApplyBrush (vtkBrush *brush)
 
void SetMatrix (vtkMatrix4x4 *m)
 
void GetMatrix (vtkMatrix4x4 *m)
 
void MultiplyMatrix (vtkMatrix4x4 *m)
 
void PushMatrix ()
 
void PopMatrix ()
 
void SetClipping (const vtkRecti &rect)
 
void EnableClipping (bool enable)
 
void Initialize (vtkRenderer *, vtkOpenGLContextDevice2D *)
 
virtual void Begin (vtkViewport *viewport)
 
void DrawPoints (const float *verts, int n, const unsigned char *colors, int nc)
 
void DrawTriangleMesh (const float *mesh, int n, const unsigned char *colors, int nc)
 
void EnableClippingPlane (int i, double *planeEquation)
 
void DisableClippingPlane (int i)
 
void DrawPoints (const float *verts, int n, const unsigned char *colors, int nc)
 
void DrawTriangleMesh (const float *mesh, int n, const unsigned char *colors, int nc)
 
void EnableClippingPlane (int i, double *planeEquation)
 
void DisableClippingPlane (int i)
 
- Public Member Functions inherited from vtkContextDevice3D
vtkContextDevice3DNewInstance () const
 
virtual void DisableClipping ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
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)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkOpenGLContextDevice3DSafeDownCast (vtkObjectBase *o)
 
static vtkOpenGLContextDevice3DNew ()
 
static int IsTypeOf (const char *type)
 
static vtkOpenGLContextDevice3DSafeDownCast (vtkObjectBase *o)
 
static vtkOpenGLContextDevice3DNew ()
 
- Static Public Member Functions inherited from vtkContextDevice3D
static int IsTypeOf (const char *type)
 
static vtkContextDevice3DSafeDownCast (vtkObjectBase *o)
 
static vtkContextDevice3DNew ()
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkOpenGLContextDevice3D ()
 
 ~vtkOpenGLContextDevice3D ()
 
virtual void EnableDepthBuffer ()
 
virtual void DisableDepthBuffer ()
 
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkOpenGLContextDevice3D ()
 
 ~vtkOpenGLContextDevice3D ()
 
virtual void EnableDepthBuffer ()
 
virtual void DisableDepthBuffer ()
 
void ReadyVCBOProgram ()
 
void ReadyVBOProgram ()
 
void SetMatrices (vtkShaderProgram *prog)
 
void BuildVBO (vtkOpenGLHelper *cbo, const float *v, int nv, const unsigned char *coolors, int nc, float *tcoords)
 
void CoreDrawTriangles (std::vector< float > &tverts)
 
virtual bool HaveWideLines ()
 
- Protected Member Functions inherited from vtkContextDevice3D
 vtkContextDevice3D ()
 
 ~vtkContextDevice3D ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- 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

vtkOpenGLHelperVCBO
 
vtkOpenGLHelperVBO
 
vtkTransformModelMatrix
 
vtkOpenGLRenderWindowRenderWindow
 
vtkRendererRenderer
 
std::vector< bool > ClippingPlaneStates
 
std::vector< doubleClippingPlaneValues
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

OpenGL class drawing 3D primitives.

This defines the implementation of a 3D context device for drawing simple primitives.

Definition at line 34 of file vtkOpenGLContextDevice3D.h.

Member Typedef Documentation

Definition at line 37 of file vtkOpenGLContextDevice3D.h.

Definition at line 44 of file vtkOpenGLContextDevice3D.h.

Constructor & Destructor Documentation

vtkOpenGLContextDevice3D::vtkOpenGLContextDevice3D ( )
protected
vtkOpenGLContextDevice3D::~vtkOpenGLContextDevice3D ( )
protected
vtkOpenGLContextDevice3D::vtkOpenGLContextDevice3D ( )
protected
vtkOpenGLContextDevice3D::~vtkOpenGLContextDevice3D ( )
protected

Member Function Documentation

static int vtkOpenGLContextDevice3D::IsTypeOf ( const char *  type)
static
virtual int vtkOpenGLContextDevice3D::IsA ( const char *  name)
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 vtkContextDevice3D.

static vtkOpenGLContextDevice3D* vtkOpenGLContextDevice3D::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkOpenGLContextDevice3D::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkContextDevice3D.

vtkOpenGLContextDevice3D* vtkOpenGLContextDevice3D::NewInstance ( ) const
void vtkOpenGLContextDevice3D::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkContextDevice3D.

static vtkOpenGLContextDevice3D* vtkOpenGLContextDevice3D::New ( )
static
void vtkOpenGLContextDevice3D::DrawPoly ( const float verts,
int  n,
const unsigned char *  colors,
int  nc 
)
virtual

Draw a polyline between the specified points.

See also
DrawLines()

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::DrawLines ( const float verts,
int  n,
const unsigned char *  colors,
int  nc 
)
virtual

Draw lines defined by specified pair of points.

See also
DrawPoly()

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::DrawPoints ( const float verts,
int  n,
const unsigned char *  colors,
int  nc 
)
virtual

Draw points at the vertex positions specified.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::DrawTriangleMesh ( const float mesh,
int  n,
const unsigned char *  colors,
int  nc 
)
virtual

Draw triangles to generate the specified mesh.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::ApplyPen ( vtkPen pen)
virtual

Apply the supplied pen which controls the outlines of shapes, as well as lines, points and related primitives. This makes a deep copy of the vtkPen object in the vtkContext2D, it does not hold a pointer to the supplied object.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::ApplyBrush ( vtkBrush brush)
virtual

Apply the supplied brush which controls the outlines of shapes, as well as lines, points and related primitives. This makes a deep copy of the vtkBrush object in the vtkContext2D, it does not hold a pointer to the supplied object.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::SetMatrix ( vtkMatrix4x4 m)
virtual

Set the model view matrix for the display

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::GetMatrix ( vtkMatrix4x4 m)
virtual

Set the model view matrix for the display

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::MultiplyMatrix ( vtkMatrix4x4 m)
virtual

Multiply the current model view matrix by the supplied one

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::PushMatrix ( )
virtual

Push the current matrix onto the stack.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::PopMatrix ( )
virtual

Pop the current matrix off of the stack.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::SetClipping ( const vtkRecti rect)
virtual

Supply a float array of length 4 with x1, y1, width, height specifying clipping region for the device in pixels.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::EnableClipping ( bool  enable)
virtual

Enable or disable the clipping of the scene.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::EnableClippingPlane ( int  i,
double planeEquation 
)
virtual

Enable/Disable the specified clipping plane. i is the index of the clipping plane being enabled or disabled (0 - 5). planeEquation points to the four coefficients of the equation for the clipping plane: Ax + By + Cz + D = 0. This is the equation format expected by glClipPlane.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::DisableClippingPlane ( int  i)
virtual

Enable/Disable the specified clipping plane. i is the index of the clipping plane being enabled or disabled (0 - 5). planeEquation points to the four coefficients of the equation for the clipping plane: Ax + By + Cz + D = 0. This is the equation format expected by glClipPlane.

Implements vtkContextDevice3D.

virtual void vtkOpenGLContextDevice3D::EnableDepthBuffer ( )
protectedvirtual

Begin drawing, turn on the depth buffer.

virtual void vtkOpenGLContextDevice3D::DisableDepthBuffer ( )
protectedvirtual

End drawing, turn off the depth buffer.

static int vtkOpenGLContextDevice3D::IsTypeOf ( const char *  type)
static
virtual int vtkOpenGLContextDevice3D::IsA ( const char *  name)
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 vtkContextDevice3D.

static vtkOpenGLContextDevice3D* vtkOpenGLContextDevice3D::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkOpenGLContextDevice3D::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkContextDevice3D.

vtkOpenGLContextDevice3D* vtkOpenGLContextDevice3D::NewInstance ( ) const
void vtkOpenGLContextDevice3D::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkContextDevice3D.

static vtkOpenGLContextDevice3D* vtkOpenGLContextDevice3D::New ( )
static
void vtkOpenGLContextDevice3D::DrawPoly ( const float verts,
int  n,
const unsigned char *  colors,
int  nc 
)
virtual

Draw a polyline between the specified points.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::DrawLines ( const float verts,
int  n,
const unsigned char *  colors,
int  nc 
)
virtual

Draw lines defined by specified pair of points.

See also
DrawPoly()

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::DrawPoints ( const float verts,
int  n,
const unsigned char *  colors,
int  nc 
)
virtual

Draw points at the vertex positions specified.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::DrawTriangleMesh ( const float mesh,
int  n,
const unsigned char *  colors,
int  nc 
)
virtual

Draw triangles to generate the specified mesh.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::ApplyPen ( vtkPen pen)
virtual

Apply the supplied pen which controls the outlines of shapes, as well as lines, points and related primitives. This makes a deep copy of the vtkPen object in the vtkContext2D, it does not hold a pointer to the supplied object.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::ApplyBrush ( vtkBrush brush)
virtual

Apply the supplied brush which controls the outlines of shapes, as well as lines, points and related primitives. This makes a deep copy of the vtkBrush object in the vtkContext2D, it does not hold a pointer to the supplied object.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::SetMatrix ( vtkMatrix4x4 m)
virtual

Set the model view matrix for the display

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::GetMatrix ( vtkMatrix4x4 m)
virtual

Set the model view matrix for the display

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::MultiplyMatrix ( vtkMatrix4x4 m)
virtual

Multiply the current model view matrix by the supplied one

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::PushMatrix ( )
virtual

Push the current matrix onto the stack.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::PopMatrix ( )
virtual

Pop the current matrix off of the stack.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::SetClipping ( const vtkRecti rect)
virtual

Supply a float array of length 4 with x1, y1, width, height specifying clipping region for the device in pixels.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::EnableClipping ( bool  enable)
virtual

Enable or disable the clipping of the scene.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::EnableClippingPlane ( int  i,
double planeEquation 
)
virtual

Enable/Disable the specified clipping plane. i is the index of the clipping plane being enabled or disabled (0 - 5). planeEquation points to the four coefficients of the equation for the clipping plane: Ax + By + Cz + D = 0. This is the equation format expected by glClipPlane.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::DisableClippingPlane ( int  i)
virtual

Enable/Disable the specified clipping plane. i is the index of the clipping plane being enabled or disabled (0 - 5). planeEquation points to the four coefficients of the equation for the clipping plane: Ax + By + Cz + D = 0. This is the equation format expected by glClipPlane.

Implements vtkContextDevice3D.

void vtkOpenGLContextDevice3D::Initialize ( vtkRenderer ,
vtkOpenGLContextDevice2D  
)

This must be set during initialization

virtual void vtkOpenGLContextDevice3D::Begin ( vtkViewport viewport)
virtual

Begin drawing, pass in the viewport to set up the view.

virtual void vtkOpenGLContextDevice3D::EnableDepthBuffer ( )
protectedvirtual

Begin drawing, turn on the depth buffer.

virtual void vtkOpenGLContextDevice3D::DisableDepthBuffer ( )
protectedvirtual

End drawing, turn off the depth buffer.

void vtkOpenGLContextDevice3D::ReadyVCBOProgram ( )
protected
void vtkOpenGLContextDevice3D::ReadyVBOProgram ( )
protected
void vtkOpenGLContextDevice3D::SetMatrices ( vtkShaderProgram prog)
protected
void vtkOpenGLContextDevice3D::BuildVBO ( vtkOpenGLHelper cbo,
const float v,
int  nv,
const unsigned char *  coolors,
int  nc,
float tcoords 
)
protected
void vtkOpenGLContextDevice3D::CoreDrawTriangles ( std::vector< float > &  tverts)
protected
virtual bool vtkOpenGLContextDevice3D::HaveWideLines ( )
protectedvirtual

Member Data Documentation

vtkOpenGLHelper* vtkOpenGLContextDevice3D::VCBO
protected

Definition at line 127 of file vtkOpenGLContextDevice3D.h.

vtkOpenGLHelper* vtkOpenGLContextDevice3D::VBO
protected

Definition at line 129 of file vtkOpenGLContextDevice3D.h.

vtkTransform* vtkOpenGLContextDevice3D::ModelMatrix
protected

Definition at line 142 of file vtkOpenGLContextDevice3D.h.

vtkOpenGLRenderWindow* vtkOpenGLContextDevice3D::RenderWindow
protected

The OpenGL render window being used by the device

Definition at line 145 of file vtkOpenGLContextDevice3D.h.

vtkRenderer* vtkOpenGLContextDevice3D::Renderer
protected

We need to store a pointer to get the camera mats

Definition at line 148 of file vtkOpenGLContextDevice3D.h.

std::vector<bool> vtkOpenGLContextDevice3D::ClippingPlaneStates
protected

Definition at line 150 of file vtkOpenGLContextDevice3D.h.

std::vector<double> vtkOpenGLContextDevice3D::ClippingPlaneValues
protected

Definition at line 151 of file vtkOpenGLContextDevice3D.h.


The documentation for this class was generated from the following file: