Fork me on GitHub

source: svn/trunk/Utilities/frog/Prim_Cube.h@ 635

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

FROG 3.0

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