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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD><style> A { color:black }</style>
<!-- hennerik CVSweb $Revision: 1.93 $ -->
<TITLE>code/nel/samples/pacs/object.h - view - 1.2</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee">
<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="object.h?sortby=date"><IMG SRC="/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="object.h?sortby=date">object.h</A>
CVS log</b> <IMG SRC="/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/?sortby=date">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?sortby=date">code</a> / <a href="/cvs/cvsweb.cgi/code/nel/?sortby=date">nel</a> / <a href="/cvs/cvsweb.cgi/code/nel/samples/?sortby=date">samples</a> / <a href="/cvs/cvsweb.cgi/code/nel/samples/pacs/?sortby=date">pacs</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/?sortby=date">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?sortby=date">code</a> / <a href="/cvs/cvsweb.cgi/code/nel/?sortby=date">nel</a> / <a href="/cvs/cvsweb.cgi/code/nel/samples/?sortby=date">samples</a> / <a href="/cvs/cvsweb.cgi/code/nel/samples/pacs/?sortby=date">pacs</a> / <a href="/cvs/cvsweb.cgi/code/nel/samples/pacs/object.h?sortby=date">object.h</a> (<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nel/samples/pacs/object.h?rev=1.2&sortby=date" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nel/samples/pacs/object.h?rev=1.2','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
Revision <B>1.2</B>, <i>Wed Feb 20 18:07:14 2002 UTC</i> (5 months ago) by <i>lecroart</i>
<BR>Branch: <b>MAIN</b>
<BR>CVS Tags: <b>georges_v2, HEAD</b><BR>Changes since <b>1.1: +2 -2
lines</b><PRE>
#FIXED: doxygen warning
</PRE>
</td></tr></table><HR noshade><PRE>/** \file net_layer5/object.h
* Objects for the sample. Link between 3d instance and collision primitives.
*
* $Id: object.h,v 1.2 2002/02/20 18:07:14 lecroart Exp $
*/
/* Copyright, 2001 Nevrax Ltd.
*
* This file is part of NEVRAX NEL.
* NEVRAX NEL 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, or (at your option)
* any later version.
* NEVRAX NEL 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 NEVRAX NEL; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
#ifndef NL_OBJECT_H
#define NL_OBJECT_H
#include "nel/misc/types_nl.h"
#include "nel/misc/vector.h"
#include "nel/misc/vectord.h"
#include "nel/pacs/u_move_primitive.h"
#include "nel/pacs/u_global_position.h"
// External classes
namespace NLNET
{
class CPacsClient;
};
namespace NLPACS
{
class UMoveContainer;
class UMovePrimitive;
class UGlobalPosition;
};
namespace NL3D
{
class UScene;
class UInstance;
};
/**
* object for the test
*
* \author Cyril 'Hulud' Corvazier
* \author Nevrax France
* \date 2001
*/
class CObjectDyn
{
public:
/// Box constructor
CObjectDyn (double width, double depth, double height, double orientation, const NLMISC::CVectorD& pos,
const NLMISC::CVectorD& speed, bool obstacle, NLPACS::UMoveContainer &container, NL3D::UScene &scene,
NLPACS::UMovePrimitive::TReaction reaction, uint8 worldImage, uint8 nbImage, uint8 insertWorldImage);
/// Cylinder constructor
CObjectDyn (double radius, double height, const NLMISC::CVectorD& pos, const NLMISC::CVectorD& speed,
bool obstacle, NLPACS::UMoveContainer &container, NL3D::UScene &scene,
NLPACS::UMovePrimitive::TReaction reaction, uint8 worldImage, uint8 nbImage, uint8 insertWorldImage);
/// Set position
void setPos (const NLMISC::CVectorD& pos);
void setGlobalPos (NLPACS::UGlobalPosition& gpos, NLMISC::CVectorD& pos, uint8 worldimage);
/// Set position
void setSpeed (const NLMISC::CVectorD& speed);
/// Set position
const NLMISC::CVectorD& getPos () const
{
return _Position;
}
/// Set position
const NLMISC::CVectorD& getSpeed () const
{
return _Speed;
}
/// Simulate
void tryMove (double deltaTime, NLPACS::UMoveContainer &container, uint8 worldImage);
void doMove (double deltaTime, uint8 worldImage);
/// Remove object from container
void remove (NLPACS::UMoveContainer &container, NL3D::UScene &scene);
private:
bool _TryMove;
NLMISC::CVectorD _Position;
NLMISC::CVectorD _TryPosition;
NLMISC::CVectorD _Speed;
NLPACS::UMovePrimitive *_MovePrimitive;
NL3D::UInstance *_Instance;
};
#endif // NL_OBJECT_H
/* End of object.h */
</PRE>
|