AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
Image.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXIO_IMAGE_H
18#define AGXIO_IMAGE_H
19
21
22#include <agx/Referenced.h>
23
24namespace agxIO
25{
26
27
33 {
34 public:
35
39 COLUMN_MAJOR
40 };
41
43
47 unsigned int getWidth() const;
48
52 unsigned int getHeight() const;
53
57 unsigned int getChannels() const;
58
62 unsigned char* getData();
63 const unsigned char* getData() const;
64
65 int getImageDataMode() const;
66
70 void setImage(const unsigned int& width, const unsigned int& height,
71 const unsigned int& channels, const int& mode, unsigned char* data);
72 protected:
73
74 unsigned int m_width;
75 unsigned int m_height;
76 unsigned int m_channels;
77
78 unsigned char* m_data;
79
81
82 virtual ~Image();
83 };
84
86}
87
88#endif
89
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXPHYSICS_EXPORT
Class to represent Images.
Definition Image.h:33
unsigned int m_height
Definition Image.h:75
ImageDataMode
Specify row/column mode.
Definition Image.h:37
@ ROW_MAJOR
Pixel data is stored by row.
Definition Image.h:38
virtual ~Image()
int getImageDataMode() const
unsigned int getChannels() const
unsigned int m_channels
Definition Image.h:76
unsigned char * getData()
unsigned int getHeight() const
const unsigned char * getData() const
int m_imageDataMode
Definition Image.h:80
unsigned int m_width
Definition Image.h:74
unsigned int getWidth() const
unsigned char * m_data
Definition Image.h:78
void setImage(const unsigned int &width, const unsigned int &height, const unsigned int &channels, const int &mode, unsigned char *data)
Sets the image.
Base class providing referencing counted objects.
Definition Referenced.h:120
Smart pointer for handling referenced counted objects.
Definition ref_ptr.h:30
The agxIO namespace contains classes for reading, writing and finding files.
Definition Material.h:42
agx::ref_ptr< Image > ImageRef
Definition Image.h:28