diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-12-30 15:03:59 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-01 20:32:48 +0400 |
commit | 2785e8e73d3473cf481ba65a6b50a50c194e63d8 (patch) | |
tree | 179263a95aa25ccf8ecd383786dd535419aeabe4 /source/blender/blenkernel/tracking_private.h | |
parent | 5933b2455c409963580ea616047f2f2ee332ff71 (diff) |
Split tracking.c into several files
File tracking.c became rather huge and annoying to
maintain and it really contains several independent
areas of motrack pipeline.
Now we've got:
* tracking.c: general-purpose functions which are used
by blender, clip editor, RNA and so.
* tracking_detect.c: feature detection functions
(blender-side, logic is still in libmv).
* tracking_plane_tracker.c: blender-side 2D tracking logic.
* tracking_plane_tracker.c: plane track tracker.
* tracking_solver.c: functions for camera solving.
* tracking_stabilize.c: 2D stabilization functions.
* tracking_util.c: utility functions for all those files
and which shouldn't be public.
Diffstat (limited to 'source/blender/blenkernel/tracking_private.h')
-rw-r--r-- | source/blender/blenkernel/tracking_private.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/source/blender/blenkernel/tracking_private.h b/source/blender/blenkernel/tracking_private.h new file mode 100644 index 00000000000..1a46b34c3b0 --- /dev/null +++ b/source/blender/blenkernel/tracking_private.h @@ -0,0 +1,84 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 Blender Foundation. + * All rights reserved. + * + * Contributor(s): Blender Foundation, + * Sergey Sharybin + * Keir Mierle + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/blenkernel/tracking_private.h + * \ingroup bke + * + * This file contains declarations of function which are used + * by multiple tracking files but which should not be public. + */ + +#ifndef __BKE_TRACKING_PRIVATE__ +#define __BKE_TRACKING_PRIVATE__ + +struct GHash; +struct MovieTracking; +struct MovieTrackingMarker; + +/*********************** Tracks map *************************/ + +typedef struct TracksMap { + char object_name[MAX_NAME]; + bool is_camera; + + int num_tracks; + int customdata_size; + + char *customdata; + MovieTrackingTrack *tracks; + + struct GHash *hash; + + int ptr; +} TracksMap; + +struct TracksMap *tracks_map_new(const char *object_name, bool is_camera, int num_tracks, int customdata_size); +int tracks_map_get_size(struct TracksMap *map); +void tracks_map_get_indexed_element(struct TracksMap *map, int index, struct MovieTrackingTrack **track, void **customdata); +void tracks_map_insert(struct TracksMap *map, struct MovieTrackingTrack *track, void *customdata); +void tracks_map_free(struct TracksMap *map, void (*customdata_free)(void *customdata)); +void tracks_map_merge(struct TracksMap *map, struct MovieTracking *tracking); + +/*********************** Space transformation functions *************************/ + +void tracking_get_search_origin_frame_pixel(int frame_width, int frame_height, + const struct MovieTrackingMarker *marker, + float frame_pixel[2]); + +void tracking_get_marker_coords_for_tracking(int frame_width, int frame_height, + const struct MovieTrackingMarker *marker, + double search_pixel_x[5], double search_pixel_y[5]); + +void tracking_set_marker_coords_from_tracking(int frame_width, int frame_height, struct MovieTrackingMarker *marker, + const double search_pixel_x[5], const double search_pixel_y[5]); + +/*********************** General purpose utility functions *************************/ + +void tracking_marker_insert_disabled(struct MovieTrackingTrack *track, const struct MovieTrackingMarker *ref_marker, + bool before, bool overwrite); + +#endif /* __BKE_TRACKING_PRIVATE__ */ |