#include <bone/FishSlice.hpp>
#include <bone/FishGrid.hpp>
#include <bone/FishSkeleton.hpp>
#include <ocean/GLvish/VGLRenderObject.hpp>
#include <ocean/GLvish/BoundingBox.hpp>
#include <eagle/PhysicalSpace.hpp>
#include <ocean/shrimp/VEnum.hpp>
#include <baseop/ExpandBBox.hpp>
#include <ocean/GLvish/GlossyTexture.hpp>
public GlossyLines,
public virtual Fish<Slice>,
public virtual Fish<Grid>,
public virtual Fish<Skeleton>
{
public:
struct FieldState : State
{
RefPtr<BoundingBox> BBox;
};
{
return new FieldState();
}
DreiBein(
const string&name,
int p,
const RefPtr<VCreationPreferences>&VP)
, Thickness(this, "thickness", 50, 0)
,
Options(
this,
"options", VEnum(
"shaded",
"monochrome"), 1)
{}
bool update(
VRequest&R,
double precision)
override;
};
bool DreiBein::update(
VRequest&R,
double precision)
{
if (!Level.getSkeleton() )
{
printf("BoundingBox: update(): No level!\n");
if (S)
{
}
return true;
}
assert( LevelRep );
if (!Coords)
{
S->BBox = BBox;
}
else
}
{
return false;
if (!MyBBox)
return false;
if (MyBBox->empty() )
return false;
using namespace Eagle::PhysicalSpace;
const point&Min = MyBBox->mincoord(),
&Max = MyBBox->maxcoord();
VEnum opt;
if (opt("shaded"))
int width = 20;
Thickness << Context >> width;
glLineWidth(width/10.0);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_POINT_SMOOTH);
glPointSize(width/10.0);
glDisable(GL_LIGHTING);
glEnable( GL_DEPTH_TEST );
glEnable ( GL_COLOR_MATERIAL );
point X( Max.x(), Min.y(), Min.z() ),
Y( Min.x(), Max.y(), Min.z() ),
Z( Min.x(), Min.y(), Max.z() );
{
glBegin(GL_LINES);
glColor3f( 1.0, 0.0, 0.0);
glTexCoord(bivector3(1,0,0) );
glVertex(Min);
glVertex(X);
glColor3f( 0.0, 1.0, 0.0);
glTexCoord(bivector3(0,1,0) );
glVertex(Min);
glVertex(Y);
glColor3f( 0.0, 0.0, 1.0);
glTexCoord(bivector3(0,0,1) );
glVertex(Min);
glVertex(Z);
glEnd();
}
return true;
}
Definition Dreibein.cpp:29
RefPtr< GlossyTexture > getLineTexture(MemCore::Intercube &CacheObject, VGLRenderContext &Context, int TextureUnit=0) const
GlossyLines(VObject *parent)
::Eagle::PhysicalSpace::point point
VGLRenderObject(const string &name, int p, const RefPtr< VCreationPreferences > &VP)
const VCamera & getCameraSettings(unsigned Eye, unsigned int ViewportIndex=0) const
void setBoundingBall(const RefPtr< ValuePool > &VP, const RefPtr< BoundingBall > &BS) const
RefPtr< State > myState(const WeakPtr< ValuePool > &Context) const
RefPtr< State > & getState(const WeakPtr< ValuePool > &VP) const
virtual RefPtr< State > newState() const
string String(const T &Val)
StrongPtr< Object, ObjectBase > RefPtr
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
Generic template namespace class for results of find() functions throughout the Bundle.
Definition Info.hpp:17
bool setStatusInfo(const RefPtr< ValuePool > &Context, const string &what) const
bool setStatusError(const RefPtr< ValuePool > &Context, const string &what, bool AnnouncePublic=false) const