A scene graph class that contains all the geometric entities for camera pose drawing.
More...
#include <EditableWire.h>
A scene graph class that contains all the geometric entities for camera pose drawing.
The EditableWire has a shape of triangle and it indicates a camera pose:
(center) |
\ / o (eye)
§ EditableWire()
entity::EditableWire::EditableWire |
( |
double |
fov2 | ) |
|
Constructor to initialize the scene graph and to set default colors.
- Parameters
-
fov2 | is the current FOV within Cherish environment (OpenGL parameter that can be extracted from GLWidget). |
§ editCenter()
void entity::EditableWire::editCenter |
( |
double |
theta | ) |
|
A method to edit the center position of the camera pose, i.e., the camera look direction.
- Parameters
-
theta | is the rotation angle from the current position. |
§ editEye()
void entity::EditableWire::editEye |
( |
double |
u, |
|
|
double |
v |
|
) |
| |
A method to edit the position of the camera eye (point of the triangular wire).
§ editFocal()
void entity::EditableWire::editFocal |
( |
double |
angle | ) |
|
A method to edit focal distance of the camera pose.
- Parameters
-
distance | is the new distance from camera eye. Note, the distance can never be smaller than certain threshold, e.g., 0.2. |
§ getCenter2D() [1/2]
void entity::EditableWire::getCenter2D |
( |
osg::Vec2f & |
p1, |
|
|
osg::Vec2f & |
p2 |
|
) |
| const |
A method to obtain local coordinates of the center points.
- Parameters
-
p1 | is the input parameter for eye location, |
p2 | is the input parameter for center location. |
§ getCenter2D() [2/2]
osg::Vec3f entity::EditableWire::getCenter2D |
( |
| ) |
const |
- Returns
- camera's center position.
§ getCenter3D()
osg::Vec3f entity::EditableWire::getCenter3D |
( |
| ) |
const |
- Returns
- global center of the camera pose wire.
§ getEye2D()
osg::Vec3f entity::EditableWire::getEye2D |
( |
| ) |
const |
- Returns
- local eye position of the camera pose wire.
§ getEye3D()
osg::Vec3f entity::EditableWire::getEye3D |
( |
| ) |
const |
- Returns
- global eye of the camera pose wire.
§ getFocal2D()
osg::Vec3f entity::EditableWire::getFocal2D |
( |
| ) |
const |
- Returns
- local position of the second focal point (first being the eye, third is symmetrical to the second one).
§ getFOV2()
double entity::EditableWire::getFOV2 |
( |
| ) |
const |
- Returns
- full angle - field of view, in degrees.
§ getGeode()
const osg::Geode * entity::EditableWire::getGeode |
( |
| ) |
const |
- Returns
- const pointer on geode node which contains all the drawables (i.e. return geode parent).
§ getRight2D()
osg::Vec3f entity::EditableWire::getRight2D |
( |
| ) |
const |
- Returns
- 2D right direction vector
§ getRight3D()
osg::Vec3f entity::EditableWire::getRight3D |
( |
| ) |
const |
§ getUp()
osg::Vec3f entity::EditableWire::getUp |
( |
| ) |
const |
§ move()
void entity::EditableWire::move |
( |
double |
u, |
|
|
double |
v |
|
) |
| |
|
protected |
A method to move all the geometries to another place. Normally called from editEye().
- Parameters
-
u | is the new u local coordinate |
v | is the new v local coordinate |
§ pick()
void entity::EditableWire::pick |
( |
int |
index | ) |
|
A method to set up selected color for a geometry.
- Parameters
-
index | is the given geometry index, e.g., 1 for eye, 2 for center, and 3 for focal geometry. |
§ rotate()
void entity::EditableWire::rotate |
( |
double |
theta | ) |
|
|
protected |
A method to rotate all the geometries on a given angle. Normally called from editCenter().
- Parameters
-
theta | is the rotation angle. The rotation is performed around the camera's eye position. |
§ setColorCenterDefaults()
void entity::EditableWire::setColorCenterDefaults |
( |
| ) |
|
|
protected |
A method to set up default colors to center geometry.
§ setColorEyeDefaults()
void entity::EditableWire::setColorEyeDefaults |
( |
| ) |
|
|
protected |
A method to set up default colors to eye geometry.
§ setColorFocal()
void entity::EditableWire::setColorFocal |
( |
const osg::Vec4f & |
color | ) |
|
|
protected |
Set a given color to the whole focal geometry.
- Parameters
-
§ translate()
void entity::EditableWire::translate |
( |
double |
d | ) |
|
|
protected |
A method to translate the focal geometry along the center line of camera pose wire.
- Parameters
-
d | is the new distance between the camera eye and the new position of the focal geometry. The method also updates the new length of the focal geometry since it is based on the distance from an eye. |
§ unpick()
void entity::EditableWire::unpick |
( |
| ) |
|
A method to set up the selected geometry to unselected default color.
§ unselect()
void entity::EditableWire::unselect |
( |
| ) |
|
A method to set up defult colors for all the geometries.
§ updateGeometry()
void entity::EditableWire::updateGeometry |
( |
osg::Geometry * |
geom | ) |
|
|
protected |
A method to update geometries after new colors are assigned.
The documentation for this class was generated from the following files: