File: translate_plane.c

package info (click to toggle)
garlic 1.5-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,324 kB
  • ctags: 1,378
  • sloc: ansic: 50,306; makefile: 1,088
file content (56 lines) | stat: -rw-r--r-- 1,306 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* Copyright (C) 2000 Damir Zucic */

/*=============================================================================

				translate_plane.c

Purpose:
	Translate the plane.

Input:
	(1) Pointer to MolComplexS structure.
	(2) Pointer to VectorS structure, with shift vector.

Output:
	(1) Plane translated.

Return value:
	No return value.

========includes:============================================================*/

#include <stdio.h>

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>

#include "defines.h"
#include "typedefs.h"

/*======translate plane:=====================================================*/

void TranslatePlane_ (MolComplexS *curr_mol_complexSP, VectorS *shift_vectorSP)
{
PlaneS		*curr_planeSP;

/* Pointer to the current plane: */
curr_planeSP = &curr_mol_complexSP->planeS;

/* Translate the plane center: */
curr_planeSP->center_x[0] += shift_vectorSP->x;
curr_planeSP->center_y    += shift_vectorSP->y;
curr_planeSP->center_z[0] += shift_vectorSP->z;

/* Update stereo data: */
curr_planeSP->center_x[1] += shift_vectorSP->x;
curr_planeSP->center_z[1] += shift_vectorSP->z;

/* Set the position_changedF: */
curr_mol_complexSP->position_changedF = 1;
}

/*===========================================================================*/