<commit_before>// @(#)root/gl:$Id$
// Author:  <NAME>  25/05/2005

#include "TGLLogicalShape.h"
#include "TGLPhysicalShape.h"
#include "TGLRnrCtx.h"
#include "TGLScene.h"
#include "TGLCamera.h"
#include "TGLSelectRecord.h"
#include "TGLContext.h"
#include "TGLIncludes.h"

#include "TBuffer3D.h"
#include "TClass.h"
#include "TContextMenu.h"


//==============================================================================
// TGLLogicalShape
//==============================================================================

//______________________________________________________________________________
//
// Abstract logical shape - a GL 'drawable' - base for all shapes -
// faceset sphere etc. Logical shapes are a unique piece of geometry,
// described in it's local frame - e.g if we have three spheres in :
// Sphere A - Radius r1, center v1
// Sphere B - Radius r2, center v2
// Sphere C - Radius r1, center v3
//
// Spheres A and C can share a common logical sphere of radius r1 - and
// place them with two physicals with translations of v1 & v2.  Sphere B
// requires a different logical (radius r2), placed with physical with
// translation v2.
//
// Physical shapes know about and can share logicals. Logicals do not
// about (aside from reference counting) physicals or share them.
//
// This sharing of logical shapes greatly reduces memory consumption and
// scene (re)build times in typical detector geometries which have many
// repeated objects placements.
//
// TGLLogicalShapes have reference counting, performed by the client
// physical shapes which are using it.
//
// Display list information is also stored here, possibly per LOD
// level. Most classes does not support LOD (only sphere and tube) and
// therefore reasonable defaults are encoded in the following virtual
// functions:
//
// * ELODAxes SupportedLODAxes()  { return kLODAxesNone; }
// * Int_t    DLCacheSize()       { return 1; }
// * UInt_t   DLOffset(lod);      // Transform lod into DL offset.
// * Short_t  QuantizeShapeLOD(); // Quantize lod.
//
// Classes that have per-LOD display-lists than override these functions.
// 'UShort_t fDLValid' is used as a bit-field determining validity of
// each quantized LOD-level; hopefully one will not have more than 16
// LOD levels per class.
// See also: TGLPhysicalShape::CalculateShapeLOD() where LOD is calculated.
//
// See base/src/TVirtualViewer3D for description of common external 3D
// viewer architecture and how external viewer clients use it.
//

ClassImp(TGLLogicalShape);

//______________________________________________________________________________
TGLLogicalShape::TGLLogicalShape() :
   fRef           (0),
   fFirstPhysical (0),
   fExternalObj   (0),
   fScene         (0),
   fDLBase        (0),
   fDLSize        (1),
   fDLValid       (0),
   fDLCache       (kTRUE),<commit_msg>Fix typo in comment.<commit_after>// @(#)root/gl:$Id$
// Author:  <NAME>  25/05/2005

#include "TGLLogicalShape.h"
#include "TGLPhysicalShape.h"
#include "TGLRnrCtx.h"
#include "TGLScene.h"
#include "TGLCamera.h"
#include "TGLSelectRecord.h"
#include "TGLContext.h"
#include "TGLIncludes.h"

#include "TBuffer3D.h"
#include "TClass.h"
#include "TContextMenu.h"


//==============================================================================
// TGLLogicalShape
//==============================================================================

//______________________________________________________________________________
//
// Abstract logical shape - a GL 'drawable' - base for all shapes -
// faceset sphere etc. Logical shapes are a unique piece of geometry,
// described in it's local frame - e.g if we have three spheres in :
// Sphere A - Radius r1, center v1
// Sphere B - Radius r2, center v2
// Sphere C - Radius r1, center v3
//
// Spheres A and C can share a common logical sphere of radius r1 - and
// place them with two physicals with translations of v1 & v2.  Sphere B
// requires a different logical (radius r2), placed with physical with
// translation v2.
//
// Physical shapes know about and can share logicals. Logicals do not
// about (aside from reference counting) physicals or share them.
//
// This sharing of logical shapes greatly reduces memory consumption and
// scene (re)build times in typical detector geometries which have many
// repeated objects placements.
//
// TGLLogicalShapes have reference counting, performed by the client
// physical shapes which are using it.
//
// Display list information is also stored here, possibly per LOD
// level. Most classes do not support LOD (only sphere and tube) and
// therefore reasonable defaults are encoded in the following virtual
// functions:
//
// * ELODAxes SupportedLODAxes()  { return kLODAxesNone; }
// * Int_t    DLCacheSize()       { return 1; }
// * UInt_t   DLOffset(lod);      // Transform lod into DL offset.
// * Short_t  QuantizeShapeLOD(); // Quantize lod.
//
// Classes that have per-LOD display-lists than override these functions.
// 'UShort_t fDLValid' is used as a bit-field determining validity of
// each quantized LOD-level; hopefully one will not have more than 16
// LOD levels per class.
// See also: TGLPhysicalShape::CalculateShapeLOD() where LOD is calculated.
//
// See base/src/TVirtualViewer3D for description of common external 3D
// viewer architecture and how external viewer clients use it.
//

ClassImp(TGLLogicalShape);

//______________________________________________________________________________
TGLLogicalShape::TGLLogicalShape() :
   fRef           (0),
   fFirstPhysical (0),
   fExternalObj   (0),
   fScene         (0),
   fDLBase        (0),
   fDLSize        (1),
   fDLValid       (0),
   fDLCache       (kTRUE),
{'fraction_non_alphanumeric': 0.15043005090398456, 'fraction_numerical': 0.01123398279796384, 'mean_word_length': 3.6362896663954434, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6939127', 'n_tokens_mistral': 1651, 'n_tokens_neox': 1556, 'n_words': 604}