In file graphics2D/SurfaceView.h:

class SurfaceView : public Sliceable, public Owner<SurfaceSliceable>

a class allowing to display a surface in a slice camera

Inheritance:


Public Classes

enum
the different type of interaction when the left mouse button is pressed, moved and released

Public Methods

virtual void recompute (SliceCamera *cam)
slice changed callback
virtual void buttonPressedCallback (SliceCamera *slicecam, int mx, int my)
callback called when a button is pressed in the slicecamera
virtual void buttonMotionCallback (SliceCamera *slicecam, int mx, int my)
callback called when a button is moved in the slicecamera
virtual void buttonReleasedCallback (SliceCamera *slicecam, int mx, int my)
callback called when a button is released in the slicecamera
virtual void updateCenter (Vec2& center, unsigned int& n)
Returns the graphic object center and weight.
virtual double updateRadius (const Vec2& center)
Returns the graphic object radius given its center
virtual double computeClosestDistance (DataTypes::MouseClick& mc) const
Return MAXDOUBLE, an image is considered as background and may not be selected
virtual void redraw (Camera2D *cam)
default redraw function for sliceable objects
SurfaceSliceable* getSurface () const
returns the mesh referenced by this object

Public

constructor
SurfaceView (Scene2D *_scene, SurfaceSliceable *_mesh)
build a SurfaceView from a surface sliceable and a 2D scene
destructor
virtual ~SurfaceView ()
destroys a SM2 View

Protected Fields

bool useZonesColor
whether model trace should be displayed using zone material colors or default trace color
float traceColor [3]
default trace color
TclString traceName
tag for trace in cameras

Protected Methods

virtual void dying (const ObjectPointer<SurfaceSliceable>& obj)
a mesh owned by this object is being destroyed

Inherited from Sliceable:

Public Classes

struct CamInfo
bool needRedraw
is redraw needed in this camera ?
CamInfo()
default constructor
virtual ~CamInfo()
empty destructor

Public Methods

virtual void createdCamera(SliceCamera& cam)
virtual void destroyedCamera(SliceCamera& cam)

Protected Fields

std::map <SliceCamera *, CamInfo *> cameras

Protected Methods

void init(void)
virtual void deletedCamera(SliceCamera& cam)

Inherited from Data2D:

Public Classes

struct MouseClick2D: public DataTypes MouseClick

Inherited from GRAPHICS:

Public Classes

enum SLICE_ORIENTATION
SLICE_X
slice with X (column) = constant
SLICE_Y
slice with Y (row) = constant
SLICE_Z
slice with Z (plane) = constant
SLICE_ALPHA
slice with alpha (angle in XY) = constant
enum GEOMETRY
CARTESIAN
standard 3D image
CYLINDRICAL
cylindrical geometry (Z = plane angle, Y = elevation, Z = in plane radius)
SPHERICAL
spherical geometry (Z = plane angle, Y = in plane angle, X = radius)

Public Methods

void backgroundDying(void)
void setBackground(SliceCameraBackground *_background)
void updateSliceables()
virtual void update()
ScaleCamera* getScaleCamera() const
void setScaleCamera(ScaleCamera *sc)
void resetScaleCamera()
virtual TclString objectName(void) const
virtual void scaleValue(const TclScale *scale, double val)
virtual const char* sliceName(SliceCamera::SLICE_ORIENTATION geom) const
virtual SliceCamera::SLICE_ORIENTATION geomByName(const char *name) const
double getSlice(void) const
double getThickness(void) const
SLICE_ORIENTATION getGeometry(void) const
void setThickness(double d)
void setGeometry(SLICE_ORIENTATION geom)
void setSlice(double val)
virtual void translateCamera(Vec2 &t)
virtual void scaleCamera(double s)
SliceCameraBackground* getBackground(void) const
void changeBackground(SliceCameraBackground *b)
virtual double getMin(const TclScale *scale) const
virtual double getMax(const TclScale *scale) const
Vec2 getOffset() const
void doFocus(void)
virtual void focusOnBackground(void)
TclSliceCamera* getInterface(void) const

Protected Fields

double slice
double thickness
SLICE_ORIENTATION geometry
bool dieOnBackground
SliceCameraBackground* background
Vec2 offset

Inherited from Camera2D:

Public Methods

Vec2 getCameraCenter(void) const
virtual void pickObject(const Vec2 &pixel)
virtual void resize(void)
virtual void startComputation(void)
virtual void stopComputation(void)
virtual void resize(unsigned int w, unsigned int h)
virtual void rotateCamera(Rotation2D& rot)
void mapToWorld(const Vec2 &pixel, Vec2 &position)
void mapToScreen(const Vec2 &position, Vec2 &pixel)
virtual void bindMouseMotion(bool on)
virtual void applyObjectSelection(Data2D *obj)
virtual void applyObjectUnselection(Data2D *obj)
virtual void drawBoundingBox(Data2D *obj) const
void displayBoundingBox()
void hideBoundingBox()
virtual void grab(const TclString& filename)
virtual void updateDisplay(void)
static void doUpdateDisplay(ClientData cam)

Public

Constructor

Camera2D(Scene2D *scn = 0, unsigned int h = 0, unsigned int w = 0, double scale = DEFAULT_CAMERA_SCALE)
Creates a new camera

Destructor

Protected Fields

static const double initialAspectRatio
Vec2 cameraCenter
bool updatePending

Protected Methods

virtual Vec2 getTrackballVector(int x, int y) const
virtual Rotation2D getTrackballRotation(const Vec2&a, const Vec2&b)
virtual double getTrackballScale(const Vec2&a, const Vec2&b)
virtual Vec2 getTrackballTranslation(const Vec2& a, const Vec2& b)
virtual Vec2 getTrackballZTranslation(const double a)

Protected

protected constructor

Camera2D(Camera2D *)
constructor that does not create any scene

Private Methods

void initCamera(void)

Inherited from Scalable:

Public Methods

virtual void scaleTo(const TclScale *scale, double val)
virtual double getStep(const TclScale *scale) const

Documentation

a class allowing to display a surface in a slice camera
enum
the different type of interaction when the left mouse button is pressed, moved and released

bool useZonesColor
whether model trace should be displayed using zone material colors or default trace color

float traceColor[3]
default trace color

TclString traceName
tag for trace in cameras

constructor

SurfaceView(Scene2D *_scene, SurfaceSliceable *_mesh)
build a SurfaceView from a surface sliceable and a 2D scene
Parameters:
scene - a 2D scene
mesh - a surface mesh

destructor

virtual ~SurfaceView()
destroys a SM2 View

virtual void recompute(SliceCamera *cam)
slice changed callback
Parameters:
cam - camera whose slice changed

virtual void buttonPressedCallback(SliceCamera *slicecam, int mx, int my)
callback called when a button is pressed in the slicecamera
Parameters:
slicecam - the slicecam where occured the click button
mx - first coordinate of the pixel clicked
my - second coordinate of the pixel clicked

virtual void buttonMotionCallback(SliceCamera *slicecam, int mx, int my)
callback called when a button is moved in the slicecamera
Parameters:
slicecam - the slicecam where is located the mouse
mx - first coordinate of the mouse position
my - second coordinate of the mouse position

virtual void buttonReleasedCallback(SliceCamera *slicecam, int mx, int my)
callback called when a button is released in the slicecamera
Parameters:
slicecam - the slicecam where is located the mouse
mx - first coordinate of the mouse position
my - second coordinate of the mouse position

virtual void updateCenter(Vec2& center, unsigned int& n)
Returns the graphic object center and weight.

virtual double updateRadius(const Vec2& center)
Returns the graphic object radius given its center

virtual double computeClosestDistance(DataTypes::MouseClick& mc) const
Return MAXDOUBLE, an image is considered as background and may not be selected

virtual void redraw(Camera2D *cam)
default redraw function for sliceable objects
Parameters:
cam - camera to redraw

SurfaceSliceable* getSurface() const
returns the mesh referenced by this object

virtual void dying(const ObjectPointer<SurfaceSliceable>& obj)
a mesh owned by this object is being destroyed
Parameters:
obj - element before destruction


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de