Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoSFImage3.h
1#ifndef COIN_SOSFIMAGE3_H
2#define COIN_SOSFIMAGE3_H
3
4/**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25\**************************************************************************/
26
27#include <Inventor/fields/SoSField.h>
28#include <Inventor/fields/SoSubField.h>
29#include <Inventor/SbVec3s.h>
30
31class COIN_DLL_API SoSFImage3 : public SoSField {
32 typedef SoSField inherited;
33
34 SO_SFIELD_CONSTRUCTOR_HEADER(SoSFImage3);
35 SO_SFIELD_REQUIRED_HEADER(SoSFImage3);
36
37public:
38 static void initClass(void);
39
40 const unsigned char *getValue(SbVec3s &size, int &nc) const;
41 void setValue(const SbVec3s &size, const int nc,
42 const unsigned char *bytes);
43
44 int operator==(const SoSFImage3 & field) const;
45 int operator!=(const SoSFImage3 & field) const {
46 return ! operator == (field);
47 }
48
49 unsigned char * startEditing(SbVec3s &size, int &nc);
50 void finishEditing(void);
51
52private:
53 virtual SbBool readValue(SoInput *in);
54 virtual void writeValue(SoOutput *out) const;
55
56 class SbImage *image;
57};
58
59#endif // !COIN_SOSFIMAGE3_H
The SbImage class is an abstract datatype for 2D and 3D images.
Definition SbImage.h:37
The SbVec3s class is a 3 dimensional vector with short integer coordinates.
Definition SbVec3s.h:39
virtual SbBool readValue(SoInput *in)=0
int operator==(const SoField &f) const
Definition SoField.cpp:1573
virtual void writeValue(SoOutput *out) const =0
The SoInput class is an abstraction of file import functionality.
Definition SoInput.h:52
The SoOutput class is an abstraction of an output stream.
Definition SoOutput.h:42
The SoSFImage3 class is used to store 3D (volume) images.
Definition SoSFImage3.h:31
int operator!=(const SoSFImage3 &field) const
Definition SoSFImage3.h:45
The SoSField class is the base class for fields which contains only a single value.
Definition SoSField.h:29

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.