AxisOp is the base class for all the 3D objects. It simply contains a transform matrix. More...
Inherits DD::Image::Op, and DD::Image::LookAt.
Inherited by DD::Image::CameraOp.
Public Member Functions | |
AxisOp (Node *, int defaultLookAtAxis=kAxisZPlus) | |
int | minimum_inputs () const |
int | maximum_inputs () const |
virtual const char * | input_label (int input, char *) const |
virtual Op * | lookat_input () const |
override from LookAt to add the look at pipe to input 1 | |
virtual bool | lookAtEnabled () const |
by default all the axis look at pipe is disabled | |
bool | test_input (int, Op *) const |
AxisOp * | input0 () const |
int | display3d () const |
bool | selectable () const |
void | display3d (int v) |
void | selectable (bool v) |
virtual bool | isGuiInteractive (Axis_KnobI::Transformation knob) const |
return true if a particular knob transformation is modifiable by user interaction in gui | |
Axis_KnobI * | getAxis () |
const char * | node_shape () const |
unsigned | node_color () const |
void | knobs (Knob_Callback) |
HandlesMode | doAnyHandles (ViewerContext *) |
void | build_handles (ViewerContext *) |
void | draw_handle (ViewerContext *) |
int | display3d () |
const Matrix4 & | local () const |
void | matrix (const Matrix4 &m) |
const Matrix4 & | matrix () const |
const Matrix4 & | imatrix () |
virtual void | matrixAt (const DD::Image::OutputContext &context, DD::Image::Matrix4 &matrix) const |
const char * | Class () const |
const char * | node_help () const |
virtual void | print_info (std::ostream &o) const |
Static Public Attributes | |
static const Description | description |
Protected Member Functions | |
void | _validate (bool for_real) |
Protected Attributes | |
Matrix4 | localtransform_ |
Local matrix that Axis_Knob fills in. | |
Matrix4 | local_ |
Matrix4 | matrix_ |
Local matrix after look at performed. | |
Matrix4 | imatrix_ |
Inverse object matrix. | |
bool | inversion_updated |
Whether imatrix_ is valid. | |
Axis_KnobI * | axis_knob |
reference to the transformation knob | |
WorldMatrixProvider * | _worldMatrixProvider |
int | display3d_ |
GUI display setting. | |
bool | selectable_ |
GUI selectable checkmark. | |
Friends | |
std::ostream & | operator<< (std::ostream &, const AxisOp &) |
AxisOp is the base class for all the 3D objects. It simply contains a transform matrix.
void AxisOp::_validate | ( | bool | for_real | ) | [protected, virtual] |
Validate our parent axis first, then concatenate the local transform with that. If the resulting matrix has changed, update the inversion flag and XYZ vectors.
Reimplemented from DD::Image::Op.
Reimplemented in DD::Image::ComplexLightOp.
References imatrix(), DD::Image::Op::input0(), inversion_updated, localtransform_, DD::Image::LookAt::lookAt(), lookat_input(), matrix_, and DD::Image::Op::validate().
bool AxisOp::test_input | ( | int | input, |
Op * | op | ||
) | const [virtual] |
Only AxisOp and NULL work.
Reimplemented from DD::Image::Op.
void AxisOp::build_handles | ( | ViewerContext * | ctx | ) | [virtual] |
This default version will always cause draw_handle() to be called when in 3D mode. Subclasses (ie the camera) should replace draw_handle with their own version to draw what they want.
Reimplemented from DD::Image::Op.
References DD::Image::Op::add_draw_handle(), DD::Image::Op::build_input_handles(), DD::Image::Op::build_knob_handles(), display3d_, DD::Image::ViewerContext::expand_bbox(), DD::Image::Op::input0(), DD::Image::ViewerContext::modelmatrix, DD::Image::Op::node_selected(), DD::Image::ViewerContext::transform_mode(), DD::Image::Op::validate(), DD::Image::VIEWER_2D, and DD::Image::ViewerContext::viewer_mode().
void AxisOp::draw_handle | ( | ViewerContext * | ctx | ) | [virtual] |
Draws any geometry attached to this axis. Note that the Axis knob will draw the 3-arrow axis control in the center.
Reimplemented from DD::Image::Op.
Reimplemented in DD::Image::CameraOp, DD::Image::ComplexLightOp, and DD::Image::LightOp.
References DD::Image::ViewerContext::display3d(), display3d_, DD::Image::ViewerContext::draw_lines(), DD::Image::ViewerContext::draw_unpickable_lines(), DD::Image::ViewerContext::fg_color(), DD::Image::gl_text(), DD::Image::glColor(), DD::Image::ViewerContext::icon_size(), DD::Image::ViewerContext::node_color(), DD::Image::Op::node_selected(), DD::Image::Op::print_name(), and selectable_.
const Matrix4 & AxisOp::imatrix | ( | ) |
Return the inverse object matrix. If the inversion has been marked invalid, calculate it now, otherwise return the current one.
References DD::Image::Matrix4::determinant(), imatrix_, DD::Image::Matrix4::inverse(), inversion_updated, DD::Image::Matrix4::makeIdentity(), and matrix_.
Referenced by _validate().
std::ostream& operator<< | ( | std::ostream & | , |
const AxisOp & | |||
) | [friend] |
Not implemented in the library but you can define it
Matrix4 DD::Image::AxisOp::matrix_ [protected] |
Local matrix after look at performed.
Object matrix - local&parent
Referenced by _validate(), and imatrix().