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
third-party
visit
Commits
92c8c06e
Commit
92c8c06e
authored
Mar 31, 2007
by
hrchilds
Browse files
Update from July 29, 2003
git-svn-id:
http://visit.ilight.com/svn/visit/trunk/src@45
18c085ea-50e0-402c-830e-de6fd14e8384
parent
5230ce30
Changes
44
Hide whitespace changes
Inline
Side-by-side
BUILD_NOTES
View file @
92c8c06e
...
...
@@ -427,9 +427,9 @@ More information about building VisIt follows after that.
#
# Build and install it in the visit directory.
#
gunzip visit030
709
.tar.gz
tar xf visit030
709
.tar
cd visit030
709
/config-site
gunzip visit030
804
.tar.gz
tar xf visit030
804
.tar
cd visit030
804
/config-site
echo VISITHOME=`cat ../../visitpath` > `hostname`.conf
cat Template.conf >> `hostname`.conf
cd ..
...
...
@@ -438,11 +438,11 @@ make
clearcase_bin/visit-bin-dist
# Use the appropriate install command based on the operating system on
# which you built VisIt.
clearcase_bin/visit-install 1.
1.6
aix `cat ../visitpath`
clearcase_bin/visit-install 1.
1.6
irix6 `cat ../visitpath`
clearcase_bin/visit-install 1.
1.6
linux `cat ../visitpath`
clearcase_bin/visit-install 1.
1.6
osf1 `cat ../visitpath`
clearcase_bin/visit-install 1.
1.6
sunos5 `cat ../visitpath`
clearcase_bin/visit-install 1.
2
aix `cat ../visitpath`
clearcase_bin/visit-install 1.
2
irix6 `cat ../visitpath`
clearcase_bin/visit-install 1.
2
linux `cat ../visitpath`
clearcase_bin/visit-install 1.
2
osf1 `cat ../visitpath`
clearcase_bin/visit-install 1.
2
sunos5 `cat ../visitpath`
When running the configure script you can enable or disable certain dependent
packages. All the configure options are listed at the beginning of the
...
...
INSTALL_NOTES
View file @
92c8c06e
...
...
@@ -17,7 +17,7 @@ Unix:
where
"version" will be 1.
1.6
for the current distribution.
"version" will be 1.
2
for the current distribution.
"platform" will be one of the following: aix, irix6, linux, osf1,
or sunos5 depending on the machine. The one you use should match
...
...
@@ -28,17 +28,17 @@ Unix:
For example
visit-install 1.
1.6
irix6 /usr/local/visit
visit-install 1.
2
irix6 /usr/local/visit
will install the irix6, 1.
1.6
version of visit in the directory
will install the irix6, 1.
2
version of visit in the directory
"/usr/local/visit". Note that you will need to have the file
"visit1_
1_6
.irix6.tar.gz" present in the current directory for this
"visit1_
2
.irix6.tar.gz" present in the current directory for this
to function properly. You can install multiple binaries into the
same directory. For example, you could then execute
visit-install -a 1.
1.6
linux /usr/local/visit
visit-install -a 1.
2
linux /usr/local/visit
to add a linux, 1.
1.6
version of visit to the same directory.
to add a linux, 1.
2
version of visit to the same directory.
2. Add the bin directory below the installation directory
(/usr/local/visit/bin in our example) to each user's search path.
...
...
@@ -76,15 +76,15 @@ Unix:
Windows:
1. Copy the file visit1.
1.6
.exe to your desktop.
1. Copy the file visit1.
2
.exe to your desktop.
2. Right click on the visit1.
1.6
.exe icon using your mouse and selecting
"Extract to folder C:\...\Desktop\visit1.
1.6
" from the popup menu. A
2. Right click on the visit1.
2
.exe icon using your mouse and selecting
"Extract to folder C:\...\Desktop\visit1.
2
" from the popup menu. A
window will popup as the file is extracted into the directory. Once
the process is complete a "visit1.
1.6
" directory icon should appear on
the process is complete a "visit1.
2
" directory icon should appear on
your desktop.
3. Double click on the "visit1.
1.6
" directory icon bringing up a file
3. Double click on the "visit1.
2
" directory icon bringing up a file
system browsing window.
4. Double click on the SETUP icon with the computer display icon to run
...
...
clearcase_bin/visit-bin-dist
View file @
92c8c06e
...
...
@@ -118,6 +118,9 @@
# Brad Whitlock, Thu Jun 19 13:16:57 PST 2003
# Removed splashscreen from the distribution.
#
# Eric Brugger, Tue Jul 29 08:23:32 PDT 2003
# Added makemili to the distribution.
#
#-----------------------------------------------------------------------
set DataFiles = "TRUE"
...
...
@@ -221,7 +224,7 @@ endif
# Determine the operating system.
#
if("$OSGiven" == "FALSE") then
set os = `/bin/uname -s | tr "[A-Z]" "[a-z]" | tr -d "[0-9]"`
set os = `/bin/uname -s | tr "[A-Z]" "[a-z]" | tr -d "[0-9]"`
endif
#
...
...
@@ -345,7 +348,7 @@ endif
mkdir distribution/visit
mkdir distribution/visit/bin
if ($DataFiles == "TRUE") then
mkdir distribution/visit/data
mkdir distribution/visit/data
endif
mkdir distribution/visit/$Version
...
...
@@ -464,7 +467,7 @@ cp $VisItDir/bin/visit distribution/visit/bin/visit
cp $VisItDir/bin/cli $bindir/cli
cp $VisItDir/bin/engine_ser $bindir/engine_ser
if(-e $VisItDir/bin/engine_par) then
cp $VisItDir/bin/engine_par $bindir/engine_par
cp $VisItDir/bin/engine_par $bindir/engine_par
endif
cp $VisItDir/bin/gui $bindir/gui
cp $VisItDir/bin/mdserver $bindir/mdserver
...
...
@@ -483,6 +486,9 @@ cp $VisItDir/bin/curv3dprep $bindir
# copy text2polys and time_annotation
cp $VisItDir/bin/text2polys $bindir
cp $VisItDir/bin/time_annotation $bindir
if(-e $VisItDir/bin/makemili_ser) then
cp $VisItDir/bin/makemili_ser $bindir/makemili_ser
endif
#
# Copy the VisIt libraries to the distribution.
...
...
@@ -596,17 +602,17 @@ cp $VisItDir/include/qt/*.h $incdir/qt
#
cp $VisItDir/help/*.html $helpdir
if (-e $VisItDir/help/visit.helpml) then
cp $VisItDir/help/visit.helpml $helpdir
cp $VisItDir/help/visit.helpml $helpdir
endif
#
# Copy the Java class files to the distribution.
#
if (-e $VisItDir/java/llnl/visit/ViewerProxy.class) then
cp -R $VisItDir/java/llnl $javadir
cp -R $VisItDir/java/llnl $javadir
endif
if (-e $VisItDir/java/RunViewer.class) then
cp -R $VisItDir/java/RunViewer.class $javadir
cp -R $VisItDir/java/RunViewer.class $javadir
endif
#
...
...
clearcase_bin/visit-build-open
View file @
92c8c06e
...
...
@@ -289,16 +289,16 @@ fi
rm
-f
gps
cat
<<
EOF
> gps
#!/bin/sh
if test ! -e /nfs/tmp
1
/
$user
; then
mkdir /nfs/tmp
1
/
$user
if test ! -e /nfs/tmp
3
/
$user
; then
mkdir /nfs/tmp
3
/
$user
fi
if test ! -e /nfs/tmp
1
/
$user
/gps; then
mkdir /nfs/tmp
1
/
$user
/gps
if test ! -e /nfs/tmp
3
/
$user
/gps; then
mkdir /nfs/tmp
3
/
$user
/gps
fi
rm -rf /nfs/tmp
1
/
$user
/gps/visitbuild
mkdir /nfs/tmp
1
/
$user
/gps/visitbuild
mv gps_
$dist
.tar.gz /nfs/tmp
1
/
$user
/gps/visitbuild/
$dist
.tar.gz
cd /nfs/tmp
1
/
$user
/gps/visitbuild
rm -rf /nfs/tmp
3
/
$user
/gps/visitbuild
mkdir /nfs/tmp
3
/
$user
/gps/visitbuild
mv gps_
$dist
.tar.gz /nfs/tmp
3
/
$user
/gps/visitbuild/
$dist
.tar.gz
cd /nfs/tmp
3
/
$user
/gps/visitbuild
gunzip -c
$dist
.tar.gz | tar xvf - > buildlog 2>&1
cd
$dist
ver=
\`
cat VERSION
\`
...
...
@@ -375,16 +375,16 @@ fi
rm
-f
frost
cat
<<
EOF
> frost
#!/bin/sh
if test ! -e /
nfs/tmp
1/
$user
; then
mkdir /
nfs/tmp
1/
$user
if test ! -e /
p/gf
1/
$user
; then
mkdir /
p/gf
1/
$user
fi
if test ! -e /
nfs/tmp
1/
$user
/frost ; then
mkdir /
nfs/tmp
1/
$user
/frost
if test ! -e /
p/gf
1/
$user
/frost ; then
mkdir /
p/gf
1/
$user
/frost
fi
rm -rf /
nfs/tmp
1/
$user
/frost/visitbuild
mkdir /
nfs/tmp
1/
$user
/frost/visitbuild
mv frost_
$dist
.tar.gz /
nfs/tmp
1/
$user
/frost/visitbuild/
$dist
.tar.gz
cd /
nfs/tmp
1/
$user
/frost/visitbuild
rm -rf /
p/gf
1/
$user
/frost/visitbuild
mkdir /
p/gf
1/
$user
/frost/visitbuild
mv frost_
$dist
.tar.gz /
p/gf
1/
$user
/frost/visitbuild/
$dist
.tar.gz
cd /
p/gf
1/
$user
/frost/visitbuild
gunzip -c
$dist
.tar.gz | tar xvf - > buildlog 2>&1
cd
$dist
ver=
\`
cat VERSION
\`
...
...
clearcase_bin/visit-install-open
View file @
92c8c06e
...
...
@@ -294,7 +294,7 @@ if [ $gps = true ]
then
if
[
$test
=
no
]
then
scp gps15:/nfs/tmp
1
/
$user
/gps/visitbuild/visit
$ver2
.osf1.tar.gz
.
scp gps15:/nfs/tmp
3
/
$user
/gps/visitbuild/visit
$ver2
.osf1.tar.gz
.
scp visit
$ver2
.osf1.tar.gz gps15:
scp visit-install gps15:
scp gps gps15:gps_install
...
...
@@ -362,7 +362,7 @@ if [ $frost = true ]
then
if
[
$test
=
no
]
then
scp
gps15:/nfs/tmp
1/
$user
/frost/visitbuild/visit
$ver2
.aix.tar.gz
.
scp
frost:/p/gf
1/
$user
/frost/visitbuild/visit
$ver2
.aix.tar.gz
.
scp visit
$ver2
.aix.tar.gz gps15:
scp visit-install gps15:
scp frost gps15:frost_install
...
...
common/comm/ParentProcess.C
View file @
92c8c06e
...
...
@@ -196,11 +196,15 @@ ParentProcess::SetVersion(const std::string &ver)
// Brad Whitlock, Fri Apr 18 15:13:34 PST 2003
// I added the -noconnect flag to help debug certain components.
//
// Brad Whitlock, Tue Jul 29 10:56:34 PDT 2003
// I added numRead and numWrite so we don't have to get the number of
// connections to create from the command line anymore.
//
// ****************************************************************************
void
ParentProcess
::
Connect
(
int
*
argc
,
char
**
argv
[],
bool
createSockets
,
int
failCode
)
ParentProcess
::
Connect
(
int
numRead
,
int
numWrite
,
int
*
argc
,
char
**
argv
[],
bool
createSockets
,
int
failCode
)
{
char
**
argv2
=
*
argv
;
bool
rhostSpecified
=
false
;
...
...
@@ -231,50 +235,6 @@ ParentProcess::Connect(int *argc, char **argv[], bool createSockets,
deleteCount
=
2
;
}
}
else
if
(
std
::
string
(
argv2
[
i
])
==
std
::
string
(
"-nread"
))
{
if
(
rhostSpecified
&&
(
i
+
1
<
*
argc
))
{
int
num
=
atoi
(
argv2
[
i
+
1
]);
if
(
createSockets
&&
(
num
>
0
)
&&
!
nReadSpecified
)
{
nReadSpecified
=
true
;
writeConnections
=
new
Connection
*
[
num
];
for
(
int
j
=
0
;
j
<
num
;
++
j
)
{
int
desc
=
GetClientSocketDescriptor
(
port
);
if
(
desc
!=
-
1
)
{
writeConnections
[
nWriteConnections
]
=
new
SocketConnection
(
desc
);
++
nWriteConnections
;
}
}
}
deleteCount
=
2
;
}
}
else
if
(
std
::
string
(
argv2
[
i
])
==
std
::
string
(
"-nwrite"
))
{
if
(
rhostSpecified
&&
(
i
+
1
<
*
argc
))
{
int
num
=
atoi
(
argv2
[
i
+
1
]);
if
(
createSockets
&&
(
num
>
0
)
&&
!
nWriteSpecified
)
{
nWriteSpecified
=
true
;
readConnections
=
new
Connection
*
[
num
];
for
(
int
j
=
0
;
j
<
num
;
++
j
)
{
int
desc
=
GetClientSocketDescriptor
(
port
);
if
(
desc
!=
-
1
)
{
readConnections
[
nReadConnections
]
=
new
SocketConnection
(
desc
);
++
nReadConnections
;
}
}
}
deleteCount
=
2
;
}
}
else
if
(
std
::
string
(
argv2
[
i
])
==
std
::
string
(
"-key"
))
{
if
(
i
+
1
<
*
argc
)
...
...
@@ -304,18 +264,58 @@ ParentProcess::Connect(int *argc, char **argv[], bool createSockets,
}
}
// end for i
if
(
createSockets
&&
(
nReadConnections
==
0
&&
nWriteConnections
==
0
))
{
// If we are supposed to create sockets but cannot, then we
// throw a CouldNotConnectException so we know that we could not
// connect back to the parent process.
EXCEPTION0
(
CouldNotConnectException
);
}
else
if
(
nWriteSpecified
||
nReadSpecified
)
//
// Now that we have connection information, create the connections.
//
if
(
rhostSpecified
&&
createSockets
)
{
// Now that the sockets are open, exchange type representation info
// and set that info in the socket connections.
ExchangeTypeRepresentations
(
failCode
);
if
(
numRead
>
0
)
{
nReadSpecified
=
true
;
writeConnections
=
new
Connection
*
[
numRead
];
for
(
int
j
=
0
;
j
<
numRead
;
++
j
)
{
int
desc
=
GetClientSocketDescriptor
(
port
);
if
(
desc
!=
-
1
)
{
writeConnections
[
nWriteConnections
]
=
new
SocketConnection
(
desc
);
++
nWriteConnections
;
}
}
}
if
(
numWrite
>
0
)
{
nWriteSpecified
=
true
;
readConnections
=
new
Connection
*
[
numWrite
];
for
(
int
j
=
0
;
j
<
numWrite
;
++
j
)
{
int
desc
=
GetClientSocketDescriptor
(
port
);
if
(
desc
!=
-
1
)
{
readConnections
[
nReadConnections
]
=
new
SocketConnection
(
desc
);
++
nReadConnections
;
}
}
}
if
(
nReadConnections
==
0
&&
nWriteConnections
==
0
)
{
//
// If we are supposed to create sockets but cannot, then we
// throw a CouldNotConnectException so we know that we could not
// connect back to the parent process.
//
EXCEPTION0
(
CouldNotConnectException
);
}
else
{
//
// Now that the sockets are open, exchange type representation info
// and set that info in the socket connections.
//
ExchangeTypeRepresentations
(
failCode
);
}
}
}
...
...
common/comm/ParentProcess.h
View file @
92c8c06e
...
...
@@ -38,6 +38,11 @@ class Connection;
// Brad Whitlock, Mon Dec 16 14:27:22 PST 2002
// Added a security key.
//
// Brad Whitlock, Tue Jul 29 10:54:29 PDT 2003
// Added numRead and numWrite to the Connect method so we know how many
// connections to create without having to pass the numbers on the command
// line.
//
// ****************************************************************************
class
COMM_API
ParentProcess
...
...
@@ -45,7 +50,8 @@ class COMM_API ParentProcess
public:
ParentProcess
();
~
ParentProcess
();
void
Connect
(
int
*
argc
,
char
**
argv
[],
bool
createSockets
,
int
failCode
=
0
);
void
Connect
(
int
numRead
,
int
numWrite
,
int
*
argc
,
char
**
argv
[],
bool
createSockets
,
int
failCode
=
0
);
const
std
::
string
&
GetHostName
()
const
;
std
::
string
GetTheUserName
()
const
;
Connection
*
GetReadConnection
(
int
i
=
0
)
const
;
...
...
common/comm/RemoteProcess.C
View file @
92c8c06e
...
...
@@ -1406,7 +1406,9 @@ RemoteProcess::SecureShellArgs() const
// Creation: Mon May 5 13:05:24 PST 2003
//
// Modifications:
//
// Brad Whitlock, Tue Jul 29 10:51:42 PDT 2003
// I removed -nread and -nwrite from the command line.
//
// ****************************************************************************
void
...
...
@@ -1480,14 +1482,6 @@ RemoteProcess::CreateCommandLine(stringVector &args, const std::string &rHost,
sprintf
(
tmp
,
"%d"
,
listenPortNum
);
args
.
push_back
(
tmp
);
args
.
push_back
(
"-nread"
);
sprintf
(
tmp
,
"%d"
,
numRead
);
args
.
push_back
(
tmp
);
args
.
push_back
(
"-nwrite"
);
sprintf
(
tmp
,
"%d"
,
numWrite
);
args
.
push_back
(
tmp
);
//
// Add the security key
//
...
...
common/misc/Init.C
View file @
92c8c06e
...
...
@@ -239,7 +239,7 @@ Init::SetComponentName(const char *cname)
{
int
len
;
if
(
cname
!=
0
&&
(
len
=
strlen
(
cname
)
>
0
)
)
if
(
cname
!=
0
&&
(
len
=
strlen
(
cname
)
)
>
0
)
{
len
=
len
<
sizeof
(
componentName
)
?
len
:
sizeof
(
componentName
)
-
1
;
strncpy
(
componentName
,
cname
,
len
);
...
...
components/Database/Database/avtGenericDatabase.C
View file @
92c8c06e
...
...
@@ -25,6 +25,7 @@
#include
<vtkUnstructuredGridBoundaryFilter.h>
#include
<vtkVisItUtility.h>
#include
<avtCallback.h>
#include
<avtDatabaseMetaData.h>
#include
<avtDatasetCollection.h>
#include
<avtDomainBoundaries.h>
...
...
@@ -1212,6 +1213,9 @@ avtGenericDatabase::GetVectorVariable(const char *varname, int ts, int domain,
// Hank Childs, Fri Mar 14 20:56:40 PST 2003
// Turned off caching in some instances.
//
// Hank Childs, Tue Jul 29 16:48:28 PDT 2003
// Scale mesh when appropriate. Also cache bounds.
//
// ****************************************************************************
vtkDataSet
*
...
...
@@ -1251,6 +1255,9 @@ avtGenericDatabase::GetMesh(const char *meshname, int ts, int domain,
//
mesh
->
Update
();
AssociateBounds
(
mesh
);
ScaleMesh
(
mesh
);
cache
.
CacheVTKObject
(
meshname
,
avtVariableCache
::
DATASET_NAME
,
ts
,
domain
,
material
,
mesh
);
...
...
@@ -4226,3 +4233,207 @@ avtGenericDatabase::QueryZones(const string &varName, const int dom,
return
rv
;
}
// ****************************************************************************
// Method: avtGenericDatabase::AssociateBounds
//
// Purpose:
// Calls GetBounds on the dataset one time and associates the information
// with the dataset. This avoids having the routine called repeatedly.
//
// Programmer: Hank Childs
// Creation: July 29, 2003
//
// ****************************************************************************
void
avtGenericDatabase
::
AssociateBounds
(
vtkDataSet
*
ds
)
{
float
bounds
[
6
];
ds
->
GetBounds
(
bounds
);
vtkFloatArray
*
arr
=
vtkFloatArray
::
New
();
arr
->
SetName
(
"avtOriginalBounds"
);
arr
->
SetNumberOfTuples
(
6
);
for
(
int
i
=
0
;
i
<
6
;
i
++
)
arr
->
SetTuple1
(
i
,
bounds
[
i
]);
ds
->
GetFieldData
()
->
AddArray
(
arr
);
arr
->
Delete
();
}
// ****************************************************************************
// Method: avtGenericDatabase::ScaleMesh
//
// Purpose:
// Scales the mesh in if it is too big.
//
// Programmer: Hank Childs
// Creation: July 29, 2003
//
// ****************************************************************************
void
avtGenericDatabase
::
ScaleMesh
(
vtkDataSet
*
ds
)
{
bool
needScaling
=
false
;
double
scaleFactor
=
1
.;
float
bounds
[
6
];
if
(
ds
->
GetFieldData
()
->
GetArray
(
"avtOriginalBounds"
)
!=
NULL
)
{
vtkDataArray
*
arr
=
ds
->
GetFieldData
()
->
GetArray
(
"avtOriginalBounds"
);
for
(
int
i
=
0
;
i
<
6
;
i
++
)
bounds
[
i
]
=
arr
->
GetTuple1
(
i
);
}
else
{
ds
->
GetBounds
(
bounds
);
}
if
(
bounds
[
1
]
-
bounds
[
0
]
>
1e8
)
{
scaleFactor
=
1
.;
double
temp
=
bounds
[
1
]
-
bounds
[
0
];
while
(
temp
>
1e6
)
{
temp
/=
10
.;
scaleFactor
*=
10
.;
}
needScaling
=
true
;
}
if
((
bounds
[
1
]
>
bounds
[
0
])
&&
(
bounds
[
1
]
-
bounds
[
0
]
<
1e-6
))
{
scaleFactor
=
1
.;
double
temp
=
bounds
[
1
]
-
bounds
[
0
];
while
(
temp
<
1e-3
)
{
temp
*=
10
.;
scaleFactor
/=
10
.;
}
needScaling
=
true
;
}
if
(
bounds
[
3
]
-
bounds
[
2
]
>
1e8
)
{
scaleFactor
=
1
.;
double
temp
=
bounds
[
3
]
-
bounds
[
2
];
while
(
temp
>
1e6
)
{
temp
/=
10
.;
scaleFactor
*=
10
.;
}
needScaling
=
true
;
}
if
((
bounds
[
3
]
>
bounds
[
2
])
&&
(
bounds
[
3
]
-
bounds
[
2
]
<
1e-6
))
{
scaleFactor
=
1
.;
double
temp
=
bounds
[
3
]
-
bounds
[
2
];
while
(
temp
<
1e-3
)
{
temp
*=
10
.;
scaleFactor
/=
10
.;
}
needScaling
=
true
;
}
if
(
bounds
[
5
]
-
bounds
[
4
]
>
1e8
)
{
scaleFactor
=
1
.;
double
temp
=
bounds
[
5
]
-
bounds
[
4
];
while
(
temp
>
1e6
)
{
temp
/=
10
.;
scaleFactor
*=
10
.;
}
needScaling
=
true
;
}
if
((
bounds
[
5
]
>
bounds
[
4
])
&&
(
bounds
[
5
]
-
bounds
[
4
]
<
1e-6
))
{
scaleFactor
=
1
.;
double
temp
=
bounds
[
5
]
-
bounds
[
4
];
while
(
temp
<
1e-3
)
{
temp
*=
10
.;
scaleFactor
/=
10
.;
}
needScaling
=
true
;
}
if
(
!
needScaling
)
{
return
;
}
static
bool
haveIssuedWarning
=
false
;
if
(
!
haveIssuedWarning
)
{
char
msg
[
1024
]
=
"The dataset is too large or too small for VisIt to "
"handle natively. As a result, the dataset is being scaled."
" This will affect the labels for axes, as well as "
"coordinate arguments, such as the origin for a slice."
"This message will only be issued one time per session, "
"even if additional datasets are scaled."
;
avtCallback
::
IssueWarning
(
msg
);
haveIssuedWarning
=
true
;
}
int
dstype
=
ds
->
GetDataObjectType
();
switch
(
dstype
)
{
case
VTK_STRUCTURED_GRID
:
case
VTK_UNSTRUCTURED_GRID
:
case
VTK_POLY_DATA
:
{
vtkPointSet
*
ps
=
(
vtkPointSet
*
)
ds
;
vtkPoints
*
pts
=
ps
->
GetPoints
();
vtkPoints
*
newPts
=
vtkPoints
::
New
();
int
npts
=
pts
->
GetNumberOfPoints
();
newPts
->
SetNumberOfPoints
(
npts
);
float
*
np
=
(
float
*
)
newPts
->
GetVoidPointer
(
0
);
float
*
p
=
(
float
*
)
pts
->
GetVoidPointer
(
0
);
int
nvals
=
3
*
npts
;
for
(
int
i
=
0
;
i
<
nvals
;
i
++
)
{
np
[
i
]
=
p
[
i
]
/
scaleFactor
;
}
ps
->
SetPoints
(
newPts
);
newPts
->
Delete
();
}
break
;
case
VTK_RECTILINEAR_GRID
:
{
vtkRectilinearGrid
*
rg
=
(
vtkRectilinearGrid
*
)
ds
;
vtkDataArray
*
in
[
3
];
in
[
0
]
=
rg
->
GetXCoordinates
();
in
[
1
]
=
rg
->
GetYCoordinates
();
in
[
2
]
=
rg
->
GetZCoordinates
();