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
ec31cee6
Commit
ec31cee6
authored
Aug 25, 1994
by
Will Schroeder
Browse files
ENH: Added Set/Get Property methods to vlActor.
parent
bac8f3e8
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/Actor.hh
View file @
ec31cee6
...
...
@@ -13,8 +13,7 @@ written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlActor - an entity in a rendering scene
//
// .NAME vlActor - an entity in a rendered image
// .SECTION Description
// vlActor is used to represent an entity in a rendering scene. It handles
// functions related to the actors position, orientation and scaling. It
...
...
@@ -22,7 +21,8 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
// = [x y z 1] Translate(-origin) Scale(scale) Rot(y) Rot(x) Rot (z)
// Trans(origin) Trans(position).
//
// The actor also maintains the front and back facing properties.
// The actor also maintains a reference to the defining geometry (i.e., the
// mapper), and rendering properties.
#ifndef __vlActor_hh
#define __vlActor_hh
...
...
@@ -39,9 +39,25 @@ class vlActor : public vlObject
public:
vlActor
();
~
vlActor
();
char
*
GetClassName
()
{
return
"vlActor"
;};
void
PrintSelf
(
ostream
&
os
,
vlIndent
indent
);
void
Render
(
vlRenderer
*
ren
);
// Description:
// Specify the property object to control rendering surface properties.
vlSetObjectMacro
(
Property
,
vlProperty
);
// Description:
// Get the property object that controls rendering surface properties.
vlGetObjectMacro
(
Property
,
vlProperty
);
// Description:
// This is the method that is used to connect an actor to the end of a
// visualization pipeline, i.e. the Mapper.
vlSetObjectMacro
(
Mapper
,
vlMapper
);
// Description:
// Returns the Mapper that this actor is getting it's data from.
vlGetObjectMacro
(
Mapper
,
vlMapper
);
// Description:
// Get the position of the actor.
...
...
@@ -114,11 +130,6 @@ class vlActor : public vlObject
vlBooleanMacro
(
Dragable
,
int
);
vlMatrix4x4
GetMatrix
();
void
SetMapper
(
vlMapper
*
m
);
vlMapper
*
GetMapper
();
vlProperty
*
Property
;
char
*
GetClassName
()
{
return
"vlActor"
;};
void
PrintSelf
(
ostream
&
os
,
vlIndent
indent
);
float
*
GetBounds
();
float
*
GetXRange
();
...
...
@@ -137,6 +148,7 @@ class vlActor : public vlObject
void
AddOrientation
(
float
a
[
3
]);
protected:
vlProperty
*
Property
;
vlMapper
*
Mapper
;
float
Origin
[
3
];
float
Position
[
3
];
...
...
src/Actor.cc
View file @
ec31cee6
...
...
@@ -23,11 +23,14 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
// Description:
// Creates an actor with the following defaults: origin(0,0,0)
// position(0,0,0) scale(1,1,1) visibility=1 pickable=1 dragable=1
// orientation= (0,0,0)
// orientation= (0,0,0). IMPORTANT NOTE: Usually the vlRenderWindow
// method MakeActor() is used to create a device specific actor. This
// has the added benefit that a default device-specific proprty is
// automatically created.
vlActor
::
vlActor
()
{
this
->
Mapper
=
0
;
this
->
Property
=
0
;
this
->
Mapper
=
NULL
;
this
->
Property
=
NULL
;
this
->
Origin
[
0
]
=
0.0
;
this
->
Origin
[
1
]
=
0.0
;
...
...
@@ -68,27 +71,6 @@ void vlActor::Render(vlRenderer *ren)
}
// Description:
// This is the method that is used to connect an actor to the end of a
// visualization pipeline, i.e. the Mapper.
void
vlActor
::
SetMapper
(
vlMapper
*
m
)
{
if
(
this
->
Mapper
!=
m
)
{
if
(
this
->
Mapper
)
this
->
Mapper
->
UnRegister
(
this
);
this
->
Mapper
=
m
;
this
->
Mapper
->
Register
(
this
);
this
->
Modified
();
}
}
// Description:
// Returns the Mapper that this actor is getting it's data from.
vlMapper
*
vlActor
::
GetMapper
()
{
return
this
->
Mapper
;
}
void
vlActor
::
PrintSelf
(
ostream
&
os
,
vlIndent
indent
)
{
if
(
this
->
ShouldIPrint
(
vlActor
::
GetClassName
()))
...
...
src/GlrRenW.cc
View file @
ec31cee6
...
...
@@ -117,7 +117,7 @@ vlActor *vlGlrRenderWindow::MakeActor()
actor
=
new
vlActor
;
prop
=
new
vlGlrProperty
;
actor
->
Property
=
(
vlProperty
*
)
prop
;
actor
->
Set
Property
(
(
vlProperty
*
)
prop
)
;
return
(
vlActor
*
)
actor
;
}
...
...
src/SGGeomF.cc
View file @
ec31cee6
...
...
@@ -46,6 +46,7 @@ void vlStructuredGeometryFilter::Execute()
this
->
Initialize
();
pd
=
this
->
Input
->
GetPointData
();
this
->
PointData
.
CopyNormalsOff
();
dims
=
this
->
Input
->
GetDimensions
();
//
// Based on the dimensions of the structured data, and the extent of the geometry,
...
...
src/SbrRenW.cc
View file @
ec31cee6
...
...
@@ -48,7 +48,7 @@ vlActor *vlSbrRenderWindow::MakeActor()
actor
=
new
vlActor
;
prop
=
new
vlSbrProperty
;
actor
->
Property
=
(
vlProperty
*
)
prop
;
actor
->
Set
Property
(
(
vlProperty
*
)
prop
)
;
return
(
vlActor
*
)
actor
;
}
...
...
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