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
c2703698
Commit
c2703698
authored
Aug 21, 1994
by
Will Schroeder
Browse files
ENH: Added documentation.
parent
000b0291
Changes
10
Hide whitespace changes
Inline
Side-by-side
include/GlrCam.hh
View file @
c2703698
...
...
@@ -13,6 +13,11 @@ written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlGlrCamera - SGI gl camera
// .SECTION Description
// vlGlrCamera is a concrete implementation of the abstract class vlCamera.
// vlGlrCamera interfaces to the Silicon Graphics gl rendering library.
#ifndef __vlGlrCamera_hh
#define __vlGlrCamera_hh
...
...
@@ -25,8 +30,9 @@ class vlGlrCamera : public vlCamera
{
public:
virtual
char
*
GetClassName
()
{
return
"vlGlrCamera"
;};
void
Render
(
vlRenderer
*
ren
);
// overides base
void
Render
(
vlGlrRenderer
*
ren
);
// real function
void
Render
(
vlRenderer
*
ren
);
void
Render
(
vlGlrRenderer
*
ren
);
};
...
...
include/GlrLgt.hh
View file @
c2703698
...
...
@@ -13,6 +13,11 @@ written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlGlrLight - SGI gl light
// .SECTION Description
// vlGlrLight is a concrete implementation of the abstract class vlLight.
// vlGlrLight interfaces to the Silicon Graphics gl rendering library.
#ifndef __vlGlrLight_hh
#define __vlGlrLight_hh
...
...
@@ -27,9 +32,9 @@ protected:
public:
char
*
GetClassName
()
{
return
"vlGlrLight"
;};
void
Render
(
vlRenderer
*
ren
,
int
light_index
);
// overides base
void
Render
(
vl
Glr
Renderer
*
ren
,
int
light_index
);
// real function
void
Render
(
vlRenderer
*
ren
,
int
light_index
);
void
Render
(
vlGlrRenderer
*
ren
,
int
light_index
);
};
#endif
...
...
include/GlrProp.hh
View file @
c2703698
...
...
@@ -13,6 +13,11 @@ written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlGlrProperty - SGI gl property
// .SECTION Description
// vlGlrProperty is a concrete implementation of the abstract class vlProperty.
// vlGlrProperty interfaces to the Silicon Graphics gl rendering library.
#ifndef __vlGlrProperty_hh
#define __vlGlrProperty_hh
...
...
@@ -25,7 +30,8 @@ class vlGlrProperty : public vlProperty
{
public:
char
*
GetClassName
()
{
return
"vlGlrProperty"
;};
void
Render
(
vlRenderer
*
ren
);
// overides base
void
Render
(
vlRenderer
*
ren
);
void
Render
(
vlGlrRenderer
*
ren
);
};
...
...
include/GlrRen.hh
View file @
c2703698
...
...
@@ -13,6 +13,12 @@ written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlGlrRenderer - SGI gl renderer
// .SECTION Description
// vlGlrRenderer is a concrete implementation of the abstract class
// vlRenderer. vlGlrRenderer interfaces to the Silicon Graphics gl
// graphics library.
#ifndef __vlGlrRenderer_hh
#define __vlGlrRenderer_hh
...
...
@@ -33,6 +39,7 @@ class vlGlrRenderer : public vlRenderer
void
Render
(
void
);
// overides base
char
*
GetClassName
()
{
return
"vlGlrRenderer"
;};
void
PrintSelf
(
ostream
&
os
,
vlIndent
indent
);
vlGeometryPrimitive
*
GetPrimitive
(
char
*
);
void
ClearLights
(
void
);
int
UpdateActors
(
void
);
...
...
include/GlrRenW.hh
View file @
c2703698
...
...
@@ -13,6 +13,12 @@ written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlGlrRenderWindow - SGI gl rendering window
// .SECTION Description
// vlGlrRenderWindow is a concrete implementation of the abstract class
// vlRenderWindow. vlGlrRenderer interfaces to the Silicon Graphics gl
// graphics library.
#ifndef __vlGlrRenderWindow_hh
#define __vlGlrRenderWindow_hh
...
...
src/GlrCam.cc
View file @
c2703698
...
...
@@ -17,14 +17,15 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
#include
"GlrRen.hh"
#include
"GlrCam.hh"
// typecast if neccessary
// Description:
// Implement base class method.
void
vlGlrCamera
::
Render
(
vlRenderer
*
ren
)
{
this
->
Render
((
vlGlrRenderer
*
)
ren
);
}
//
set the appropriate attributes in Glr for this camera
//
//
Description:
//
Actual camera render method.
void
vlGlrCamera
::
Render
(
vlGlrRenderer
*
ren
)
{
float
aspect
[
3
];
...
...
src/GlrLgt.cc
View file @
c2703698
...
...
@@ -25,13 +25,15 @@ static float light_info[] = {
};
// typecast if neccessary
// Description:
// Implement base class method.
void
vlGlrLight
::
Render
(
vlRenderer
*
ren
,
int
light_index
)
{
this
->
Render
((
vlGlrRenderer
*
)
ren
,
light_index
);
}
// set the appropriate attributes in Glr for this light
// Description:
// Actual light render method.
void
vlGlrLight
::
Render
(
vlGlrRenderer
*
ren
,
int
light_index
)
{
float
dx
,
dy
,
dz
;
...
...
src/GlrProp.cc
View file @
c2703698
...
...
@@ -28,13 +28,15 @@ static float mat[] = {
LMNULL
};
// typecast if neccessary
// Description:
// Implement base class method.
void
vlGlrProperty
::
Render
(
vlRenderer
*
ren
)
{
this
->
Render
((
vlGlrRenderer
*
)
ren
);
}
// set the appropriate attributes in Glr for this property
// Description:
// Actual property render method.
void
vlGlrProperty
::
Render
(
vlGlrRenderer
*
ren
)
{
int
i
,
method
;
...
...
src/GlrRen.cc
View file @
c2703698
...
...
@@ -35,6 +35,8 @@ vlGlrRenderer::vlGlrRenderer()
{
}
// Description:
// Ask actors to build and draw themselves.
int
vlGlrRenderer
::
UpdateActors
()
{
vlActor
*
anActor
;
...
...
@@ -73,6 +75,8 @@ int vlGlrRenderer::UpdateActors()
return
count
;
}
// Description:
// Ask active camera to load its view matrix.
int
vlGlrRenderer
::
UpdateCameras
()
{
// update the viewing transformation
...
...
@@ -82,6 +86,9 @@ int vlGlrRenderer::UpdateCameras ()
return
1
;
}
// Description:
// Internal method temporarily removes lights before reloading them
// into graphics pipeline.
void
vlGlrRenderer
::
ClearLights
(
void
)
{
short
cur_light
;
...
...
@@ -107,6 +114,8 @@ void vlGlrRenderer::ClearLights (void)
this
->
NumberOfLightsBound
=
0
;
}
// Description:
// Ask lights to load themselves into graphics pipeline.
int
vlGlrRenderer
::
UpdateLights
()
{
vlLight
*
light
;
...
...
@@ -154,6 +163,8 @@ int vlGlrRenderer::UpdateLights ()
return
count
;
}
// Description:
// Concrete gl render method.
void
vlGlrRenderer
::
Render
(
void
)
{
// standard render method
...
...
@@ -166,6 +177,8 @@ void vlGlrRenderer::Render(void)
popmatrix
();
}
// Description:
// Create particular type of gl geometry primitive.
vlGeometryPrimitive
*
vlGlrRenderer
::
GetPrimitive
(
char
*
type
)
{
vlGeometryPrimitive
*
prim
;
...
...
@@ -194,7 +207,6 @@ vlGeometryPrimitive *vlGlrRenderer::GetPrimitive(char *type)
return
((
vlGeometryPrimitive
*
)
NULL
);
}
void
vlGlrRenderer
::
PrintSelf
(
ostream
&
os
,
vlIndent
indent
)
{
if
(
this
->
ShouldIPrint
(
vlGlrRenderer
::
GetClassName
()))
...
...
src/GlrRenW.cc
View file @
c2703698
...
...
@@ -95,6 +95,19 @@ static void set_window(int buffer,Window W,GLXconfig *conf)
conf
[
i
].
arg
=
(
int
)
W
;
}
vlGlrRenderWindow
::
vlGlrRenderWindow
()
{
this
->
Gid
=
-
2
;
this
->
DisplayId
=
(
Display
*
)
NULL
;
this
->
WindowId
=
(
Window
)
NULL
;
this
->
NextWindowId
=
(
Window
)
NULL
;
this
->
ColorMap
=
(
Colormap
)
0
;
strcpy
(
this
->
Name
,
"Visualization Library - GL"
);
}
// Description:
// Create a gl-specific actor.
vlActor
*
vlGlrRenderWindow
::
MakeActor
()
{
vlActor
*
actor
;
...
...
@@ -107,6 +120,8 @@ vlActor *vlGlrRenderWindow::MakeActor()
return
(
vlActor
*
)
actor
;
}
// Description:
// Create a gl specific light.
vlLight
*
vlGlrRenderWindow
::
MakeLight
()
{
vlGlrLight
*
light
;
...
...
@@ -115,6 +130,8 @@ vlLight *vlGlrRenderWindow::MakeLight()
return
(
vlLight
*
)
light
;
}
// Description:
// Create a gl specific renderer.
vlRenderer
*
vlGlrRenderWindow
::
MakeRenderer
()
{
vlGlrRenderer
*
ren
;
...
...
@@ -127,6 +144,8 @@ vlRenderer *vlGlrRenderWindow::MakeRenderer()
return
(
vlRenderer
*
)
ren
;
}
// Description:
// Create a gl specific camera.
vlCamera
*
vlGlrRenderWindow
::
MakeCamera
()
{
vlGlrCamera
*
camera
;
...
...
@@ -135,17 +154,8 @@ vlCamera *vlGlrRenderWindow::MakeCamera()
return
(
vlCamera
*
)
camera
;
}
vlGlrRenderWindow
::
vlGlrRenderWindow
()
{
this
->
Gid
=
-
2
;
this
->
DisplayId
=
(
Display
*
)
NULL
;
this
->
WindowId
=
(
Window
)
NULL
;
this
->
NextWindowId
=
(
Window
)
NULL
;
this
->
ColorMap
=
(
Colormap
)
0
;
strcpy
(
this
->
Name
,
"Visualization Library - GL"
);
}
// Description:
// Begin the rendering process.
void
vlGlrRenderWindow
::
Start
(
void
)
{
// if the renderer has not been initialized, do so now
...
...
@@ -155,6 +165,8 @@ void vlGlrRenderWindow::Start(void)
winset
(
this
->
Gid
);
}
// Description:
// End the rendering process and display the image.
void
vlGlrRenderWindow
::
Frame
(
void
)
{
if
(
this
->
DoubleBuffer
)
...
...
@@ -164,6 +176,8 @@ void vlGlrRenderWindow::Frame(void)
}
}
// Description:
// Specify various window parameters.
void
vlGlrRenderWindow
::
WindowConfigure
()
{
if
(
this
->
DoubleBuffer
)
...
...
@@ -200,6 +214,8 @@ void vlGlrRenderWindow::WindowConfigure()
}
// Description:
// Initialize the window for rendering.
void
vlGlrRenderWindow
::
WindowInitialize
(
void
)
{
GLXconfig
*
conf
;
...
...
@@ -324,6 +340,8 @@ void vlGlrRenderWindow::WindowInitialize (void)
this
->
Mapped
=
1
;
}
// Description:
// Initialize the rendering window.
void
vlGlrRenderWindow
::
Initialize
(
void
)
{
// make sure we havent already been initialized
...
...
@@ -339,6 +357,8 @@ void vlGlrRenderWindow::Initialize (void)
this
->
Gid
=
1
;
}
// Description:
// Make the connection to the window manager.
void
vlGlrRenderWindow
::
Connect
()
{
int
status
=
-
1
;
...
...
@@ -380,6 +400,8 @@ void vlGlrRenderWindow::Connect()
this
->
Gid
=
-
1
;
}
// Description:
// Change the window to fill the entire screen.
void
vlGlrRenderWindow
::
SetFullScreen
(
int
arg
)
{
int
*
temp
;
...
...
@@ -437,7 +459,8 @@ void vlGlrRenderWindow::SetFullScreen(int arg)
this
->
Modified
();
}
// Description:
// Set the preferred window size to full screen.
void
vlGlrRenderWindow
::
PrefFullScreen
()
{
this
->
Connect
();
...
...
@@ -452,7 +475,8 @@ void vlGlrRenderWindow::PrefFullScreen()
this
->
Borders
=
0
;
}
// Description:
// Resize the window.
void
vlGlrRenderWindow
::
WindowRemap
()
{
short
cur_light
;
...
...
@@ -475,7 +499,8 @@ void vlGlrRenderWindow::WindowRemap()
this
->
WindowInitialize
();
}
// Description:
// Get the current size of the window.
int
*
vlGlrRenderWindow
::
GetSize
(
void
)
{
XWindowAttributes
attribs
;
...
...
@@ -496,6 +521,8 @@ int *vlGlrRenderWindow::GetSize(void)
return
this
->
Size
;
}
// Description:
// Get the position in screen coordinates of the window.
int
*
vlGlrRenderWindow
::
GetPosition
(
void
)
{
XWindowAttributes
attribs
;
...
...
@@ -520,6 +547,8 @@ int *vlGlrRenderWindow::GetPosition(void)
return
this
->
Position
;
}
// Description:
// Specify the size of the rendering window.
void
vlGlrRenderWindow
::
SetSize
(
int
x
,
int
y
)
{
// if we arent mappen then just set the ivars
...
...
@@ -539,6 +568,8 @@ void vlGlrRenderWindow::SetSize(int x,int y)
}
// Description:
// Get the window display id.
Display
*
vlGlrRenderWindow
::
GetDisplayId
()
{
vlDebugMacro
(
<<
"Returning DisplayId of "
<<
(
void
*
)
this
->
DisplayId
<<
"
\n
"
);
...
...
@@ -546,6 +577,8 @@ Display *vlGlrRenderWindow::GetDisplayId()
return
this
->
DisplayId
;
}
// Description:
// Get the window id.
Window
vlGlrRenderWindow
::
GetWindowId
()
{
vlDebugMacro
(
<<
"Returning WindowId of "
<<
(
void
*
)
this
->
WindowId
<<
"
\n
"
);
...
...
@@ -553,6 +586,8 @@ Window vlGlrRenderWindow::GetWindowId()
return
this
->
WindowId
;
}
// Description:
// Set the window id to a pre-existing window.
void
vlGlrRenderWindow
::
SetWindowId
(
Window
arg
)
{
vlDebugMacro
(
<<
"Setting WindowId to "
<<
(
void
*
)
arg
<<
"
\n
"
);
...
...
@@ -560,6 +595,8 @@ void vlGlrRenderWindow::SetWindowId(Window arg)
this
->
WindowId
=
arg
;
}
// Description:
// Set the display id of the window to a pre-exisiting display id.
void
vlGlrRenderWindow
::
SetDisplayId
(
Display
*
arg
)
{
vlDebugMacro
(
<<
"Setting DisplayId to "
<<
(
void
*
)
arg
<<
"
\n
"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment