DRW: Add DRW_view_camtexco_get()

This commit is contained in:
Clément Foucault
2022-05-14 21:08:15 +02:00
parent c7033bdf26
commit 46114f0a36
2 changed files with 6 additions and 0 deletions

View File

@@ -746,6 +746,7 @@ const DRWView *DRW_view_get_active(void);
*/
void DRW_view_clip_planes_set(DRWView *view, float (*planes)[4], int plane_len);
void DRW_view_camtexco_set(DRWView *view, float texco[4]);
void DRW_view_camtexco_get(const DRWView *view, float r_texco[4]);
/* For all getters, if view is NULL, default view is assumed. */

View File

@@ -2081,6 +2081,11 @@ void DRW_view_camtexco_set(DRWView *view, float texco[4])
copy_v4_v4(view->storage.viewcamtexcofac, texco);
}
void DRW_view_camtexco_get(const DRWView *view, float r_texco[4])
{
copy_v4_v4(r_texco, view->storage.viewcamtexcofac);
}
void DRW_view_frustum_corners_get(const DRWView *view, BoundBox *corners)
{
memcpy(corners, &view->frustum_corners, sizeof(view->frustum_corners));