NOTE: We don't implement raw tesselation of sphere - hence this will not appear in viewers which don't support directly (non-OpenGL) Shows that viewers can at least deal gracefully with these cases
Our abstract base shape class.
#if defined(__CINT__) && !defined(__MAKECINT__)
{
}
#else
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TSystem * gSystem
virtual int CompileMacro(const char *filename, Option_t *opt="", const char *library_name="", const char *build_dir="", UInt_t dirmode=0)
This method compiles and loads a shared library containing the code from the file "filename".
#include <vector>
{
public:
protected:
};
fX(
x), fY(
y), fZ(z), fColor(color)
{}
class Sphere : public Shape
{
public:
private:
};
{}
{
}
}
}
}
}
return buffer;
}
class Box : public Shape
{
public:
private:
};
{}
{
}
}
}
buffer.
fPnts[ 0] = fX - fDX; buffer.
fPnts[ 1] = fY - fDY; buffer.
fPnts[ 2] = fZ - fDZ;
buffer.
fPnts[ 3] = fX + fDX; buffer.
fPnts[ 4] = fY - fDY; buffer.
fPnts[ 5] = fZ - fDZ;
buffer.
fPnts[ 6] = fX + fDX; buffer.
fPnts[ 7] = fY + fDY; buffer.
fPnts[ 8] = fZ - fDZ;
buffer.
fPnts[ 9] = fX - fDX; buffer.
fPnts[10] = fY + fDY; buffer.
fPnts[11] = fZ - fDZ;
buffer.
fPnts[12] = fX - fDX; buffer.
fPnts[13] = fY - fDY; buffer.
fPnts[14] = fZ + fDZ;
buffer.
fPnts[15] = fX + fDX; buffer.
fPnts[16] = fY - fDY; buffer.
fPnts[17] = fZ + fDZ;
buffer.
fPnts[18] = fX + fDX; buffer.
fPnts[19] = fY + fDY; buffer.
fPnts[20] = fZ + fDZ;
buffer.
fPnts[21] = fX - fDX; buffer.
fPnts[22] = fY + fDY; buffer.
fPnts[23] = fZ + fDZ;
}
return buffer;
}
{
public:
private:
};
{}
{
}
}
}
buffer.
fPnts[ 0] = fX - fDX; buffer.
fPnts[ 1] = fY - fDY; buffer.
fPnts[ 2] = fZ;
buffer.
fPnts[ 3] = fX + fDX; buffer.
fPnts[ 4] = fY - fDY; buffer.
fPnts[ 5] = fZ;
buffer.
fPnts[ 6] = fX + fDX; buffer.
fPnts[ 7] = fY + fDY; buffer.
fPnts[ 8] = fZ;
buffer.
fPnts[ 9] = fX - fDX; buffer.
fPnts[10] = fY + fDY; buffer.
fPnts[11] = fZ;
buffer.
fPnts[12] = fX; buffer.
fPnts[13] = fY ; buffer.
fPnts[14] = fZ + fDZ;
}
return buffer;
}
{
public:
private:
std::vector<Shape *> fShapes;
};
MyGeom::MyGeom()
{
aShape =
new Box(
kRed, 0.0, 0.0, 0.0, 20.0, 20.0, 20.0);
aShape =
new Box(
kBlue, 50.0, 100.0, 200.0, 5.0, 10.0, 15.0);
}
MyGeom::~MyGeom()
{
}
{
gPad->GetViewer3D(option);
}
{
std::vector<Shape *>::const_iterator
ShapeIt = fShapes.
begin();
Shape * shape;
}
}
}
{
printf(
"\n\nviewer3DLocal: This frame demonstates local frame use of 3D viewer architecture.\n");
printf(
"Creates sphere, two boxes and a square based pyramid, described in local frame.\n");
printf(
"We do not implement raw tesselation of sphere - hence will not appear in viewers\n");
printf(
"which do not support in natively (non-GL viewer).\n\n");
}
#define ClassDefOverride(name, id)
const_iterator begin() const
const_iterator end() const
Use this attribute class when an object should have 3D capabilities.
Sphere description class - see TBuffer3DTypes for producer classes Supports hollow and cut spheres.
Generic 3D primitive description class.
void SetLocalMasterIdentity()
Set kRaw tessellation section of buffer with supplied sizes.
Double_t fLocalMaster[16]
void ClearSectionsValid()
Clear any sections marked valid.
void SetSectionsValid(UInt_t mask)
void SetAABoundingBox(const Double_t origin[3], const Double_t halfLengths[3])
Set fBBVertex in kBoundingBox section to a axis aligned (local) BB using supplied origin and box half...
Bool_t SetRawSizes(UInt_t reqPnts, UInt_t reqPntsCapacity, UInt_t reqSegs, UInt_t reqSegsCapacity, UInt_t reqPols, UInt_t reqPolsCapacity)
Set kRaw tessellation section of buffer with supplied sizes.
Mother of all ROOT objects.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Abstract 3D shapes viewer.