Blender  V3.3
COM_TrackPositionOperation.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2012 Blender Foundation. */
3 
4 #pragma once
5 
6 #include <string.h>
7 
9 
10 #include "DNA_movieclip_types.h"
11 #include "DNA_tracking_types.h"
12 
13 #include "BLI_listbase.h"
14 #include "BLI_string.h"
15 
16 namespace blender::compositor {
17 
22  protected:
26  char track_name_[64];
27  int axis_;
28  int position_;
31 
33  float marker_pos_[2];
34  float relative_pos_[2];
37 
41  void determine_canvas(const rcti &preferred_area, rcti &r_area) override;
42 
43  public:
45 
47  {
48  movie_clip_ = clip;
49  }
50  void set_tracking_object(char *object)
51  {
53  }
54  void set_track_name(char *track)
55  {
56  BLI_strncpy(track_name_, track, sizeof(track_name_));
57  }
58  void set_framenumber(int framenumber)
59  {
60  framenumber_ = framenumber;
61  }
62  void set_axis(int value)
63  {
64  axis_ = value;
65  }
66  void set_position(int value)
67  {
68  position_ = value;
69  }
70  void set_relative_frame(int value)
71  {
72  relative_frame_ = value;
73  }
74  void set_speed_output(bool speed_output)
75  {
76  speed_output_ = speed_output;
77  }
78 
79  void init_execution() override;
80 
81  void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override;
82 
83  const float *get_constant_elem() override;
84 
85  private:
86  void calc_track_position();
87 };
88 
89 } // namespace blender::compositor
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
_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
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void determine_canvas(const rcti &preferred_area, rcti &r_area) override
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
ccl_global KernelShaderEvalInput ccl_global float * output