#include <Matrix4.h>
Definition at line 26 of file Matrix4.h.
[inline]
[inline]
[inline]
[inline]
sets the matrix so all items are the given constant value.
Definition at line 128 of file Matrix4.C.
References mat.
clears the matrix (resets it to identity).
Definition at line 118 of file Matrix4.C.
References mat.
Referenced by SpaceballTracker::do_start, MobileTracker::do_start, dodecahedron, Timestep::get_transform_from_cell, Matrix4, measure_pbc_neighbors, Displayable::recalc_mat, VRJugglerDisplayDevice::render, FreeVRDisplayDevice::render, CaveDisplayDevice::render, Displayable::reset_transformation, SensorConfig::SensorConfig, OpenGLRenderer::set_persp, Displayable::set_rot, OpenGLRenderer::setup_initial_opengl_state, POV3DisplayDevice::trimesh_c4n3v3, POV3DisplayDevice::trimesh_c4u_n3b_v3f, POV3DisplayDevice::tristrip, SpaceballTracker::update, VRPNTracker::update, FreeVRTracker::update, CaveTracker::update, MobileTracker::update, and VMDTracker::VMDTracker.
inverts the matrix, that is, the inverse of the rotation, the inverse of the scaling, and the opposite of the translation vector. returns 0 if there were no problems, -1 if the matrix is singular.
Definition at line 136 of file Matrix4.C.
Referenced by Tool::dograb, PickModeForce::get_force, get_transform_to_orthonormal_cell, measure_pbc_neighbors, myfit3, PickModeMove::pick_molecule_move, vmd_measure_inverse, and VolumetricData::voxel_coord_from_cartesian_coord.
replaces this matrix with the given one.
Definition at line 220 of file Matrix4.C.
References mat.
Referenced by Matrix4, measure_pbc_neighbors, operator=, VMDTracker::orientation, VRJugglerTracker::update, SpaceballTracker::update, and MobileTracker::update.
This subroutine defines a viewing transformation with the eye at point (vx,vy,vz) looking at the point (px,py,pz). Twist is the right-hand rotation about this line. The resultant matrix is multiplied with the top of the transformation stack and then replaces it. Precisely, lookat does: lookat=trans(-vx,-vy,-vz)*rotate(theta,y)*rotate(phi,x)*rotate(-twist,z).
Definition at line 364 of file Matrix4.C.
References constant, mat, multmatrix, rot, and translate.
premultiply the matrix by the given matrix, this->other * this.
Definition at line 225 of file Matrix4.C.
References mat.
Referenced by Displayable::add_rot, convert_endpoints_to_matrix, RotateTool::do_event, Tool::dograb, DisplayDevice::find_pbc_images, get_transform_to_orthonormal_cell, lookat, measure_fit, measure_pbc_neighbors, myfit3, VMDTracker::orientation, RotateTool::orientation, Displayable::recalc_mat, VRJugglerDisplayDevice::render, FreeVRDisplayDevice::render, CaveDisplayDevice::render, rot, scale, OpenGLRenderer::set_persp, translate, SpaceballTracker::update, and MobileTracker::update.
multiplies a 3D norm (first arg) by the Matrix, returns in second arg.
Definition at line 72 of file Matrix4.C.
References mat.
Referenced by multplaneeq3d, OptiXRenderer::render_to_videostream, OptiXRenderer::ring_array_color, HMDMgr::rot_basis_quat, HMDMgr::rot_point_quat, OSPRayRenderer::tricolor_list, OSPRay2Renderer::tricolor_list, OptiXRenderer::tricolor_list, ANARIRender::tricolor_list, POV3DisplayDevice::trimesh_c4n3v3, OSPRayRenderer::trimesh_c4n3v3, OSPRay2Renderer::trimesh_c4n3v3, OptiXRenderer::trimesh_c4n3v3, ANARIRender::trimesh_c4n3v3, POV3DisplayDevice::trimesh_c4u_n3b_v3f, OSPRayRenderer::trimesh_c4u_n3b_v3f, OSPRay2Renderer::trimesh_c4u_n3b_v3f, OptiXRenderer::trimesh_c4u_n3b_v3f, ANARIRender::trimesh_c4u_n3b_v3f, OSPRayRenderer::trimesh_c4u_n3f_v3f, OSPRay2Renderer::trimesh_c4u_n3f_v3f, OptiXRenderer::trimesh_c4u_n3f_v3f, ANARIRender::trimesh_c4u_n3f_v3f, OSPRayRenderer::trimesh_n3b_v3f, OSPRay2Renderer::trimesh_n3b_v3f, OptiXRenderer::trimesh_n3b_v3f, ANARIRender::trimesh_n3b_v3f, OSPRayRenderer::trimesh_n3f_v3f, OSPRay2Renderer::trimesh_n3f_v3f, OptiXRenderer::trimesh_n3f_v3f, ANARIRender::trimesh_n3f_v3f, POV3DisplayDevice::tristrip, OSPRayRenderer::tristrip, OSPRay2Renderer::tristrip, OptiXRenderer::tristrip, LibTachyonDisplayDevice::tristrip, and ANARIRender::tristrip.
multiplies a 3D texture plane equation by the Matrix.
Definition at line 89 of file Matrix4.C.
References multnorm3d.
multiplies a 3D point (first arg) by the Matrix, returns in second arg.
Definition at line 35 of file Matrix4.C.
References mat.
Referenced by compute_pbcminmax, OSPRayRenderer::cylinder_array, OSPRay2Renderer::cylinder_array, OptiXRenderer::cylinder_array, ANARIRender::cylinder_array, OSPRayRenderer::cylinder_array_color, OSPRay2Renderer::cylinder_array_color, OptiXRenderer::cylinder_array_color, ANARIRender::cylinder_array_color, PinchTool::do_event, GrabTool::do_event, dodecahedron, Tool::dograb, PickModeForce::get_force, measure_fit, measure_move, measure_pbc_neighbors, multpointarray_3d, myfit3, normal_atom_coord, GeometryMol::normal_atom_coord, PickModeCenter::pick_molecule_end, PickModeMove::pick_molecule_move, Stage::pick_move, Axes::pick_move, OptiXRenderer::render_to_videostream, OptiXRenderer::ring_array_color, Scene::rotate_light, OSPRayRenderer::sphere_array, OSPRay2Renderer::sphere_array, OptiXRenderer::sphere_array, ANARIRender::sphere_array, OSPRayRenderer::sphere_array_color, OSPRay2Renderer::sphere_array_color, OptiXRenderer::sphere_array_color, ANARIRender::sphere_array_color, Tool::target, text_cmd_mol, trans_overlap, OSPRayRenderer::tricolor_list, OSPRay2Renderer::tricolor_list, OptiXRenderer::tricolor_list, ANARIRender::tricolor_list, POV3DisplayDevice::trimesh_c4n3v3, OSPRayRenderer::trimesh_c4n3v3, OSPRay2Renderer::trimesh_c4n3v3, OptiXRenderer::trimesh_c4n3v3, ANARIRender::trimesh_c4n3v3, POV3DisplayDevice::trimesh_c4u_n3b_v3f, OSPRayRenderer::trimesh_c4u_n3b_v3f, OSPRay2Renderer::trimesh_c4u_n3b_v3f, OptiXRenderer::trimesh_c4u_n3b_v3f, ANARIRender::trimesh_c4u_n3b_v3f, OSPRayRenderer::trimesh_c4u_n3f_v3f, OSPRay2Renderer::trimesh_c4u_n3f_v3f, OptiXRenderer::trimesh_c4u_n3f_v3f, ANARIRender::trimesh_c4u_n3f_v3f, OSPRayRenderer::trimesh_n3b_v3f, OSPRay2Renderer::trimesh_n3b_v3f, OptiXRenderer::trimesh_n3b_v3f, ANARIRender::trimesh_n3b_v3f, OSPRayRenderer::trimesh_n3f_v3f, OSPRay2Renderer::trimesh_n3f_v3f, OptiXRenderer::trimesh_n3f_v3f, ANARIRender::trimesh_n3f_v3f, OptiXRenderer::trimesh_v3f, POV3DisplayDevice::tristrip, OSPRayRenderer::tristrip, OSPRay2Renderer::tristrip, OptiXRenderer::tristrip, LibTachyonDisplayDevice::tristrip, ANARIRender::tristrip, Tool::tug, VRJugglerTracker::update, and VolumetricData::voxel_coord_from_cartesian_coord.
multiplies a 4D point (first arg) by the Matrix, returns in second arg.
Definition at line 109 of file Matrix4.C.
References mat.
Referenced by Displayable::change_center, and text_cmd_mol.
multiplies a 3D point array (2nd arg) by the Matrix, returns in 3rd arg.
Definition at line 60 of file Matrix4.C.
References multpoint3d.
[inline]
performs a left-handed rotation around an axis (char == 'x', 'y', or 'z').
Definition at line 241 of file Matrix4.C.
References DEGTORAD, mat, and multmatrix.
Referenced by Displayable::add_rot, convert_endpoints_to_matrix, dodecahedron, lookat, myfit3, rotate_axis, Scene::rotate_light, Displayable::set_rot, transvec, transvec, transvecinv, transvecinv, VRJugglerTracker::update, SpaceballTracker::update, FreeVRTracker::update, CaveTracker::update, and MobileTracker::update.
apply a rotation around the given vector; angle in radians.
Definition at line 273 of file Matrix4.C.
References RADTODEG, rot, transvec, and transvecinv.
Referenced by do_density_rotate, do_rotate, dodecahedron, obj_transabout, OptiXRenderer::render_to_videostream, Symmetry::score_axis, Symmetry::score_plane, and Symmetry::score_rotary_reflection.
[inline]
performs scaling.
Definition at line 307 of file Matrix4.C.
References mat, multmatrix, and z.
Referenced by Displayable::change_center, molinfo_get, Displayable::recalc_mat, scale, Symmetry::score_inversion, Symmetry::score_plane, Symmetry::score_rotary_reflection, FileRenderer::super_scale, POV3DisplayDevice::trimesh_c4n3v3, POV3DisplayDevice::trimesh_c4u_n3b_v3f, and POV3DisplayDevice::tristrip.
[inline]
performs a translation.
Definition at line 298 of file Matrix4.C.
References mat, multmatrix, and z.
Referenced by convert_endpoints_to_matrix, get_transform_to_orthonormal_cell, Timestep::get_transforms, lookat, measure_fit, molinfo_get, myfit2, myfit3, Displayable::recalc_mat, Symmetry::score_axis, Symmetry::score_inversion, Symmetry::score_plane, Symmetry::score_rotary_reflection, Tool::target, and translate.
transposes the matrix.
Definition at line 207 of file Matrix4.C.
References mat.
Referenced by Tool::tug.
apply a rotation such that 'x' is brought along the given vector.
Definition at line 280 of file Matrix4.C.
References length, RADTODEG, rot, and z.
Referenced by obj_transvec, and rotate_axis.
apply a rotation such that the given vector is brought along 'x'.
Definition at line 289 of file Matrix4.C.
References length, RADTODEG, rot, and z.
Referenced by obj_transvecinv, and rotate_axis.
the matrix itself.
Definition at line 33 of file Matrix4.h.
Referenced by atomselect_move, compute_pbcminmax, constant, CmdRotMat::create_text, OSPRayDisplayDevice::cylinder, OSPRay2DisplayDevice::cylinder, OptiXDisplayDevice::cylinder, do_density_rotate, RotateTool::do_event, PrintTool::do_event, Tool::dograb, Timestep::get_transform_from_cell, M_VRJapp::getWandRotMat, handle_vrpn_tracker, identity, inverse, VrmlDisplayDevice::load, OpenGLRenderer::loadmatrix, loadmatrix, lookat, Matrix4, measure_fit, measure_move, measure_pbc2onc, measure_pbc_neighbors, molinfo_get, molinfo_set, OpenGLRenderer::multmatrix, multmatrix, multnorm3d, multpoint3d, multpoint4d, obj_transabout, obj_transvec, obj_transvecinv, ortho, ortho2, print_Matrix4, py_fit, py_get_rotation, py_move, PSDisplayDevice::render, FileRenderer::render, rot, HMDMgr::rot_basis_quat, HMDMgr::rot_point_quat, scale, FileRenderer::scale_factor, OptiXDisplayDevice::sphere, text_cmd_mol, text_cmd_tool, trans_from_rotate, translate, transpose, OSPRayDisplayDevice::triangle, OSPRay2DisplayDevice::triangle, OptiXDisplayDevice::triangle, ANARIDisplayDevice::triangle, POV3DisplayDevice::trimesh_c4n3v3, POV3DisplayDevice::trimesh_c4u_n3b_v3f, POV3DisplayDevice::tristrip, vmd_measure_fit, vmd_measure_inverse, vmd_measure_pbc2onc_transform, vmd_measure_pbc_neighbors, vmd_measure_symmetry, vmd_measure_trans_overlap, vmd_volmap_ils, and window.