Debian Codegraph @

apps/demos/drop/TsPiece.h

raw symbols SCIP
1 /*
2 *
3 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * Further, this software is distributed without any warranty that it is
16 * free of the rightful claim of any third person regarding infringement
17 * or the like. Any license provided herein, whether implied or
18 * otherwise, applies only to this software file. Patent licenses, if
19 * any, provided herein do not apply to combinations of this program with
20 * other software, or any other product whatsoever.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27 * Mountain View, CA 94043, or:
28 *
29 * http://www.sgi.com
30 *
31 * For further information regarding this notice, see:
32 *
33 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34 *
35 */
36
37 // -*- C++ -*-
38
39 /*
40 * Copyright (C) 1990,91 Silicon Graphics, Inc.
41 *
42 _______________________________________________________________________
43 ______________ S I L I C O N G R A P H I C S I N C . ____________
44 |
45 | $Source: /oss/CVS/cvs/inventor/apps/demos/drop/TsPiece.h,v $
46 | $Revision: 1.1.1.1 $
47 | $Date: 2000/08/15 12:55:54 $
48 |
49 | Description:
50 | This class describes a base class for constructing pieces used in
51 | the drop demo program. Pieces are composed of blocks arranged
52 | in some order which defines the particular piece. The pieces are
53 | stored as indices into a three dimensional array (the playing field)
54 | for each block that is part of the piece. Operations on the piece
55 | move it to different locations and orientations on the playing field
56 | by modifying the indices into the playing field.
57 |
58 | Classes:
59 | TsPiece
60 |
61 | Author: Dave Immel
62 |
63 ______________ S I L I C O N G R A P H I C S I N C . ____________
64 _______________________________________________________________________
65 */
66
67 #ifndef _TS_PIECE_
68 #define _TS_PIECE_cxx . . $ `apps/demos/drop/TsPiece.h:68:9`!
69
70 //////////////////////////////////////////////////////////////////////////////
71 //
72 // Class: TsPiece
73 //
74 // The base class for the drop pieces. Methods transform the piece and
75 // store its position and orientation.
76 //
77 //////////////////////////////////////////////////////////////////////////////
78
79 class TsPiececxx . . $ TsPiece# {
80 public:
81 TsPiececxx . . $ TsPiece#TsPiece(49f6e7a06ebc5aa8).();
82 ~cxx . . $ TsPiece#`~TsPiece`(49f6e7a06ebc5aa8).TsPiececxx . . $ TsPiece#();
83
84 // Sets the orientation of the piece
85 void setOrientationcxx . . $ TsPiece#setOrientation(d4f767463ce0a6b3).( int orient ) {orientationcxx . . $ TsPiece#orientation. = orient;};
86
87 // Get the positions of the blocks of the piece in its current
88 // orientation. Return the number of blocks in the piece.
89 int getPositioncxx . . $ TsPiece#getPosition(a5f7824ee4986326).( int pos[] );
90
91 // Get the positions of the blocks of the piece given an orientation.
92 // Return the number of blocks in the piece.
93 int getPositioncxx . . $ TsPiece#getPosition(ac48f4a6ffa9e770).( int orientation, int pos[] );
94
95 protected:
96 int orientationcxx . . $ TsPiece#orientation.;
97 int numBlockscxx . . $ TsPiece#numBlocks.;
98 int piecePositionTablecxx . . $ TsPiece#piecePositionTable.[24][4];
99
100 };
101
102 #endif /* _TS_PIECE_ */
103
104
105
106