Fork me on GitHub

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

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

FROG 3.0

File size: 2.0 KB
Line 
1#ifndef _FROG_Prim_CUSTOMCUBE_H__
2#define _FROG_Prim_CUSTOMCUBE_H__
3
4#include "Base.h"
5
6namespace FROG{
7
8class Prim_CustomCube : public BaseColl_Id {
9public :
10 float P1X; float P1Y; float P1Z;
11 float P2X; float P2Y; float P2Z;
12 float P3X; float P3Y; float P3Z;
13 float P4X; float P4Y; float P4Z;
14 float P5X; float P5Y; float P5Z;
15 float P6X; float P6Y; float P6Z;
16 float P7X; float P7Y; float P7Z;
17 float P8X; float P8Y; float P8Z;
18
19 virtual unsigned int chunkId(){ return 41010;}
20 virtual bool isCompactible(){ return true; }
21
22 Prim_CustomCube(){}
23 Prim_CustomCube(
24 unsigned int detId,
25 float p1X, float p1Y, float p1Z,
26 float p2X, float p2Y, float p2Z,
27 float p3X, float p3Y, float p3Z,
28 float p4X, float p4Y, float p4Z,
29 float p5X, float p5Y, float p5Z,
30 float p6X, float p6Y, float p6Z,
31 float p7X, float p7Y, float p7Z,
32 float p8X, float p8Y, float p8Z ):
33 BaseColl_Id(detId),
34 P1X(p1X), P1Y(p1Y), P1Z(p1Z),
35 P2X(p2X), P2Y(p2Y), P2Z(p2Z),
36 P3X(p3X), P3Y(p3Y), P3Z(p3Z),
37 P4X(p4X), P4Y(p4Y), P4Z(p4Z),
38 P5X(p5X), P5Y(p5Y), P5Z(p5Z),
39 P6X(p6X), P6Y(p6Y), P6Z(p6Z),
40 P7X(p7X), P7Y(p7Y), P7Z(p7Z),
41 P8X(p8X), P8Y(p8Y), P8Z(p8Z){}
42
43
44 virtual ByteBuffer writeData(){
45 ByteBuffer toReturn(100);
46 toReturn.putUInt(detId_);
47 toReturn.putFloat(P1X);
48 toReturn.putFloat(P1Y);
49 toReturn.putFloat(P1Z);
50 toReturn.putFloat(P2X);
51 toReturn.putFloat(P2Y);
52 toReturn.putFloat(P2Z);
53 toReturn.putFloat(P3X);
54 toReturn.putFloat(P3Y);
55 toReturn.putFloat(P3Z);
56 toReturn.putFloat(P4X);
57 toReturn.putFloat(P4Y);
58 toReturn.putFloat(P4Z);
59 toReturn.putFloat(P5X);
60 toReturn.putFloat(P5Y);
61 toReturn.putFloat(P5Z);
62 toReturn.putFloat(P6X);
63 toReturn.putFloat(P6Y);
64 toReturn.putFloat(P6Z);
65 toReturn.putFloat(P7X);
66 toReturn.putFloat(P7Y);
67 toReturn.putFloat(P7Z);
68 toReturn.putFloat(P8X);
69 toReturn.putFloat(P8Y);
70 toReturn.putFloat(P8Z);
71 return toReturn;
72 }
73};
74
75}//FROG Namespace
76#endif
Note: See TracBrowser for help on using the repository browser.