Fork me on GitHub

source: svn/trunk/Utilities/frog/Prim_CustomSurface.h@ 763

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

FROG 3.0

File size: 1.3 KB
Line 
1#ifndef _FROG_Prim_CUSTOMSURFACE_H__
2#define _FROG_Prim_CUSTOMSURFACE_H__
3
4#include "Base.h"
5
6namespace FROG{
7
8class Prim_CustomSurface : 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
15 virtual unsigned int chunkId(){ return 42010;}
16 virtual bool isCompactible(){ return true; }
17
18 Prim_CustomSurface(){}
19 Prim_CustomSurface(
20 unsigned int detId,
21 float p1X, float p1Y, float p1Z,
22 float p2X, float p2Y, float p2Z,
23 float p3X, float p3Y, float p3Z,
24 float p4X, float p4Y, float p4Z):
25 BaseColl_Id(detId),
26 P1X(p1X), P1Y(p1Y), P1Z(p1Z),
27 P2X(p2X), P2Y(p2Y), P2Z(p2Z),
28 P3X(p3X), P3Y(p3Y), P3Z(p3Z),
29 P4X(p4X), P4Y(p4Y), P4Z(p4Z){}
30
31 virtual ByteBuffer writeData(){
32 ByteBuffer toReturn(52);
33 toReturn.putUInt(detId_);
34 toReturn.putFloat(P1X);
35 toReturn.putFloat(P1Y);
36 toReturn.putFloat(P1Z);
37 toReturn.putFloat(P2X);
38 toReturn.putFloat(P2Y);
39 toReturn.putFloat(P2Z);
40 toReturn.putFloat(P3X);
41 toReturn.putFloat(P3Y);
42 toReturn.putFloat(P3Z);
43 toReturn.putFloat(P4X);
44 toReturn.putFloat(P4Y);
45 toReturn.putFloat(P4Z);
46 return toReturn;
47 }
48};
49
50}//FROG Namespace
51#endif
Note: See TracBrowser for help on using the repository browser.