Fork me on GitHub

source: svn/trunk/Utilities/frog/Prim_Rectangle.h@ 986

Last change on this file since 986 was 583, checked in by cp3-support, 13 years ago

FROG 3.0

File size: 1.2 KB
Line 
1#ifndef _FROG_Prim_RECTANGLE_H__
2#define _FROG_Prim_RECTANGLE_H__
3
4#include "Base.h"
5
6namespace FROG{
7
8class Prim_Rectangle : public BaseColl_Id {
9public :
10 float PosX; float PosY; float PosZ;
11 float WidthX; float WidthY; float WidthZ;
12 float LengthX; float LengthY; float LengthZ;
13
14 virtual unsigned int chunkId(){ return 42020;}
15 virtual bool isCompactible(){ return true; }
16
17 Prim_Rectangle(){}
18 Prim_Rectangle(
19 unsigned int detId,
20 float posX, float posY, float posZ,
21 float widthX, float widthY, float widthZ,
22 float lengthX, float lengthY, float lengthZ) :
23 BaseColl_Id(detId),
24 PosX(posX), PosY(posY), PosZ(posZ),
25 WidthX(widthX), WidthY(widthY), WidthZ(widthZ),
26 LengthX(lengthX), LengthY(lengthY), LengthZ(lengthZ){}
27
28 virtual ByteBuffer writeData(){
29 ByteBuffer toReturn(40);
30 toReturn.putUInt(detId_);
31 toReturn.putFloat(PosX);
32 toReturn.putFloat(PosY);
33 toReturn.putFloat(PosZ);
34 toReturn.putFloat(WidthX);
35 toReturn.putFloat(WidthY);
36 toReturn.putFloat(WidthZ);
37 toReturn.putFloat(LengthX);
38 toReturn.putFloat(LengthY);
39 toReturn.putFloat(LengthZ);
40 return toReturn;
41 }
42};
43
44}//FROG Namespace
45#endif
Note: See TracBrowser for help on using the repository browser.