26#define MAGICNUMBER 0xB3D0
29#define CHUNKMAIN 0x4D4D
30#define CHUNKMAINVERSION 0x0002
32#define CHUNK3DVERSION 0x3D3E
33#define CHUNK3DOBJECT 0x4000
34#define CHUNK3DOBJECTMESH 0x4100
35#define CHUNK3DOBJECTMESHVERTICES 0x4110
36#define CHUNK3DOBJECTMESHFACES 0x4120
37#define CHUNK3DOBJECTMESHMATGROUP 0x4130
38#define CHUNK3DOBJECTMESHMAPPING 0x4140
40#define CHUNK3DMATERIAL 0xAFFF
43#define MATDIFFUSE 0xA020
44#define MATSPECULAR 0xA030
45#define MATTRANSPARENCY 0xA050
48#define COLOR_24 0x0011
49#define LIN_COLOR_24 0x0012
50#define LIN_COLOR_F 0x0013
51#define INT_PERCENTAGE 0x0030
52#define FLOAT_PERCENTAGE 0x0031
65 color[0] = color[1] = color[2] = 0;
134Material *material[1024];
145 printf(
"Error : Input File Could Not Be Opened!\n");
150 printf(
"Error : Input File Could Not Be Read!\n");
161 if (
feof(
f))
return(-1);
163 c->offset =
c->len = 0;
167 c->endoffset =
c->offset +
c->len;
375 model.numverts = model.numfaces = 0;
402 if (model.vlist != 0)
delete [] model.vlist;
403 if (model.flist != 0)
delete [] model.flist;
406 model.numverts = model.numfaces = 0;
424 if (model.vlist == 0) {
425 for (i = 0; i <
numv; i++) {
430 printf(
"\nWarning : Insufficient Memory to Load Vertices!\n");
433 for (i = 0; i <
numv; i++) {
454 if (model.flist == 0) {
455 for (i = 0; i <
numf; i++) {
461 printf(
"\nWarning : Insufficient Memory to Load Faces!\n");
464 for (i = 0; i <
numf; i++) {
487 printf(
"Reading %i Texture Coordinates...",
numuv);
488 if (
numuv != model.numverts) {
489 for (i = 0; i <
numuv; i++) {
493 printf(
"\nWarning : Number of Vertices and Mapping Data do not match!\n");
496 for (i = 0; i <
numuv; i++) {
520 }
while ((
c != 0) && (!
feof(
f)));
534 for (i=0; i<model.numverts; ++i) {
535 ts[
nummodels]->SetVertex(i, model.vlist[i].x, model.vlist[i].y,
538 for (i=0; i<model.numfaces; ++i) {
539 ts[
nummodels]->SetTriangle(i, model.flist[i].v1, model.flist[i].v2,
546 if (
strcmp(model.matname, material[i]->name) == 0) {
548 ts[
nummodels]->SetMainColorRGB(material[i]->color[0],
549 material[i]->color[1],
550 material[i]->color[2]);
565 for (i=0;i<2048;i++)
ts[i] = 0;
566 for (i=0;i<1024;i++) material[i] = 0;
576 ts[i]->GenerateTriangleNormals();
584 if (material[i] != 0)
delete material[i];
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TEveManager * gEve
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
virtual void AddElement(TEveElement *el)
Add el to the list of children.
void AddElement(TEveElement *element, TEveElement *parent=nullptr)
Add an element.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Made from a list of vertices and a list of triangles (triplets of vertex indices).
virtual void SetName(const char *name)
Set the name of the TNamed.
void Vertex(const Double_t *v)