#include <Iguana/GLBrowsers/interface/Ig3DCameraUtils.h>
Public Member Functions | |
SbVec3f | getFocalPoint (void) const |
Ig3DCameraUtils (void) | |
void | setCamera (SoSFRotation *orientation, SoSFVec3f *position, SoSFFloat *focalDistance) |
void | setFocalPoint (const SbVec3f &focalPoint) |
Private Attributes | |
SoSFFloat * | m_focalDistance |
SoSFRotation * | m_orientation |
SoSFVec3f * | m_position |
Definition at line 21 of file Ig3DCameraUtils.h.
Ig3DCameraUtils::Ig3DCameraUtils | ( | void | ) |
Definition at line 19 of file Ig3DCameraUtils.cc.
00020 : m_orientation (0), 00021 m_position (0), 00022 m_focalDistance (0) 00023 {}
SbVec3f Ig3DCameraUtils::getFocalPoint | ( | void | ) | const |
Definition at line 38 of file Ig3DCameraUtils.cc.
References ASSERT, dir, m_focalDistance, m_orientation, and m_position.
Referenced by Ig3DCameraRotControl::applyValue().
00039 { 00040 ASSERT (m_orientation); 00041 ASSERT (m_position); 00042 ASSERT (m_focalDistance); 00043 00044 SbVec3f dir; 00045 m_orientation->getValue ().multVec (SbVec3f (0, 0, -1), dir); 00046 return m_position->getValue () + m_focalDistance->getValue () * dir; 00047 }
void Ig3DCameraUtils::setCamera | ( | SoSFRotation * | orientation, | |
SoSFVec3f * | position, | |||
SoSFFloat * | focalDistance | |||
) |
Definition at line 27 of file Ig3DCameraUtils.cc.
References m_focalDistance, m_orientation, and m_position.
Referenced by Ig3DViewpointsCategory::attach(), and Ig3DViewpointsCategory::detach().
00030 { 00031 m_orientation = orientation; 00032 m_position = position; 00033 m_focalDistance = focalDistance; 00034 }
void Ig3DCameraUtils::setFocalPoint | ( | const SbVec3f & | focalPoint | ) |
Definition at line 50 of file Ig3DCameraUtils.cc.
References ASSERT, dir, m_focalDistance, m_orientation, and m_position.
Referenced by Ig3DCameraRotControl::applyValue().
00051 { 00052 ASSERT (m_orientation); 00053 ASSERT (m_position); 00054 ASSERT (m_focalDistance); 00055 00056 SbVec3f dir; 00057 m_orientation->getValue ().multVec (SbVec3f (0, 0, -1), dir); 00058 *m_position = fp - m_focalDistance->getValue () * dir; 00059 }
SoSFFloat* Ig3DCameraUtils::m_focalDistance [private] |
Definition at line 39 of file Ig3DCameraUtils.h.
Referenced by getFocalPoint(), setCamera(), and setFocalPoint().
SoSFRotation* Ig3DCameraUtils::m_orientation [private] |
Definition at line 37 of file Ig3DCameraUtils.h.
Referenced by getFocalPoint(), setCamera(), and setFocalPoint().
SoSFVec3f* Ig3DCameraUtils::m_position [private] |
Definition at line 38 of file Ig3DCameraUtils.h.
Referenced by getFocalPoint(), setCamera(), and setFocalPoint().