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 
   66      color[0] = color[1] = color[2] = 0;
 
  138Material *material[1024];
 
  149      printf(
"Error : Input File Could Not Be Opened!\n");
 
  154      printf(
"Error : Input File Could Not Be Read!\n");
 
  168   c->offset = 
c->len = 0;
 
  172   c->endoffset = 
c->offset + 
c->len;
 
  363   model.numverts = model.numfaces = 0;
 
  385   if (model.vlist != 0)
 
  386      delete[] model.vlist;
 
  387   if (model.flist != 0)
 
  388      delete[] model.flist;
 
  391   model.numverts = model.numfaces = 0;
 
  409   if (model.vlist == 0) {
 
  410      for (i = 0; i < 
numv; i++) {
 
  415      printf(
"\nWarning : Insufficient Memory to Load Vertices!\n");
 
  418   for (i = 0; i < 
numv; i++) {
 
  439   if (model.flist == 0) {
 
  440      for (i = 0; i < 
numf; i++) {
 
  446      printf(
"\nWarning : Insufficient Memory to Load Faces!\n");
 
  449   for (i = 0; i < 
numf; i++) {
 
  472   printf(
"Reading %i Texture Coordinates...", 
numuv);
 
  473   if (
numuv != model.numverts) {
 
  474      for (i = 0; i < 
numuv; i++) {
 
  478      printf(
"\nWarning : Number of Vertices and Mapping Data do not match!\n");
 
  481   for (i = 0; i < 
numuv; i++) {
 
  505   } 
while ((
c != 0) && (!
feof(
f)));
 
  519   for (i = 0; i < model.numverts; ++i) {
 
  520      ts[
nummodels]->SetVertex(i, model.vlist[i].x, model.vlist[i].y, model.vlist[i].z);
 
  522   for (i = 0; i < model.numfaces; ++i) {
 
  523      ts[
nummodels]->SetTriangle(i, model.flist[i].v1, model.flist[i].v2, model.flist[i].v3);
 
  529      if (
strcmp(model.matname, material[i]->name) == 0) {
 
  531         ts[
nummodels]->SetMainColorRGB(material[i]->color[0], material[i]->color[1], material[i]->color[2]);
 
  546   for (i = 0; i < 2048; i++)
 
  548   for (i = 0; i < 1024; i++)
 
  559            ts[i]->GenerateTriangleNormals();
 
  567      if (material[i] != 0)
 
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short)
 
int Int_t
Signed integer 4 bytes (int)
 
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char)
 
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
 
float Float_t
Float 4 bytes (float)
 
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)