Definition at line 24 of file base_camera.
◆ base_camera() [1/2]
tools::sg::base_camera::base_camera |
( |
| ) |
|
|
inlineprotected |
Definition at line 100 of file base_camera.
112 mem::increment(s_class().c_str());
◆ ~base_camera()
virtual tools::sg::base_camera::~base_camera |
( |
| ) |
|
|
inlinevirtual |
Definition at line 117 of file base_camera.
119 mem::decrement(s_class().c_str());
◆ base_camera() [2/2]
tools::sg::base_camera::base_camera |
( |
const base_camera & |
a_from | ) |
|
|
inlineprotected |
Definition at line 123 of file base_camera.
135 mem::increment(s_class().c_str());
◆ _mult_matrix()
void tools::sg::base_camera::_mult_matrix |
( |
matrix_action & |
a_action | ) |
|
|
inlineprotected |
◆ astro_orientation()
void tools::sg::base_camera::astro_orientation |
( |
float |
a_ra, |
|
|
float |
a_dec |
|
) |
| |
|
inline |
◆ direction()
void tools::sg::base_camera::direction |
( |
vec3f & |
a_dir | ) |
const |
|
inline |
◆ dump()
void tools::sg::base_camera::dump |
( |
std::ostream & |
a_out | ) |
|
|
inline |
Definition at line 331 of file base_camera.
332 a_out <<
" znear " <<
znear.
value() << std::endl;
333 a_out <<
" zfar " <<
zfar.
value() << std::endl;
335 a_out <<
" pos " << pos[0] <<
" " << pos[1] <<
" " << pos[2] << std::endl;
◆ event()
virtual void tools::sg::base_camera::event |
( |
event_action & |
a_action | ) |
|
|
inlinevirtual |
◆ get_lrbt()
virtual void tools::sg::base_camera::get_lrbt |
( |
unsigned int |
, |
|
|
unsigned int |
, |
|
|
float & |
, |
|
|
float & |
, |
|
|
float & |
, |
|
|
float & |
|
|
) |
| |
|
pure virtual |
◆ get_matrix()
◆ height_at_focal()
bool tools::sg::base_camera::height_at_focal |
( |
float & |
a_h | ) |
const |
|
inline |
◆ id_orientation()
static const vec4<float>& tools::sg::base_camera::id_orientation |
( |
| ) |
|
|
inlinestaticprotected |
Definition at line 536 of file base_camera.
536 {
static const vec4<float> s_v(0,0,0,1);
return s_v;}
◆ is_type_ortho()
bool tools::sg::base_camera::is_type_ortho |
( |
| ) |
const |
|
inline |
◆ is_visible()
virtual void tools::sg::base_camera::is_visible |
( |
visible_action & |
a_action | ) |
|
|
inlinevirtual |
◆ look_at()
bool tools::sg::base_camera::look_at |
( |
const vec3f & |
a_dir, |
|
|
const vec3f & |
a_up |
|
) |
| |
|
inline |
Definition at line 298 of file base_camera.
301 vec3f x;y.cross(z,x);
307 if(!x.normalize())
return false;
308 if(!y.normalize())
return false;
309 if(!z.normalize())
return false;
314 rot.set_value(0,0,x[0]);
315 rot.set_value(1,0,x[1]);
316 rot.set_value(2,0,x[2]);
318 rot.set_value(0,1,y[0]);
319 rot.set_value(1,1,y[1]);
320 rot.set_value(2,1,y[2]);
322 rot.set_value(0,2,z[0]);
323 rot.set_value(1,2,z[1]);
324 rot.set_value(2,2,z[2]);
◆ near_height()
virtual float tools::sg::base_camera::near_height |
( |
| ) |
const |
|
pure virtual |
◆ node_desc_fields()
virtual const desc_fields& tools::sg::base_camera::node_desc_fields |
( |
| ) |
const |
|
inlinevirtual |
◆ operator=()
Definition at line 139 of file base_camera.
140 parent::operator=(a_from);
141 znear = a_from.znear;
148 focal = a_from.focal;
◆ operator==()
bool tools::sg::base_camera::operator== |
( |
const base_camera & |
a_from | ) |
const |
|
inlineprotected |
Definition at line 153 of file base_camera.
154 if(
znear!=a_from.znear)
return false;
155 if(
zfar!=a_from.zfar)
return false;
156 if(
position!=a_from.position)
return false;
◆ pane_to()
void tools::sg::base_camera::pane_to |
( |
float |
a_x, |
|
|
float |
a_y, |
|
|
float |
a_z |
|
) |
| |
|
inline |
Definition at line 258 of file base_camera.
265 vec3f side;dir.cross(up,side);
267 vec3f d(a_x,a_y,a_z);
270 vec3f pos =
position.
value() + side * (side.dot(d)) + up * (up.dot(d));
◆ pick()
virtual void tools::sg::base_camera::pick |
( |
pick_action & |
a_action | ) |
|
|
inlinevirtual |
◆ render()
virtual void tools::sg::base_camera::render |
( |
render_action & |
a_action | ) |
|
|
inlinevirtual |
Reimplemented from tools::sg::node.
Definition at line 74 of file base_camera.
80 a_action.load_proj_matrix(a_action.projection_matrix());
81 a_action.load_model_matrix(a_action.model_matrix());
◆ rotate_around_direction()
void tools::sg::base_camera::rotate_around_direction |
( |
float |
a_delta | ) |
|
|
inline |
◆ rotate_around_up()
void tools::sg::base_camera::rotate_around_up |
( |
float |
a_delta | ) |
|
|
inline |
◆ rotate_around_x()
void tools::sg::base_camera::rotate_around_x |
( |
float |
a_delta | ) |
|
|
inline |
◆ rotate_around_x_at_focal()
void tools::sg::base_camera::rotate_around_x_at_focal |
( |
float |
a_delta | ) |
|
|
inline |
◆ rotate_around_y_at_focal()
void tools::sg::base_camera::rotate_around_y_at_focal |
( |
float |
a_delta | ) |
|
|
inline |
◆ rotate_around_z()
void tools::sg::base_camera::rotate_around_z |
( |
float |
a_delta | ) |
|
|
inline |
◆ rotate_around_z_at_focal()
void tools::sg::base_camera::rotate_around_z_at_focal |
( |
float |
a_delta | ) |
|
|
inline |
◆ rotate_to_dir()
void tools::sg::base_camera::rotate_to_dir |
( |
const vec3f & |
a_dir | ) |
|
|
inline |
Definition at line 226 of file base_camera.
236 vec3f side;dir.cross(up,side);
237 vec3f v = side * (side.dot(a_dir)) + dir * (dir.dot(a_dir));
◆ set_state()
void tools::sg::base_camera::set_state |
( |
matrix_action & |
a_action | ) |
|
|
inlineprotected |
Definition at line 521 of file base_camera.
522 state& _state = a_action.state();
524 _state.m_camera_znear =
znear;
525 _state.m_camera_zfar =
zfar;
530 _state.m_proj = a_action.projection_matrix();
◆ translate_along_dir()
void tools::sg::base_camera::translate_along_dir |
( |
float |
a_delta | ) |
|
|
inline |
◆ translate_along_side()
void tools::sg::base_camera::translate_along_side |
( |
float |
a_delta | ) |
|
|
inline |
Definition at line 274 of file base_camera.
279 vec3f side;dir.cross(up,side);
◆ translate_along_up()
void tools::sg::base_camera::translate_along_up |
( |
float |
a_delta | ) |
|
|
inline |
◆ type()
virtual camera_type tools::sg::base_camera::type |
( |
| ) |
const |
|
pure virtual |
◆ update_motion()
bool tools::sg::base_camera::update_motion |
( |
int |
a_move | ) |
|
|
inline |
◆ update_sg()
void tools::sg::base_camera::update_sg |
( |
std::ostream & |
a_out | ) |
|
|
inlineprotected |
Definition at line 475 of file base_camera.
497 a_out <<
"update_sg :"
498 <<
" get orientation inverse failed."
◆ zoom()
virtual void tools::sg::base_camera::zoom |
( |
float |
| ) |
|
|
pure virtual |
◆ da
sf<float> tools::sg::base_camera::da |
◆ ds
sf<float> tools::sg::base_camera::ds |
◆ dx
sf<float> tools::sg::base_camera::dx |
◆ focal
sf<float> tools::sg::base_camera::focal |
◆ m_lrbt
◆ m_proj
mat4f tools::sg::base_camera::m_proj |
|
protected |
◆ m_tmp
float tools::sg::base_camera::m_tmp[16] |
|
protected |
◆ orientation
sf_rotf tools::sg::base_camera::orientation |
◆ position
sf_vec3f tools::sg::base_camera::position |
◆ zfar
sf<float> tools::sg::base_camera::zfar |
◆ znear
sf<float> tools::sg::base_camera::znear |
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/sg/base_camera
#define TOOLS_FIELD_DESC_NODE_CLASS(a__class)
#define TOOLS_ARG_FIELD_DESC(a__field)