Blender  V2.93
ContextFunctions.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
23 #include "ContextFunctions.h"
24 
25 #include "../view_map/SteerableViewMap.h"
26 
27 #include "../system/TimeStamp.h"
28 
30 
31 unsigned GetTimeStampCF()
32 {
34 }
35 
36 unsigned GetCanvasWidthCF()
37 {
38  return Canvas::getInstance()->width();
39 }
40 
42 {
43  return Canvas::getInstance()->height();
44 }
45 
47 {
48  return Canvas::getInstance()->border();
49 }
50 
51 void LoadMapCF(const char *iFileName, const char *iMapName, unsigned iNbLevels, float iSigma)
52 {
53  return Canvas::getInstance()->loadMap(iFileName, iMapName, iNbLevels, iSigma);
54 }
55 
56 float ReadMapPixelCF(const char *iMapName, int level, unsigned x, unsigned y)
57 {
58  Canvas *canvas = Canvas::getInstance();
59  return canvas->readMapPixel(iMapName, level, x, y);
60 }
61 
62 float ReadCompleteViewMapPixelCF(int level, unsigned x, unsigned y)
63 {
65  return svm->readCompleteViewMapPixel(level, x, y);
66 }
67 
68 float ReadDirectionalViewMapPixelCF(int iOrientation, int level, unsigned x, unsigned y)
69 {
71  return svm->readSteerableViewMapPixel(iOrientation, level, x, y);
72 }
73 
75 {
77 }
78 
79 } // namespace Freestyle::ContextFunctions
Functions related to context queries.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
SteerableViewMap * getSteerableViewMap()
Definition: Canvas.h:177
void loadMap(const char *iFileName, const char *iMapName, unsigned iNbLevels=4, float iSigma=1.0f)
Definition: Canvas.cpp:311
static Canvas * getInstance()
Definition: Canvas.h:69
virtual BBox< Vec2i > border() const =0
float readMapPixel(const char *iMapName, int level, int x, int y)
Definition: Canvas.cpp:461
virtual int height() const =0
virtual int width() const =0
const FEdge * selectedFEdge() const
Definition: Canvas.h:183
float readSteerableViewMapPixel(unsigned iOrientation, int iLevel, int x, int y)
float readCompleteViewMapPixel(int iLevel, int x, int y)
static TimeStamp * instance()
Definition: TimeStamp.h:32
unsigned getTimeStamp() const
Definition: TimeStamp.h:37
float ReadCompleteViewMapPixelCF(int level, unsigned x, unsigned y)
float ReadDirectionalViewMapPixelCF(int iOrientation, int level, unsigned x, unsigned y)
void LoadMapCF(const char *iFileName, const char *iMapName, unsigned iNbLevels, float iSigma)
float ReadMapPixelCF(const char *iMapName, int level, unsigned x, unsigned y)
static unsigned x[3]
Definition: RandGen.cpp:87