26 #include "../image/Image.h"
27 #include "../stroke/StrokeRenderer.h"
28 #include "../stroke/StyleModule.h"
29 #include "../system/TimeStamp.h"
31 #include "../system/StringUtils.h"
93 static bool firsttime =
true;
97 cerr <<
"unable to load stroke textures" << endl;
124 float *rgb =
new float[3 *
w * h];
125 memset(rgb, 0,
sizeof(
float[3]) *
w * h);
128 if (_pass_diffuse.buf) {
129 int xmin =
border().getMin().x();
130 int ymin =
border().getMin().y();
131 int xmax =
border().getMax().x();
132 int ymax =
border().getMax().y();
133 int rectx = _pass_diffuse.width;
134 int recty = _pass_diffuse.height;
135 float xfac = ((
float)rectx) / ((
float)(xmax - xmin));
136 float yfac = ((
float)recty) / ((
float)(ymax - ymin));
139 printf(
"readColorPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n",
150 (
int)(xfac * 100.0f));
154 for (
int j = 0; j < h; j++) {
155 jj = (int)((
y - ymin + j) * yfac);
156 if (jj < 0 || jj >= recty) {
159 for (
int i = 0; i <
w; i++) {
160 ii = (int)((
x - xmin + i) * xfac);
161 if (ii < 0 || ii >= rectx) {
164 memcpy(rgb + (
w * j + i) * 3, _pass_diffuse.buf + (rectx * jj + ii) * 3,
sizeof(
float[3]));
168 oImage.
setArray(rgb, xsch, ysch,
w, h,
x,
y,
false);
173 float *
z =
new float[
w * h];
174 memset(
z, 0,
sizeof(
float) *
w * h);
178 int xmin =
border().getMin().x();
179 int ymin =
border().getMin().y();
180 int xmax =
border().getMax().x();
181 int ymax =
border().getMax().y();
182 int rectx = _pass_z.width;
183 int recty = _pass_z.height;
184 float xfac = ((
float)rectx) / ((
float)(xmax - xmin));
185 float yfac = ((
float)recty) / ((
float)(ymax - ymin));
188 printf(
"readDepthPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n",
199 (
int)(xfac * 100.0f));
203 for (
int j = 0; j < h; j++) {
204 jj = (int)((
y - ymin + j) * yfac);
205 if (jj < 0 || jj >= recty) {
208 for (
int i = 0; i <
w; i++) {
209 ii = (int)((
x - xmin + i) * xfac);
210 if (ii < 0 || ii >= rectx) {
213 z[
w * j + i] = _pass_z.buf[rectx * jj + ii];
typedef float(TangentPoint)[2]
The spinal tap of the system.
_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 GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_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
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
virtual void readDepthPixels(int x, int y, int w, int h, GrayImage &oImage) const
virtual BBox< Vec2i > border() const
void setViewer(AppView *iViewer)
virtual void RenderStroke(Stroke *)
virtual BBox< Vec3r > scene3DBBox() const
virtual void readColorPixels(int x, int y, int w, int h, RGBImage &oImage) const
virtual float thickness() const
BBox< Vec3r > scene3DBBox() const
std::deque< StrokeLayer * > _Layers
std::deque< StyleModule * > _StyleModules
static const char * _MapsPath
StrokeRenderer * _Renderer
static Path * getInstance()
const string & getMapsDir() const
void setArray(float *lvl, unsigned width, unsigned height, unsigned sw, unsigned sh, unsigned x, unsigned y, bool copy=true)
virtual void setArray(float *rgb, unsigned width, unsigned height, unsigned sw, unsigned sh, unsigned x, unsigned y, bool copy=true)
static bool loadTextures()
void Render(const StrokeRenderer *iRenderer)
void RenderBasic(const StrokeRenderer *iRenderer)