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
VTK
VTK
Commits
a93aa26e
Commit
a93aa26e
authored
Feb 24, 1994
by
Will Schroeder
Browse files
Initial revision
parent
cb304d42
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ByteSwap.hh
0 → 100644
View file @
a93aa26e
/*=========================================================================
Program: Visualization Library
Module: ByteSwap.hh
Language: C++
Date: $Date$
Version: $Revision$
Description:
---------------------------------------------------------------------------
This file is part of the Visualization Library. No part of this file
or its contents may be copied, reproduced or altered in any way
without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
//
// Class for performing common math operations (e.g., dot, cross products)
//
#ifndef __vlByteSwap_hh
#define __vlByteSwap_hh
class
vlByteSwap
{
public:
Swap4
(
char
*
c
);
Swap4
(
float
*
p
)
{
Swap4
((
char
*
)
p
);};
Swap4
(
int
*
i
)
{
Swap4
((
char
*
)
i
);};
Swap4
(
unsigned
long
*
i
)
{
Swap4
((
char
*
)
i
);};
};
#endif
src/ByteSwap.cc
0 → 100644
View file @
a93aa26e
/*=========================================================================
Program: Visualization Library
Module: ByteSwap.cc
Language: C++
Date: $Date$
Version: $Revision$
Description:
---------------------------------------------------------------------------
This file is part of the Visualization Library. No part of this file
or its contents may be copied, reproduced or altered in any way
without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
#include
"ByteSwap.hh"
vlByteSwap
::
Swap4
(
char
*
mem_ptr1
)
{
char
one_byte
;
one_byte
=
mem_ptr1
[
0
];
mem_ptr1
[
0
]
=
mem_ptr1
[
3
];
mem_ptr1
[
3
]
=
one_byte
;
one_byte
=
mem_ptr1
[
1
];
mem_ptr1
[
1
]
=
mem_ptr1
[
2
];
mem_ptr1
[
2
]
=
one_byte
;
}
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